饥荒联机版

饥荒联机版

Fix Multiplayer
Gonz008 2015 年 7 月 23 日 上午 9:34
Changes to Coding I'm prolly gonna make
in the modmain.iua I was wondering if I got rid of the "deciduoustrees", "evergreens" from this list if it would stop them from respawning constantly?


--Renew world (blueprint in case of old bell blueprint, flowers because they don't regrow fast enough)
local renewLimitedResources = GetModConfigData("RENEWLIMITEDRESOURCES")
if renewLimitedResources ~= 0 then
local renew_short = { "berrybush", "carrot_planted", "deciduoustrees", "evergreens", "flint", "flower", "grass", "rock1", "rock2", "sapling" }
for k, prefab in ipairs(renew_short) do --Items lying on the ground that are frequently harvested and very basic resources that should always be available
AddPrefabPostInit(prefab, function(inst)
if GLOBAL.TheWorld.ismastersim then
inst:AddComponent("renewable")
inst.components.renewable.delay = math.ceil(0.5*renewLimitedResources)
end
end)
end





Same thing here with the spiderdens:



--Defaults to this
end
end)
end
local renew_long = { "houndmound", "molehill", "pigtorch", "spiderden", "spiderhole", "tallbirdnest", "wasphive" }
for k, prefab in ipairs(renew_long) do --Mainly mob spawning structures (that are destroyed for a reason)
AddPrefabPostInit(prefab, function(inst)
if GLOBAL.TheWorld.ismastersim then
inst:AddComponent("renewable")
inst.components.renewable.delay = math.ceil(2*renewLimitedResources)
end
end)
end



TL;DR: if i remove anything from the renew list, would it stop respawning apart from worldgen?
< >
正在显示第 1 - 1 条,共 1 条留言
icke  [开发者] 2015 年 7 月 27 日 上午 2:42 
Sorry for slow reply, apparently steam doesn't notify me if someone makes a new discussion. Anyway, removing those from the list should stop them from respawning. (Except for those that have already been destroyed and are queued for respawning, but newly destroyed ones won't respawn.)
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50