Thrance Posted September 8, 2019 Share Posted September 8, 2019 Hello, I encountered a bug while playing with the Hamlet DLC: rabbit hutches are broken in interiors. Bunnymen would spawn once if you are in the same room as the hutch or disappear forever in limbo. Being a modder myself, I made the following fix to the rabbithouse.lua file: Replace: local function Empty(inst) --print(inst, "OnDay") if not inst:HasTag("burnt") then if inst.components.spawner:IsOccupied() then if inst.doortask then inst.doortask:Cancel() inst.doortask = nil end inst.doortask = inst:DoTaskInTime(1 + math.random()*2, function() inst.components.spawner:ReleaseChild() end) end end end By: local function Empty(inst) if inst:HasTag("burnt") or GetClock():IsDay() then inst.doortask = nil else if inst.doortask and not inst:IsInLimbo() then if inst.components.spawner:IsOccupied() then inst.components.spawner:ReleaseChild() end inst.doortask = nil else inst.doortask = true inst:DoTaskInTime(1 + math.random()*2, function() Empty(inst) end) end end end Adding those checks fixed the bug. I guess pig/wildbore houses have the same problem and need fixing too. Thank you for the great game. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.