2018-01-23 04:35:36 +00:00
|
|
|
if GLOBAL.STRINGS.NAMES.MIGRATION_PORTAL then
|
2018-01-27 09:23:18 +00:00
|
|
|
-- we have caves
|
|
|
|
AddPrefabPostInit("forest", function(inst)
|
|
|
|
if inst.ismastersim then
|
|
|
|
inst:AddComponent("natural_regrowth")
|
|
|
|
inst:AddComponent("event_regrowth")
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
AddPrefabPostInit("cave", function(inst)
|
2018-01-23 04:35:36 +00:00
|
|
|
if inst.ismastersim then
|
|
|
|
inst:AddComponent("natural_regrowth")
|
2018-01-23 10:13:21 +00:00
|
|
|
inst:AddComponent("event_regrowth")
|
2018-01-23 04:35:36 +00:00
|
|
|
end
|
|
|
|
end)
|
|
|
|
else
|
2018-01-27 09:23:18 +00:00
|
|
|
-- only overworld
|
2018-01-23 10:13:21 +00:00
|
|
|
AddPrefabPostInit("world", function(inst)
|
2018-01-23 04:35:36 +00:00
|
|
|
if inst.ismastersim then
|
|
|
|
inst:AddComponent("natural_regrowth")
|
2018-01-23 10:13:21 +00:00
|
|
|
inst:AddComponent("event_regrowth")
|
2018-01-23 04:35:36 +00:00
|
|
|
end
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
2018-01-27 09:23:18 +00:00
|
|
|
local natural =
|
|
|
|
{
|
2018-01-28 00:44:49 +00:00
|
|
|
berrybush = 1451,
|
|
|
|
berrybush2 = 1429,
|
|
|
|
berrybush_juicy = 1429,
|
2018-01-27 09:23:18 +00:00
|
|
|
carrot_planted = 240,
|
2018-01-28 00:44:49 +00:00
|
|
|
evergreen = 251,
|
|
|
|
deciduoustree = 251,
|
2018-01-27 09:23:18 +00:00
|
|
|
marsh_tree = 480,
|
2018-01-28 00:44:49 +00:00
|
|
|
twiggytree = 491,
|
|
|
|
flower = 229,
|
|
|
|
grass = 229,
|
|
|
|
blue_mushroom = 251,
|
2018-01-27 09:23:18 +00:00
|
|
|
red_mushroom = 240,
|
|
|
|
green_mushroom = 240,
|
|
|
|
reeds = 480,
|
|
|
|
sapling = 240,
|
|
|
|
marsh_bush = 480,
|
2018-01-28 00:44:49 +00:00
|
|
|
cactus = 479,
|
|
|
|
rock1 = 229,
|
2018-01-27 09:23:18 +00:00
|
|
|
rock2 = 240,
|
2018-01-28 00:44:49 +00:00
|
|
|
rock_flintless = 251,
|
2018-01-27 09:23:18 +00:00
|
|
|
rock_moon = 480,
|
2018-01-28 00:44:49 +00:00
|
|
|
stalagmite = 489,
|
2018-01-27 09:23:18 +00:00
|
|
|
stalagmite_tall = 240,
|
|
|
|
}
|
|
|
|
|
|
|
|
local event =
|
|
|
|
{
|
2018-01-28 00:44:49 +00:00
|
|
|
flower_evil = 480,
|
|
|
|
marbletree= 960,
|
|
|
|
livingtree = 969,
|
|
|
|
mandrake = 969,
|
|
|
|
beehive = 489,
|
|
|
|
wasphive = 969,
|
|
|
|
houndmound = 1449,
|
2018-01-27 09:23:18 +00:00
|
|
|
pighouse = 960,
|
|
|
|
mermhouse = 960,
|
2018-01-28 00:44:49 +00:00
|
|
|
spiderden = 1431,
|
|
|
|
catcoonden = 951,
|
|
|
|
tentacle = 489,
|
|
|
|
rabbithole = 471,
|
|
|
|
fireflies = 471,
|
|
|
|
knight = 1431,
|
|
|
|
bishop = 1431,
|
|
|
|
rook = 1449,
|
|
|
|
knight_nightmare = 1449,
|
2018-01-27 09:23:18 +00:00
|
|
|
bishop_nightmare = 1440,
|
|
|
|
rook_nightmare = 1440,
|
2018-01-28 00:44:49 +00:00
|
|
|
monkeypods = 951,
|
|
|
|
ruins_statue_mage = 969,
|
|
|
|
ruins_statue_mage_nogem = 969,
|
2018-01-27 09:23:18 +00:00
|
|
|
ruins_statue_head = 960,
|
2018-01-28 00:44:49 +00:00
|
|
|
ruins_statue_head_nogem = 951,
|
|
|
|
rabbithouse = 951,
|
2018-01-28 05:43:36 +00:00
|
|
|
slurtlehole = 951,
|
|
|
|
tallbirdnest = 960
|
2018-01-27 09:23:18 +00:00
|
|
|
}
|
|
|
|
|
2018-01-23 04:35:36 +00:00
|
|
|
AddComponentPostInit("natural_regrowth", function(component)
|
2018-01-27 09:23:18 +00:00
|
|
|
for prefab, time in pairs(natural) do
|
2018-01-28 00:44:49 +00:00
|
|
|
if GetModConfigData(prefab) then
|
|
|
|
component:RegisterRegrowth(prefab, prefab, time)
|
|
|
|
end
|
2018-01-27 09:23:18 +00:00
|
|
|
end
|
2018-01-28 00:44:49 +00:00
|
|
|
component:FinishModConfig()
|
2018-01-23 04:35:36 +00:00
|
|
|
end)
|
|
|
|
|
2018-01-23 10:13:21 +00:00
|
|
|
AddComponentPostInit("event_regrowth", function(component)
|
2018-01-27 09:23:18 +00:00
|
|
|
for prefab, time in pairs(event) do
|
2018-01-28 00:44:49 +00:00
|
|
|
if GetModConfigData(prefab) then
|
|
|
|
component:RegisterRegrowth(prefab, prefab, time)
|
|
|
|
end
|
2018-01-27 09:23:18 +00:00
|
|
|
end
|
2018-01-23 10:13:21 +00:00
|
|
|
component:FinishModConfig()
|
2018-01-27 09:23:18 +00:00
|
|
|
end)
|
2018-01-23 04:35:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
--"forest" for the overworld
|
|
|
|
--"cave" for the caves.
|
|
|
|
--No more "world" prefab.
|