Add an ABM function which resets heat to 0, since gates/controllers won't be cooled normally if they are moved (piston, etc...) during the cooling delay.

This commit is contained in:
Novatux
2013-06-05 06:45:19 +02:00
parent fa0cf15cd9
commit edc10dac47
4 changed files with 33 additions and 23 deletions

View File

@ -25,5 +25,15 @@ mesecon.on_dignode = function (pos, node)
end
end
minetest.register_abm({
nodenames = {"group:overheat"},
interval = 1.0,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local meta = minetest.env:get_meta(pos)
meta:set_int("heat",0)
end,
})
minetest.register_on_placenode(mesecon.on_placenode)
minetest.register_on_dignode(mesecon.on_dignode)