From 89821a8329681acdbd271a73996654a2c50495d8 Mon Sep 17 00:00:00 2001 From: kabou Date: Sat, 31 Dec 2022 10:41:39 +0100 Subject: [PATCH 1/2] Rename cocoa pod placement function. * Rename cocoa pod placement function to match the `on_place` call in the cocoa pods item definition. * Make the function local, there are no callers outside of mcl_cocoas. --- mods/ITEMS/mcl_cocoas/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_cocoas/init.lua b/mods/ITEMS/mcl_cocoas/init.lua index 7c22927f84..59d902d12b 100644 --- a/mods/ITEMS/mcl_cocoas/init.lua +++ b/mods/ITEMS/mcl_cocoas/init.lua @@ -3,7 +3,7 @@ local S = minetest.get_translator(minetest.get_current_modname()) mcl_cocoas = {} -- Place cocoa -function mcl_cocoas.place(itemstack, placer, pt, plantname) +local function cocoa_place(itemstack, placer, pt, plantname) -- check if pointing at a node if not pt or pt.type ~= "node" then return From 2a37d38f6cb09a97e2de24bff4c7220422cb81bb Mon Sep 17 00:00:00 2001 From: kabou Date: Sat, 31 Dec 2022 11:18:04 +0100 Subject: [PATCH 2/2] Reformat cocoa pod node definition groups. --- mods/ITEMS/mcl_cocoas/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_cocoas/init.lua b/mods/ITEMS/mcl_cocoas/init.lua index 59d902d12b..0792972bec 100644 --- a/mods/ITEMS/mcl_cocoas/init.lua +++ b/mods/ITEMS/mcl_cocoas/init.lua @@ -90,7 +90,11 @@ local crop_def = { }, }, groups = { - handy=1,axey=1, cocoa=1, not_in_creative_inventory=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, attached_node_facedir=1, + handy = 1, axey = 1, + dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, + attached_node_facedir=1, + not_in_creative_inventory=1, + cocoa=1 }, sounds = mcl_sounds.node_sound_wood_defaults(), on_rotate = false,