Remove references to deprecated mintest.setting_ functions
parent
6f0eadfa07
commit
6d752ff603
|
@ -81,7 +81,7 @@ function beds.register_bed(name, def)
|
|||
minetest.set_node(pos, {name = name .. "_bottom", param2 = dir})
|
||||
minetest.set_node(botpos, {name = name .. "_top", param2 = dir})
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
local pi = math.pi
|
||||
local player_in_bed = 0
|
||||
local is_sp = minetest.is_singleplayer()
|
||||
local enable_respawn = minetest.setting_getbool("enable_bed_respawn")
|
||||
local enable_respawn = minetest.settings:get_bool("enable_bed_respawn",true)
|
||||
if enable_respawn == nil then
|
||||
enable_respawn = true
|
||||
end
|
||||
|
@ -22,7 +22,7 @@ local function get_look_yaw(pos)
|
|||
end
|
||||
|
||||
local function is_night_skip_enabled()
|
||||
local enable_night_skip = minetest.setting_getbool("enable_bed_night_skip")
|
||||
local enable_night_skip = minetest.settings:get_bool("enable_bed_night_skip")
|
||||
if enable_night_skip == nil then
|
||||
enable_night_skip = true
|
||||
end
|
||||
|
|
|
@ -113,7 +113,7 @@ function boat.on_punch(self, puncher)
|
|||
minetest.after(0.1, function()
|
||||
self.object:remove()
|
||||
end)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
local inv = puncher:get_inventory()
|
||||
if inv:room_for_item("main", "boats:boat") then
|
||||
inv:add_item("main", "boats:boat")
|
||||
|
@ -231,7 +231,7 @@ minetest.register_craftitem("boats:boat", {
|
|||
end
|
||||
pointed_thing.under.y = pointed_thing.under.y + 0.5
|
||||
minetest.add_entity(pointed_thing.under, "boats:boat")
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
print("[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loading....")
|
||||
print("[BobBlocks] loading Blocks")
|
||||
--print("[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loading....")
|
||||
--print("[BobBlocks] loading Blocks")
|
||||
dofile(minetest.get_modpath("bobblocks") .. "/blocks.lua")
|
||||
print("[BobBlocks] loaded Blocks")
|
||||
--print("[BobBlocks] loading Health")
|
||||
--print("[BobBlocks] loaded Blocks")
|
||||
----print("[BobBlocks] loading Health")
|
||||
--dofile(minetest.get_modpath("bobblocks") .. "/health.lua")
|
||||
--print("[BobBlocks] loaded Health")
|
||||
--print("[BobBlocks] loading Traps")
|
||||
----print("[BobBlocks] loaded Health")
|
||||
----print("[BobBlocks] loading Traps")
|
||||
--dofile(minetest.get_modpath("bobblocks") .. "/trap.lua")
|
||||
--print("[BobBlocks] loaded Traps")
|
||||
print("[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loaded!")
|
||||
----print("[BobBlocks] loaded Traps")
|
||||
--print("[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loaded!")
|
|
@ -21,8 +21,8 @@ local bones_formspec =
|
|||
"listring[current_player;main]" ..
|
||||
default.get_hotbar_bg(0,4.85)
|
||||
|
||||
local share_bones_time = tonumber(minetest.setting_get("share_bones_time")) or 1200
|
||||
local share_bones_time_early = tonumber(minetest.setting_get("share_bones_time_early")) or share_bones_time / 4
|
||||
local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or 1200
|
||||
local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4
|
||||
|
||||
minetest.register_node("bones:bones", {
|
||||
description = "Bones",
|
||||
|
@ -161,13 +161,13 @@ end
|
|||
|
||||
minetest.register_on_dieplayer(function(player)
|
||||
|
||||
local bones_mode = minetest.setting_get("bones_mode") or "bones"
|
||||
local bones_mode = minetest.settings:get("bones_mode") or "bones"
|
||||
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then
|
||||
bones_mode = "bones"
|
||||
end
|
||||
|
||||
-- return if keep inventory set or in creative mode
|
||||
if bones_mode == "keep" or minetest.setting_getbool("creative_mode") then
|
||||
if bones_mode == "keep" or minetest.settings:get_bool("creative_mode") then
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
@ -358,7 +358,7 @@ minetest.register_craftitem(":carts:cart", {
|
|||
return
|
||||
end
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
|
|
@ -78,7 +78,7 @@ minetest.register_entity(":__builtin:item", {
|
|||
end,
|
||||
|
||||
on_step = function(self, dtime)
|
||||
local time = minetest.setting_get("remove_items")
|
||||
local time = minetest.settings:get("remove_items")
|
||||
if not time then
|
||||
time = 300
|
||||
end
|
||||
|
@ -177,6 +177,6 @@ minetest.register_entity(":__builtin:item", {
|
|||
end,
|
||||
})
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
if minetest.settings:get("log_mods") then
|
||||
minetest.log("action", "builtin_item loaded")
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
creative = {}
|
||||
local player_inventory = {}
|
||||
local creative_mode = minetest.setting_getbool("creative_mode")
|
||||
local creative_mode = minetest.settings:get_bool("creative_mode")
|
||||
|
||||
-- Create detached creative inventory after loading all mods
|
||||
creative.init_creative_inventory = function(owner)
|
||||
|
@ -38,16 +38,16 @@ creative.init_creative_inventory = function(owner)
|
|||
end,
|
||||
on_take = function(inv, listname, index, stack, player)
|
||||
local player_name, stack_name = player:get_player_name(), stack:get_name()
|
||||
--print(player_name .. " takes item from creative inventory; listname = " .. listname .. ", index = " .. index .. ", stack = " .. dump(stack:to_table()))
|
||||
----print(player_name .. " takes item from creative inventory; listname = " .. listname .. ", index = " .. index .. ", stack = " .. dump(stack:to_table()))
|
||||
if stack then
|
||||
minetest.log("action", player_name .. " takes " .. stack_name .. " from creative inventory")
|
||||
--print("Stack name: " .. stack_name .. ", Stack count: " .. stack:get_count())
|
||||
----print("Stack name: " .. stack_name .. ", Stack count: " .. stack:get_count())
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
creative.update_creative_inventory(owner_name)
|
||||
--print("creative inventory size: " .. player_inventory[player_name].size)
|
||||
----print("creative inventory size: " .. player_inventory[player_name].size)
|
||||
end
|
||||
|
||||
local function tab_category(tab_id)
|
||||
|
|
|
@ -323,16 +323,16 @@ minetest.register_abm({
|
|||
chance = 5,
|
||||
|
||||
action = function(p0, node, _, _)
|
||||
--print("leafdecay ABM at "..p0.x..", "..p0.y..", "..p0.z..")")
|
||||
----print("leafdecay ABM at "..p0.x..", "..p0.y..", "..p0.z..")")
|
||||
local do_preserve = false
|
||||
local d = minetest.registered_nodes[node.name].groups.leafdecay
|
||||
if not d or d == 0 then
|
||||
--print("not groups.leafdecay")
|
||||
----print("not groups.leafdecay")
|
||||
return
|
||||
end
|
||||
local n0 = minetest.get_node(p0)
|
||||
if n0.param2 ~= 0 then
|
||||
--print("param2 ~= 0")
|
||||
----print("param2 ~= 0")
|
||||
return
|
||||
end
|
||||
local p0_hash = nil
|
||||
|
@ -346,10 +346,10 @@ minetest.register_abm({
|
|||
-- work at the border of the active area
|
||||
if n.name == "ignore" or (reg and reg.groups.tree and
|
||||
reg.groups.tree ~= 0) then
|
||||
--print("cached trunk still exists")
|
||||
----print("cached trunk still exists")
|
||||
return
|
||||
end
|
||||
--print("cached trunk is invalid")
|
||||
----print("cached trunk is invalid")
|
||||
-- Cache is invalid
|
||||
table.remove(default.leafdecay_trunk_cache, p0_hash)
|
||||
end
|
||||
|
@ -365,7 +365,7 @@ minetest.register_abm({
|
|||
if p1 then
|
||||
do_preserve = true
|
||||
if default.leafdecay_enable_cache then
|
||||
--print("caching trunk")
|
||||
----print("caching trunk")
|
||||
-- Cache the trunk
|
||||
default.leafdecay_trunk_cache[p0_hash] = p1
|
||||
end
|
||||
|
|
|
@ -1783,7 +1783,7 @@ local function register_sign(material, desc, def)
|
|||
meta:set_string("formspec", "field[text;;${text}]")
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||
----print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||
local player_name = sender:get_player_name()
|
||||
if minetest.is_protected(pos, player_name) then
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
|
|
|
@ -97,7 +97,7 @@ minetest.register_on_joinplayer(function(player)
|
|||
player:set_local_animation({x=0, y=79}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, 30)
|
||||
|
||||
-- set GUI
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
player:set_inventory_formspec(default.gui_survival_form)
|
||||
end
|
||||
player:hud_set_hotbar_image("gui_hotbar.png")
|
||||
|
|
|
@ -461,7 +461,7 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
|
|||
player_name,
|
||||
interval) then
|
||||
minetest.set_node(pos, {name = sapling_name})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
else
|
||||
|
|
|
@ -326,7 +326,7 @@ function doors.register(name, def)
|
|||
meta:set_string("infotext", "Owned by " .. pn)
|
||||
end
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
|
||||
|
@ -550,7 +550,7 @@ function doors.register_trapdoor(name, def)
|
|||
meta:set_string("doors_owner", pn)
|
||||
meta:set_string("infotext", "Owned by "..pn)
|
||||
|
||||
return minetest.setting_getbool("creative_mode")
|
||||
return minetest.settings:get_bool("creative_mode")
|
||||
end
|
||||
|
||||
def.on_blast = function() end
|
||||
|
|
|
@ -55,7 +55,7 @@ farming.hoe_on_use = function(itemstack, user, pointed_thing, uses)
|
|||
gain = 0.5,
|
||||
})
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
itemstack:add_wear(65535/(uses-1))
|
||||
end
|
||||
return itemstack
|
||||
|
@ -177,7 +177,7 @@ farming.place_seed = function(itemstack, placer, pointed_thing, plantname)
|
|||
-- add the node and remove 1 item from the itemstack
|
||||
minetest.add_node(pt.above, {name = plantname, param2 = 1})
|
||||
tick(pt.above)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
|
|
@ -125,7 +125,7 @@ minetest.register_tool("fire:flint_and_steel", {
|
|||
end
|
||||
end
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
|
@ -183,7 +183,7 @@ function fire.update_sounds_around(pos)
|
|||
local p0, p1 = fire.get_area_p0p1(pos)
|
||||
local cp = {x = (p0.x + p1.x) / 2, y = (p0.y + p1.y) / 2, z = (p0.z + p1.z) / 2}
|
||||
local flames_p = minetest.find_nodes_in_area(p0, p1, {"fire:basic_flame"})
|
||||
--print("number of flames at "..minetest.pos_to_string(p0).."/"
|
||||
----print("number of flames at "..minetest.pos_to_string(p0).."/"
|
||||
-- ..minetest.pos_to_string(p1)..": "..#flames_p)
|
||||
local should_have_sound = (#flames_p > 0)
|
||||
local wanted_sound = nil
|
||||
|
@ -237,7 +237,7 @@ minetest.register_abm({
|
|||
|
||||
-- Enable the following ABMs according to 'disable fire' setting
|
||||
|
||||
if minetest.setting_getbool("disable_fire") then
|
||||
if minetest.settings:get_bool("disable_fire") then
|
||||
|
||||
-- Remove basic flames only
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ minetest.register_node("flowers:waterlily", {
|
|||
if not minetest.is_protected(pos, player_name) then
|
||||
minetest.set_node(pos, {name = "flowers:waterlily",
|
||||
param2 = math.random(0, 3)})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
else
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 6e0b20d43b69c24f396a093c5c8a9ef16118039d
|
|
@ -1,4 +1,4 @@
|
|||
local stuff_string = minetest.setting_get("initial_stuff") or
|
||||
local stuff_string = minetest.settings:get("initial_stuff") or
|
||||
"default:pick_steel,default:axe_steel,default:shovel_steel," ..
|
||||
"default:torch 99,landrush:landclaim 4"
|
||||
|
||||
|
@ -39,6 +39,6 @@ function give_initial_stuff.get_list()
|
|||
end
|
||||
|
||||
give_initial_stuff.add_from_csv(stuff_string)
|
||||
if minetest.setting_getbool("give_initial_stuff") then
|
||||
if minetest.settings:get_bool("give_initial_stuff") then
|
||||
minetest.register_on_newplayer(give_initial_stuff.give)
|
||||
end
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,7 +16,7 @@ homedecor = {
|
|||
gettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end,
|
||||
|
||||
-- infinite stacks
|
||||
expect_infinite_stacks = minetest.setting_getbool("creative_mode") and not minetest.get_modpath("unified_inventory")
|
||||
expect_infinite_stacks = minetest.settings:get_bool("creative_mode") and not minetest.get_modpath("unified_inventory")
|
||||
}
|
||||
|
||||
-- Determine if the item being pointed at is the underside of a node (e.g a ceiling)
|
||||
|
@ -131,4 +131,4 @@ dofile(modpath.."/wardrobe.lua")
|
|||
|
||||
dofile(modpath.."/crafts.lua")
|
||||
|
||||
print("[HomeDecor] " .. homedecor.gettext("Loaded!"))
|
||||
--print("[HomeDecor] " .. homedecor.gettext("Loaded!"))
|
||||
|
|
|
@ -55,6 +55,6 @@ for i in ipairs(lrfurn.colors) do
|
|||
|
||||
end
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
if minetest.settings:get("log_mods") then
|
||||
minetest.log("action", "armchairs loaded")
|
||||
end
|
||||
|
|
|
@ -119,6 +119,6 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
if minetest.settings:get("log_mods") then
|
||||
minetest.log("action", "coffeetable loaded")
|
||||
end
|
||||
|
|
|
@ -45,6 +45,6 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
if minetest.settings:get("log_mods") then
|
||||
minetest.log("action", "endtable loaded")
|
||||
end
|
||||
|
|
|
@ -81,6 +81,6 @@ for i in ipairs(lrfurn.colors) do
|
|||
|
||||
end
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
if minetest.settings:get("log_mods") then
|
||||
minetest.log("action", "long sofas loaded")
|
||||
end
|
||||
|
|
|
@ -82,6 +82,6 @@ for i in ipairs(lrfurn.colors) do
|
|||
|
||||
end
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
if minetest.settings:get("log_mods") then
|
||||
minetest.log("action", "sofas loaded")
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
minetest.register_globalstep(function(dtime)
|
||||
for _,player in ipairs(minetest.get_connected_players()) do
|
||||
if player:get_hp() > 0 or not minetest.setting_getbool("enable_damage") then
|
||||
if player:get_hp() > 0 or not minetest.settings:get_bool("enable_damage") then
|
||||
local pos = player:getpos()
|
||||
if ( pos == nil ) then
|
||||
return
|
||||
|
@ -77,7 +77,7 @@ end)
|
|||
--[[
|
||||
function minetest.handle_node_drops(pos, drops, digger)
|
||||
local inv
|
||||
if minetest.setting_getbool("creative_mode") and digger and digger:is_player() then
|
||||
if minetest.settings:get_bool("creative_mode") and digger and digger:is_player() then
|
||||
inv = digger:get_inventory()
|
||||
end
|
||||
for _,item in ipairs(drops) do
|
||||
|
@ -105,8 +105,8 @@ function minetest.handle_node_drops(pos, drops, digger)
|
|||
obj:setvelocity({x=1/x, y=obj:getvelocity().y, z=1/z})
|
||||
|
||||
-- FIXME this doesnt work for deactiveted objects
|
||||
if minetest.setting_get("remove_items") and tonumber(minetest.setting_get("remove_items")) then
|
||||
minetest.after(tonumber(minetest.setting_get("remove_items")), function(obj)
|
||||
if minetest.settings:get("remove_items") and tonumber(minetest.settings:get("remove_items")) then
|
||||
minetest.after(tonumber(minetest.settings:get("remove_items")), function(obj)
|
||||
obj:remove()
|
||||
end, obj)
|
||||
end
|
||||
|
@ -117,6 +117,6 @@ function minetest.handle_node_drops(pos, drops, digger)
|
|||
end
|
||||
]]
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
if minetest.settings:get("log_mods") then
|
||||
minetest.log("action", "item_drop loaded")
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
if minetest.get_modpath("default") then
|
||||
minetest.override_item("default:sign_wall", {
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||
----print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||
if not fields.text then return end
|
||||
local player_name = sender:get_player_name()
|
||||
if minetest.is_protected(pos, player_name) then
|
||||
|
|
|
@ -7,10 +7,10 @@ if minetest.get_modpath("screwdriver") then
|
|||
-- Start overwriting the standard function
|
||||
tmp_tool = minetest.registered_tools["screwdriver:screwdriver"]
|
||||
if tmp_tool == nil then
|
||||
print("Something went wrong when correcting the screwdriver...")
|
||||
--print("Something went wrong when correcting the screwdriver...")
|
||||
end
|
||||
if tmp_tool.on_use == nil then
|
||||
print( "tmp_tool.on_use is a nil value... ")
|
||||
--print( "tmp_tool.on_use is a nil value... ")
|
||||
end
|
||||
tmp_tool.on_use = function(itemstack, user, pointed_thing)
|
||||
safe_screwdriver_handler(itemstack, user, pointed_thing)
|
||||
|
@ -25,7 +25,7 @@ if minetest.get_modpath("screwdriver") then
|
|||
end
|
||||
minetest.registered_tools["screwdriver:screwdriver"..i] = tmp_tool
|
||||
end
|
||||
print( "Rewritten screwdriver routines..." )
|
||||
--print( "Rewritten screwdriver routines..." )
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@ signdef.description = "Unprotected Sign"
|
|||
signdef.on_receive_fields = function(pos, formname, fields, sender)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if not fields.text then return end
|
||||
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
||||
"\" to sign at "..minetest.pos_to_string(pos))
|
||||
--print((sender:get_player_name() or "").." wrote \""..fields.text.."\" to sign at "..minetest.pos_to_string(pos))
|
||||
meta:set_string("text", fields.text)
|
||||
meta:set_string("infotext", '"'..fields.text..'"')
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ an working fix which restores original functionality
|
|||
if minetest.get_modpath( 'snow' ) then
|
||||
local entity_prototype = minetest.registered_entities['snow:snowball_entity']
|
||||
if not entity_prototype then
|
||||
print( 'COuld not detect snowball prototype...')
|
||||
--print( 'COuld not detect snowball prototype...')
|
||||
return
|
||||
end
|
||||
entity_prototype.on_step = function(self, dtime)
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
local players = minetest.get_connected_players()
|
||||
|
||||
if ( #players < 12 ) then
|
||||
minetest.setting_set("server_announce","1")
|
||||
minetest.settings:set("server_announce","1")
|
||||
else
|
||||
minetest.setting_set("server_announce","0")
|
||||
minetest.settings:set("server_announce","0")
|
||||
end
|
||||
|
||||
minetest.after(60,check_announce)
|
||||
|
|
|
@ -126,7 +126,7 @@ function mesecon.receptor_off(pos, rules)
|
|||
end
|
||||
|
||||
|
||||
print("[OK] Mesecons")
|
||||
--print("[OK] Mesecons")
|
||||
|
||||
-- Deprecated stuff
|
||||
-- To be removed in future releases
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
-- Just remove the following two functions to delete the hack, to be done when other mods have updated
|
||||
function mesecon.receptor_on(self, pos, rules)
|
||||
if (self.receptor_on) then
|
||||
print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_on.")
|
||||
print("[Mesecons] If you are the programmer of this mod, please update it ")
|
||||
print("[Mesecons] to use mesecon.receptor_on instead. mesecon:* is deprecated")
|
||||
print("[Mesecons] Otherwise, please make sure you're running the latest version")
|
||||
print("[Mesecons] of that mod and inform the mod creator.")
|
||||
--print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_on.")
|
||||
--print("[Mesecons] If you are the programmer of this mod, please update it ")
|
||||
--print("[Mesecons] to use mesecon.receptor_on instead. mesecon:* is deprecated")
|
||||
--print("[Mesecons] Otherwise, please make sure you're running the latest version")
|
||||
--print("[Mesecons] of that mod and inform the mod creator.")
|
||||
else
|
||||
rules = pos
|
||||
pos = self
|
||||
|
@ -16,11 +16,11 @@ end
|
|||
|
||||
function mesecon.receptor_off(self, pos, rules)
|
||||
if (self.receptor_off) then
|
||||
print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_off.")
|
||||
print("[Mesecons] If you are the programmer of this mod, please update it ")
|
||||
print("[Mesecons] to use mesecon.receptor_off instead. mesecon:* is deprecated")
|
||||
print("[Mesecons] Otherwise, please make sure you're running the latest version")
|
||||
print("[Mesecons] of that mod and inform the mod creator.")
|
||||
--print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_off.")
|
||||
--print("[Mesecons] If you are the programmer of this mod, please update it ")
|
||||
--print("[Mesecons] to use mesecon.receptor_off instead. mesecon:* is deprecated")
|
||||
--print("[Mesecons] Otherwise, please make sure you're running the latest version")
|
||||
--print("[Mesecons] of that mod and inform the mod creator.")
|
||||
else
|
||||
rules = pos
|
||||
pos = self
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
-- SETTINGS
|
||||
function mesecon.setting(setting, default)
|
||||
if type(default) == "boolean" then
|
||||
local read = minetest.setting_getbool("mesecon."..setting)
|
||||
local read = minetest.settings:get_bool("mesecon."..setting)
|
||||
if read == nil then
|
||||
return default
|
||||
else
|
||||
return read
|
||||
end
|
||||
elseif type(default) == "string" then
|
||||
return minetest.setting_get("mesecon."..setting) or default
|
||||
return minetest.settings:get("mesecon."..setting) or default
|
||||
elseif type(default) == "number" then
|
||||
return tonumber(minetest.setting_get("mesecon."..setting) or default)
|
||||
return tonumber(minetest.settings:get("mesecon."..setting) or default)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -198,7 +198,7 @@ end
|
|||
-------------------------
|
||||
|
||||
local function safe_print(param)
|
||||
print(dump(param))
|
||||
--print(dump(param))
|
||||
end
|
||||
|
||||
local function safe_date()
|
||||
|
@ -417,8 +417,7 @@ local function save_memory(pos, meta, mem)
|
|||
if (#memstring <= memsize_max) then
|
||||
meta:set_string("lc_memory", memstring)
|
||||
else
|
||||
print("Error: Luacontroller memory overflow. "..memsize_max.." bytes available, "
|
||||
..#memstring.." required. Controller overheats.")
|
||||
--print("Error: Luacontroller memory overflow. "..memsize_max.." bytes available, "..#memstring.." required. Controller overheats.")
|
||||
burn_controller(pos)
|
||||
end
|
||||
end
|
||||
|
@ -521,7 +520,7 @@ local function on_receive_fields(pos, form_name, fields, sender)
|
|||
reset_meta(pos, fields.code)
|
||||
local err = run(pos, {type="program"})
|
||||
if err then
|
||||
print(err)
|
||||
--print(err)
|
||||
reset_meta(pos, fields.code, err)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -216,7 +216,7 @@ function mesecon.mvps_move_objects(pos, dir, nodestack)
|
|||
end
|
||||
|
||||
-- Move objects lying/standing on the stack (before it was pushed - oldstack)
|
||||
if tonumber(minetest.setting_get("movement_gravity")) > 0 and dir.y == 0 then
|
||||
if tonumber(minetest.settings:get("movement_gravity")) > 0 and dir.y == 0 then
|
||||
-- If gravity positive and dir horizontal, push players standing on the stack
|
||||
for _, n in ipairs(nodestack) do
|
||||
local p_above = vector.add(n.pos, {x=0, y=1, z=0})
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
local time = 0
|
||||
local update_time = tonumber(minetest.setting_get("wieldview_update_time"))
|
||||
local update_time = tonumber(minetest.settings:get("wieldview_update_time"))
|
||||
if not update_time then
|
||||
update_time = 2
|
||||
minetest.setting_set("wieldview_update_time", tostring(update_time))
|
||||
minetest.settings:set("wieldview_update_time", tostring(update_time))
|
||||
end
|
||||
local node_tiles = minetest.setting_getbool("wieldview_node_tiles")
|
||||
local node_tiles = minetest.settings:get_bool("wieldview_node_tiles")
|
||||
if not node_tiles then
|
||||
node_tiles = false
|
||||
minetest.setting_set("wieldview_node_tiles", "false")
|
||||
minetest.settings:set("wieldview_node_tiles", "false")
|
||||
end
|
||||
|
||||
wieldview = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
dofile(minetest.get_modpath("steel").."/rust.lua")
|
||||
|
||||
if minetest.setting_getbool("creative_mode") and not minetest.get_modpath("unified_inventory") then
|
||||
if minetest.settings:get_bool("creative_mode") and not minetest.get_modpath("unified_inventory") then
|
||||
steel_expect_infinite_stacks = true
|
||||
else
|
||||
steel_expect_infinite_stacks = false
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
--- Worldedit.
|
||||
-- @module worldedit
|
||||
-- @release 1.1
|
||||
-- @copyright 2013 sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote).
|
||||
-- @license GNU Affero General Public License version 3 (AGPLv3)
|
||||
-- @author sfan5
|
||||
-- @author Anthony Zang (Uberi/Temperest)
|
||||
-- @author Bret O'Donnel (cornernote)
|
||||
-- @author ShadowNinja
|
||||
|
||||
worldedit = {}
|
||||
worldedit.version = {1, 1, major=1, minor=1}
|
||||
worldedit.version_string = table.concat(worldedit.version, ".")
|
||||
|
||||
if not minetest.get_voxel_manip then
|
||||
local err_msg = "This version of WorldEdit requires Minetest 0.4.8 or later! You have an old version."
|
||||
minetest.log("error", string.rep("#", 128))
|
||||
minetest.log("error", err_msg)
|
||||
minetest.log("error", string.rep("#", 128))
|
||||
error(err_msg)
|
||||
end
|
||||
|
||||
local path = minetest.get_modpath(minetest.get_current_modname())
|
||||
|
||||
local function load_module(path)
|
||||
local file = io.open(path, "r")
|
||||
if not file then return end
|
||||
file:close()
|
||||
return dofile(path)
|
||||
end
|
||||
|
||||
dofile(path .. "/common.lua")
|
||||
load_module(path .. "/manipulations.lua")
|
||||
load_module(path .. "/primitives.lua")
|
||||
load_module(path .. "/visualization.lua")
|
||||
load_module(path .. "/serialization.lua")
|
||||
load_module(path .. "/code.lua")
|
||||
load_module(path .. "/compatibility.lua")
|
||||
load_module(path .. "/wand.lua")
|
||||
load_module(path .. "/cuboid.lua")
|
||||
|
||||
|
||||
if minetest.setting_getbool("log_mods") then
|
||||
print("[WorldEdit] Loaded!")
|
||||
end
|
||||
|
||||
--- Worldedit.
|
||||
-- @module worldedit
|
||||
-- @release 1.1
|
||||
-- @copyright 2013 sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote).
|
||||
-- @license GNU Affero General Public License version 3 (AGPLv3)
|
||||
-- @author sfan5
|
||||
-- @author Anthony Zang (Uberi/Temperest)
|
||||
-- @author Bret O'Donnel (cornernote)
|
||||
-- @author ShadowNinja
|
||||
|
||||
worldedit = {}
|
||||
worldedit.version = {1, 1, major=1, minor=1}
|
||||
worldedit.version_string = table.concat(worldedit.version, ".")
|
||||
|
||||
if not minetest.get_voxel_manip then
|
||||
local err_msg = "This version of WorldEdit requires Minetest 0.4.8 or later! You have an old version."
|
||||
minetest.log("error", string.rep("#", 128))
|
||||
minetest.log("error", err_msg)
|
||||
minetest.log("error", string.rep("#", 128))
|
||||
error(err_msg)
|
||||
end
|
||||
|
||||
local path = minetest.get_modpath(minetest.get_current_modname())
|
||||
|
||||
local function load_module(path)
|
||||
local file = io.open(path, "r")
|
||||
if not file then return end
|
||||
file:close()
|
||||
return dofile(path)
|
||||
end
|
||||
|
||||
dofile(path .. "/common.lua")
|
||||
load_module(path .. "/manipulations.lua")
|
||||
load_module(path .. "/primitives.lua")
|
||||
load_module(path .. "/visualization.lua")
|
||||
load_module(path .. "/serialization.lua")
|
||||
load_module(path .. "/code.lua")
|
||||
load_module(path .. "/compatibility.lua")
|
||||
load_module(path .. "/wand.lua")
|
||||
load_module(path .. "/cuboid.lua")
|
||||
|
||||
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
--print("[WorldEdit] Loaded!")
|
||||
end
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,7 +7,7 @@ Example:
|
|||
name = "Make Hollow Cylinder",
|
||||
privs = {worldedit=true},
|
||||
get_formspec = function(name) return "some formspec here" end,
|
||||
on_select = function(name) print(name .. " clicked the button!") end,
|
||||
on_select = function(name) --print(name .. " clicked the button!") end,
|
||||
})
|
||||
|
||||
Use `nil` for the `options` parameter to unregister the function associated with the given identifier.
|
||||
|
@ -32,7 +32,7 @@ end
|
|||
Example:
|
||||
|
||||
worldedit.register_gui_handler("worldedit_gui_hollow_cylinder", function(name, fields)
|
||||
print(minetest.serialize(fields))
|
||||
--print(minetest.serialize(fields))
|
||||
end)
|
||||
]]
|
||||
|
||||
|
@ -144,7 +144,7 @@ else --fallback button
|
|||
return
|
||||
end
|
||||
if (minetest.check_player_privs(name, {creative=true}) or
|
||||
minetest.setting_getbool("creative_mode")) and
|
||||
minetest.settings:get_bool("creative_mode")) and
|
||||
creative then --creative is active, add button to modified formspec
|
||||
local creative_formspec = player:get_inventory_formspec()
|
||||
local tab_id = tonumber(creative_formspec:match("tabheader%[.-;(%d+)%;"))
|
||||
|
|
|
@ -12,8 +12,7 @@ circular_saw = {}
|
|||
circular_saw.known_stairs = setmetatable({}, {
|
||||
__newindex = function(k, v)
|
||||
local modname = minetest.get_current_modname()
|
||||
print(("WARNING: mod %s tried to add node %s to the circular saw"
|
||||
.. " manually."):format(modname, v))
|
||||
--print(("WARNING: mod %s tried to add node %s to the circular saw manually."):format(modname, v))
|
||||
end,
|
||||
})
|
||||
|
||||
|
@ -168,8 +167,7 @@ function circular_saw:update_inventory(pos, amount)
|
|||
if modname == "default" then
|
||||
modname = "moreblocks"
|
||||
end
|
||||
-- print("circular_saw set to " .. modname .. " : "
|
||||
-- .. material .. " with " .. (amount) .. " microblocks.")
|
||||
-- --print("circular_saw set to " .. modname .. " : ".. material .. " with " .. (amount) .. " microblocks.")
|
||||
|
||||
-- 0-7 microblocks may remain left-over:
|
||||
inv:set_list("micro", {
|
||||
|
|
|
@ -8,7 +8,7 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
|||
moreblocks.config = {}
|
||||
|
||||
local function getbool_default(setting, default)
|
||||
local value = minetest.setting_getbool(setting)
|
||||
local value = minetest.settings:get_bool(setting)
|
||||
if value == nil then
|
||||
value = default
|
||||
end
|
||||
|
@ -21,7 +21,7 @@ local function setting(settingtype, name, default)
|
|||
getbool_default("moreblocks." .. name, default)
|
||||
else
|
||||
moreblocks.config[name] =
|
||||
minetest.setting_get("moreblocks." .. name) or default
|
||||
minetest.settings:get("moreblocks." .. name) or default
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -473,7 +473,7 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
if minetest.setting_getbool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
|
||||
if minetest.settings:get_bool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
|
||||
minetest.register_craft({
|
||||
output = "moreblocks:circular_saw",
|
||||
recipe = {
|
||||
|
|
|
@ -28,6 +28,6 @@ dofile(modpath .. "/redefinitions.lua")
|
|||
dofile(modpath .. "/crafting.lua")
|
||||
dofile(modpath .. "/aliases.lua")
|
||||
|
||||
if minetest.setting_getbool("log_mods") then
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
minetest.log("action", S("[moreblocks] loaded."))
|
||||
end
|
||||
|
|
|
@ -13,8 +13,8 @@ local dirs2 = {15, 8, 17, 6, 15}
|
|||
local dirs3 = {14, 11, 16, 5, 14}
|
||||
|
||||
function stairsplus:register_6dfacedir_conversion(modname, material)
|
||||
--print("Register stairsplus 6d facedir conversion")
|
||||
--print('ABM for '..modname..' "'..material..'"')
|
||||
----print("Register stairsplus 6d facedir conversion")
|
||||
----print('ABM for '..modname..' "'..material..'"')
|
||||
|
||||
local objects_list1 = {
|
||||
modname.. ":slab_" ..material.. "_inverted",
|
||||
|
@ -71,8 +71,8 @@ function stairsplus:register_6dfacedir_conversion(modname, material)
|
|||
dest_object = string.gsub(dest_object, "_right_half", "_half")
|
||||
end
|
||||
|
||||
--print(" +---> convert " ..object)
|
||||
--print(" | to " ..dest_object)
|
||||
----print(" +---> convert " ..object)
|
||||
----print(" | to " ..dest_object)
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {object},
|
||||
|
@ -114,8 +114,8 @@ function stairsplus:register_6dfacedir_conversion(modname, material)
|
|||
dest_object = string.gsub(dest_object, "_wall", "")
|
||||
end
|
||||
|
||||
--print(" +---> convert " ..object)
|
||||
--print(" | to " ..dest_object)
|
||||
----print(" +---> convert " ..object)
|
||||
----print(" | to " ..dest_object)
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {object},
|
||||
|
|
|
@ -13,7 +13,7 @@ stairsplus = {}
|
|||
stairsplus.expect_infinite_stacks = false
|
||||
|
||||
if not minetest.get_modpath("unified_inventory")
|
||||
and minetest.setting_getbool("creative_mode") then
|
||||
and minetest.settings:get_bool("creative_mode") then
|
||||
stairsplus.expect_infinite_stacks = true
|
||||
end
|
||||
|
||||
|
|
|
@ -708,7 +708,7 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume,
|
|||
chunk_size = 2
|
||||
end
|
||||
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
|
||||
--print("generate_ore num_chunks: "..dump(num_chunks))
|
||||
----print("generate_ore num_chunks: "..dump(num_chunks))
|
||||
for i=1,num_chunks do
|
||||
if (y_max-chunk_size+1 <= y_min) then return end
|
||||
local y0 = pr:next(y_min, y_max-chunk_size+1)
|
||||
|
@ -733,7 +733,7 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume,
|
|||
end
|
||||
end
|
||||
end
|
||||
--print("generate_ore done")
|
||||
----print("generate_ore done")
|
||||
end
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
|
|
|
@ -56,7 +56,7 @@ moretrees.gettext = S
|
|||
|
||||
-- infinite stacks checking
|
||||
|
||||
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
|
||||
moretrees.expect_infinite_stacks = false
|
||||
else
|
||||
moretrees.expect_infinite_stacks = true
|
||||
|
@ -307,4 +307,4 @@ function moretrees:grow_fir_snow(pos)
|
|||
minetest.spawn_tree(pos,moretrees.fir_model)
|
||||
end
|
||||
|
||||
print("[Moretrees] Loaded (2013-02-11)")
|
||||
--print("[Moretrees] Loaded (2013-02-11)")
|
||||
|
|
|
@ -325,7 +325,7 @@ minetest.register_craftitem(":default:mese_crystal_fragment", {
|
|||
on_place = function(stack,_, pt)
|
||||
if pt.under and minetest.get_node(pt.under).name == "default:obsidian" then
|
||||
local done = make_portal(pt.under)
|
||||
if done and not minetest.setting_getbool("creative_mode") then
|
||||
if done and not minetest.settings:get_bool("creative_mode") then
|
||||
stack:take_item()
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -113,5 +113,5 @@ if pipeworks.enable_autocrafter then dofile(pipeworks.modpath.."/autocrafter.lua
|
|||
|
||||
minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")
|
||||
|
||||
print("Pipeworks loaded!")
|
||||
--print("Pipeworks loaded!")
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ minetest.register_globalstep(function(dtime)
|
|||
handle_active_blocks_timer = handle_active_blocks_timer + dtime
|
||||
if handle_active_blocks_timer >= handle_active_blocks_step then
|
||||
handle_active_blocks_timer = handle_active_blocks_timer - handle_active_blocks_step
|
||||
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())
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
if pipeworks.enable_detector_tube then
|
||||
local detector_tube_step = 2 * tonumber(minetest.setting_get("dedicated_server_step"))
|
||||
local detector_tube_step = 2 * 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",
|
||||
|
|
|
@ -53,4 +53,4 @@ plantslib:spawn_on_surfaces({
|
|||
|
||||
minetest.register_alias("bushes:basket_pies", "bushes:basket_strawberry")
|
||||
|
||||
print("[Bushes] Loaded.")
|
||||
--print("[Bushes] Loaded.")
|
||||
|
|
|
@ -467,4 +467,4 @@ minetest.register_alias("flowers:potted_cotton_plant", "flowers:potted_dandelion
|
|||
minetest.register_alias("flowers:cotton", "farming:string")
|
||||
minetest.register_alias("flowers:cotton_wad", "farming:string")
|
||||
|
||||
print("[Flowers] Loaded.")
|
||||
--print("[Flowers] Loaded.")
|
||||
|
|
|
@ -144,4 +144,4 @@ for i in ipairs(grasses_list) do
|
|||
})
|
||||
end
|
||||
|
||||
print("[Junglegrass] Loaded.")
|
||||
--print("[Junglegrass] Loaded.")
|
||||
|
|
|
@ -26,7 +26,7 @@ local DEBUG = false --... except if you want to spam the console with debugging
|
|||
|
||||
function plantslib:dbg(msg)
|
||||
if DEBUG then
|
||||
print("[Plantlife] "..msg)
|
||||
--print("[Plantlife] "..msg)
|
||||
minetest.log("verbose", "[Plantlife] "..msg)
|
||||
end
|
||||
end
|
||||
|
@ -48,7 +48,7 @@ local humidity_persistence = 0.5
|
|||
local humidity_scale = 250
|
||||
|
||||
local time_scale = 1
|
||||
local time_speed = tonumber(minetest.setting_get("time_speed"))
|
||||
local time_speed = tonumber(minetest.settings:get("time_speed"))
|
||||
|
||||
if time_speed and time_speed > 0 then
|
||||
time_scale = 72 / time_speed
|
||||
|
@ -518,7 +518,7 @@ end
|
|||
|
||||
-- Check for infinite stacks
|
||||
|
||||
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
|
||||
plantslib.expect_infinite_stacks = false
|
||||
else
|
||||
plantslib.expect_infinite_stacks = true
|
||||
|
@ -534,4 +534,4 @@ function plantslib:get_nodedef_field(nodename, fieldname)
|
|||
end
|
||||
|
||||
|
||||
print("[Plantlife Library] Loaded")
|
||||
--print("[Plantlife Library] Loaded")
|
||||
|
|
|
@ -98,4 +98,4 @@ plantslib:grow_plants({
|
|||
ground_nodes = {"default:dirt_with_grass"}
|
||||
})
|
||||
|
||||
print("[Poison Ivy] Loaded.")
|
||||
--print("[Poison Ivy] Loaded.")
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 1f3e1a1eb8980e44fd9fb4ee9a8c2a240a146ddf
|
|
@ -81,7 +81,7 @@ screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses)
|
|||
minetest.swap_node(pos, node)
|
||||
end
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
itemstack:add_wear(65535 / ((uses or 200) - 1))
|
||||
end
|
||||
|
||||
|
|
|
@ -271,8 +271,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
|
||||
if debug then
|
||||
biome_string,biome2_string = biomeToString(biome,biome2)
|
||||
print(biome_string.." and "..biome2_string..": Snow Biome Genarated near x"..minp.x.." z"..minp.z)
|
||||
print(string.format("elapsed time: %.2fms", (os.clock() - t1) * 1000))
|
||||
--print(biome_string.." and "..biome2_string..": Snow Biome Genarated near x"..minp.x.." z"..minp.z)
|
||||
--print(string.format("elapsed time: %.2fms", (os.clock() - t1) * 1000))
|
||||
end
|
||||
--end
|
||||
end)
|
||||
|
|
|
@ -307,7 +307,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
if write_to_map and debug then -- print if any column of mapchunk was snow biome
|
||||
local biome_string,biome2_string = biome_to_string(biome,biome2)
|
||||
local chugent = math.ceil((os.clock() - t1) * 1000)
|
||||
print("[snow] "..biome_string.." and "..biome2_string.." x "..minp.x.." z "..minp.z.." time "..chugent.." ms")
|
||||
--print("[snow] "..biome_string.." and "..biome2_string.." x "..minp.x.." z "..minp.z.." time "..chugent.." ms")
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ There is one in each of the "stairsplus.register_all" sections.
|
|||
|
||||
-- Check for infinite stacks
|
||||
|
||||
--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
|
||||
-- snow_stairsplus.expect_infinite_stacks = false
|
||||
--else
|
||||
-- snow_stairsplus.expect_infinite_stacks = true
|
||||
|
|
|
@ -80,7 +80,7 @@ end
|
|||
for i,v in pairs(snow) do
|
||||
local t = type(v)
|
||||
if t == "string" or t == "number" or t == "boolean" then
|
||||
local v = minetest.setting_get("snow_"..i)
|
||||
local v = minetest.settings:get("snow_"..i)
|
||||
if v ~= nil then
|
||||
if v == "true" then v = true end
|
||||
if v == "false" then v = false end
|
||||
|
|
|
@ -80,7 +80,7 @@ end
|
|||
for i,v in pairs(snow) do
|
||||
local t = type(v)
|
||||
if t == "string" or t == "number" or t == "boolean" then
|
||||
local v = minetest.setting_get("snow_"..i)
|
||||
local v = minetest.settings:get("snow_"..i)
|
||||
if v ~= nil then
|
||||
if v == "true" then v = true end
|
||||
if v == "false" then v = false end
|
||||
|
|
|
@ -15,7 +15,7 @@ minetest.register_alias("stairs:slab_pinewood", "stairs:slab_pine_wood")
|
|||
|
||||
-- Get setting for replace ABM
|
||||
|
||||
local replace = minetest.setting_getbool("enable_stairs_replace_abm")
|
||||
local replace = false;
|
||||
|
||||
|
||||
-- Register stairs.
|
||||
|
|
|
@ -6,64 +6,64 @@
|
|||
Depends : default
|
||||
]]
|
||||
-- Create variables and tables
|
||||
print("Streets: Creating variables and tables...")
|
||||
--print("Streets: Creating variables and tables...")
|
||||
streets = {}
|
||||
streets.version = "1.3 indev"
|
||||
streets.modpath = minetest.get_modpath("streets")
|
||||
streets.extendedBy = {}
|
||||
|
||||
-- Check for mods which change this mod's beahaviour
|
||||
print("Streets: Checking installed mods...")
|
||||
--print("Streets: Checking installed mods...")
|
||||
if minetest.get_modpath("wool") then
|
||||
print("'Wool' is installed \n\t => You can craft labels for your asphalt blocks")
|
||||
--print("'Wool' is installed \n\t => You can craft labels for your asphalt blocks")
|
||||
streets.extendedBy.wool = true
|
||||
else
|
||||
print("'Wool' not installed \n\t => You can't craft any labels")
|
||||
--print("'Wool' not installed \n\t => You can't craft any labels")
|
||||
streets.extendedBy.wool = false
|
||||
end
|
||||
if minetest.get_modpath("technic") then
|
||||
print("'Technic' is installed \n\t => You can use its concrete also in this mod")
|
||||
--print("'Technic' is installed \n\t => You can use its concrete also in this mod")
|
||||
streets.extendedBy.technic = true
|
||||
else
|
||||
print("'Technic' not installed \n\t => StreetsMod will register its own concrete block")
|
||||
--print("'Technic' not installed \n\t => StreetsMod will register its own concrete block")
|
||||
streets.extendedBy.technic = false
|
||||
end
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
print("'Moreblocks' is installed \n\t => There will be stairs and slabs'")
|
||||
--print("'Moreblocks' is installed \n\t => There will be stairs and slabs'")
|
||||
streets.extendedBy.moreblocks = true
|
||||
else
|
||||
print("'Moreblocks' not installed \n\t => There won't be stairs and slabs'")
|
||||
--print("'Moreblocks' not installed \n\t => There won't be stairs and slabs'")
|
||||
streets.extendedBy.moreblocks = false
|
||||
end
|
||||
if minetest.get_modpath("bucket") then
|
||||
print("'Bucket' is installed \n\t => All signs are available")
|
||||
--print("'Bucket' is installed \n\t => All signs are available")
|
||||
streets.extendedBy.bucket = true
|
||||
else
|
||||
print("'Bucket' not installed \n\t => No signs available")
|
||||
--print("'Bucket' not installed \n\t => No signs available")
|
||||
streets.extendedBy.bucket = false
|
||||
end
|
||||
if minetest.get_modpath("mesecons") then
|
||||
print("'Mesecons' is installed \n\t => Trafficlights might be available. Checking for digilines. Streetlamps available")
|
||||
--print("'Mesecons' is installed \n\t => Trafficlights might be available. Checking for digilines. Streetlamps available")
|
||||
streets.extendedBy.mesecons = true
|
||||
else
|
||||
print("'Mesecons' not installed \n\t => No trafficlight and streetlamps, sorry.")
|
||||
--print("'Mesecons' not installed \n\t => No trafficlight and streetlamps, sorry.")
|
||||
streets.extendedBy.mesecons = false
|
||||
end
|
||||
if minetest.get_modpath("digilines") then
|
||||
print("'Digilines' is installed \n\t => Trafficlights might be available")
|
||||
--print("'Digilines' is installed \n\t => Trafficlights might be available")
|
||||
streets.extendedBy.digilines = true
|
||||
else
|
||||
print("'Digilines' not installed \n\t => No trafficlight, sorry.")
|
||||
--print("'Digilines' not installed \n\t => No trafficlight, sorry.")
|
||||
streets.extendedBy.digilines = false
|
||||
end
|
||||
if minetest.get_modpath("prefab") then
|
||||
print("'Prefab concrete' is installed \n\t => Use its concrete block for streets' crafting recipes.")
|
||||
--print("'Prefab concrete' is installed \n\t => Use its concrete block for streets' crafting recipes.")
|
||||
streets.extendedBy.prefab = true
|
||||
else
|
||||
print("'Prefab concrete' not installed \n\t => Streets will register its own concrete block.")
|
||||
--print("'Prefab concrete' not installed \n\t => Streets will register its own concrete block.")
|
||||
streets.extendedBy.prefab = false
|
||||
end
|
||||
|
||||
-- Done
|
||||
print("Streets: Setup completed, have fun with StreetsMod ".. streets.version .."!")
|
||||
print("Streets: Special thanks to everyone who contributed to this mod (except myself): Immanuel_Kant and philipbenr!")
|
||||
--print("Streets: Setup completed, have fun with StreetsMod ".. streets.version .."!")
|
||||
--print("Streets: Special thanks to everyone who contributed to this mod (except myself): Immanuel_Kant and philipbenr!")
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
local load_start = os.clock()
|
||||
|
||||
technic = rawget(_G, "technic") or {}
|
||||
technic.creative_mode = minetest.setting_getbool("creative_mode")
|
||||
technic.creative_mode = minetest.settings:get_bool("creative_mode")
|
||||
|
||||
|
||||
local modpath = minetest.get_modpath("technic")
|
||||
|
@ -44,7 +44,7 @@ dofile(modpath.."/tools/init.lua")
|
|||
-- Aliases for legacy node/item names
|
||||
dofile(modpath.."/legacy.lua")
|
||||
|
||||
if minetest.setting_getbool("log_mods") then
|
||||
print(S("[Technic] Loaded in %f seconds"):format(os.clock() - load_start))
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
--print(S("[Technic] Loaded in %f seconds"):format(os.clock() - load_start))
|
||||
end
|
||||
|
||||
|
|
|
@ -616,7 +616,7 @@ local function dmg_abm(pos, node)
|
|||
end
|
||||
|
||||
--[[
|
||||
if minetest.setting_getbool("enable_damage") then
|
||||
if minetest.settings:get_bool("enable_damage") then
|
||||
minetest.register_abm({
|
||||
nodenames = {"group:radioactive"},
|
||||
interval = 1,
|
||||
|
|
|
@ -129,13 +129,13 @@ local function form_handler(pos, formname, fields, sender)
|
|||
|
||||
if onesize_products[k] ~= nil or (twosize_products[k] ~= nil and size==2) then
|
||||
meta:set_string("cnc_product", inputname .. "_technic_cnc_" .. k)
|
||||
--print(inputname .. "_technic_cnc_" .. k)
|
||||
----print(inputname .. "_technic_cnc_" .. k)
|
||||
break
|
||||
end
|
||||
|
||||
if twosize_products[k] ~= nil and size==1 then
|
||||
meta:set_string("cnc_product", inputname .. "_technic_cnc_" .. k .. "_double")
|
||||
--print(inputname .. "_technic_cnc_" .. k .. "_double")
|
||||
----print(inputname .. "_technic_cnc_" .. k .. "_double")
|
||||
break
|
||||
end
|
||||
end
|
||||
|
|
|
@ -56,11 +56,11 @@ technic.inductive_on_punch_off = function(pos, eu_charge, swapnode)
|
|||
technic.swap_node(pos, swapnode)
|
||||
meta:set_int("active", 1)
|
||||
meta:set_int("EU_charge",eu_charge)
|
||||
--print("-----------")
|
||||
--print("Turn on:")
|
||||
--print("EU_charge: "..meta:get_int("EU_charge"))
|
||||
--print("has_supply: "..meta:get_string("has_supply"))
|
||||
--print("<----------->")
|
||||
----print("-----------")
|
||||
----print("Turn on:")
|
||||
----print("EU_charge: "..meta:get_int("EU_charge"))
|
||||
----print("has_supply: "..meta:get_string("has_supply"))
|
||||
----print("<----------->")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -69,11 +69,11 @@ technic.inductive_on_punch_on = function(pos, eu_charge, swapnode)
|
|||
technic.swap_node(pos, swapnode)
|
||||
meta:set_int("active", 0)
|
||||
meta:set_int("EU_charge",eu_charge)
|
||||
--print("-----------")
|
||||
--print("Turn off:")
|
||||
--print("EU_charge: "..meta:get_int("EU_charge"))
|
||||
--print("has_supply: "..meta:get_string("has_supply"))
|
||||
--print("<---------->")
|
||||
----print("-----------")
|
||||
----print("Turn off:")
|
||||
----print("EU_charge: "..meta:get_int("EU_charge"))
|
||||
----print("has_supply: "..meta:get_string("has_supply"))
|
||||
----print("<---------->")
|
||||
end
|
||||
|
||||
local shutdown_inductive_appliances = function(pos)
|
||||
|
|
|
@ -3,7 +3,7 @@ local S = technic.getter
|
|||
|
||||
frames = {}
|
||||
|
||||
local infinite_stacks = minetest.setting_getbool("creative_mode") and minetest.get_modpath("unified_inventory") == nil
|
||||
local infinite_stacks = minetest.settings:get_bool("creative_mode") and minetest.get_modpath("unified_inventory") == nil
|
||||
|
||||
local frames_pos = {}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ local function register_recipe(typename, data)
|
|||
local recipe = {time = data.time, input = {}, output = data.output}
|
||||
local index = get_recipe_index(data.input)
|
||||
if not index then
|
||||
print("[Technic] ignored registration of garbage recipe!")
|
||||
--print("[Technic] ignored registration of garbage recipe!")
|
||||
return
|
||||
end
|
||||
for _, stack in ipairs(data.input) do
|
||||
|
@ -82,7 +82,7 @@ function technic.get_recipe(typename, items)
|
|||
end
|
||||
local index = get_recipe_index(items)
|
||||
if not index then
|
||||
print("[Technic] ignored registration of garbage recipe!")
|
||||
--print("[Technic] ignored registration of garbage recipe!")
|
||||
return
|
||||
end
|
||||
local recipe = technic.recipes[typename].recipes[index]
|
||||
|
|
|
@ -86,7 +86,7 @@ local check_node_subp = function(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nod
|
|||
if technic.is_tier_cable(name, tier) then
|
||||
add_new_cable_node(all_nodes, pos)
|
||||
elseif machines[name] then
|
||||
--dprint(name.." is a "..machines[name])
|
||||
--d--print(name.." is a "..machines[name])
|
||||
if machines[name] == technic.producer then
|
||||
add_new_cable_node(PR_nodes, pos)
|
||||
elseif machines[name] == technic.receiver then
|
||||
|
@ -119,7 +119,7 @@ local traverse_network = function(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_no
|
|||
{x=pos.x, y=pos.y-1, z=pos.z},
|
||||
{x=pos.x, y=pos.y, z=pos.z+1},
|
||||
{x=pos.x, y=pos.y, z=pos.z-1}}
|
||||
--print("ON")
|
||||
----print("ON")
|
||||
for i, cur_pos in pairs(positions) do
|
||||
check_node_subp(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes, cur_pos, machines, tier, sw_pos, i == 3)
|
||||
end
|
||||
|
@ -202,7 +202,7 @@ minetest.register_abm({
|
|||
if tier then
|
||||
PR_nodes, BA_nodes, RE_nodes = get_network(pos, pos1, tier)
|
||||
else
|
||||
--dprint("Not connected to a network")
|
||||
--d--print("Not connected to a network")
|
||||
meta:set_string("infotext", S("%s Has No Network"):format(machine_name))
|
||||
return
|
||||
end
|
||||
|
@ -261,7 +261,7 @@ minetest.register_abm({
|
|||
meta1 = minetest.get_meta(pos1)
|
||||
PR_eu_supply = PR_eu_supply + meta1:get_int(eu_supply_str)
|
||||
end
|
||||
--dprint("Total PR supply:"..PR_eu_supply)
|
||||
--d--print("Total PR supply:"..PR_eu_supply)
|
||||
|
||||
-- Get all the demand from the RE nodes
|
||||
local RE_eu_demand = 0
|
||||
|
@ -269,7 +269,7 @@ minetest.register_abm({
|
|||
meta1 = minetest.get_meta(pos1)
|
||||
RE_eu_demand = RE_eu_demand + meta1:get_int(eu_demand_str)
|
||||
end
|
||||
--dprint("Total RE demand:"..RE_eu_demand)
|
||||
--d--print("Total RE demand:"..RE_eu_demand)
|
||||
|
||||
-- Get all the power from the BA nodes
|
||||
local BA_eu_supply = 0
|
||||
|
@ -277,7 +277,7 @@ minetest.register_abm({
|
|||
meta1 = minetest.get_meta(pos1)
|
||||
BA_eu_supply = BA_eu_supply + meta1:get_int(eu_supply_str)
|
||||
end
|
||||
--dprint("Total BA supply:"..BA_eu_supply)
|
||||
--d--print("Total BA supply:"..BA_eu_supply)
|
||||
|
||||
-- Get all the demand from the BA nodes
|
||||
local BA_eu_demand = 0
|
||||
|
@ -285,7 +285,7 @@ minetest.register_abm({
|
|||
meta1 = minetest.get_meta(pos1)
|
||||
BA_eu_demand = BA_eu_demand + meta1:get_int(eu_demand_str)
|
||||
end
|
||||
--dprint("Total BA demand:"..BA_eu_demand)
|
||||
--d--print("Total BA demand:"..BA_eu_demand)
|
||||
|
||||
meta:set_string("infotext",
|
||||
S("@1. Supply: @2 Demand: @3",
|
||||
|
@ -293,7 +293,7 @@ minetest.register_abm({
|
|||
|
||||
-- If the PR supply is enough for the RE demand supply them all
|
||||
if PR_eu_supply >= RE_eu_demand then
|
||||
--dprint("PR_eu_supply"..PR_eu_supply.." >= RE_eu_demand"..RE_eu_demand)
|
||||
--d--print("PR_eu_supply"..PR_eu_supply.." >= RE_eu_demand"..RE_eu_demand)
|
||||
for _, pos1 in pairs(RE_nodes) do
|
||||
meta1 = minetest.get_meta(pos1)
|
||||
local eu_demand = meta1:get_int(eu_demand_str)
|
||||
|
@ -310,14 +310,14 @@ minetest.register_abm({
|
|||
meta1 = minetest.get_meta(pos1)
|
||||
local eu_demand = meta1:get_int(eu_demand_str)
|
||||
meta1:set_int(eu_input_str, math.floor(eu_demand * charge_factor))
|
||||
--dprint("Charging battery:"..math.floor(eu_demand*charge_factor))
|
||||
--d--print("Charging battery:"..math.floor(eu_demand*charge_factor))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
-- If the PR supply is not enough for the RE demand we will discharge the batteries too
|
||||
if PR_eu_supply + BA_eu_supply >= RE_eu_demand then
|
||||
--dprint("PR_eu_supply "..PR_eu_supply.."+BA_eu_supply "..BA_eu_supply.." >= RE_eu_demand"..RE_eu_demand)
|
||||
--d--print("PR_eu_supply "..PR_eu_supply.."+BA_eu_supply "..BA_eu_supply.." >= RE_eu_demand"..RE_eu_demand)
|
||||
for _, pos1 in pairs(RE_nodes) do
|
||||
meta1 = minetest.get_meta(pos1)
|
||||
local eu_demand = meta1:get_int(eu_demand_str)
|
||||
|
@ -333,7 +333,7 @@ minetest.register_abm({
|
|||
meta1 = minetest.get_meta(pos1)
|
||||
local eu_supply = meta1:get_int(eu_supply_str)
|
||||
meta1:set_int(eu_input_str, math.floor(eu_supply * charge_factor))
|
||||
--dprint("Discharging battery:"..math.floor(eu_supply*charge_factor))
|
||||
--d--print("Discharging battery:"..math.floor(eu_supply*charge_factor))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ if not minetest.get_modpath("pipeworks") then
|
|||
local dummy = function()
|
||||
end
|
||||
pipeworks_meta.__index = function(table, key)
|
||||
print("[technic_chests] WARNING: variable or method '"..key.."' not present in dummy pipeworks table - assuming it is a method...")
|
||||
--print("[technic_chests] WARNING: variable or method '"..key.."' not present in dummy pipeworks table - assuming it is a method...")
|
||||
pipeworks[key] = dummy
|
||||
return dummy
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
tnt = {}
|
||||
|
||||
-- Default to enabled when in singleplayer
|
||||
local enable_tnt = minetest.setting_getbool("enable_tnt")
|
||||
local enable_tnt = minetest.settings:get_bool("enable_tnt")
|
||||
if enable_tnt == nil then
|
||||
enable_tnt = minetest.is_singleplayer()
|
||||
end
|
||||
|
@ -12,7 +12,7 @@ local loss_prob = {}
|
|||
loss_prob["default:cobble"] = 3
|
||||
loss_prob["default:dirt"] = 4
|
||||
|
||||
local tnt_radius = tonumber(minetest.setting_get("tnt_radius") or 3)
|
||||
local tnt_radius = tonumber(minetest.settings:get("tnt_radius") or 3)
|
||||
|
||||
-- Fill a list with data for content IDs, after all nodes are registered
|
||||
local cid_data = {}
|
||||
|
|
|
@ -78,7 +78,7 @@ travelnet.save_data = function()
|
|||
file:write( data );
|
||||
file:close();
|
||||
else
|
||||
print("[Mod travelnet] Error: Savefile '"..tostring( path ).."' could not be written.");
|
||||
--print("[Mod travelnet] Error: Savefile '"..tostring( path ).."' could not be written.");
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -93,7 +93,7 @@ travelnet.restore_data = function()
|
|||
travelnet.targets = minetest.deserialize( data );
|
||||
file:close();
|
||||
else
|
||||
print("[Mod travelnet] Error: Savefile '"..tostring( path ).."' not found.");
|
||||
--print("[Mod travelnet] Error: Savefile '"..tostring( path ).."' not found.");
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ minetest.after(0.01, function()
|
|||
end
|
||||
table.sort(unified_inventory.items_list)
|
||||
unified_inventory.items_list_size = #unified_inventory.items_list
|
||||
print("Unified Inventory. inventory size: "..unified_inventory.items_list_size)
|
||||
--print("Unified Inventory. inventory size: "..unified_inventory.items_list_size)
|
||||
for _, name in ipairs(unified_inventory.items_list) do
|
||||
local def = minetest.registered_items[name]
|
||||
-- Simple drops
|
||||
|
@ -301,6 +301,6 @@ end
|
|||
|
||||
function unified_inventory.is_creative(playername)
|
||||
return minetest.check_player_privs(playername, {creative=true})
|
||||
or minetest.setting_getbool("creative_mode")
|
||||
or minetest.settings:get_bool("creative_mode")
|
||||
end
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ unified_inventory = {
|
|||
fgettext = function(s) return minetest.formspec_escape(mygettext(s)) end,
|
||||
|
||||
-- "Lite" mode
|
||||
lite_mode = minetest.setting_getbool("unified_inventory_lite"),
|
||||
lite_mode = minetest.settings:get_bool("unified_inventory_lite"),
|
||||
|
||||
pagecols = 8,
|
||||
pagerows = 10,
|
||||
|
|
|
@ -362,5 +362,5 @@ minetest.register_alias("unifieddyes:grey_paint", "dye:grey")
|
|||
minetest.register_alias("unifieddyes:darkgrey_paint", "dye:dark_grey")
|
||||
minetest.register_alias("unifieddyes:carbon_black", "dye:black")
|
||||
|
||||
print("[UnifiedDyes] Loaded!")
|
||||
--print("[UnifiedDyes] Loaded!")
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ vendor.can_dig = function(pos,player)
|
|||
end
|
||||
|
||||
vendor.on_receive_fields = function(pos, formname, fields, sender)
|
||||
-- print("Vendor at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||
-- --print("Vendor at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||
if ( fields.number == nil or fields.limit == nil or fields.cost == nil or fields.shop == nil ) then -- invalid/aborted form
|
||||
return
|
||||
end
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 4817cdf95d9ada03b3ea58ffac4492641efd774c
|
Loading…
Reference in New Issue