mirror of
https://github.com/minetest-mods/ropes.git
synced 2024-11-28 02:13:43 +01:00
make replacement of default ladders optional
This commit is contained in:
parent
c69b6fb0e4
commit
1b6539199a
@ -3,6 +3,22 @@ local S, NS = dofile(modpath.."/intllib.lua")
|
||||
|
||||
if ropes.extending_ladder_enabled then
|
||||
|
||||
local wood_recipe = {
|
||||
{"group:stick", "group:stick", "group:stick"},
|
||||
{"group:stick", "", "group:stick"},
|
||||
{"group:stick", "", "group:stick"},
|
||||
}
|
||||
local wood_name = S("Wooden Extendable Ladder")
|
||||
|
||||
local steel_recipe = {
|
||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
}
|
||||
local steel_name = S("Steel Extendable Ladder")
|
||||
|
||||
if ropes.replace_default_ladders then
|
||||
|
||||
minetest.unregister_item("default:ladder_wood")
|
||||
minetest.unregister_item("default:ladder_steel")
|
||||
minetest.clear_craft({output = "default:ladder_wood"})
|
||||
@ -33,24 +49,31 @@ minetest.register_lbm({
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ropes:ladder_wood 5",
|
||||
recipe = {
|
||||
wood_recipe = {
|
||||
{"group:stick", "", "group:stick"},
|
||||
{"group:stick", "group:stick", "group:stick"},
|
||||
{"group:stick", "", "group:stick"},
|
||||
}
|
||||
})
|
||||
wood_name = S("Wooden Ladder")
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'ropes:ladder_steel 15',
|
||||
recipe = {
|
||||
steel_recipe = {
|
||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||
}
|
||||
steel_name = S("Steel Ladder")
|
||||
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ropes:ladder_wood 5",
|
||||
recipe = wood_recipe,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'ropes:ladder_steel 15',
|
||||
recipe = steel_recipe,
|
||||
})
|
||||
|
||||
local ladder_extender = function(pos, node, clicker, itemstack, pointed_thing, ladder_node, standing_limit)
|
||||
-- on_rightclick can be called by other mods, make sure we have all the parameters we need
|
||||
@ -105,7 +128,7 @@ local ladder_extender = function(pos, node, clicker, itemstack, pointed_thing, l
|
||||
end
|
||||
|
||||
minetest.register_node("ropes:ladder_wood", {
|
||||
description = S("Wooden Ladder"),
|
||||
description = wood_name,
|
||||
_doc_items_longdesc = ropes.doc.ladder_longdesc,
|
||||
_doc_items_usagehelp = ropes.doc.ladder_usagehelp,
|
||||
tiles = {"default_wood.png","default_wood.png","default_wood.png^[transformR270","default_wood.png^[transformR270","default_ladder_wood.png"},
|
||||
@ -138,7 +161,7 @@ minetest.register_node("ropes:ladder_wood", {
|
||||
})
|
||||
|
||||
minetest.register_node("ropes:ladder_steel", {
|
||||
description = S("Steel Ladder"),
|
||||
description = steel_name,
|
||||
_doc_items_longdesc = ropes.doc.ladder_longdesc,
|
||||
_doc_items_usagehelp = ropes.doc.ladder_usagehelp,
|
||||
tiles = {"default_steel_block.png","default_steel_block.png","default_steel_block.png","default_steel_block.png","default_ladder_steel.png"},
|
||||
|
3
init.lua
3
init.lua
@ -18,6 +18,8 @@ ropes.extending_ladder_enabled = minetest.settings:get_bool("ropes_extending_lad
|
||||
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")
|
||||
|
||||
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
|
||||
|
||||
@ -35,7 +37,6 @@ dofile( MP .. "/extendingladder.lua" )
|
||||
dofile( MP .. "/bridge.lua" )
|
||||
dofile( MP .. "/loot.lua" )
|
||||
|
||||
|
||||
for i=1,5 do
|
||||
minetest.register_alias(string.format("vines:%irope_block", i), string.format("ropes:%irope_block", i))
|
||||
end
|
||||
|
16
locale/es.po
16
locale/es.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-11-27 22:45-0700\n"
|
||||
"POT-Creation-Date: 2019-04-28 16:30-0600\n"
|
||||
"PO-Revision-Date: 2018-10-27 11:26+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -18,7 +18,7 @@ msgstr ""
|
||||
"X-Generator: Poedit 1.8.11\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: bridge.lua:47
|
||||
#: bridge.lua:49
|
||||
msgid "Wooden Bridge"
|
||||
msgstr ""
|
||||
|
||||
@ -189,14 +189,22 @@ msgid ""
|
||||
"that juts out away from the location you're standing on."
|
||||
msgstr ""
|
||||
|
||||
#: extendingladder.lua:103
|
||||
#: extendingladder.lua:11
|
||||
msgid "Wooden Ladder"
|
||||
msgstr ""
|
||||
|
||||
#: extendingladder.lua:136
|
||||
#: extendingladder.lua:18
|
||||
msgid "Steel Ladder"
|
||||
msgstr ""
|
||||
|
||||
#: extendingladder.lua:57
|
||||
msgid "Wooden Extendable Ladder"
|
||||
msgstr ""
|
||||
|
||||
#: extendingladder.lua:64
|
||||
msgid "Steel Extendable Ladder"
|
||||
msgstr ""
|
||||
|
||||
#: ropeboxes.lua:121
|
||||
msgid "@1 Ropebox @2m"
|
||||
msgstr "Caja de cuerda de @1 de @2m"
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-11-27 22:45-0700\n"
|
||||
"POT-Creation-Date: 2019-04-28 16:30-0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -17,7 +17,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: bridge.lua:47
|
||||
#: bridge.lua:49
|
||||
msgid "Wooden Bridge"
|
||||
msgstr ""
|
||||
|
||||
@ -147,14 +147,22 @@ msgid ""
|
||||
"that juts out away from the location you're standing on."
|
||||
msgstr ""
|
||||
|
||||
#: extendingladder.lua:103
|
||||
#: extendingladder.lua:11
|
||||
msgid "Wooden Ladder"
|
||||
msgstr ""
|
||||
|
||||
#: extendingladder.lua:136
|
||||
#: extendingladder.lua:18
|
||||
msgid "Steel Ladder"
|
||||
msgstr ""
|
||||
|
||||
#: extendingladder.lua:57
|
||||
msgid "Wooden Extendable Ladder"
|
||||
msgstr ""
|
||||
|
||||
#: extendingladder.lua:64
|
||||
msgid "Steel Extendable Ladder"
|
||||
msgstr ""
|
||||
|
||||
#: ropeboxes.lua:121
|
||||
msgid "@1 Ropebox @2m"
|
||||
msgstr ""
|
||||
|
@ -36,12 +36,16 @@ ropes_steel_rope_box_max_multiple (Maximum steel rope box multiple) int 9 0 9
|
||||
#existing rope boxes into "unknown node"s.
|
||||
ropes_create_all_definitions (Create all rope box definitions) bool false
|
||||
|
||||
#Extending ladders replaces the default wallmounted wood and steel ladders
|
||||
#with ladders capable of standing on their own, to a defined limit.
|
||||
#Extending ladders are capable of standing on their own, to a defined limit.
|
||||
#A ladder can extend to its unsupported limit before needing another node
|
||||
#behind it to provide a new point of support. Right-clicking on an existing
|
||||
#ladder with a stack of ladders will add new ladder segments to its top.
|
||||
ropes_extending_ladder_enabled (Enable extendable ladders) bool true
|
||||
|
||||
#If extending ladders are enabled, this setting will cause them to replace
|
||||
#the default ladders entirely.
|
||||
ropes_replace_default_ladders (Replace default ladders with extendable ladders) bool false
|
||||
|
||||
ropes_extending_wood_ladder_limit (Unsupported limit of wooden ladders) int 5
|
||||
ropes_extending_steel_ladder_limit (Unsupported limit of steel ladders) int 15
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user