Add translator credits
[minetest_mtg_plus.git] / doors.lua
blobc22c2364ec43d5cd72b5614c5abb012c1697cac6
1 local S = minetest.get_translator("mtg_plus")
3 local door_simple = S("A door covers a vertical area of two blocks to block the way. It can be opened and closed by any player.")
4 local door_simple_use = S("Use the use key on it to open or close it.")
6 local metal_sounds
7 if default.node_sound_metal_defaults then
8 metal_sounds = default.node_sound_metal_defaults()
9 else
10 metal_sounds = default.node_sound_stone_defaults()
11 end
13 -- Doors
14 doors.register("door_wood_bar", {
15 tiles = {{ name = "mtg_plus_door_wood_bar.png", backface_culling = true }},
16 description = S("Wooden Bar Door"),
17 _doc_items_longdesc = door_simple,
18 _doc_items_usagehelp = door_simple_use,
19 _doc_items_image = "mtg_plus_door_wood_bar_item.png",
20 inventory_image = "mtg_plus_door_wood_bar_item.png",
21 sounds = default.node_sound_wood_defaults(),
22 sound_open = "doors_fencegate_open",
23 sound_close = "doors_fencegate_close",
24 groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
25 recipe = {
26 {"xpanes:wood_flat",},
27 {"xpanes:wood_flat",},
31 minetest.register_craft({
32 type = "fuel",
33 recipe = "doors:door_wood_bar",
34 burntime = 4,
37 doors.register("door_papyrus", {
38 tiles = {{ name = "mtg_plus_door_papyrus.png", backface_culling = true }},
39 description = S("Papyrus Door"),
40 _doc_items_longdesc = door_simple,
41 _doc_items_usagehelp = door_simple_use,
42 _doc_items_image = "mtg_plus_door_papyrus_item.png",
43 inventory_image = "mtg_plus_door_papyrus_item.png",
44 sounds = default.node_sound_leaves_defaults(),
45 sound_open = "doors_fencegate_open",
46 sound_close = "doors_fencegate_close",
47 groups = { snappy = 2, choppy = 1, flammable = 2 },
48 recipe = {
49 {"default:papyrus", "default:papyrus"},
50 {"farming:string", "farming:string"},
51 {"default:papyrus", "default:papyrus"},
55 minetest.register_craft({
56 type = "fuel",
57 recipe = "doors:door_papyrus",
58 burntime = 4,
61 doors.register("door_ice", {
62 tiles = {{ name = "mtg_plus_door_ice.png", backface_culling = true }},
63 description = S("Ice Door"),
64 _doc_items_longdesc = S("Ice doors can be opened and closed. They are solid, but some of the light hitting ice doors can still go through, making them an interesting decoration in icy areas."),
65 _doc_items_usagehelp = door_simple_use,
66 _doc_items_image = "mtg_plus_door_ice_item.png",
67 inventory_image = "mtg_plus_door_ice_item.png",
68 groups = { cracky = 3, slippery = 3, },
69 sounds = default.node_sound_glass_defaults(),
70 sound_open = "mtg_plus_door_ice_open",
71 sound_close = "mtg_plus_door_ice_close",
72 recipe = {
73 {"default:ice", "default:ice"},
74 {"default:ice", "default:ice"},
75 {"default:ice", "default:ice"},
79 doors.register("door_icesteel", {
80 tiles = {{ name = "mtg_plus_door_icesteel.png", backface_culling = true }},
81 description = S("Icy Steel Door"),
82 _doc_items_longdesc = S("Icy steel doors are a combination of ice doors and steel doors which can only be opened and closed by their owners. They are solid, but some of the light hitting icy steel doors can still go through."),
83 _doc_items_usagehelp = S("Point the door to see who owns it. Use the use key on the door to open or close it (if you own it)."),
84 _doc_items_image = "mtg_plus_door_icesteel_item.png",
85 protected = true,
86 sound_open = "mtg_plus_door_icesteel_open",
87 sound_close = "mtg_plus_door_icesteel_close",
88 inventory_image = "mtg_plus_door_icesteel_item.png",
89 sounds = metal_sounds,
90 groups = { snappy = 1, bendy = 2, cracky = 3, melty = 3, level = 2, slippery = 1, },
93 minetest.register_craft({
94 output = "doors:door_icesteel 2",
95 type = "shapeless",
96 recipe = {"doors:door_ice", "doors:door_steel"},
99 doors.register_fencegate("mtg_plus:gate_goldwood", {
100 description = S("Goldwood Fence Gate"),
101 material = "mtg_plus:goldwood",
102 texture = "mtg_plus_goldwood.png",
103 groups = {choppy=2, },
106 minetest.override_item("mtg_plus:gate_goldwood_closed", {
107 _doc_items_longdesc = S("A fence gate made from precious goldwood. It blocks the path, but it can be opened and easily jumped over. Other fence posts will neatly connect to this fence gate."),
108 _doc_items_usagehelp = S("Right-click the gate to open or close it."),
110 minetest.override_item("mtg_plus:gate_goldwood_open", {
111 _doc_items_create_entry = false,
113 if minetest.get_modpath("doc") then
114 doc.add_entry_alias("nodes", "mtg_plus:gate_goldwood_closed", "nodes", "mtg_plus:gate_goldwood_open")
117 doors.register_trapdoor("mtg_plus:trapdoor_ice", {
118 description = S("Ice Trapdoor"),
119 _doc_items_longdesc = S("An ice trapdoor covers the floor and can be opened and closed by anyone. Ice trapdoors are solid, but some light can pass through nonetheless."),
120 _doc_items_usagehelp = door_simple_use,
121 tile_front = "mtg_plus_trapdoor_ice.png",
122 tile_side = "mtg_plus_trapdoor_ice_side.png",
123 inventory_image = "mtg_plus_trapdoor_ice.png",
124 wield_image = "mtg_plus_trapdoor_ice.png",
125 sound_open = "mtg_plus_door_ice_open",
126 sound_close = "mtg_plus_door_ice_close",
127 sounds = default.node_sound_glass_defaults(),
128 groups = { cracky = 3, slippery = 3, door = 1 },
131 minetest.register_craft({
132 output = "mtg_plus:trapdoor_ice 2",
133 recipe = { { "default:ice", "default:ice", "default:ice" },
134 { "default:ice", "default:ice", "default:ice" }, }
137 doors.register_trapdoor("mtg_plus:trapdoor_icesteel", {
138 description = S("Icy Steel Trapdoor"),
139 _doc_items_longdesc = S("An icy steel trapdoor is a combination of an ice trapdoor and a steel trapdoor. It covers the floor and can only be opened and closed by its placer. Icy steel trapdoors are solid, but some light can pass through nonetheless."),
140 _doc_items_usagehelp = S("Point the icy steel trapdoor to see who owns it. Use the use key on it to open or close it (if you own it)."),
141 protected = true,
142 tile_front = "mtg_plus_trapdoor_icesteel.png",
143 tile_side = "mtg_plus_trapdoor_icesteel_side.png",
144 inventory_image = "mtg_plus_trapdoor_icesteel.png",
145 wield_image = "mtg_plus_trapdoor_icesteel.png",
146 sound_open = "mtg_plus_door_icesteel_open",
147 sound_close = "mtg_plus_door_icesteel_close",
148 sounds = metal_sounds,
149 groups = { snappy = 1, bendy = 2, cracky = 3, melty = 3, level = 2, slippery = 1, door = 1 },
152 minetest.register_craft({
153 type = "shapeless",
154 output = "mtg_plus:trapdoor_icesteel 2",
155 recipe = { "mtg_plus:trapdoor_ice", "doors:trapdoor_steel" },