mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-06-28 05:50:17 +02:00
Fix #155 (option 2 used). Remove non-ActionQueue system. Enable overheat for more than 20 actions per second on lua- / microcontrollers and gates.
Fix a bug where a burnt luacontroller didn't have the correct pin-states as the burnt controller does not register any changes from outside.
This commit is contained in:
@ -47,9 +47,7 @@ function set_gate(pos, on)
|
||||
gate = get_gate(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if on ~= gate_state(pos) then
|
||||
yc_heat(meta)
|
||||
--minetest.after(0.5, yc_cool, meta)
|
||||
if yc_overheat(meta) then
|
||||
if mesecon.do_overheat(pos) then
|
||||
pop_gate(pos)
|
||||
else
|
||||
local node = minetest.get_node(pos)
|
||||
@ -78,7 +76,9 @@ end
|
||||
function pop_gate(pos)
|
||||
gate = get_gate(pos)
|
||||
minetest.remove_node(pos)
|
||||
minetest.after(0.2, yc_overheat_off, pos)
|
||||
minetest.after(0.2, function (pos)
|
||||
mesecon:receptor_off(pos, mesecon.rules.flat)
|
||||
end , pos) -- wait for pending parsings
|
||||
minetest.add_item(pos, "mesecons_gates:"..gate.."_off")
|
||||
end
|
||||
|
||||
@ -153,7 +153,6 @@ for _, gate in ipairs(gates) do
|
||||
walkable = true,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_int("heat", 0)
|
||||
update_gate(pos)
|
||||
end,
|
||||
groups = groups,
|
||||
@ -221,4 +220,3 @@ minetest.register_craft({
|
||||
{'mesecons:mesecon', '', ''},
|
||||
},
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user