安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题






do lureplants alery in a world are affected by this mod or do they just stay at default?
local old_KillAllMinions = inst.components.minionspawner.KillAllMinions
inst.components.minionspawner.KillAllMinions = function(self)
if self.block_KillAllMinions ~= nil then
self.block_KillAllMinions = nil
return
end
return old_KillAllMinions(self)
end
--hook OnPicked
local old_OnPicked = inst.components.shelf.ontakeitemfn
inst.components.shelf.ontakeitemfn = function(inst, taker, itemonshelf, ...)
if taker and taker:HasTag("naturescientist") then
inst.components.minionspawner.block_KillAllMinions = true --Prevent lure plant resetting
old_OnPicked(inst, taker, itemonshelf, ...)
--wake up NOW!
if inst.task then
local TryRevealBait = inst.task.fn
inst.task:Cancel() --removing (it could happen in 1 second)
--change time: base + delta
inst.task = inst:DoTaskInTime(math.random() * delta + base, TryRevealBait)
end
else
return old_OnPicked(inst, taker, itemonshelf, ...)
end
end
end)
local function SelectLure(inst)
...
end
to something like:
local function SelectLure(inst)
...
if #lures >= 1 then
return lures[math.random(#lures)]
elseif inst.components.minionspawner.numminions * 2 >= inst.components.minionspawner.maxminions then
inst.task = DoTaskInTime(<insert time in seconds here>, SpawnMeat)
end
end
end
local function SpawnMeat(inst)
local meat = SpawnPrefab("plantmeat")
inst.components.inventory:GiveItem(meat)
return meat
end
Probably just remove
inst:RemoveEventCallback("onremove", inst._OnLurePerished, inst.lure)
as well as
inst.components.minionspawner.shouldspawn = false
inst.components.minionspawner:KillAllMinions()
in the OnPicked function, and
inst:ListenForEvent("onremove", inst._OnLurePerished, inst.lure)
in the HideBait function,
and possibly remove
inst:ListenForEvent("onremove", inst._OnLurePerished, inst.lure)
In the TryRevealBait function.
May or may not need these
local function OnOpen(inst)
if not inst.components.health:IsDead() then
end
end
local function OnClose(inst)
if not inst.components.health:IsDead() and inst.sg.currentstate.name ~= "transition" then
end
end
Need this later:
inst:AddComponent("container")
inst.components.container:WidgetSetup("lureplant")
inst.components.container.onopenfn = OnOpen
inst.components.container.onclosefn = OnClose
Probably need to comment out any references to the shelf component otherwise it will conflict.
Delete inventory component and replace all references to it with "container"
Some of the similar components have different names, so you need to:
replace inventory.maxslots with container.numslots
replace inventory.itemslots with container.slots
beacause i m lazy for collecting resources over and over
Update: I also made it so you can have it kill the birds immediately while keeping their meat fresh, in case that is what you were looking for.
i hope you remember me,
i subscribed to this mod and its working great!
it really helps alot :)