From c3f3406e8ee0a4c8523863a4b69ecda7c2be48b2 Mon Sep 17 00:00:00 2001 From: paramat Date: Thu, 10 Nov 2016 04:04:20 +0000 Subject: [PATCH] Default: Add 'group:cools_lava' for lavacooling by snowblock and ice Make lava cooling ABM use a new group 'group:cools_lava'. Nodes other than water can cool lava. We assume snowblock and ice melt, turn to water and cool lava. Leave 'group:water' present temporarily to not break mod liquids. --- mods/default/functions.lua | 2 +- mods/default/nodes.lua | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 429ce9fe..4008547e 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -126,7 +126,7 @@ end minetest.register_abm({ label = "Lava cooling", nodenames = {"default:lava_source", "default:lava_flowing"}, - neighbors = {"group:water"}, + neighbors = {"group:cools_lava", "group:water"}, interval = 1, chance = 1, catch_up = false, diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index ebd1e5d7..dba84da1 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -467,7 +467,7 @@ minetest.register_node("default:snow", { minetest.register_node("default:snowblock", { description = "Snow Block", tiles = {"default_snow.png"}, - groups = {crumbly = 3, puts_out_fire = 1}, + groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1}, sounds = default.node_sound_dirt_defaults({ footstep = {name = "default_snow_footstep", gain = 0.15}, dug = {name = "default_snow_footstep", gain = 0.2}, @@ -487,7 +487,7 @@ minetest.register_node("default:ice", { tiles = {"default_ice.png"}, is_ground_content = false, paramtype = "light", - groups = {cracky = 3, puts_out_fire = 1}, + groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1}, sounds = default.node_sound_glass_defaults(), }) @@ -1351,7 +1351,7 @@ minetest.register_node("default:water_source", { liquid_alternative_source = "default:water_source", liquid_viscosity = 1, post_effect_color = {a = 103, r = 30, g = 60, b = 90}, - groups = {water = 3, liquid = 3, puts_out_fire = 1}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1}, }) minetest.register_node("default:water_flowing", { @@ -1396,7 +1396,7 @@ minetest.register_node("default:water_flowing", { liquid_viscosity = 1, post_effect_color = {a = 103, r = 30, g = 60, b = 90}, groups = {water = 3, liquid = 3, puts_out_fire = 1, - not_in_creative_inventory = 1}, + not_in_creative_inventory = 1, cools_lava = 1}, }) @@ -1442,7 +1442,7 @@ minetest.register_node("default:river_water_source", { liquid_renewable = false, liquid_range = 2, post_effect_color = {a = 103, r = 30, g = 76, b = 90}, - groups = {water = 3, liquid = 3, puts_out_fire = 1}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1}, }) minetest.register_node("default:river_water_flowing", { @@ -1489,7 +1489,7 @@ minetest.register_node("default:river_water_flowing", { liquid_range = 2, post_effect_color = {a = 103, r = 30, g = 76, b = 90}, groups = {water = 3, liquid = 3, puts_out_fire = 1, - not_in_creative_inventory = 1}, + not_in_creative_inventory = 1, cools_lava = 1}, }) -- 2.25.1