From 4025e001f03c51ef67ce00068e7c1b79c32e8f18 Mon Sep 17 00:00:00 2001 From: mazes-80 <1608580+mazes-80@users.noreply.github.com> Date: Sun, 14 Aug 2022 14:22:36 +0200 Subject: [PATCH 1/2] Deprecated: setting_get -> settings:get --- gravelsieve/init.lua | 16 +++++----------- sl_controller/config.lua | 2 +- tubelib/init.lua | 6 +++--- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/gravelsieve/init.lua b/gravelsieve/init.lua index 4dc7730..6a47973 100644 --- a/gravelsieve/init.lua +++ b/gravelsieve/init.lua @@ -48,21 +48,15 @@ local S = gravelsieve.S dofile(minetest.get_modpath("gravelsieve") .. "/hammer.lua") -local settings_get -if minetest.setting_get then - settings_get = minetest.setting_get -else - settings_get = function(...) return minetest.settings:get(...) end -end -gravelsieve.ore_rarity = tonumber(settings_get("gravelsieve_ore_rarity")) or 1.16 -gravelsieve.ore_max_elevation = tonumber(settings_get("gravelsieve_ore_max_elevation")) or 0 -gravelsieve.ore_min_elevation = tonumber(settings_get("gravelsieve_ore_min_elevation")) or -30912 +gravelsieve.ore_rarity = tonumber(minetest.settings:get("gravelsieve_ore_rarity")) or 1.16 +gravelsieve.ore_max_elevation = tonumber(minetest.settings:get("gravelsieve_ore_max_elevation")) or 0 +gravelsieve.ore_min_elevation = tonumber(minetest.settings:get("gravelsieve_ore_min_elevation")) or -30912 local y_spread = math.max(1 + gravelsieve.ore_max_elevation - gravelsieve.ore_min_elevation, 1) -- Increase the probability over the natural occurrence -local PROBABILITY_FACTOR = tonumber(settings_get("gravelsieve_probability_factor")) or 3 +local PROBABILITY_FACTOR = tonumber(minetest.settings:get("gravelsieve_probability_factor")) or 3 -local STEP_DELAY = tonumber(settings_get("gravelsieve_step_delay")) or 1.0 +local STEP_DELAY = tonumber(minetest.settings:get("gravelsieve_step_delay")) or 1.0 -- tubelib aging feature local AGING_LEVEL1 = nil diff --git a/sl_controller/config.lua b/sl_controller/config.lua index 407c516..6c9558f 100644 --- a/sl_controller/config.lua +++ b/sl_controller/config.lua @@ -1,2 +1,2 @@ -- Battery capacity in usec CPU time -sl_controller.battery_capacity = tonumber(minetest.setting_get("battery_capacity")) or 5000000 +sl_controller.battery_capacity = tonumber(minetest.settings:get("battery_capacity")) or 5000000 diff --git a/tubelib/init.lua b/tubelib/init.lua index 8c87414..079c8bd 100644 --- a/tubelib/init.lua +++ b/tubelib/init.lua @@ -40,9 +40,9 @@ local S = tubelib.S tubelib.version = 2.00 -tubelib.max_num_forceload_blocks = tonumber(minetest.setting_get("tubelib_max_num_forceload_blocks")) or 10 -tubelib.basalt_stone_enabled = minetest.setting_get("tubelib_basalt_stone_enabled") == "true" -tubelib.machine_aging_value = tonumber(minetest.setting_get("tubelib_machine_aging_value")) or 100 +tubelib.max_num_forceload_blocks = tonumber(minetest.settings:get("tubelib_max_num_forceload_blocks")) or 10 +tubelib.basalt_stone_enabled = minetest.settings:get("tubelib_basalt_stone_enabled") == "true" +tubelib.machine_aging_value = tonumber(minetest.settings:get("tubelib_machine_aging_value")) or 100 --------------------------- conversion to v0.04 From 4bd27c544adcf5565d5e1b9fb316172e0c2d7c44 Mon Sep 17 00:00:00 2001 From: mazes-80 <1608580+mazes-80@users.noreply.github.com> Date: Sun, 14 Aug 2022 14:27:30 +0200 Subject: [PATCH 2/2] gravelsieve: use_texture_alpha = "clip" --- gravelsieve/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/gravelsieve/init.lua b/gravelsieve/init.lua index 6a47973..e1a96df 100644 --- a/gravelsieve/init.lua +++ b/gravelsieve/init.lua @@ -465,6 +465,7 @@ for idx = 0,4 do minetest.register_node(node_name..idx, { description = description, tiles = tiles_data, + use_texture_alpha = "clip", drawtype = "nodebox", drop = node_name,