From c201ee75336fc32fe536f90407a48ada5a17ca6f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 14 May 2017 21:37:21 +0200 Subject: [PATCH] Add plant group to plants, required for farmland --- GROUPS.md | 3 +++ mods/ITEMS/mcl_core/nodes.lua | 18 +++++++++--------- mods/ITEMS/mcl_farming/beetroot.lua | 8 ++++---- mods/ITEMS/mcl_farming/carrots.lua | 4 ++-- mods/ITEMS/mcl_farming/melon.lua | 4 ++-- mods/ITEMS/mcl_farming/potatoes.lua | 4 ++-- mods/ITEMS/mcl_farming/pumpkin.lua | 4 ++-- mods/ITEMS/mcl_farming/shared_functions.lua | 4 ++-- mods/ITEMS/mcl_farming/wheat.lua | 4 ++-- mods/ITEMS/mcl_flowers/init.lua | 12 ++++++------ mods/ITEMS/mcl_nether/nether_wart.lua | 8 ++++---- 11 files changed, 38 insertions(+), 35 deletions(-) diff --git a/GROUPS.md b/GROUPS.md index 4c3eea86a..dcfdbd0f1 100644 --- a/GROUPS.md +++ b/GROUPS.md @@ -128,6 +128,9 @@ These groups are used mostly for informational purposes * `container=1`: Other/unspecified container type * `spawn_egg=1`: Spawn egg +* `plant=1`: Plant or part of a plant +* `double_plant`: Part of a double-sized plant. 1 = lower part, 2 = upper part + * `weapon=1`: Item is primarily (!) a weapon * `tool=1`: Item is primarily (!) a tool * `craftitem=1`: Item is primarily (!) used for crafting diff --git a/mods/ITEMS/mcl_core/nodes.lua b/mods/ITEMS/mcl_core/nodes.lua index cd68bf534..2aa5079c7 100644 --- a/mods/ITEMS/mcl_core/nodes.lua +++ b/mods/ITEMS/mcl_core/nodes.lua @@ -706,7 +706,7 @@ minetest.register_node("mcl_core:sapling", { fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} }, stack_max = 64, - groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, + groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) @@ -792,7 +792,7 @@ minetest.register_node("mcl_core:darksapling", { fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} }, stack_max = 64, - groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, + groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) @@ -936,7 +936,7 @@ minetest.register_node("mcl_core:junglesapling", { fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} }, stack_max = 64, - groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, + groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) @@ -1022,7 +1022,7 @@ minetest.register_node("mcl_core:acaciasapling", { node_placement_prediction = "", on_place = mcl_util.on_place_non_mycelium_plant, stack_max = 64, - groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, + groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _mcl_hardness = 0, @@ -1101,7 +1101,7 @@ minetest.register_node("mcl_core:sprucesapling", { fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} }, stack_max = 64, - groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, + groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) @@ -1181,7 +1181,7 @@ minetest.register_node("mcl_core:birchsapling", { fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} }, stack_max = 64, - groups = {dig_immediate=3, sapling=1,non_mycelium_plant=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, + groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,deco_block=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) @@ -1201,7 +1201,7 @@ minetest.register_node("mcl_core:cactus", { tiles = {"default_cactus_top.png", "default_cactus_bottom.png", "default_cactus_side.png","default_cactus_side.png","default_cactus_side.png","default_cactus_side.png"}, is_ground_content = true, stack_max = 64, - groups = {handy=1, attached_node=1, deco_block=1, dig_by_piston=1}, + groups = {handy=1, attached_node=1, plant=1, deco_block=1, dig_by_piston=1}, sounds = mcl_sounds.node_sound_wood_defaults(), paramtype = "light", node_placement_prediction = "", @@ -1290,7 +1290,7 @@ minetest.register_node("mcl_core:reeds", { }, }, stack_max = 64, - groups = {dig_immediate=3, craftitem=1, non_mycelium_plant=1, dig_by_piston=1}, + groups = {dig_immediate=3, craftitem=1, plant=1, non_mycelium_plant=1, dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), node_placement_prediction = "", on_place = mcl_util.on_place_non_mycelium_plant, @@ -1808,7 +1808,7 @@ minetest.register_node("mcl_core:deadbush", { walkable = false, stack_max = 64, buildable_to = true, - groups = {dig_immediate=3, flammable=3,attached_node=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1}, + groups = {dig_immediate=3, flammable=3,attached_node=1,plant=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1}, drop = { max_items = 1, items = { diff --git a/mods/ITEMS/mcl_farming/beetroot.lua b/mods/ITEMS/mcl_farming/beetroot.lua index 7927942ef..458a5edd6 100644 --- a/mods/ITEMS/mcl_farming/beetroot.lua +++ b/mods/ITEMS/mcl_farming/beetroot.lua @@ -30,7 +30,7 @@ minetest.register_node("mcl_farming:beetroot_0", { {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) @@ -54,7 +54,7 @@ minetest.register_node("mcl_farming:beetroot_1", { {-0.5, -0.5, -0.5, 0.5, -3/16, 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) @@ -78,7 +78,7 @@ minetest.register_node("mcl_farming:beetroot_2", { {-0.5, -0.5, -0.5, 0.5, 2/16, 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) @@ -111,7 +111,7 @@ minetest.register_node("mcl_farming:beetroot", { {-0.5, -0.5, -0.5, 0.5, 3/16, 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1,beetroot=4}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,beetroot=4}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) diff --git a/mods/ITEMS/mcl_farming/carrots.lua b/mods/ITEMS/mcl_farming/carrots.lua index 7550709c7..9442a97c2 100644 --- a/mods/ITEMS/mcl_farming/carrots.lua +++ b/mods/ITEMS/mcl_farming/carrots.lua @@ -40,7 +40,7 @@ for i=1, 7 do {-0.5, -0.5, -0.5, 0.5, sel_height, 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) @@ -73,7 +73,7 @@ minetest.register_node("mcl_farming:carrot", { {-0.5, -0.5, -0.5, 0.5, 4/16, 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) diff --git a/mods/ITEMS/mcl_farming/melon.lua b/mods/ITEMS/mcl_farming/melon.lua index acef4ecc8..ee6dea591 100644 --- a/mods/ITEMS/mcl_farming/melon.lua +++ b/mods/ITEMS/mcl_farming/melon.lua @@ -18,7 +18,7 @@ local melon_base_def = { _doc_items_longdesc = "A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices.", stack_max = 64, tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png"}, - groups = {handy=1,axey=1, building_block=1,dig_by_piston=1}, + groups = {handy=1,axey=1, plant=1,building_block=1,dig_by_piston=1}, drop = { max_items = 1, items = { @@ -84,7 +84,7 @@ for s=1,7 do {-0.15, -0.5, -0.15, 0.15, -0.5+h, 0.15} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1, plant_melon_stem=s}, + groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1, plant_melon_stem=s}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) diff --git a/mods/ITEMS/mcl_farming/potatoes.lua b/mods/ITEMS/mcl_farming/potatoes.lua index 128f3f9be..df00aa8f9 100644 --- a/mods/ITEMS/mcl_farming/potatoes.lua +++ b/mods/ITEMS/mcl_farming/potatoes.lua @@ -42,7 +42,7 @@ for i=1, 7 do type = "fixed", fixed = { selbox }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) @@ -74,7 +74,7 @@ minetest.register_node("mcl_farming:potato", { { -0.5, -0.5, -0.5, 0.5, 1/16, 0.5 } } }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) diff --git a/mods/ITEMS/mcl_farming/pumpkin.lua b/mods/ITEMS/mcl_farming/pumpkin.lua index 453f2b3f9..1a95ef3c4 100644 --- a/mods/ITEMS/mcl_farming/pumpkin.lua +++ b/mods/ITEMS/mcl_farming/pumpkin.lua @@ -59,7 +59,7 @@ for s=1,7 do {-0.15, -0.5, -0.15, 0.15, -0.5+h, 0.15} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) @@ -79,7 +79,7 @@ local pumpkin_base_def = { stack_max = 64, paramtype2 = "facedir", tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face.png"}, - groups = {handy=1,axey=1, building_block=1, dig_by_piston=1}, + groups = {handy=1,axey=1, plant=1,building_block=1, dig_by_piston=1}, sounds = mcl_sounds.node_sound_wood_defaults(), _mcl_blast_resistance = 5, _mcl_hardness = 1, diff --git a/mods/ITEMS/mcl_farming/shared_functions.lua b/mods/ITEMS/mcl_farming/shared_functions.lua index cb88b17c0..c9a2c3c69 100644 --- a/mods/ITEMS/mcl_farming/shared_functions.lua +++ b/mods/ITEMS/mcl_farming/shared_functions.lua @@ -200,7 +200,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s stem_def.drop = stem_drop end if stem_def.groups == nil then - stem_def.groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1} + stem_def.groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1} end if stem_def.sounds == nil then stem_def.sounds = mcl_sounds.node_sound_leaves_defaults() @@ -277,7 +277,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s fixed = connected_stem_selectionbox[i] }, tiles = connected_stem_tiles[i], - groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) diff --git a/mods/ITEMS/mcl_farming/wheat.lua b/mods/ITEMS/mcl_farming/wheat.lua index c7f1e21a4..00f0dbbcb 100644 --- a/mods/ITEMS/mcl_farming/wheat.lua +++ b/mods/ITEMS/mcl_farming/wheat.lua @@ -51,7 +51,7 @@ for i=1,7 do {-0.5, -0.5, -0.5, 0.5, sel_heights[i], 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1, dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1, dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) @@ -78,7 +78,7 @@ minetest.register_node("mcl_farming:wheat", { { items = {'mcl_farming:wheat_item'} } } }, - groups = {dig_immediate=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1, dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1, dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index b7f5a1204..8020d5c58 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -18,7 +18,7 @@ local function add_simple_flower(name, desc, image, simple_selection_box) paramtype = "light", walkable = false, stack_max = 64, - groups = {dig_immediate=3,flammable=2,flower=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,deco_block=1}, + groups = {dig_immediate=3,flammable=2,plant=1,flower=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,deco_block=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), node_placement_prediction = "", on_place = mcl_util.on_place_non_mycelium_plant, @@ -68,7 +68,7 @@ minetest.register_node("mcl_flowers:tallgrass", { buildable_to = true, is_ground_content = true, -- CHECKME: How does tall grass behave when pushed by a piston? - groups = {dig_immediate=3, flammable=3,attached_node=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1}, + groups = {dig_immediate=3, flammable=3,attached_node=1,plant=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), drop = wheat_seed_drop, after_dig_node = function(pos, oldnode, oldmetadata, user) @@ -96,7 +96,7 @@ minetest.register_node("mcl_flowers:fern", { walkable = false, stack_max = 64, -- CHECKME: How does a fern behave when pushed by a piston? - groups = {dig_immediate=3,flammable=2,attached_node=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1}, + groups = {dig_immediate=3,flammable=2,attached_node=1,plant=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1}, buildable_to = true, sounds = mcl_sounds.node_sound_leaves_defaults(), after_dig_node = function(pos, oldnode, oldmetadata, user) @@ -183,7 +183,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im minetest.remove_node(top) end end, - groups = {dig_immediate=3,flammable=2,flower=flowergroup,non_mycelium_plant=1,attached_node=1, dig_by_water=1,dig_by_piston=1, double_plant=1,deco_block=1}, + groups = {dig_immediate=3,flammable=2,flower=flowergroup,non_mycelium_plant=1,attached_node=1, dig_by_water=1,dig_by_piston=1, plant=1,double_plant=1,deco_block=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), }) @@ -206,7 +206,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im minetest.dig_node(bottom) end end, - groups = {dig_immediate=3,flammable=2,flower=flowergroup,non_mycelium_plant=1,dig_by_water=1,dig_by_piston=1, not_in_creative_inventory = 1, double_plant=2}, + groups = {dig_immediate=3,flammable=2,flower=flowergroup,non_mycelium_plant=1,dig_by_water=1,dig_by_piston=1, not_in_creative_inventory = 1, plant=1,double_plant=2}, sounds = mcl_sounds.node_sound_leaves_defaults(), }) @@ -239,7 +239,7 @@ minetest.register_node("mcl_flowers:waterlily", { liquids_pointable = true, walkable = true, sunlight_propagates = true, - groups = {dig_immediate = 3, dig_by_water = 1, dig_by_piston = 1, deco_block=1}, + groups = {dig_immediate = 3, plant=1, dig_by_water = 1, dig_by_piston = 1, deco_block=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), node_placement_prediction = "", node_box = { diff --git a/mods/ITEMS/mcl_nether/nether_wart.lua b/mods/ITEMS/mcl_nether/nether_wart.lua index f408aa4c6..30414f79c 100644 --- a/mods/ITEMS/mcl_nether/nether_wart.lua +++ b/mods/ITEMS/mcl_nether/nether_wart.lua @@ -14,7 +14,7 @@ minetest.register_node("mcl_nether:nether_wart_0", { {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), }) @@ -34,7 +34,7 @@ minetest.register_node("mcl_nether:nether_wart_1", { {-0.5, -0.5, -0.5, 0.5, 0.15, 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), }) @@ -54,7 +54,7 @@ minetest.register_node("mcl_nether:nether_wart_2", { {-0.5, -0.5, -0.5, 0.5, 0.15, 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), }) @@ -81,7 +81,7 @@ minetest.register_node("mcl_nether:nether_wart", { {-0.5, -0.5, -0.5, 0.5, 0.45, 0.5} }, }, - groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), })