Deprecated: setting_get -> settings:get

This commit is contained in:
mazes-80 2022-08-14 14:22:36 +02:00
parent 16e560a4aa
commit 4025e001f0
3 changed files with 9 additions and 15 deletions

@ -48,21 +48,15 @@ local S = gravelsieve.S
dofile(minetest.get_modpath("gravelsieve") .. "/hammer.lua") dofile(minetest.get_modpath("gravelsieve") .. "/hammer.lua")
local settings_get gravelsieve.ore_rarity = tonumber(minetest.settings:get("gravelsieve_ore_rarity")) or 1.16
if minetest.setting_get then gravelsieve.ore_max_elevation = tonumber(minetest.settings:get("gravelsieve_ore_max_elevation")) or 0
settings_get = minetest.setting_get gravelsieve.ore_min_elevation = tonumber(minetest.settings:get("gravelsieve_ore_min_elevation")) or -30912
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
local y_spread = math.max(1 + gravelsieve.ore_max_elevation - gravelsieve.ore_min_elevation, 1) local y_spread = math.max(1 + gravelsieve.ore_max_elevation - gravelsieve.ore_min_elevation, 1)
-- Increase the probability over the natural occurrence -- 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 -- tubelib aging feature
local AGING_LEVEL1 = nil local AGING_LEVEL1 = nil

@ -1,2 +1,2 @@
-- Battery capacity in usec CPU time -- 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

@ -40,9 +40,9 @@ local S = tubelib.S
tubelib.version = 2.00 tubelib.version = 2.00
tubelib.max_num_forceload_blocks = tonumber(minetest.setting_get("tubelib_max_num_forceload_blocks")) or 10 tubelib.max_num_forceload_blocks = tonumber(minetest.settings:get("tubelib_max_num_forceload_blocks")) or 10
tubelib.basalt_stone_enabled = minetest.setting_get("tubelib_basalt_stone_enabled") == "true" tubelib.basalt_stone_enabled = minetest.settings:get("tubelib_basalt_stone_enabled") == "true"
tubelib.machine_aging_value = tonumber(minetest.setting_get("tubelib_machine_aging_value")) or 100 tubelib.machine_aging_value = tonumber(minetest.settings:get("tubelib_machine_aging_value")) or 100
--------------------------- conversion to v0.04 --------------------------- conversion to v0.04