From ef55292f8b4901e2a3106eca899ba1b5045805c8 Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 22 Aug 2024 00:16:01 +0200 Subject: [PATCH] rename _mcl_basenode to _mcl_baseitem --- mods/ITEMS/mcl_beds/api.lua | 2 +- mods/ITEMS/mcl_beehives/init.lua | 8 ++++---- mods/ITEMS/mcl_brewing/init.lua | 2 +- mods/ITEMS/mcl_cocoas/init.lua | 2 +- mods/ITEMS/mcl_doors/api_doors.lua | 8 ++++---- mods/ITEMS/mcl_doors/api_trapdoors.lua | 2 +- 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/wheat.lua | 4 ++-- mods/ITEMS/mcl_flowers/init.lua | 2 +- mods/ITEMS/mcl_mangrove/init.lua | 6 +++--- mods/ITEMS/mcl_ocean/kelp.lua | 2 +- mods/ITEMS/mcl_ocean/sea_pickle.lua | 4 ++-- mods/ITEMS/mcl_ocean/seagrass.lua | 2 +- mods/ITEMS/mcl_stairs/api.lua | 4 ++-- mods/ITEMS/mcl_stairs/cornerstair.lua | 4 ++-- mods/PLAYER/mcl_meshhand/init.lua | 4 ++-- 20 files changed, 40 insertions(+), 40 deletions(-) diff --git a/mods/ITEMS/mcl_beds/api.lua b/mods/ITEMS/mcl_beds/api.lua index 0fe35403d..5d0406a2a 100644 --- a/mods/ITEMS/mcl_beds/api.lua +++ b/mods/ITEMS/mcl_beds/api.lua @@ -236,7 +236,7 @@ function mcl_beds.register_bed(name, def) on_rotate = rotate, after_destruct = destruct_bed, - _mcl_basenode = name .. "_bottom", + _mcl_baseitem = name .. "_bottom", }) minetest.register_alias(name, name .. "_bottom") diff --git a/mods/ITEMS/mcl_beehives/init.lua b/mods/ITEMS/mcl_beehives/init.lua index 11e18ca1e..a47b2eda5 100644 --- a/mods/ITEMS/mcl_beehives/init.lua +++ b/mods/ITEMS/mcl_beehives/init.lua @@ -113,7 +113,7 @@ for l = 1, 4 do sounds = mcl_sounds.node_sound_wood_defaults(), _mcl_blast_resistance = 0.6, _mcl_hardness = 0.6, - _mcl_basenode = "mcl_beehives:beehive", + _mcl_baseitem = "mcl_beehives:beehive", drop = "", after_dig_node = dig_hive, }) @@ -132,7 +132,7 @@ minetest.register_node("mcl_beehives:beehive_5", { sounds = mcl_sounds.node_sound_wood_defaults(), _mcl_blast_resistance = 0.6, _mcl_hardness = 0.6, - _mcl_basenode = "mcl_beehives:beehive", + _mcl_baseitem = "mcl_beehives:beehive", on_rightclick = honey_harvest, drop = "", after_dig_node = dig_hive, @@ -173,7 +173,7 @@ for i = 1, 4 do sounds = mcl_sounds.node_sound_wood_defaults(), _mcl_blast_resistance = 0.3, _mcl_hardness = 0.3, - _mcl_basenode = "mcl_beehives:bee_nest", + _mcl_baseitem = "mcl_beehives:bee_nest", drop = "", after_dig_node = dig_hive, }) @@ -193,7 +193,7 @@ minetest.register_node("mcl_beehives:bee_nest_5", { _mcl_blast_resistance = 0.3, _mcl_hardness = 0.3, _mcl_honey_level = 5, - _mcl_basenode = "mcl_beehives:bee_nest", + _mcl_baseitem = "mcl_beehives:bee_nest", on_rightclick = honey_harvest, drop = "", after_dig_node = dig_hive, diff --git a/mods/ITEMS/mcl_brewing/init.lua b/mods/ITEMS/mcl_brewing/init.lua index dd260e2c3..5979c313e 100644 --- a/mods/ITEMS/mcl_brewing/init.lua +++ b/mods/ITEMS/mcl_brewing/init.lua @@ -405,7 +405,7 @@ local tpl_brewing_stand = { sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 1, _mcl_hardness = 1, - _mcl_basenode = "mcl_brewing:stand_000", + _mcl_baseitem = "mcl_brewing:stand_000", after_dig_node = drop_contents, allow_metadata_inventory_take = allow_take, allow_metadata_inventory_put = allow_put, diff --git a/mods/ITEMS/mcl_cocoas/init.lua b/mods/ITEMS/mcl_cocoas/init.lua index 3ca06812f..2c9a8f9e0 100644 --- a/mods/ITEMS/mcl_cocoas/init.lua +++ b/mods/ITEMS/mcl_cocoas/init.lua @@ -95,7 +95,7 @@ local crop_def = { on_rotate = false, _mcl_blast_resistance = 3, _mcl_hardness = 0.2, - _mcl_basenode = "mcl_cocoas:cocoa_beans", + _mcl_baseitem = "mcl_cocoas:cocoa_beans", _on_bone_meal = function(_, _, _, pos, n) if n.name == "mcl_cocoas:cocoa_1" or n.name == "mcl_cocoas:cocoa_2" then return mcl_cocoas.grow(pos) diff --git a/mods/ITEMS/mcl_doors/api_doors.lua b/mods/ITEMS/mcl_doors/api_doors.lua index de3715a18..e02490050 100644 --- a/mods/ITEMS/mcl_doors/api_doors.lua +++ b/mods/ITEMS/mcl_doors/api_doors.lua @@ -297,7 +297,7 @@ function mcl_doors:register_door(name, def) groups = def.groups, _mcl_hardness = def._mcl_hardness, _mcl_blast_resistance = def._mcl_blast_resistance, - _mcl_basenode = name, + _mcl_baseitem = name, sounds = def.sounds, after_destruct = function(bottom, _) @@ -377,7 +377,7 @@ function mcl_doors:register_door(name, def) groups = def.groups, _mcl_hardness = def._mcl_hardness, _mcl_blast_resistance = def._mcl_blast_resistance, - _mcl_basenode = name, + _mcl_baseitem = name, sounds = def.sounds, after_destruct = function(top, oldnode) @@ -457,7 +457,7 @@ function mcl_doors:register_door(name, def) groups = def.groups, _mcl_hardness = def._mcl_hardness, _mcl_blast_resistance = def._mcl_blast_resistance, - _mcl_basenode = name, + _mcl_baseitem = name, sounds = def.sounds, after_destruct = function(bottom, _) @@ -537,7 +537,7 @@ function mcl_doors:register_door(name, def) groups = def.groups, _mcl_hardness = def._mcl_hardness, _mcl_blast_resistance = def._mcl_blast_resistance, - _mcl_basenode = name, + _mcl_baseitem = name, sounds = def.sounds, after_destruct = function(top, oldnode) diff --git a/mods/ITEMS/mcl_doors/api_trapdoors.lua b/mods/ITEMS/mcl_doors/api_trapdoors.lua index 7881a8957..98f193267 100644 --- a/mods/ITEMS/mcl_doors/api_trapdoors.lua +++ b/mods/ITEMS/mcl_doors/api_trapdoors.lua @@ -220,7 +220,7 @@ function mcl_doors:register_trapdoor(name, def) groups = groups_open, _mcl_hardness = def._mcl_hardness, _mcl_blast_resistance = def._mcl_blast_resistance, - _mcl_basenode = name, + _mcl_baseitem = name, sounds = def.sounds, drop = name, node_box = { diff --git a/mods/ITEMS/mcl_farming/beetroot.lua b/mods/ITEMS/mcl_farming/beetroot.lua index 93ef55623..88da2f274 100644 --- a/mods/ITEMS/mcl_farming/beetroot.lua +++ b/mods/ITEMS/mcl_farming/beetroot.lua @@ -43,7 +43,7 @@ minetest.register_node("mcl_farming:beetroot_0", { sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _on_bone_meal = on_bone_meal, - _mcl_basenode = "mcl_farming:beetroot_seeds", + _mcl_baseitem = "mcl_farming:beetroot_seeds", }) minetest.register_node("mcl_farming:beetroot_1", { @@ -69,7 +69,7 @@ minetest.register_node("mcl_farming:beetroot_1", { sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _on_bone_meal = on_bone_meal, - _mcl_basenode = "mcl_farming:beetroot_seeds", + _mcl_baseitem = "mcl_farming:beetroot_seeds", }) minetest.register_node("mcl_farming:beetroot_2", { @@ -95,7 +95,7 @@ minetest.register_node("mcl_farming:beetroot_2", { sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _on_bone_meal = on_bone_meal, - _mcl_basenode = "mcl_farming:beetroot_seeds", + _mcl_baseitem = "mcl_farming:beetroot_seeds", }) minetest.register_node("mcl_farming:beetroot", { @@ -149,7 +149,7 @@ minetest.register_node("mcl_farming:beetroot", { sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _on_bone_meal = on_bone_meal, - _mcl_basenode = "mcl_farming:beetroot_seeds", + _mcl_baseitem = "mcl_farming:beetroot_seeds", }) minetest.register_craftitem("mcl_farming:beetroot_item", { diff --git a/mods/ITEMS/mcl_farming/carrots.lua b/mods/ITEMS/mcl_farming/carrots.lua index f2513833e..79e5597a2 100644 --- a/mods/ITEMS/mcl_farming/carrots.lua +++ b/mods/ITEMS/mcl_farming/carrots.lua @@ -50,7 +50,7 @@ for i=1, 7 do sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _on_bone_meal = on_bone_meal, - _mcl_basenode = "mcl_farming:carrot_item", + _mcl_baseitem = "mcl_farming:carrot_item", }) end @@ -92,7 +92,7 @@ minetest.register_node("mcl_farming:carrot", { max_count = 4, cap = 5, }, - _mcl_basenode = "mcl_farming:carrot_item", + _mcl_baseitem = "mcl_farming:carrot_item", }) minetest.register_craftitem("mcl_farming:carrot_item", { diff --git a/mods/ITEMS/mcl_farming/melon.lua b/mods/ITEMS/mcl_farming/melon.lua index b606380df..1345d36fb 100644 --- a/mods/ITEMS/mcl_farming/melon.lua +++ b/mods/ITEMS/mcl_farming/melon.lua @@ -111,7 +111,7 @@ for s=1,7 do sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _on_bone_meal = on_bone_meal, - _mcl_basenode = "mcl_farming:melon_seeds", + _mcl_baseitem = "mcl_farming:melon_seeds", }) end @@ -123,7 +123,7 @@ local stem_def = { tiles = {"mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127"}, wield_image = "mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127", inventory_image = "mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127", - _mcl_basenode = "mcl_farming:melon_seeds", + _mcl_baseitem = "mcl_farming:melon_seeds", } -- Register stem growth diff --git a/mods/ITEMS/mcl_farming/potatoes.lua b/mods/ITEMS/mcl_farming/potatoes.lua index c2c84b8e8..5f513cf77 100644 --- a/mods/ITEMS/mcl_farming/potatoes.lua +++ b/mods/ITEMS/mcl_farming/potatoes.lua @@ -54,7 +54,7 @@ for i=1, 7 do sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _on_bone_meal = on_bone_meal, - _mcl_basenode = "mcl_farming:potato_item", + _mcl_baseitem = "mcl_farming:potato_item", }) end @@ -96,7 +96,7 @@ minetest.register_node("mcl_farming:potato", { max_count = 4, cap = 5 }, - _mcl_basenode = "mcl_farming:potato_item", + _mcl_baseitem = "mcl_farming:potato_item", }) minetest.register_craftitem("mcl_farming:potato_item", { diff --git a/mods/ITEMS/mcl_farming/pumpkin.lua b/mods/ITEMS/mcl_farming/pumpkin.lua index c2bf31379..d83148eff 100644 --- a/mods/ITEMS/mcl_farming/pumpkin.lua +++ b/mods/ITEMS/mcl_farming/pumpkin.lua @@ -102,7 +102,7 @@ for s=1,7 do sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _on_bone_meal = on_bone_meal, - _mcl_basenode = "mcl_farming:pumpkin_seeds", + _mcl_baseitem = "mcl_farming:pumpkin_seeds", }) end @@ -113,7 +113,7 @@ local stem_def = { tiles = {"mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127"}, wield_image = "mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127", inventory_image = "mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127", - _mcl_basenode = "mcl_farming:pumpkin_seeds", + _mcl_baseitem = "mcl_farming:pumpkin_seeds", } -- Template for pumpkin diff --git a/mods/ITEMS/mcl_farming/wheat.lua b/mods/ITEMS/mcl_farming/wheat.lua index 1dd984bda..0a17d9f77 100644 --- a/mods/ITEMS/mcl_farming/wheat.lua +++ b/mods/ITEMS/mcl_farming/wheat.lua @@ -70,7 +70,7 @@ for i=1,7 do sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _on_bone_meal = on_bone_meal, - _mcl_basenode = "mcl_farming:wheat_seeds", + _mcl_baseitem = "mcl_farming:wheat_seeds", }) end @@ -110,7 +110,7 @@ minetest.register_node("mcl_farming:wheat", { max_count = 6, cap = 7 }, - _mcl_basenode = "mcl_farming:wheat_seeds", + _mcl_baseitem = "mcl_farming:wheat_seeds", }) mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3", "mcl_farming:wheat_4", "mcl_farming:wheat_5", "mcl_farming:wheat_6", "mcl_farming:wheat_7"}, 25, 20) diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index aaef8625e..114b696d3 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -316,7 +316,7 @@ function mcl_flowers.add_large_plant(name, def) drop = def.bottom.drop or ( "mcl_flowers:"..name ), _mcl_shears_drop = def.bottom._mcl_shears_drop, _mcl_fortune_drop = def.bottom._mcl_fortune_drop, - _mcl_basenode = "mcl_flowers:"..name, + _mcl_baseitem = "mcl_flowers:"..name, after_destruct = function(pos, _) -- Remove bottom half of flower (if it exists) local top = pos diff --git a/mods/ITEMS/mcl_mangrove/init.lua b/mods/ITEMS/mcl_mangrove/init.lua index ba268e963..3112af5d5 100644 --- a/mods/ITEMS/mcl_mangrove/init.lua +++ b/mods/ITEMS/mcl_mangrove/init.lua @@ -102,7 +102,7 @@ for _,root in pairs(propagule_water_nodes) do _mcl_hardness = 0, _mcl_blast_resistance = 0, _mcl_silk_touch_drop = true, - _mcl_basenode = "mcl_mangrove:propagule", + _mcl_baseitem = "mcl_mangrove:propagule", }) end @@ -226,7 +226,7 @@ minetest.register_node("mcl_mangrove:hanging_propagule_1", { tiles = {"mcl_mangrove_propagule_hanging.png"}, inventory_image = "mcl_mangrove_propagule.png", wield_image = "mcl_mangrove_propagule.png", - _mcl_basenode = "mcl_mangrove:propagule", + _mcl_baseitem = "mcl_mangrove:propagule", }) @@ -272,7 +272,7 @@ local wlroots = { handy = 1, hoey = 1, water=4, liquid=3, puts_out_fire=1, dig_by_piston = 1, deco_block = 1, not_in_creative_inventory=1 }, _mcl_blast_resistance = 100, _mcl_hardness = -1, -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode - _mcl_basenode = "mcl_mangrove:mangrove_roots", + _mcl_baseitem = "mcl_mangrove:mangrove_roots", on_construct = function(pos) local dim = mcl_worlds.pos_to_dimension(pos) if dim == "nether" then diff --git a/mods/ITEMS/mcl_ocean/kelp.lua b/mods/ITEMS/mcl_ocean/kelp.lua index 32d03b0a9..b5ef87722 100644 --- a/mods/ITEMS/mcl_ocean/kelp.lua +++ b/mods/ITEMS/mcl_ocean/kelp.lua @@ -491,7 +491,7 @@ kelp.surface_deftemplate = { --_mcl_falling_node_alternative = is_falling and nodename or nil, _mcl_hardness = 0, _mcl_blast_resistance = 0, - _mcl_basenode = "mcl_ocean:kelp" + _mcl_baseitem = "mcl_ocean:kelp" } -- Commented properties are the ones obtained using register_kelp_surface. diff --git a/mods/ITEMS/mcl_ocean/sea_pickle.lua b/mods/ITEMS/mcl_ocean/sea_pickle.lua index ba6de47cf..14c8b705d 100644 --- a/mods/ITEMS/mcl_ocean/sea_pickle.lua +++ b/mods/ITEMS/mcl_ocean/sea_pickle.lua @@ -169,7 +169,7 @@ for s=1,4 do on_place = on_place, _mcl_sea_pickle_off = "mcl_ocean:sea_pickle_"..s.."_off_"..ontop, _mcl_sea_pickle_next = next_on, - _mcl_basenode = "mcl_ocean:sea_pickle_1_dead_brain_coral_block", + _mcl_baseitem = "mcl_ocean:sea_pickle_1_dead_brain_coral_block", _mcl_hardness = 0, _mcl_blast_resistance = 0, _mcl_cooking_output = cookoutput, @@ -204,7 +204,7 @@ for s=1,4 do end, _mcl_sea_pickle_on = "mcl_ocean:sea_pickle_"..s.."_"..ontop, _mcl_sea_pickle_next = next_off, - _mcl_basenode = "mcl_ocean:sea_pickle_1_dead_brain_coral_block", + _mcl_baseitem = "mcl_ocean:sea_pickle_1_dead_brain_coral_block", _mcl_hardness = 0, _mcl_blast_resistance = 0, }) diff --git a/mods/ITEMS/mcl_ocean/seagrass.lua b/mods/ITEMS/mcl_ocean/seagrass.lua index 0902f64d1..06f9f5b4e 100644 --- a/mods/ITEMS/mcl_ocean/seagrass.lua +++ b/mods/ITEMS/mcl_ocean/seagrass.lua @@ -143,7 +143,7 @@ for s=1, #surfaces do _mcl_shears_drop = { "mcl_ocean:seagrass" }, _mcl_hardness = 0, _mcl_blast_resistance = 0, - _mcl_basenode = "mcl_ocean:seagrass", + _mcl_baseitem = "mcl_ocean:seagrass", }) if mod_doc and surfaces[s][1] ~= "dirt" then doc.add_entry_alias("nodes", "mcl_ocean:seagrass_dirt", "nodes", "mcl_ocean:seagrass_"..surfaces[s][1]) diff --git a/mods/ITEMS/mcl_stairs/api.lua b/mods/ITEMS/mcl_stairs/api.lua index d6460fdc2..7450e62a5 100644 --- a/mods/ITEMS/mcl_stairs/api.lua +++ b/mods/ITEMS/mcl_stairs/api.lua @@ -360,7 +360,7 @@ local function register_slab(subname, stairdef) topdef._doc_items_usagehelp = nil topdef.drop = lower_slab topdef._mcl_other_slab_half = lower_slab - topdef._mcl_basenode = lower_slab + topdef._mcl_baseitem = lower_slab function topdef.on_rotate(pos, node, _, mode) -- Flip slab if mode == screwdriver.ROTATE_AXIS then @@ -397,7 +397,7 @@ local function register_slab(subname, stairdef) drop = lower_slab .. " 2", _mcl_hardness = stairdef.hardness, _mcl_blast_resistance = stairdef.blast_resistance, - _mcl_basenode = lower_slab, + _mcl_baseitem = lower_slab, }) if stairdef.recipeitem and stairdef.recipeitem ~= "" then diff --git a/mods/ITEMS/mcl_stairs/cornerstair.lua b/mods/ITEMS/mcl_stairs/cornerstair.lua index ae9143349..0cac30169 100644 --- a/mods/ITEMS/mcl_stairs/cornerstair.lua +++ b/mods/ITEMS/mcl_stairs/cornerstair.lua @@ -761,7 +761,7 @@ function mcl_stairs.cornerstair.add(name, stairtiles) stairs = {name, name.."_outer", name.."_inner"}, after_dig_node = function(pos, oldnode) after_dig_node(pos, oldnode) end, _mcl_hardness = node_def._mcl_hardness, - _mcl_basenode = name, + _mcl_baseitem = name, on_rotate = false, placement_prevented = placement_prevented_outer, }) @@ -787,7 +787,7 @@ function mcl_stairs.cornerstair.add(name, stairtiles) stairs = {name, name.."_outer", name.."_inner"}, after_dig_node = function(pos, oldnode) after_dig_node(pos, oldnode) end, _mcl_hardness = node_def._mcl_hardness, - _mcl_basenode = name, + _mcl_baseitem = name, on_rotate = false, placement_prevented = placement_prevented_inner, }) diff --git a/mods/PLAYER/mcl_meshhand/init.lua b/mods/PLAYER/mcl_meshhand/init.lua index cbfda8412..383d0b12d 100644 --- a/mods/PLAYER/mcl_meshhand/init.lua +++ b/mods/PLAYER/mcl_meshhand/init.lua @@ -118,8 +118,8 @@ minetest.override_item("", { local stack = ItemStack(name) if minetest.get_item_group(name, "not_in_creative_inventory") > 0 then local def = stack:get_definition() - if not def._mcl_basenode then return end - name = def._mcl_basenode + if not def._mcl_baseitem then return end + name = def._mcl_baseitem stack = ItemStack(name) end local inv = placer:get_inventory()