diff options
author | DS-Minetest <vorunbekannt75@web.de> | 2017-10-29 15:25:23 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2017-10-29 21:19:08 +0100 |
commit | db39eef2f6583c91d3d2c8823eaa1b627110980d (patch) | |
tree | 9e4b13f0660c7278cf262ca56951d7bc5c7fe297 | |
parent | f78937b351d42c04bb2f07ca4a365d456289f30e (diff) |
Make the fpga overheat
-rw-r--r-- | mesecons_fpga/init.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesecons_fpga/init.lua b/mesecons_fpga/init.lua index 0c56d7d..97de775 100644 --- a/mesecons_fpga/init.lua +++ b/mesecons_fpga/init.lua @@ -72,7 +72,7 @@ plg.register_nodes({ sunlight_propagates = true, paramtype = "light", walkable = true, - groups = {dig_immediate = 2, mesecon = 3}, + groups = {dig_immediate = 2, mesecon = 3, overheat = 1}, drop = "mesecons_fpga:fpga0000", selection_box = { type = "fixed", @@ -309,6 +309,11 @@ plg.update = function(pos) local meta = minetest.get_meta(pos) if meta:get_int("valid") ~= 1 then return + elseif mesecon.do_overheat(pos) then + plg.setports(pos, false, false, false, false) + meta:set_int("valid", 0) + meta:set_string("infotext", "FPGA (overheated)") + return end local is = lcore.deserialize(meta:get_string("instr")) |