summaryrefslogtreecommitdiff
path: root/mesecons_luacontroller
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons_luacontroller')
-rw-r--r--mesecons_luacontroller/init.lua18
-rw-r--r--mesecons_luacontroller/textures/jeija_luac_background.pngbin2016 -> 718 bytes
2 files changed, 9 insertions, 9 deletions
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua
index c754eda..25273a1 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),
@@ -478,14 +478,13 @@ local function reset_meta(pos, code, errmsg)
local meta = minetest.get_meta(pos)
meta:set_string("code", code)
code = minetest.formspec_escape(code or "")
- errmsg = minetest.formspec_escape(errmsg or "")
- meta:set_string("formspec", "size[10,8]"..
- "background[-0.2,-0.25;10.4,8.75;jeija_luac_background.png]"..
- "textarea[0.2,0.6;10.2,5;code;;"..code.."]"..
- "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)
+ errmsg = minetest.formspec_escape(tostring(errmsg or ""))
+ meta:set_string("formspec", "size[12,10]"..
+ "background[-0.2,-0.25;12.4,10.75;jeija_luac_background.png]"..
+ "textarea[0.2,0.2;12.2,9.5;code;;"..code.."]"..
+ "image_button[4.75,8.75;2.5,1;jeija_luac_runbutton.png;program;]"..
+ "image_button_exit[11.72,-0.25;0.425,0.4;jeija_close_window.png;exit;]"..
+ "label[0.1,9;"..errmsg.."]")
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,
diff --git a/mesecons_luacontroller/textures/jeija_luac_background.png b/mesecons_luacontroller/textures/jeija_luac_background.png
index 40e316c..40b427e 100644
--- a/mesecons_luacontroller/textures/jeija_luac_background.png
+++ b/mesecons_luacontroller/textures/jeija_luac_background.png
Binary files differ