world_regrowth_pp/modmain.lua

26 lines
617 B
Lua
Raw Normal View History

2018-01-23 04:35:36 +00:00
if GLOBAL.STRINGS.NAMES.MIGRATION_PORTAL then
AddPrefabPostInit("world", function(inst)
if inst.ismastersim then
inst:AddComponent("natural_regrowth")
end
end)
else
AddPrefabPostInit("forest", function(inst)
if inst.ismastersim then
inst:AddComponent("natural_regrowth")
end
end)
end
AddComponentPostInit("natural_regrowth", function(component)
component:RegisterRegrowth("grass", "grass")
end)
AddComponentPostInit("natural_regrowth", function(component)
component:RegisterRegrowth("evergreen", "evergreen")
end)
--"forest" for the overworld
--"cave" for the caves.
--No more "world" prefab.