Add translator credits
[minetest_mtg_plus.git] / xpanes.lua
blob6cd37adcf352e854094c8ce0a5ff30d32ad8d80b
1 local S = minetest.get_translator("mtg_plus")
3 -- xpanes
4 xpanes.register_pane("paper", {
5 description = S("Paper Barrier"),
6 inventory_image = "mtg_plus_paperwall.png",
7 wield_image = "mtg_plus_paperwall.png",
8 textures = {"mtg_plus_paperwall.png", "mtg_plus_paperwall.png", "mtg_plus_paperwall.png"},
9 groups = {snappy=3, flammable=4, pane=1},
10 sounds = {
11 footstep = {name="mtg_plus_paper_step", gain=0.1, max_hear_distance=7},
12 place = {name="mtg_plus_paper_step", gain=0.3, max_hear_distance=13},
13 dig = {name="mtg_plus_paper_dig", gain=0.1, max_hear_distance=11},
14 dug = {name="mtg_plus_paper_dug", gain=0.2, max_hear_distance=13},
16 recipe = {
17 { "default:paper", "default:paper", "default:paper" },
18 { "default:paper", "default:paper", "default:paper" },
22 local r
23 if minetest.registered_items["xpanes:paper_flat"] then
24 r = "xpanes:paper_flat"
25 else
26 r = "xpanes:paper"
27 end
28 minetest.register_craft({
29 type = "fuel",
30 recipe = r,
31 burntime = 1,
34 xpanes.register_pane("wood", {
35 description = S("Wooden Bars"),
36 inventory_image = "mtg_plus_wooden_bar.png",
37 wield_image = "mtg_plus_wooden_bar.png",
38 textures = {"mtg_plus_wooden_bar.png", "mtg_plus_wooden_bar_side.png", "mtg_plus_wooden_bar_y.png"},
39 groups = {choppy=3, oddly_breakable_by_hand=2, flammable=2, pane=1},
40 sounds = default.node_sound_wood_defaults(),
41 recipe = {
42 { "group:wood", "", "group:wood" },
43 { "group:wood", "", "group:wood" },
44 { "group:wood", "", "group:wood" },
48 if minetest.registered_items["xpanes:wood_flat"] then
49 r = "xpanes:wood_flat"
50 else
51 r = "xpanes:wood"
52 end
53 minetest.register_craft({
54 type = "fuel",
55 recipe = r,
56 burntime = 2,
59 xpanes.register_pane("goldglass", {
60 description = S("Goldglass Pane"),
61 inventory_image = "mtg_plus_goldglass.png",
62 wield_image = "mtg_plus_goldglass.png",
63 textures = {"mtg_plus_goldglass.png","mtg_plus_goldglass_pane_half.png","mtg_plus_goldglass_pane_top.png",},
64 groups = {cracky=3,oddly_breakable_by_hand=2,pane=1},
65 sounds = default.node_sound_glass_defaults(),
66 recipe = {
67 { "mtg_plus:goldglass","mtg_plus:goldglass","mtg_plus:goldglass", },
68 { "mtg_plus:goldglass","mtg_plus:goldglass","mtg_plus:goldglass", },
72 xpanes.register_pane("goldglass2", {
73 description = S("Golden Window"),
74 inventory_image = "mtg_plus_goldglass2.png",
75 wield_image = "mtg_plus_goldglass2.png",
76 textures = {"mtg_plus_goldglass2.png","mtg_plus_goldglass_pane_half.png","mtg_plus_goldglass_pane_top.png",},
77 groups = {cracky=3,oddly_breakable_by_hand=3,pane=1},
78 sounds = default.node_sound_glass_defaults(),
79 recipe = {
80 { "default:gold_ingot","default:gold_ingot","default:gold_ingot", },
81 { "default:gold_ingot","default:glass","default:gold_ingot", },
82 { "default:gold_ingot","default:gold_ingot","default:gold_ingot", },
86 xpanes.register_pane("papyrus", {
87 description = S("Papyrus Lattice"),
88 inventory_image = "mtg_plus_papyrus_lattice.png",
89 wield_image = "mtg_plus_papyrus_lattice.png",
90 textures = {"mtg_plus_papyrus_lattice.png","mtg_plus_papyrus_lattice.png","mtg_plus_papyrus_lattice.png"},
91 groups = {snappy=2, choppy=1, flammable=2,pane=1},
92 sounds = default.node_sound_leaves_defaults(),
93 recipe = {
94 { "default:papyrus", "farming:string", "default:papyrus" },
95 { "default:papyrus", "farming:string", "default:papyrus" },
99 if minetest.registered_items["xpanes:papyrus_flat"] then
100 r = "xpanes:papyrus_flat"
101 else
102 r = "xpanes:papyrus"
104 minetest.register_craft({
105 type = "fuel",
106 recipe = r,
107 burntime = 1,
111 xpanes.register_pane("ice", {
112 description = S("Ice Window Pane"),
113 inventory_image = "mtg_plus_ice_window.png",
114 wield_image = "mtg_plus_ice_window.png",
115 textures = {"mtg_plus_ice_window.png", "mtg_plus_ice_window.png", "mtg_plus_ice_window.png"},
116 groups = {cracky=3, slippery = 3, pane=1},
117 sounds = default.node_sound_glass_defaults(),
118 recipe = {
119 { "mtg_plus:ice_window", "mtg_plus:ice_window", "mtg_plus:ice_window", },
120 { "mtg_plus:ice_window", "mtg_plus:ice_window", "mtg_plus:ice_window", }
124 local panes = {
125 paper = S("Papier barriers are thin solid layers of paper which neatly connect to their neighbors as you build them. They could be useful to separate rooms."),
126 wood = S("Wooden bars are barriers which neatly connect to their neighbors as you build them."),
127 goldglass = S("Goldglass panes are thin layers of goldglass which neatly connect to their neighbors as you build them."),
128 goldglass2 = S("Golden windows are decorative blocks which can be placed into holes for nice-looking windows. Golden windows automatically connect to their neighbors as you build them."),
129 papyrus = S("Papyrus lattices are strong barriers which neatly connect to their neighbors as you build them."),
130 ice = S("Ice window panes are thinner than the full ice windows and neatly connect to each other as you build them"),
133 for pane, longdesc in pairs(panes) do
134 minetest.override_item("xpanes:"..pane.."_flat", {
135 _doc_items_longdesc = longdesc,
137 minetest.override_item("xpanes:"..pane, {
138 _doc_items_create_entry = false,
140 if minetest.get_modpath("doc") then
141 doc.add_entry_alias("nodes", "xpanes:"..pane.."_flat", "nodes", "xpanes:"..pane)