update plantlife, castles, basic_materials, cool_trees, currency,
digistuff, farming_redo, technic, glooptest, homedecor, maptools,
mesecons, moreblocks, moreores, pipeworks, teleport_request,
unified_inventory, unifieddyes, worldedit, and xban
2020-02-16 01:45:23 -05:00
|
|
|
|
|
|
|
-- Used for localization, choose either built-in or intllib.
|
|
|
|
|
|
|
|
local MP, S, NS = nil
|
|
|
|
|
|
|
|
if (minetest.get_modpath("intllib") == nil) then
|
|
|
|
S = minetest.get_translator("castle_gates")
|
|
|
|
|
|
|
|
else
|
|
|
|
-- internationalization boilerplate
|
|
|
|
MP = minetest.get_modpath(minetest.get_current_modname())
|
|
|
|
S, NS = dofile(MP.."/intllib.lua")
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2017-03-17 16:53:18 -04:00
|
|
|
|
|
|
|
if minetest.get_modpath("doors") then
|
|
|
|
doors.register("castle_gates:oak_door", {
|
|
|
|
tiles = {{ name = "castle_door_oak.png", backface_culling = true }},
|
|
|
|
description = S("Oak Door"),
|
|
|
|
inventory_image = "castle_oak_door_inv.png",
|
|
|
|
protected = true,
|
|
|
|
groups = { choppy = 2, door = 1 },
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
recipe = {
|
|
|
|
{"default:tree", "default:tree"},
|
|
|
|
{"default:tree", "default:tree"},
|
|
|
|
{"default:tree", "default:tree"},
|
|
|
|
}
|
|
|
|
})
|
2018-09-08 12:12:15 -04:00
|
|
|
|
|
|
|
local door_recipe
|
|
|
|
if minetest.get_modpath("xpanes") then
|
|
|
|
door_recipe = {
|
|
|
|
{"xpanes:jailbars_flat", "xpanes:jailbars_flat"},
|
|
|
|
{"xpanes:jailbars_flat", "xpanes:jailbars_flat"},
|
|
|
|
{"xpanes:jailbars_flat", "xpanes:jailbars_flat"},
|
|
|
|
}
|
|
|
|
else
|
|
|
|
door_recipe = {
|
|
|
|
{"default:steel_ingot", ""},
|
|
|
|
{"", "default:steel_ingot"},
|
|
|
|
{"default:steel_ingot", ""},
|
|
|
|
}
|
|
|
|
end
|
2017-03-17 16:53:18 -04:00
|
|
|
|
|
|
|
doors.register("castle_gates:jail_door", {
|
|
|
|
tiles = {{ name = "castle_door_jail.png", backface_culling = true }},
|
|
|
|
description = S("Jail Door"),
|
|
|
|
inventory_image = "castle_jail_door_inv.png",
|
|
|
|
protected = true,
|
|
|
|
groups = { cracky = 2, door = 1, flow_through = 1},
|
|
|
|
sound_open = "doors_steel_door_open",
|
|
|
|
sound_close = "doors_steel_door_close",
|
2018-09-08 12:12:15 -04:00
|
|
|
recipe = door_recipe,
|
2017-03-17 16:53:18 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_alias("castle:oak_door_a", "castle_gates:oak_door_a")
|
|
|
|
minetest.register_alias("castle:oak_door_b", "castle_gates:oak_door_b")
|
|
|
|
minetest.register_alias("castle:jail_door_a", "castle_gates:jail_door_a")
|
|
|
|
minetest.register_alias("castle:jail_door_b", "castle_gates:jail_door_b")
|
|
|
|
end
|
|
|
|
|
|
|
|
if minetest.get_modpath("xpanes") then
|
|
|
|
xpanes.register_pane("jailbars", {
|
|
|
|
description = S("Jail Bars"),
|
|
|
|
tiles = {"castle_jailbars.png"},
|
|
|
|
drawtype = "airlike",
|
|
|
|
paramtype = "light",
|
updated cool_trees, basic_materials, bonemeal, castles, cblocks,
currency, facade, farming redo, item_drop, mesecons, pipeworks, technic,
titanium, and worldedit.
Switched to cheapie's display_blocks redo mod (replaces jojo1997's old
version).
2020-05-31 16:20:11 -04:00
|
|
|
textures = {"castle_jailbars.png", "castle_jailbars.png", "castle_jailbars.png"},
|
2017-03-17 16:53:18 -04:00
|
|
|
inventory_image = "castle_jailbars.png",
|
|
|
|
wield_image = "castle_jailbars.png",
|
|
|
|
sounds = default.node_sound_metal_defaults(),
|
|
|
|
groups = {cracky=1, pane=1, flow_through=1},
|
|
|
|
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"}},
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
for i = 1, 15 do
|
|
|
|
minetest.register_alias("castle:jailbars_"..i, "xpanes:jailbars_"..i)
|
|
|
|
end
|
|
|
|
minetest.register_alias("castle:jailbars", "xpanes:jailbars")
|