From e68065bb50c4513e5afc1687a385c4b64309cb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imre=20P=C3=A9ntek?= Date: Thu, 4 Apr 2024 01:09:39 +0200 Subject: [PATCH 1/2] to fix these messages: 2024-04-04 01:04:37: [Main] Undeclared global variable "default_stone_sounds" accessed at .../moreores/init.lua:129 --- init.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index a31a8b8..6911d51 100644 --- a/init.lua +++ b/init.lua @@ -33,12 +33,15 @@ local stone_ingredient = is_mcl_core_present and "mcl_core:stone" or "default:st local copper_ingredient = is_mcl_core_present and "mcl_copper:copper_ingot" or 'default:copper_ingot' +local default_stone_sounds +local default_metal_sounds + if is_mcl_sounds_present then -local default_stone_sounds = mcl_sounds.node_sound_stone_defaults() -local default_metal_sounds = mcl_sounds.node_sound_metal_defaults() + default_stone_sounds = mcl_sounds.node_sound_stone_defaults() + default_metal_sounds = mcl_sounds.node_sound_metal_defaults() else -local default_stone_sounds = default.node_sound_stone_defaults() -local default_metal_sounds = default.node_sound_metal_defaults() + default_stone_sounds = default.node_sound_stone_defaults() + default_metal_sounds = default.node_sound_metal_defaults() end From e8a4efc63f47892ae98977a521086ae152dd8f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imre=20P=C3=A9ntek?= Date: Thu, 4 Apr 2024 01:20:38 +0200 Subject: [PATCH 2/2] to further drive the point home: luacheck is still happy --- .luacheckrc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index c28dcf0..fe0b58e 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -3,11 +3,6 @@ unused_args = false allow_defined_top = true max_line_length = 90 -ignore = { - "default_stone_sounds", - "default_metal_sounds" -} - stds.minetest = { read_globals = { "DIR_DELIM",