mirror of
https://github.com/minetest-mods/ropes.git
synced 2024-11-28 10:23:44 +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
|
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_wood")
|
||||||
minetest.unregister_item("default:ladder_steel")
|
minetest.unregister_item("default:ladder_steel")
|
||||||
minetest.clear_craft({output = "default:ladder_wood"})
|
minetest.clear_craft({output = "default:ladder_wood"})
|
||||||
@ -33,24 +49,31 @@ minetest.register_lbm({
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
wood_recipe = {
|
||||||
output = "ropes:ladder_wood 5",
|
|
||||||
recipe = {
|
|
||||||
{"group:stick", "", "group:stick"},
|
{"group:stick", "", "group:stick"},
|
||||||
{"group:stick", "group:stick", "group:stick"},
|
{"group:stick", "group:stick", "group:stick"},
|
||||||
{"group:stick", "", "group:stick"},
|
{"group:stick", "", "group:stick"},
|
||||||
}
|
}
|
||||||
})
|
wood_name = S("Wooden Ladder")
|
||||||
|
|
||||||
minetest.register_craft({
|
steel_recipe = {
|
||||||
output = 'ropes:ladder_steel 15',
|
|
||||||
recipe = {
|
|
||||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
{'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)
|
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
|
-- 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
|
end
|
||||||
|
|
||||||
minetest.register_node("ropes:ladder_wood", {
|
minetest.register_node("ropes:ladder_wood", {
|
||||||
description = S("Wooden Ladder"),
|
description = wood_name,
|
||||||
_doc_items_longdesc = ropes.doc.ladder_longdesc,
|
_doc_items_longdesc = ropes.doc.ladder_longdesc,
|
||||||
_doc_items_usagehelp = ropes.doc.ladder_usagehelp,
|
_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"},
|
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", {
|
minetest.register_node("ropes:ladder_steel", {
|
||||||
description = S("Steel Ladder"),
|
description = steel_name,
|
||||||
_doc_items_longdesc = ropes.doc.ladder_longdesc,
|
_doc_items_longdesc = ropes.doc.ladder_longdesc,
|
||||||
_doc_items_usagehelp = ropes.doc.ladder_usagehelp,
|
_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"},
|
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
|
if ropes.extending_ladder_enabled == nil then
|
||||||
ropes.extending_ladder_enabled = true
|
ropes.extending_ladder_enabled = true
|
||||||
end
|
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_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
|
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 .. "/bridge.lua" )
|
||||||
dofile( MP .. "/loot.lua" )
|
dofile( MP .. "/loot.lua" )
|
||||||
|
|
||||||
|
|
||||||
for i=1,5 do
|
for i=1,5 do
|
||||||
minetest.register_alias(string.format("vines:%irope_block", i), string.format("ropes:%irope_block", i))
|
minetest.register_alias(string.format("vines:%irope_block", i), string.format("ropes:%irope_block", i))
|
||||||
end
|
end
|
||||||
|
16
locale/es.po
16
locale/es.po
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: 2018-10-27 11:26+0200\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -18,7 +18,7 @@ msgstr ""
|
|||||||
"X-Generator: Poedit 1.8.11\n"
|
"X-Generator: Poedit 1.8.11\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
#: bridge.lua:47
|
#: bridge.lua:49
|
||||||
msgid "Wooden Bridge"
|
msgid "Wooden Bridge"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -189,14 +189,22 @@ msgid ""
|
|||||||
"that juts out away from the location you're standing on."
|
"that juts out away from the location you're standing on."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: extendingladder.lua:103
|
#: extendingladder.lua:11
|
||||||
msgid "Wooden Ladder"
|
msgid "Wooden Ladder"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: extendingladder.lua:136
|
#: extendingladder.lua:18
|
||||||
msgid "Steel Ladder"
|
msgid "Steel Ladder"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: extendingladder.lua:57
|
||||||
|
msgid "Wooden Extendable Ladder"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: extendingladder.lua:64
|
||||||
|
msgid "Steel Extendable Ladder"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ropeboxes.lua:121
|
#: ropeboxes.lua:121
|
||||||
msgid "@1 Ropebox @2m"
|
msgid "@1 Ropebox @2m"
|
||||||
msgstr "Caja de cuerda de @1 de @2m"
|
msgstr "Caja de cuerda de @1 de @2m"
|
||||||
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -17,7 +17,7 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=CHARSET\n"
|
"Content-Type: text/plain; charset=CHARSET\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: bridge.lua:47
|
#: bridge.lua:49
|
||||||
msgid "Wooden Bridge"
|
msgid "Wooden Bridge"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -147,14 +147,22 @@ msgid ""
|
|||||||
"that juts out away from the location you're standing on."
|
"that juts out away from the location you're standing on."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: extendingladder.lua:103
|
#: extendingladder.lua:11
|
||||||
msgid "Wooden Ladder"
|
msgid "Wooden Ladder"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: extendingladder.lua:136
|
#: extendingladder.lua:18
|
||||||
msgid "Steel Ladder"
|
msgid "Steel Ladder"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: extendingladder.lua:57
|
||||||
|
msgid "Wooden Extendable Ladder"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: extendingladder.lua:64
|
||||||
|
msgid "Steel Extendable Ladder"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ropeboxes.lua:121
|
#: ropeboxes.lua:121
|
||||||
msgid "@1 Ropebox @2m"
|
msgid "@1 Ropebox @2m"
|
||||||
msgstr ""
|
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.
|
#existing rope boxes into "unknown node"s.
|
||||||
ropes_create_all_definitions (Create all rope box definitions) bool false
|
ropes_create_all_definitions (Create all rope box definitions) bool false
|
||||||
|
|
||||||
#Extending ladders replaces the default wallmounted wood and steel ladders
|
#Extending ladders are capable of standing on their own, to a defined limit.
|
||||||
#with ladders capable of standing on their own, to a defined limit.
|
|
||||||
#A ladder can extend to its unsupported limit before needing another node
|
#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
|
#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.
|
#ladder with a stack of ladders will add new ladder segments to its top.
|
||||||
ropes_extending_ladder_enabled (Enable extendable ladders) bool true
|
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_wood_ladder_limit (Unsupported limit of wooden ladders) int 5
|
||||||
ropes_extending_steel_ladder_limit (Unsupported limit of steel ladders) int 15
|
ropes_extending_steel_ladder_limit (Unsupported limit of steel ladders) int 15
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user