summaryrefslogtreecommitdiff
path: root/mesecons_fpga
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons_fpga')
-rw-r--r--mesecons_fpga/init.lua7
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"))