1 var TILE_CENTERED_HEIGHT_MAP = false;
2 var WATER_LEVEL_CHANGED = false;
7 * Camera location in case there are no player entities.
10 "Position": { "x": 256, "y": 150, "z": 256 },
12 "Declination": 0.523599
19 // Get civ data as array of JSON strings
20 var data = RMS.GetCivData();
21 if (!data || !data.length)
22 throw new Error("InitMapGen: error reading civ data");
24 for (var i = 0; i < data.length; ++i)
26 var civData = JSON.parse(data[i]);
27 g_CivData[civData.Code] = civData;
30 log("Creating new map...");
31 g_Map = new Map(g_MapSettings.Size, g_MapSettings.BaseHeight);
32 initTerrain(g_MapSettings.BaseTerrain);
39 if (!WATER_LEVEL_CHANGED)
40 g_Environment.Water.WaterBody.Height = SEA_LEVEL - 0.1;
43 "entities": g_Map.exportEntityList(),
44 "height": g_Map.exportHeightData(),
45 "seaLevel": SEA_LEVEL,
47 "textureNames": g_Map.IDToName,
48 "tileData": g_Map.exportTerrainTextures(),
50 "Environment": g_Environment