forked from mtcontrib/pipeworks
Replace deprecated methods: (#179)
- 'setting_get' with 'settings:get' - 'setting_getbool' with 'settings:get_bool'
This commit is contained in:
parent
7d70d79cda
commit
69d994a2a2
|
@ -30,7 +30,7 @@ local settings = {
|
||||||
for name, value in pairs(settings) do
|
for name, value in pairs(settings) do
|
||||||
local setting_type = type(value)
|
local setting_type = type(value)
|
||||||
if setting_type == "boolean" then
|
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
|
if pipeworks[name] == nil then
|
||||||
pipeworks[name] = value
|
pipeworks[name] = value
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
-- Contributed by mauvebic, 2013-01-03, rewritten a bit by Vanessa Ezekowitz
|
-- 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)
|
pipeworks.check_for_liquids = function(pos)
|
||||||
local coords = {
|
local coords = {
|
||||||
|
|
2
init.lua
2
init.lua
|
@ -26,7 +26,7 @@ end
|
||||||
-- Random variables
|
-- Random variables
|
||||||
|
|
||||||
pipeworks.expect_infinite_stacks = true
|
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
|
pipeworks.expect_infinite_stacks = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local luaentity = pipeworks.luaentity
|
local luaentity = pipeworks.luaentity
|
||||||
local enable_max_limit = minetest.setting_get("pipeworks_enable_items_per_tube_limit")
|
local enable_max_limit = minetest.settings:get("pipeworks_enable_items_per_tube_limit")
|
||||||
local max_tube_limit = tonumber(minetest.setting_get("pipeworks_max_items_per_tube")) or 30
|
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
|
if enable_max_limit == nil then enable_max_limit = true end
|
||||||
|
|
||||||
function pipeworks.tube_item(pos, item)
|
function pipeworks.tube_item(pos, item)
|
||||||
|
|
|
@ -71,7 +71,7 @@ end
|
||||||
local active_blocks = {} -- These only contain active blocks near players (i.e., not forceloaded ones)
|
local active_blocks = {} -- These only contain active blocks near players (i.e., not forceloaded ones)
|
||||||
|
|
||||||
local move_entities_globalstep_part1 = function(dtime)
|
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 = {}
|
local new_active_blocks = {}
|
||||||
for _, player in ipairs(minetest.get_connected_players()) do
|
for _, player in ipairs(minetest.get_connected_players()) do
|
||||||
local blockpos = get_blockpos(player:getpos())
|
local blockpos = get_blockpos(player:getpos())
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
if pipeworks.enable_detector_tube then
|
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", {
|
pipeworks.register_tube("pipeworks:detector_tube_on", {
|
||||||
description = "Detecting Pneumatic Tube Segment on (you hacker you)",
|
description = "Detecting Pneumatic Tube Segment on (you hacker you)",
|
||||||
inventory_image = "pipeworks_detector_tube_inv.png",
|
inventory_image = "pipeworks_detector_tube_inv.png",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user