2019-03-07 11:23:12 -08:00
|
|
|
local S = minetest.get_translator("mtg_plus")
|
2017-06-08 03:57:37 -07:00
|
|
|
|
2017-08-26 10:39:10 -07:00
|
|
|
local metal_sounds
|
|
|
|
if default.node_sound_metal_defaults then
|
|
|
|
metal_sounds = default.node_sound_metal_defaults()
|
|
|
|
else
|
|
|
|
metal_sounds = default.node_sound_stone_defaults()
|
|
|
|
end
|
|
|
|
|
2017-06-08 03:57:37 -07:00
|
|
|
-- Ladders
|
|
|
|
minetest.register_node("mtg_plus:ladder_papyrus", {
|
|
|
|
description = S("Papyrus Ladder"),
|
|
|
|
_doc_items_longdesc = S("A particulary strong piece of ladder which allows you to move vertically."),
|
|
|
|
drawtype = "signlike",
|
|
|
|
tiles = {"mtg_plus_ladder_papyrus.png"},
|
|
|
|
inventory_image = "mtg_plus_ladder_papyrus.png",
|
|
|
|
wield_image = "mtg_plus_ladder_papyrus.png",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
climbable = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
selection_box = { type = "wallmounted", },
|
|
|
|
groups = { snappy = 2, choppy = 1, flammable = 2 },
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "mtg_plus:ladder_papyrus 2",
|
|
|
|
recipe = { {"default:papyrus", "", "default:papyrus"},
|
|
|
|
{"farming:string", "default:papyrus", "farming:string"},
|
|
|
|
{"default:papyrus", "", "default:papyrus"}},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "mtg_plus:ladder_papyrus",
|
|
|
|
burntime = 2,
|
|
|
|
})
|
|
|
|
|
2019-08-25 17:27:40 -07:00
|
|
|
local metal_ladders = {
|
|
|
|
{ "gold", S("Golden Ladder"), "default:gold_ingot", { cracky = 3 }, true },
|
|
|
|
{ "bronze", S("Bronze Ladder"), "default:bronze_ingot", { cracky = 2 }, },
|
|
|
|
{ "copper", S("Copper Ladder"), "default:copper_ingot", { cracky = 2 }, },
|
|
|
|
{ "tin", S("Tin Ladder"), "default:tin_ingot", { cracky = 2 }, },
|
|
|
|
}
|
2017-06-08 03:57:37 -07:00
|
|
|
|
2019-08-25 17:27:40 -07:00
|
|
|
for m=1, #metal_ladders do
|
|
|
|
local metal = metal_ladders[m]
|
|
|
|
local longdesc
|
|
|
|
if metal[5] then
|
|
|
|
longdesc = S("A luxurious piece of ladder which allows you to move vertically.")
|
|
|
|
else
|
|
|
|
longdesc = S("A piece of ladder which allows you to move vertically.")
|
|
|
|
end
|
|
|
|
minetest.register_node("mtg_plus:ladder_"..metal[1], {
|
|
|
|
description = metal[2],
|
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
drawtype = "signlike",
|
|
|
|
tiles = {"mtg_plus_ladder_"..metal[1]..".png"},
|
|
|
|
inventory_image = "mtg_plus_ladder_"..metal[1]..".png",
|
|
|
|
wield_image = "mtg_plus_ladder_"..metal[1]..".png",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
climbable = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
selection_box = { type = "wallmounted", },
|
|
|
|
groups = metal[4],
|
|
|
|
sounds = metal_sounds,
|
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "mtg_plus:ladder_"..metal[1].." 15",
|
|
|
|
recipe = {
|
|
|
|
{metal[3], "", metal[3]},
|
|
|
|
{metal[3], metal[3], metal[3]},
|
|
|
|
{metal[3], "", metal[3]},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|