diff options
author | Jeija <jeija@mesecons.net> | 2014-04-20 21:44:58 +0200 |
---|---|---|
committer | Jeija <jeija@mesecons.net> | 2014-04-20 21:51:17 +0200 |
commit | 300abcb5877d948e6a68be454ed46b65a0f90f01 (patch) | |
tree | 8f8ba5271d7a11b66cd087506713a14047972518 /mesecons_gates | |
parent | 1f666875807c3c8e6c1771e4fb46c374d2e40ccb (diff) |
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.
Diffstat (limited to 'mesecons_gates')
-rw-r--r-- | mesecons_gates/init.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mesecons_gates/init.lua b/mesecons_gates/init.lua index 51ed4af..a22edf6 100644 --- a/mesecons_gates/init.lua +++ b/mesecons_gates/init.lua @@ -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', '', ''}, }, }) - |