From 2aef6adf19713c2ca9216ced614b5960e7c1457c Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Thu, 15 Jun 2023 20:51:45 -0400 Subject: [PATCH] fix get key configuration helper access * seems something related to syntactic sugar seems do not works anymore.. as i asked repect some commits at https://notabug.org/TenPlus1/nssm/issues/19 --- helpers.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/helpers.lua b/helpers.lua index 43474b6..7a69d72 100644 --- a/helpers.lua +++ b/helpers.lua @@ -10,12 +10,12 @@ ----------------------------------------------------- local is_46 = minetest.has_feature("add_entity_with_staticdata") -if is_46 then - get_minetest_config = function( key ) - minetest.settings:get( key ) +function get_minetest_config( key ) + if is_46 then + return minetest.settings:get( key ) + else + return core.setting_get( key ) -- backwards compatibility end -else - get_minetest_config = core.setting_get -- backwards compatibility end function convert_ipv4( str )