From 1b8493b22b19c50ca0deb43dbe31ec2552fc49e4 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 12 Nov 2020 23:10:15 +0100 Subject: [PATCH] Make many nodes floodable --- mods/boost_cart/rails.lua | 4 ++++ mods/farming/api.lua | 4 ++++ mods/farming/nodes.lua | 1 + mods/flowerpots/nodes.lua | 1 + mods/flowers/init.lua | 6 ++++++ mods/glowcrystals/init.lua | 1 + mods/gluncarp/carpets.lua | 1 + mods/hades_core/ladders.lua | 1 + mods/hades_core/plants.lua | 7 +++++++ mods/hades_food/init.lua | 1 + mods/hades_torches/init.lua | 3 +++ mods/hades_trees/api.lua | 2 ++ mods/plantlife/flowers_plus/init.lua | 2 ++ mods/refruit/init.lua | 2 ++ mods/simple_bushes/init.lua | 7 +++++++ mods/vessels/init.lua | 3 +++ mods/vines/init.lua | 2 ++ 17 files changed, 48 insertions(+) diff --git a/mods/boost_cart/rails.lua b/mods/boost_cart/rails.lua index bc7637d..a43859f 100644 --- a/mods/boost_cart/rails.lua +++ b/mods/boost_cart/rails.lua @@ -13,6 +13,7 @@ minetest.register_node(":carts:rail", { sunlight_propagates = true, is_ground_content = true, walkable = false, + floodable = true, selection_box = { type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, @@ -41,6 +42,7 @@ minetest.register_node(":carts:copperrail", { paramtype = "light", is_ground_content = true, walkable = false, + floodable = true, selection_box = { type = "fixed", -- but how to specify the dimensions for curved and sideways rails? @@ -71,6 +73,7 @@ minetest.register_node(":carts:powerrail", { paramtype = "light", is_ground_content = true, walkable = false, + floodable = true, selection_box = { type = "fixed", -- but how to specify the dimensions for curved and sideways rails? @@ -117,6 +120,7 @@ minetest.register_node(":carts:brakerail", { paramtype = "light", is_ground_content = true, walkable = false, + floodable = true, selection_box = { type = "fixed", -- but how to specify the dimensions for curved and sideways rails? diff --git a/mods/farming/api.lua b/mods/farming/api.lua index 169c348..5e8d760 100644 --- a/mods/farming/api.lua +++ b/mods/farming/api.lua @@ -196,6 +196,7 @@ farming.register_plant = function(name, def) groups = g, paramtype = "light", walkable = false, + floodable = true, sunlight_propagates = true, node_box = { type = "fixed", @@ -242,6 +243,7 @@ farming.register_plant = function(name, def) paramtype = "light", walkable = false, buildable_to = true, + floodable = true, is_ground_content = true, drop = drop, selection_box = { @@ -260,6 +262,7 @@ farming.register_plant = function(name, def) paramtype = "light", walkable = false, buildable_to = true, + floodable = true, is_ground_content = true, drop = drop, selection_box = { @@ -276,6 +279,7 @@ farming.register_plant = function(name, def) paramtype = "light", walkable = false, buildable_to = true, + floodable = true, is_ground_content = true, drop = drop, selection_box = { diff --git a/mods/farming/nodes.lua b/mods/farming/nodes.lua index a3ee244..894cfc5 100644 --- a/mods/farming/nodes.lua +++ b/mods/farming/nodes.lua @@ -146,6 +146,7 @@ minetest.register_node("farming:flowergrass", { waving = 1, walkable = false, buildable_to = true, + floodable = true, is_ground_content = true, groups = {snappy=3,flammable=3,flora=1,attached_node=1}, sounds = hades_sounds.node_sound_leaves_defaults(), diff --git a/mods/flowerpots/nodes.lua b/mods/flowerpots/nodes.lua index 01ca8aa..f2556d5 100644 --- a/mods/flowerpots/nodes.lua +++ b/mods/flowerpots/nodes.lua @@ -50,6 +50,7 @@ minetest.register_node("flowerpots:flower_pot", { visual_scale = 0.5, wield_scale = {x=1.0, y=1.0, z=1.0}, paramtype = "light", + floodable = true, selection_box = { type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2} diff --git a/mods/flowers/init.lua b/mods/flowers/init.lua index 02cce86..77b824a 100644 --- a/mods/flowers/init.lua +++ b/mods/flowers/init.lua @@ -22,6 +22,7 @@ minetest.register_node("flowers:dandelion_white", { paramtype = "light", walkable = false, buildable_to = true, + floodable = true, groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_white=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -41,6 +42,7 @@ minetest.register_node("flowers:dandelion_yellow", { paramtype = "light", walkable = false, buildable_to = true, + floodable = true, groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_yellow=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -60,6 +62,7 @@ minetest.register_node("flowers:geranium", { paramtype = "light", walkable = false, buildable_to = true, + floodable = true, groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_blue=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -79,6 +82,7 @@ minetest.register_node("flowers:rose", { paramtype = "light", walkable = false, buildable_to = true, + floodable = true, groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_red=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -98,6 +102,7 @@ minetest.register_node("flowers:tulip", { paramtype = "light", walkable = false, buildable_to = true, + floodable = true, groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_orange=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -117,6 +122,7 @@ minetest.register_node("flowers:viola", { paramtype = "light", walkable = false, buildable_to = true, + floodable = true, groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_violet=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { diff --git a/mods/glowcrystals/init.lua b/mods/glowcrystals/init.lua index 62187f7..e7aa7ea 100644 --- a/mods/glowcrystals/init.lua +++ b/mods/glowcrystals/init.lua @@ -45,6 +45,7 @@ minetest.register_node("glowcrystals:glowcrystal_torch", { paramtype2 = "wallmounted", sunlight_propagates = true, walkable = false, + floodable = true, light_source = minetest.LIGHT_MAX-1, selection_box = { type = "wallmounted", diff --git a/mods/gluncarp/carpets.lua b/mods/gluncarp/carpets.lua index 3f2aa4d..5bf40b3 100644 --- a/mods/gluncarp/carpets.lua +++ b/mods/gluncarp/carpets.lua @@ -33,6 +33,7 @@ for i in ipairs(carpet_tab) do is_ground_content = false, walkable = false, buildable_to = false, + floodable = true, wield_scale= { x=1, y=1, z=0.5 }, node_box = { type = "fixed", diff --git a/mods/hades_core/ladders.lua b/mods/hades_core/ladders.lua index dfe80f4..8a53f30 100644 --- a/mods/hades_core/ladders.lua +++ b/mods/hades_core/ladders.lua @@ -14,6 +14,7 @@ hades_core.register_ladder = function(id, def) paramtype2 = "wallmounted", walkable = false, climbable = true, + floodable = true, node_box = { type = "wallmounted", wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }, diff --git a/mods/hades_core/plants.lua b/mods/hades_core/plants.lua index b3157db..aadf304 100644 --- a/mods/hades_core/plants.lua +++ b/mods/hades_core/plants.lua @@ -12,6 +12,7 @@ minetest.register_node("hades_core:dry_shrub", { walkable = false, is_ground_content = true, buildable_to = true, + floodable = true, groups = {snappy=3,flammable=3,attached_node=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -33,6 +34,7 @@ minetest.register_node("hades_core:grass_1", { walkable = false, is_ground_content = true, buildable_to = true, + floodable = true, groups = {snappy=3,flammable=3,flora=1,grass=1,attached_node=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -58,6 +60,7 @@ for i=2,5 do waving = 1, walkable = false, buildable_to = true, + floodable = true, is_ground_content = true, drop = "hades_core:grass_1", groups = {snappy=3,flammable=3,flora=1,grass=1,attached_node=1,not_in_creative_inventory=1}, @@ -80,6 +83,7 @@ minetest.register_node("hades_core:junglegrass", { paramtype = "light", walkable = false, buildable_to = true, + floodable = true, is_ground_content = true, groups = {snappy=3,flammable=2,flora=1,grass=1,attached_node=1}, sounds = hades_sounds.node_sound_leaves_defaults(), @@ -122,6 +126,7 @@ minetest.register_node("hades_core:snag", { } } }, + floodable = true, sounds = hades_sounds.node_sound_wood_defaults(), on_place = minetest.rotate_node }) @@ -200,6 +205,7 @@ minetest.register_node("hades_core:papyrus", { wield_image = "default_papyrus.png", paramtype = "light", is_ground_content = true, + floodable = true, walkable = false, selection_box = { type = "fixed", @@ -246,6 +252,7 @@ minetest.register_node("hades_core:sugarcane", { paramtype = "light", walkable = false, is_ground_content = true, + floodable = true, selection_box = { type = "fixed", fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} diff --git a/mods/hades_food/init.lua b/mods/hades_food/init.lua index ee00d37..e9d8f76 100644 --- a/mods/hades_food/init.lua +++ b/mods/hades_food/init.lua @@ -11,6 +11,7 @@ minetest.register_node("hades_food:plate", { paramtype = "light", paramtype2 = "wallmounted", is_ground_content = false, + floodable = true, sounds = hades_sounds.node_sound_stone_defaults(), groups = {dig_immediate=3, attached_node=1}, on_rotate = false, diff --git a/mods/hades_torches/init.lua b/mods/hades_torches/init.lua index a759579..7bdbf76 100644 --- a/mods/hades_torches/init.lua +++ b/mods/hades_torches/init.lua @@ -20,6 +20,7 @@ hades_torches.register_torch = function(id, def) paramtype2 = "wallmounted", sunlight_propagates = true, walkable = false, + floodable = true, liquids_pointable = false, light_source = light, groups = {choppy=2, dig_immediate=3, flammable=1, attached_node=1, torch=1}, @@ -66,6 +67,7 @@ hades_torches.register_torch = function(id, def) paramtype2 = "wallmounted", sunlight_propagates = true, walkable = false, + floodable = true, light_source = light, groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1}, drop = "hades_torches:"..id, @@ -86,6 +88,7 @@ hades_torches.register_torch = function(id, def) paramtype2 = "wallmounted", sunlight_propagates = true, walkable = false, + floodable = true, light_source = light, groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1}, drop = "hades_torches:"..id, diff --git a/mods/hades_trees/api.lua b/mods/hades_trees/api.lua index e93a7fb..ca90d47 100644 --- a/mods/hades_trees/api.lua +++ b/mods/hades_trees/api.lua @@ -50,6 +50,7 @@ hades_trees.register_sapling = function(id, def) paramtype = "light", walkable = false, is_ground_content = false, + floodable = true, selection_box = { type = "fixed", fixed = def.selbox, @@ -114,6 +115,7 @@ hades_trees.register_fruit = function(id, def) sunlight_propagates = true, walkable = false, is_ground_content = false, + floodable = true, selection_box = { type = "fixed", fixed = def.selbox, diff --git a/mods/plantlife/flowers_plus/init.lua b/mods/plantlife/flowers_plus/init.lua index d7aa74e..7fd8671 100644 --- a/mods/plantlife/flowers_plus/init.lua +++ b/mods/plantlife/flowers_plus/init.lua @@ -126,6 +126,7 @@ for i in ipairs(lilies_list) do fixed = { -0.5, -0.495, -0.5, 0.5, -0.49, 0.5 }, }, buildable_to = true, + floodable = true, liquids_pointable = true, drop = "flowers:waterlily", @@ -176,6 +177,7 @@ for i in ipairs(seaweed_list) do fixed = { -0.5, -0.495, -0.5, 0.5, -0.49, 0.5 }, }, buildable_to = true, + floodable = true, liquids_pointable = true, drop = "flowers:seaweed", diff --git a/mods/refruit/init.lua b/mods/refruit/init.lua index e956ab7..50a4f75 100644 --- a/mods/refruit/init.lua +++ b/mods/refruit/init.lua @@ -45,6 +45,7 @@ function refruit.add_refruit(id, def) paramtype = "light", sunlight_propagates = true, walkable = false, + floodable = true, selection_box = { type = "fixed", fixed = def.bud_selbox, @@ -63,6 +64,7 @@ function refruit.add_refruit(id, def) paramtype = "light", sunlight_propagates = true, walkable = false, + floodable = true, selection_box = { type = "fixed", fixed = def.flower_selbox, diff --git a/mods/simple_bushes/init.lua b/mods/simple_bushes/init.lua index e9d554c..9ac18e5 100644 --- a/mods/simple_bushes/init.lua +++ b/mods/simple_bushes/init.lua @@ -13,6 +13,7 @@ minetest.register_node("simple_bushes:green", { sunlight_propagates = true, paramtype = "light", walkable = false, + floodable = true, groups = {snappy=3,flammable=2,simple_bush=1,attached_node=1,color_green=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -40,6 +41,7 @@ minetest.register_node("simple_bushes:white", { sunlight_propagates = true, paramtype = "light", walkable = false, + floodable = true, groups = {snappy=3,flammable=2,simple_bush=1,attached_node=1,color_white=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -67,6 +69,7 @@ minetest.register_node("simple_bushes:yellow", { sunlight_propagates = true, paramtype = "light", walkable = false, + floodable = true, groups = {snappy=3,flammable=2,simple_bush=1,attached_node=1,color_yellow=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -94,6 +97,7 @@ minetest.register_node("simple_bushes:blue", { sunlight_propagates = true, paramtype = "light", walkable = false, + floodable = true, groups = {snappy=3,flammable=2,simple_bush=1,attached_node=1,color_blue=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -121,6 +125,7 @@ minetest.register_node("simple_bushes:red", { sunlight_propagates = true, paramtype = "light", walkable = false, + floodable = true, groups = {snappy=3,flammable=2,simple_bush=1,attached_node=1,color_red=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -148,6 +153,7 @@ minetest.register_node("simple_bushes:orange", { sunlight_propagates = true, paramtype = "light", walkable = false, + floodable = true, groups = {snappy=3,flammable=2,simple_bush=1,attached_node=1,color_orange=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { @@ -176,6 +182,7 @@ minetest.register_node("simple_bushes:violet", { sunlight_propagates = true, paramtype = "light", walkable = false, + floodable = true, groups = {snappy=3,flammable=2,simple_bush=1,attached_node=1,color_violet=1}, sounds = hades_sounds.node_sound_leaves_defaults(), selection_box = { diff --git a/mods/vessels/init.lua b/mods/vessels/init.lua index c0a5491..997d1b3 100644 --- a/mods/vessels/init.lua +++ b/mods/vessels/init.lua @@ -12,6 +12,7 @@ minetest.register_node("vessels:glass_bottle", { paramtype = "light", walkable = false, is_ground_content = false, + floodable = true, selection_box = { type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25} @@ -38,6 +39,7 @@ minetest.register_node("vessels:drinking_glass", { paramtype = "light", walkable = false, is_ground_content = false, + floodable = true, selection_box = { type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25} @@ -64,6 +66,7 @@ minetest.register_node("vessels:steel_bottle", { paramtype = "light", walkable = false, is_ground_content = false, + floodable = true, selection_box = { type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25} diff --git a/mods/vines/init.lua b/mods/vines/init.lua index db32fdc..53f5a22 100644 --- a/mods/vines/init.lua +++ b/mods/vines/init.lua @@ -174,6 +174,7 @@ local function register_vine(id, def) climbable = true, drop = "", buildable_to = buildable_to, + floodable = true, sunlight_propagates = true, paramtype = "light", paramtype2 = paramtype2, @@ -201,6 +202,7 @@ local function register_vine(id, def) climbable = true, drop = "", buildable_to = buildable_to, + floodable = true, sunlight_propagates = true, paramtype = "light", paramtype2 = paramtype2, -- 2.11.4.GIT