Skip to content
Snippets Groups Projects
Commit db39eef2 authored by DS-Minetest's avatar DS-Minetest Committed by sfan5
Browse files

Make the fpga overheat

parent f78937b3
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ plg.register_nodes({ ...@@ -72,7 +72,7 @@ plg.register_nodes({
sunlight_propagates = true, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
walkable = true, walkable = true,
groups = {dig_immediate = 2, mesecon = 3}, groups = {dig_immediate = 2, mesecon = 3, overheat = 1},
drop = "mesecons_fpga:fpga0000", drop = "mesecons_fpga:fpga0000",
selection_box = { selection_box = {
type = "fixed", type = "fixed",
...@@ -309,6 +309,11 @@ plg.update = function(pos) ...@@ -309,6 +309,11 @@ plg.update = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
if meta:get_int("valid") ~= 1 then if meta:get_int("valid") ~= 1 then
return 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 end
local is = lcore.deserialize(meta:get_string("instr")) local is = lcore.deserialize(meta:get_string("instr"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment