diff --git a/CHANGELOG.md b/CHANGELOG.md index a7b9106..9d9a4cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This update completely breaks the API lol. - Added Darkstone - Added Glowslime - Added Magma +- Give the Heater Device and Freezer Device more abilities with new `heatable` and `coolable` groups # [Sep 29th 2024] Unnamed Minor Update diff --git a/mods/pyutest/pyutest_core/electricity.lua b/mods/pyutest/pyutest_core/electricity.lua index ed8990a..fb95c8d 100644 --- a/mods/pyutest/pyutest_core/electricity.lua +++ b/mods/pyutest/pyutest_core/electricity.lua @@ -110,6 +110,10 @@ PyuTest.make_node("pyutest_core:freezer_device", "Freezer Device", { if minetest.get_item_group(n.name, "freezable") ~= 0 then minetest.set_node(p, {name = "pyutest_core:ice_block"}) + elseif minetest.get_item_group(n.name, "coolable") ~= 0 then + local def = minetest.registered_nodes[n.name] + local cool_into = def.__cool_into or "pyutest_core:water_source" + minetest.set_node(p, {name = cool_into}) end end) end @@ -127,6 +131,10 @@ PyuTest.make_node("pyutest_core:heater_device", "Heater Device", { local def = minetest.registered_nodes[n.name] local thaw_into = def.__thaw_into or "pyutest_core:water_source" minetest.set_node(p, {name = thaw_into}) + elseif minetest.get_item_group(n.name, "heatable") ~= 0 then + local def = minetest.registered_nodes[n.name] + local heat_into = def.__heat_into or "pyutest_core:lava_source" + minetest.set_node(p, {name = heat_into}) end end) end diff --git a/mods/pyutest/pyutest_core/liquid.lua b/mods/pyutest/pyutest_core/liquid.lua index 9c07207..f04be3f 100644 --- a/mods/pyutest/pyutest_core/liquid.lua +++ b/mods/pyutest/pyutest_core/liquid.lua @@ -56,14 +56,16 @@ end PyuTest.make_liquid("pyutest_core:water", "Water", { water = 1, - freezable = 1 + freezable = 1, + heatable = 1 }, "pyutest-water.png", 1, { post_effect_color = {a=60, r=24.7, g=46.3, b=89.4}, paramtype2 = "color", }) PyuTest.make_liquid("pyutest_core:lava", "Lava", { - lava = 1 + lava = 1, + coolable = 1 }, "pyutest-lava.png", 5, { damage_per_second = 4, light_source = 8