diff options
author | numberZero <silverunicorn2011@yandex.ru> | 2017-04-14 23:14:17 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-14 23:14:17 +0400 |
commit | 54b9eaffa2d604055e33cb9be876d0b5e7d96e1c (patch) | |
tree | 19002ab41501b2fc69582418fef5b32f559ac259 /mesecons_luacontroller | |
parent | 25541646749ef692f32f3fd5ad5541a97db02109 (diff) |
Improve overheating (#334)
New overheating system that doesn’t use the meta.
Diffstat (limited to 'mesecons_luacontroller')
-rw-r--r-- | mesecons_luacontroller/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua index c754eda..66dc73b 100644 --- a/mesecons_luacontroller/init.lua +++ b/mesecons_luacontroller/init.lua @@ -315,7 +315,7 @@ local function create_environment(pos, mem, event) port = vports_copy, event = event, mem = mem, - heat = minetest.get_meta(pos):get_int("heat"), + heat = mesecon.get_heat(pos), heat_max = mesecon.setting("overheat_max", 20), print = safe_print, interrupt = get_interrupt(pos), @@ -485,7 +485,6 @@ local function reset_meta(pos, code, errmsg) "image_button[3.75,6;2.5,1;jeija_luac_runbutton.png;program;]".. "image_button_exit[9.72,-0.25;0.425,0.4;jeija_close_window.png;exit;]".. "label[0.1,5;"..errmsg.."]") - meta:set_int("heat", 0) meta:set_int("luac_id", math.random(1, 65535)) end @@ -626,6 +625,7 @@ for d = 0, 1 do d = d == 1, }, after_dig_node = function (pos, node) + mesecon.do_cooldown(pos) mesecon.receptor_off(pos, output_rules) end, is_luacontroller = true, |