ropes/init.lua

67 lines
2.9 KiB
Lua
Raw Permalink Normal View History

ropes = {
name = 'ropes',
2015-02-09 02:12:47 +01:00
}
2017-02-03 08:22:31 +01:00
-- internationalization boilerplate
local modname = minetest.get_current_modname()
local MP = minetest.get_modpath(modname)
ropes.S = minetest.get_translator(modname)
2017-02-03 08:22:31 +01:00
2017-06-18 21:06:14 +02:00
ropes.ropeLength = tonumber(minetest.settings:get("ropes_rope_length")) or 50
ropes.woodRopeBoxMaxMultiple = tonumber(minetest.settings:get("ropes_wood_rope_box_max_multiple")) or 2
ropes.copperRopeBoxMaxMultiple = tonumber(minetest.settings:get("ropes_copper_rope_box_max_multiple")) or 5
ropes.steelRopeBoxMaxMultiple = tonumber(minetest.settings:get("ropes_steel_rope_box_max_multiple")) or 9
ropes.create_all_definitions = minetest.settings:get_bool("ropes_create_all_definitions")
2018-11-28 07:07:01 +01:00
ropes.ropeLadderLength = tonumber(minetest.settings:get("ropes_rope_ladder_length")) or 50
2018-11-27 09:07:25 +01:00
ropes.extending_ladder_enabled = minetest.settings:get_bool("ropes_extending_ladder_enabled")
2018-11-28 07:07:01 +01:00
if ropes.extending_ladder_enabled == nil then
ropes.extending_ladder_enabled = true
end
ropes.replace_default_ladders = minetest.settings:get_bool("ropes_replace_default_ladders")
2018-11-27 09:07:25 +01:00
ropes.extending_wood_ladder_limit = tonumber(minetest.settings:get("ropes_extending_wood_ladder_limit")) or 5
ropes.extending_steel_ladder_limit = tonumber(minetest.settings:get("ropes_extending_steel_ladder_limit")) or 15
2017-02-10 05:29:42 +01:00
2018-11-28 07:07:01 +01:00
ropes.bridges_enabled = minetest.settings:get_bool("ropes_bridges_enabled")
if ropes.bridges_enabled == nil then
ropes.bridges_enabled = true
end
ropes.can_extend_into_airlike = minetest.settings:get_bool("ropes_can_extend_into_airlike")
ropes.can_extend_into_nodes = {["air"] = true}
if minetest.get_modpath("nether") then
ropes.can_extend_into_nodes["nether:fumes"] = true
end
2018-11-27 09:07:25 +01:00
dofile( MP .. "/doc.lua" )
dofile( MP .. "/functions.lua" )
dofile( MP .. "/crafts.lua" )
dofile( MP .. "/ropeboxes.lua" )
dofile( MP .. "/ropeladder.lua" )
dofile( MP .. "/extendingladder.lua" )
2018-11-28 07:07:01 +01:00
dofile( MP .. "/bridge.lua" )
2018-11-27 09:07:25 +01:00
dofile( MP .. "/loot.lua" )
2013-09-12 15:04:02 +02:00
2017-02-01 05:53:56 +01:00
for i=1,5 do
minetest.register_alias(string.format("vines:%irope_block", i), string.format("ropes:%irope_block", i))
2017-02-10 05:29:42 +01:00
end
minetest.register_alias("vines:rope", "ropes:rope")
minetest.register_alias("vines:rope_bottom", "ropes:rope_bottom")
minetest.register_alias("vines:rope_end", "ropes:rope_bottom")
minetest.register_alias("vines:rope_top", "ropes:rope_top")
minetest.register_alias("vines:ropeladder_top", "ropes:ropeladder_top")
minetest.register_alias("vines:ropeladder", "ropes:ropeladder")
minetest.register_alias("vines:ropeladder_bottom", "ropes:ropeladder_bottom")
minetest.register_alias("vines:ropeladder_falling", "ropes:ropeladder_falling")
minetest.register_alias("vines:rope_block", "ropes:steel5rope_block")
2017-02-10 05:29:42 +01:00
for i=1,9 do
minetest.register_alias(string.format("ropes:%irope_block", i), string.format("ropes:steel%irope_block", i))
2017-02-10 05:29:42 +01:00
end
2017-03-01 07:14:58 +01:00
minetest.register_alias("castle:ropes", "ropes:rope")
minetest.register_alias("castle:ropebox", "ropes:steel1rope_block")
minetest.register_alias("castle:box_rope", "ropes:rope")
2017-02-01 05:53:56 +01:00
2018-11-27 09:07:25 +01:00
print("[Ropes] Loaded!")