diff options
author | Jordan Irwin <antumdeluge@gmail.com> | 2017-05-18 02:33:56 -0700 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-05-18 05:33:56 -0400 |
commit | 69d994a2a28b435a5cc37528fccce04c44d1d5ba (patch) | |
tree | ca7ca1d2071f3b52ef1646b95c8cfe2c1727e868 | |
parent | 7d70d79cdac6f44a5409e78e93bbcb419e1c3958 (diff) | |
download | pipeworks-69d994a2a28b435a5cc37528fccce04c44d1d5ba.tar pipeworks-69d994a2a28b435a5cc37528fccce04c44d1d5ba.tar.gz pipeworks-69d994a2a28b435a5cc37528fccce04c44d1d5ba.tar.bz2 pipeworks-69d994a2a28b435a5cc37528fccce04c44d1d5ba.tar.xz pipeworks-69d994a2a28b435a5cc37528fccce04c44d1d5ba.zip |
Replace deprecated methods: (#179)
- 'setting_get' with 'settings:get'
- 'setting_getbool' with 'settings:get_bool'
-rw-r--r-- | default_settings.lua | 2 | ||||
-rw-r--r-- | flowing_logic.lua | 2 | ||||
-rw-r--r-- | init.lua | 2 | ||||
-rw-r--r-- | item_transport.lua | 4 | ||||
-rw-r--r-- | luaentity.lua | 2 | ||||
-rw-r--r-- | signal_tubes.lua | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/default_settings.lua b/default_settings.lua index 6f661b5..99b86fe 100644 --- a/default_settings.lua +++ b/default_settings.lua @@ -30,7 +30,7 @@ local settings = { for name, value in pairs(settings) do local setting_type = type(value) if setting_type == "boolean" then - pipeworks[name] = minetest.setting_getbool(prefix..name) + pipeworks[name] = minetest.settings:get_bool(prefix..name) if pipeworks[name] == nil then pipeworks[name] = value end diff --git a/flowing_logic.lua b/flowing_logic.lua index e1c0bf5..632baa6 100644 --- a/flowing_logic.lua +++ b/flowing_logic.lua @@ -4,7 +4,7 @@ -- Contributed by mauvebic, 2013-01-03, rewritten a bit by Vanessa Ezekowitz -- -local finitewater = minetest.setting_getbool("liquid_finite") +local finitewater = minetest.settings:get_bool("liquid_finite") pipeworks.check_for_liquids = function(pos) local coords = { @@ -26,7 +26,7 @@ end -- Random variables pipeworks.expect_infinite_stacks = true -if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then +if minetest.get_modpath("unified_inventory") or not minetest.settings:get_bool("creative_mode") then pipeworks.expect_infinite_stacks = false end diff --git a/item_transport.lua b/item_transport.lua index 43adeea..b2d2aa2 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -1,6 +1,6 @@ local luaentity = pipeworks.luaentity -local enable_max_limit = minetest.setting_get("pipeworks_enable_items_per_tube_limit") -local max_tube_limit = tonumber(minetest.setting_get("pipeworks_max_items_per_tube")) or 30 +local enable_max_limit = minetest.settings:get("pipeworks_enable_items_per_tube_limit") +local max_tube_limit = tonumber(minetest.settings:get("pipeworks_max_items_per_tube")) or 30 if enable_max_limit == nil then enable_max_limit = true end function pipeworks.tube_item(pos, item) diff --git a/luaentity.lua b/luaentity.lua index ab7280c..382b0c1 100644 --- a/luaentity.lua +++ b/luaentity.lua @@ -71,7 +71,7 @@ end local active_blocks = {} -- These only contain active blocks near players (i.e., not forceloaded ones) local move_entities_globalstep_part1 = function(dtime) - local active_block_range = tonumber(minetest.setting_get("active_block_range")) or 2 + local active_block_range = tonumber(minetest.settings:get("active_block_range")) or 2 local new_active_blocks = {} for _, player in ipairs(minetest.get_connected_players()) do local blockpos = get_blockpos(player:getpos()) diff --git a/signal_tubes.lua b/signal_tubes.lua index 3b2653c..a0a8039 100644 --- a/signal_tubes.lua +++ b/signal_tubes.lua @@ -1,5 +1,5 @@ if pipeworks.enable_detector_tube then - local detector_tube_step = 5 * tonumber(minetest.setting_get("dedicated_server_step")) + local detector_tube_step = 5 * tonumber(minetest.settings:get("dedicated_server_step")) pipeworks.register_tube("pipeworks:detector_tube_on", { description = "Detecting Pneumatic Tube Segment on (you hacker you)", inventory_image = "pipeworks_detector_tube_inv.png", |