diff options
author | Anthony <azhang9@gmail.com> | 2013-06-05 10:35:36 -0700 |
---|---|---|
committer | Anthony <azhang9@gmail.com> | 2013-06-05 10:35:36 -0700 |
commit | 9a9df6cabf54a07e0ea29e63ba6468fd3ee633aa (patch) | |
tree | d4180454279a73dc29606c2b4bb76d3a5afa30d0 /mesecons_microcontroller | |
parent | fa0cf15cd97eaa1527bdd87047d231885ec3428d (diff) | |
parent | edc10dac472cf89818fed4c30e7b12cb9275fb30 (diff) | |
download | mesecons-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_microcontroller')
-rw-r--r-- | mesecons_microcontroller/init.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mesecons_microcontroller/init.lua b/mesecons_microcontroller/init.lua index 0f6a7cd..c3ddb4e 100644 --- a/mesecons_microcontroller/init.lua +++ b/mesecons_microcontroller/init.lua @@ -19,9 +19,9 @@ if tostring(d) == "1" then top = top.."^jeija_microcontroller_LED_D.png" end if tostring(d)..tostring(c)..tostring(b)..tostring(a) ~= "0000" then - groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon = 3} + groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon = 3, overheat = 1} else - groups = {dig_immediate=2, mesecon = 3} + groups = {dig_immediate=2, mesecon = 3, overheat = 1} end local rules={} if (a == 1) then table.insert(rules, {x = -1, y = 0, z = 0}) end @@ -162,7 +162,7 @@ end function update_yc(pos) local meta = minetest.env:get_meta(pos) yc_heat(meta) - minetest.after(0.5, yc_cool, meta) + --minetest.after(0.5, yc_cool, meta) if (yc_overheat(meta)) then minetest.env:remove_node(pos) minetest.after(0.2, yc_overheat_off, pos) --wait for pending parsings @@ -674,17 +674,17 @@ function yc_heat(meta) end end -function yc_cool(meta) - h = meta:get_int("heat") - if h ~= nil then - meta:set_int("heat", h - 1) - end -end +--function yc_cool(meta) +-- h = meta:get_int("heat") +-- if h ~= nil then +-- meta:set_int("heat", h - 1) +-- end +--end function yc_overheat(meta) h = meta:get_int("heat") if h == nil then return true end -- if nil the overheat - if h>30 then + if h>60 then return true else return false |