@@ 10,3 10,29 @@ minetest.register_tool("falling_nodes:spark", {
end
end,
})
+
+minetest.register_tool("falling_nodes:heat", {
+ description = "Heat\nHeats the clicked node",
+ short_description = "Heat",
+ inventory_image = "[fill:1x1:#FFDD00",
+ on_place = function(itemstack, placer, pointed_thing)
+ local pos = pointed_thing.under
+ local name = minetest.get_node(pos).name
+ if not falling_nodes.registered_materials[name] then return end
+ if not falling_nodes.registered_materials[name].temperature_high then return end
+ falling_nodes.registered_materials[name].temperature_high.action(pos)
+ end,
+})
+
+minetest.register_tool("falling_nodes:cool", {
+ description = "Cool\nCools the clicked node",
+ short_description = "Cool",
+ inventory_image = "[fill:1x1:#00DDFF",
+ on_place = function(itemstack, placer, pointed_thing)
+ local pos = pointed_thing.under
+ local name = minetest.get_node(pos).name
+ if not falling_nodes.registered_materials[name] then return end
+ if not falling_nodes.registered_materials[name].temperature_low then return end
+ falling_nodes.registered_materials[name].temperature_low.action(pos)
+ end,
+})