Compare commits

...

3 Commits

Author SHA1 Message Date
6822dfd9c4 mod - firefly - fix wrong check for object on place 2024-04-28 09:11:18 -04:00
91b64d2996 mod creative - fix check for newer lang on engine 2024-04-28 08:58:50 -04:00
8a7aed8dc1 mods doors - fix error on sounds that xpected table on new engines
* fix error `bad argument # 5 to 'register_item_raw' (table expected, got string)`
* backported codeberg commit 201cf5f for newer engines mostly 5.3
2024-04-28 08:55:55 -04:00
3 changed files with 7 additions and 4 deletions

View File

@ -49,7 +49,7 @@ local function update_sfinv(name)
end)
end
if is_50 then
if creative.is_50 then
privs_definition = {
description = privs_description,
give_to_singleplayer = false,
@ -186,7 +186,7 @@ function creative.update_creative_inventory(player_name, tab_content)
local lang = minetest.settings:get("language") or "en"
local player_info = minetest.get_player_information(player_name)
if is_53 then
if creative.is_53 then
if player_info and player_info.lang_code ~= "" then
lang = player_info.lang_code
end

View File

@ -757,7 +757,7 @@ function doors.register_fencegate(name, def)
local fence_closed = table.copy(fence)
fence_closed.mesh = "doors_fencegate_closed.obj"
fence_closed.gate = name .. "_open"
fence_closed.sound = "doors_fencegate_open"
fence_closed.sound = (is_54 and {"doors_fencegate_close"} or "doors_fencegate_close")
fence_closed.collision_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4},
@ -766,7 +766,7 @@ function doors.register_fencegate(name, def)
local fence_open = table.copy(fence)
fence_open.mesh = "doors_fencegate_open.obj"
fence_open.gate = name .. "_closed"
fence_open.sound = "doors_fencegate_close"
fence_open.sound = (is_54 and {"doors_fencegate_open"} or "doors_fencegate_open")
fence_open.groups.not_in_creative_inventory = 1
fence_open.collision_box = {
type = "fixed",

View File

@ -45,6 +45,7 @@ minetest.register_tool("fireflies:bug_net", {
description = "Bug Net",
inventory_image = "fireflies_bugnet.png",
on_use = function(itemstack, player, pointed_thing)
if not player then return itemstack end
if not pointed_thing or pointed_thing.type ~= "node" or
minetest.is_protected(pointed_thing.under, player:get_player_name()) then
return
@ -104,6 +105,8 @@ minetest.register_node("fireflies:firefly_bottle", {
},
sounds = default.node_sound_glass_defaults(),
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
if not player then return itemstack end
local lower_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
if minetest.is_protected(pos, player:get_player_name()) or
minetest.get_node(lower_pos).name ~= "air" then