-- world and environment setup file

----------- basic world-init stuff ----------- 

worldInitData = WorldInitData(128)
worldInitData.WorldSeed = 1491437053
worldInitData.ColourMapRegions = true
worldInitData.CloudLayerHeight = 5.5
worldInitData.EnableCloudLayer = true
worldInitData.EnableRain = true
worldInitData.FullScreen = true

----------- terrains ----------- 

-- 0	0	0	0
-- 0	0	0	1
-- 0	0	1	0
-- 0	0	1	1
-- 0	1	0	0
-- 0	1	0	1
-- 0	1	1	0
-- 0	1	1	1
-- 1	0	0	0
-- 1	0	0	1
-- 1	0	1	0
-- 1	0	1	1
-- 1	1	0	0
-- 1	1	0	1
-- 1	1	1	0
-- 1	1	1	1

-- WA
-- DS
-- LE
-- MC

-- soilASEC
-- soilASEM
-- soilASLC
-- soilASLM
-- soilADEC
-- soilADEM
-- soilADLC
-- soilADLM
-- soilWSEC
-- soilWSEM
-- soilWDEC
-- soilWDEM

-- soilASEC;soilASEM;soilASLC;soilASLM;soilADEC;soilADEM;soilADLC;soilADLM;soilWSEC;soilWSEM;soilWDEC;soilWDEM

tpd = TerrainPaintData("soilASLM")
tpd.AudioCue = "grass"
tpd:AddColor("terr_grass1")
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("soilADLM")
tpd.AudioCue = "grass"
tpd:AddColor("terr_grass2")
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("soilASLC")
tpd.AudioCue = "highland"
tpd:AddColor("terr_high1")
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("soilADLC")
tpd.AudioCue = "highland"
tpd:AddColor("terr_high2")
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("soilWSLM")
tpd.AudioCue = "grass"
tpd:AddColor("terr_grass1")
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("soilWDLM")
tpd.AudioCue = "grass"
tpd:AddColor("terr_grass1")
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("soilWSLC")
tpd.AudioCue = "highland"
tpd:AddColor("terr_high1")
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("soilWDLC")
tpd.AudioCue = "highland"
tpd:AddColor("terr_high1")
worldInitData:AddTerrainPaintData(tpd)

----

tpd = TerrainPaintData("snow1")
tpd.RoadPathfindingPenaltyFactor = 50
tpd:AddColor("terr_snow1")
tpd.AudioCue = "snow"
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("snow2")
tpd.RoadPathfindingPenaltyFactor = 50
tpd:AddColor("terr_snow2")
tpd.AudioCue = "snow"
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("bare")
tpd.AudioCue = "highland"
tpd.RoadPathfindingPenaltyFactor = -1
tpd.IsBare = true
tpd:AddColor("terr_bare1")
tpd:AddColor("terr_bare1")
tpd:AddColor("terr_bare2")
tpd:AddColor("terr_bare1")
tpd:AddColor("terr_bare2")
tpd:AddColor("terr_bare2")
tpd:AddColor("terr_bare1")
tpd:AddColor("terr_bare1")
tpd:AddColor("terr_bare2")
tpd:AddColor("terr_bare1")
tpd:AddColor("terr_bare2")
--tpd:AddColor(144,128,96)
--tpd:AddColor(120,100,70)
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("ocean")
tpd.RoadPathfindingPenaltyFactor = -1
tpd.IsBare = true
tpd:AddColor("terr_ocean")
tpd.AudioCue = "ocean"
tpd.IsWater = true
tpd.MaxHeight = 0
tpd.MaxSlope = 0
worldInitData:AddTerrainPaintData(tpd)

tpd = TerrainPaintData("beach")
tpd.RoadPathfindingPenaltyFactor = 50
tpd:AddColor("terr_beach")
tpd.MinHeight = 0.0
tpd.MaxHeight = 0.1
tpd.MaxSlope = 10 -- madeup shallow angle
tpd.TemperatureModifier = 0;
worldInitData:AddTerrainPaintData(tpd)

----------- times of day ----------- 

worldInitData:AddTimeOfDay(TimeOfDay("midnight0", "midnight", "midnight", 0))
worldInitData:AddTimeOfDay(TimeOfDay("postMidnight", "midnight", 4.5))
worldInitData:AddTimeOfDay(TimeOfDay("dawn1", "predawn", 5.25))
worldInitData:AddTimeOfDay(TimeOfDay("dawn2", "dawn", 6))
worldInitData:AddTimeOfDay(TimeOfDay("dawn3", "am", 7.5))
worldInitData:AddTimeOfDay(TimeOfDay("preNoon", "noon", 10))
worldInitData:AddTimeOfDay(TimeOfDay("noon", "noon", 12))

-- all the post-12.00 times are calculated by reflecting the morning times
worldInitData:AddTimeOfDay(TimeOfDay("postNoon", "noon", 14))
worldInitData:AddTimeOfDay(TimeOfDay("dusk1", "pm", 16))
worldInitData:AddTimeOfDay(TimeOfDay("dusk2", "dusk", 18))
worldInitData:AddTimeOfDay(TimeOfDay("dusk3", "evening", 20))
worldInitData:AddTimeOfDay(TimeOfDay("preMidnight", "midnight", 21))
worldInitData:AddTimeOfDay(TimeOfDay("midnight24", "midnight", "midnight", 24))

----------- types of weather ----------- 

-- weather = Weather("fine")
-- worldInitData:AddWeather(weather)

-- weather = Weather("cloudy")
-- worldInitData:AddWeather(weather)



----------- pass the finished data to the app -----------

SetWorldInitData(worldInitData)