summaryrefslogtreecommitdiff
path: root/mesecons_luacontroller
diff options
context:
space:
mode:
authorAnthony <azhang9@gmail.com>2013-06-05 10:35:36 -0700
committerAnthony <azhang9@gmail.com>2013-06-05 10:35:36 -0700
commit9a9df6cabf54a07e0ea29e63ba6468fd3ee633aa (patch)
treed4180454279a73dc29606c2b4bb76d3a5afa30d0 /mesecons_luacontroller
parentfa0cf15cd97eaa1527bdd87047d231885ec3428d (diff)
parentedc10dac472cf89818fed4c30e7b12cb9275fb30 (diff)
downloadmesecons-9a9df6cabf54a07e0ea29e63ba6468fd3ee633aa.tar
mesecons-9a9df6cabf54a07e0ea29e63ba6468fd3ee633aa.tar.gz
mesecons-9a9df6cabf54a07e0ea29e63ba6468fd3ee633aa.tar.bz2
mesecons-9a9df6cabf54a07e0ea29e63ba6468fd3ee633aa.tar.xz
mesecons-9a9df6cabf54a07e0ea29e63ba6468fd3ee633aa.zip
Merge pull request #106 from Novatux/heat
Add an ABM function which resets heat to 0, ...
Diffstat (limited to 'mesecons_luacontroller')
-rw-r--r--mesecons_luacontroller/init.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua
index 02bde9f..4c6ff30 100644
--- a/mesecons_luacontroller/init.lua
+++ b/mesecons_luacontroller/init.lua
@@ -100,17 +100,17 @@ local heat = function (meta) -- warm up
end
end
-local cool = function (meta) -- cool down after a while
- h = meta:get_int("heat")
- if h ~= nil then
- meta:set_int("heat", h - 1)
- end
-end
+--local cool = function (meta) -- cool down after a while
+-- h = meta:get_int("heat")
+-- if h ~= nil then
+-- meta:set_int("heat", h - 1)
+-- end
+--end
local overheat = function (meta) -- determine if too hot
h = meta:get_int("heat")
if h == nil then return true end -- if nil then overheat
- if h > 20 then
+ if h > 40 then
return true
else
return false
@@ -258,7 +258,7 @@ end
local do_overheat = function (pos, meta)
-- Overheat protection
heat(meta)
- minetest.after(0.5, cool, meta)
+ --minetest.after(0.5, cool, meta)
if overheat(meta) then
mesecon:swap_node(pos, BASENAME.."_burnt")
minetest.env:get_meta(pos):set_string("lc_interrupts", "")
@@ -412,9 +412,9 @@ if d == 1 then
end
if a + b + c + d ~= 0 then
- groups = {dig_immediate=2, not_in_creative_inventory=1}
+ groups = {dig_immediate=2, not_in_creative_inventory=1, overheat = 1}
else
- groups = {dig_immediate=2}
+ groups = {dig_immediate=2, overheat = 1}
end
output_rules[cid] = {}