Skip to content
Permalink
Browse files

Make the fpga overheat

  • Loading branch information...
DS-Minetest authored and sfan5 committed Oct 29, 2017
1 parent f78937b commit db39eef2f6583c91d3d2c8823eaa1b627110980d
Showing with 6 additions and 1 deletion.
  1. +6 −1 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"))

0 comments on commit db39eef

Please sign in to comment.
You can’t perform that action at this time.