Delay custom actions.
This commit is contained in:
parent
f8678a3d44
commit
234b71064c
12 changed files with 83 additions and 15 deletions
|
@ -108,6 +108,13 @@ mobs:register_mob("fun_caves:goblin_coal", {
|
|||
end,
|
||||
|
||||
do_custom = function(self)
|
||||
if not self.custom_time or self.custom_time % fun_caves.custom_delay == 0 then
|
||||
self.custom_time = fun_caves.custom_delay - 1
|
||||
else
|
||||
self.custom_time = self.custom_time - 1
|
||||
return
|
||||
end
|
||||
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_torch_freq, {"default:torch"}, "air")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"default:stone"}, "default:mossycobble")
|
||||
fun_caves.search_replace(self.object:getpos(), fun_caves.goblin_trap_freq, {"group:stone"}, "fun_caves:stone_with_coal_trap")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue