From d53b354f330eda535c53ac6188875c6a1cf9a68c Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Sun, 11 Jan 2026 16:25:20 -0500 Subject: [PATCH 1/8] expose heatsinkable_nodes --- sillystuff.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sillystuff.lua b/sillystuff.lua index 33a6b6e..86d77c1 100644 --- a/sillystuff.lua +++ b/sillystuff.lua @@ -5,6 +5,8 @@ local heatsinkable_nodes = { ["digistuff:eeprom"] = true, } +digistuff.heatsinkable_nodes = heatsinkable_nodes + for i = 0, 15, 1 do local bit0 = i % 2 > 0 and "1" or "0" local bit1 = i % 4 > 1 and "1" or "0" From 96e3b3750dffdcc38933f74575ed1d553e4361e3 Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Mon, 12 Jan 2026 06:48:30 -0500 Subject: [PATCH 2/8] heatsinkable nic --- nic.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nic.lua b/nic.lua index 8c4b415..46b5989 100644 --- a/nic.lua +++ b/nic.lua @@ -1,7 +1,7 @@ local http = ... minetest.register_node("digistuff:nic", { description = "Digilines NIC", - groups = {cracky=3}, + groups = {cracky=3, heatsinkable=1}, is_ground_content = false, on_construct = function(pos) local meta = minetest.get_meta(pos) From 9875f3190bb605885c077803651938b3be588488 Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Mon, 12 Jan 2026 06:49:12 -0500 Subject: [PATCH 3/8] heatsinkable gpu --- gpu.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpu.lua b/gpu.lua index 4f5b37f..1acad1d 100644 --- a/gpu.lua +++ b/gpu.lua @@ -935,7 +935,7 @@ end minetest.register_node("digistuff:gpu", { description = "Digilines 2D Graphics Processor", - groups = { cracky = 3 }, + groups = { cracky = 3, heatsinkable = 1 }, is_ground_content = false, on_construct = function(pos) local meta = minetest.get_meta(pos) From 3e1434031d4494de136641c2a57af17efcb4dc9b Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Mon, 12 Jan 2026 06:50:06 -0500 Subject: [PATCH 4/8] heatsinkable ram, eeprom --- memory.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memory.lua b/memory.lua index 33e8503..20f85f7 100644 --- a/memory.lua +++ b/memory.lua @@ -1,6 +1,6 @@ minetest.register_node("digistuff:ram", { description = "Digilines 128Kbit SRAM", - groups = {cracky=3}, + groups = {cracky=3, heatsinkable=1}, is_ground_content = false, on_construct = function(pos) local meta = minetest.get_meta(pos) @@ -64,7 +64,7 @@ minetest.register_node("digistuff:ram", { minetest.register_node("digistuff:eeprom", { description = "Digilines 128Kbit EEPROM", - groups = {cracky=3}, + groups = {cracky=3, heatsinkable=1}, is_ground_content = false, on_construct = function(pos) local meta = minetest.get_meta(pos) From 08ad77ee8faac024e9b53ff2a5684fe048e76759 Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Mon, 12 Jan 2026 06:52:27 -0500 Subject: [PATCH 5/8] heatsinkable ioexpander --- ioexpander.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ioexpander.lua b/ioexpander.lua index 3f4a4cc..ab505a2 100644 --- a/ioexpander.lua +++ b/ioexpander.lua @@ -107,7 +107,7 @@ for i=0,15,1 do local offstate = i == 0 minetest.register_node("digistuff:ioexpander_"..i, { description = offstate and "Digilines I/O Expander" or string.format("Digilines I/O Expander (on state %X - you hacker you!)",i), - groups = offstate and {cracky = 3,} or {cracky = 3,not_in_creative_inventory = 1,}, + groups = {cracky = 3,heatsinkable=1,not_in_creative_inventory = (not offstate) and 1,}, is_ground_content = false, on_construct = function(pos) local meta = minetest.get_meta(pos) From 348d1cf8b4aef293540e5eb2c75b1a71e27c90c4 Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Mon, 12 Jan 2026 07:00:12 -0500 Subject: [PATCH 6/8] use groups in heatsink --- sillystuff.lua | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/sillystuff.lua b/sillystuff.lua index 86d77c1..4fc0e63 100644 --- a/sillystuff.lua +++ b/sillystuff.lua @@ -1,20 +1,26 @@ -local heatsinkable_nodes = { - ["digistuff:nic"] = true, - ["digistuff:gpu"] = true, - ["digistuff:ram"] = true, - ["digistuff:eeprom"] = true, -} - -digistuff.heatsinkable_nodes = heatsinkable_nodes for i = 0, 15, 1 do local bit0 = i % 2 > 0 and "1" or "0" local bit1 = i % 4 > 1 and "1" or "0" local bit2 = i % 8 > 3 and "1" or "0" local bit3 = i % 16 > 7 and "1" or "0" - heatsinkable_nodes["mesecons_luacontroller:luacontroller" .. bit0 .. bit1 .. bit2 .. bit3] = true - heatsinkable_nodes["mooncontroller:mooncontroller" .. bit0 .. bit1 .. bit2 .. bit3] = true - heatsinkable_nodes["digistuff:ioexpander_" .. i] = true + local bits = bit0 .. bit1 .. bit2 .. bit3 + do + local name = "mesecons_luacontroller:luacontroller" .. bits + local groups = core.registered_nodes[name].groups + groups.heatsinkable = 1 + core.override_item(name, { + groups = groups + }) + end + do + local name = "mooncontroller:mooncontroller" .. bits + local groups = core.registered_nodes[name].groups + groups.heatsinkable = 1 + core.override_item(name, { + groups = groups + }) + end end minetest.register_node("digistuff:heatsink", { @@ -48,7 +54,7 @@ minetest.register_node("digistuff:heatsink", { }, after_place_node = function(pos) local icpos = vector.add(pos,vector.new(0,-1,0)) - if heatsinkable_nodes[minetest.get_node(icpos).name] then + if core.get_item_group(core.get_node(icpos).name, "heatsinkable") then minetest.set_node(pos,{name = "digistuff:heatsink_onic"}) end end, From ba7b55cb090fa3f7c6762a0747a79678afe750b7 Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Mon, 12 Jan 2026 07:22:25 -0500 Subject: [PATCH 7/8] avoid writing to core --- sillystuff.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sillystuff.lua b/sillystuff.lua index 4fc0e63..00a6f18 100644 --- a/sillystuff.lua +++ b/sillystuff.lua @@ -7,7 +7,7 @@ for i = 0, 15, 1 do local bits = bit0 .. bit1 .. bit2 .. bit3 do local name = "mesecons_luacontroller:luacontroller" .. bits - local groups = core.registered_nodes[name].groups + local groups = table.copy(core.registered_nodes[name].groups) groups.heatsinkable = 1 core.override_item(name, { groups = groups @@ -15,7 +15,7 @@ for i = 0, 15, 1 do end do local name = "mooncontroller:mooncontroller" .. bits - local groups = core.registered_nodes[name].groups + local groups = table.copy(core.registered_nodes[name].groups) groups.heatsinkable = 1 core.override_item(name, { groups = groups From 135fbcce414ea28c4ca6d08287d3ee81908853a0 Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Mon, 12 Jan 2026 12:51:41 -0500 Subject: [PATCH 8/8] only override if present --- sillystuff.lua | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sillystuff.lua b/sillystuff.lua index 00a6f18..25aa07c 100644 --- a/sillystuff.lua +++ b/sillystuff.lua @@ -7,19 +7,25 @@ for i = 0, 15, 1 do local bits = bit0 .. bit1 .. bit2 .. bit3 do local name = "mesecons_luacontroller:luacontroller" .. bits - local groups = table.copy(core.registered_nodes[name].groups) - groups.heatsinkable = 1 - core.override_item(name, { + local def = core.registered_nodes[name] + if def then + local groups = table.copy(def.groups) + groups.heatsinkable = 1 + core.override_item(name, { groups = groups - }) + }) + end end do local name = "mooncontroller:mooncontroller" .. bits - local groups = table.copy(core.registered_nodes[name].groups) - groups.heatsinkable = 1 - core.override_item(name, { + local def = core.registered_nodes[name] + if def then + local groups = table.copy(def.groups) + groups.heatsinkable = 1 + core.override_item(name, { groups = groups - }) + }) + end end end