summaryrefslogtreecommitdiff
path: root/homedecor
diff options
context:
space:
mode:
Diffstat (limited to 'homedecor')
-rw-r--r--homedecor/clocks.lua26
-rw-r--r--homedecor/cobweb.lua11
-rw-r--r--homedecor/electrics.lua9
-rw-r--r--homedecor/foyer.lua17
-rw-r--r--homedecor/gastronomy.lua49
-rw-r--r--homedecor/handlers/expansion.lua14
-rw-r--r--homedecor/kitchen_furniture.lua4
-rw-r--r--homedecor/lighting.lua2
-rw-r--r--homedecor/office.lua26
-rw-r--r--homedecor/trash_cans.lua8
-rw-r--r--homedecor/wardrobe.lua10
11 files changed, 108 insertions, 68 deletions
diff --git a/homedecor/clocks.lua b/homedecor/clocks.lua
index b2a594a..71d7ecd 100644
--- a/homedecor/clocks.lua
+++ b/homedecor/clocks.lua
@@ -1,25 +1,27 @@
+
+local S = homedecor_i18n.gettext
+
local clock_sbox = {
type = "fixed",
fixed = { -8/32, -8/32, 14/32, 8/32, 8/32, 16/32 }
}
local clock_materials = {
- { "plastic", "homedecor_generic_plastic.png" },
- { "wood", "default_wood.png" }
+ { "plastic", S("Plastic analog clock"), "homedecor_generic_plastic.png" },
+ { "wood", S("Wooden analog clock"), "default_wood.png" }
}
-for i in ipairs(clock_materials) do
- local m1 = clock_materials[i][1]
- local m2 = clock_materials[i][2]
- homedecor.register("analog_clock_"..m1, {
- description = "Analog clock ("..m1..")",
+for _, mat in ipairs(clock_materials) do
+ local name, desc, tex = unpack(mat)
+ homedecor.register("analog_clock_"..name, {
+ description = desc,
mesh = "homedecor_analog_clock.obj",
tiles = {
"homedecor_analog_clock_face.png",
- m2,
+ tex,
"homedecor_analog_clock_back.png"
},
- inventory_image = "homedecor_analog_clock_"..m1.."_inv.png",
+ inventory_image = "homedecor_analog_clock_"..name.."_inv.png",
walkable = false,
selection_box = clock_sbox,
groups = {snappy=3},
@@ -28,7 +30,7 @@ for i in ipairs(clock_materials) do
end
homedecor.register("digital_clock", {
- description = "Digital clock",
+ description = S("Digital clock"),
tiles = {
"homedecor_digital_clock_edges.png",
"homedecor_digital_clock_edges.png",
@@ -50,7 +52,7 @@ homedecor.register("digital_clock", {
})
homedecor.register("alarm_clock", {
- description = "Alarm clock",
+ description = S("Alarm clock"),
tiles = {
"homedecor_alarm_clock_top.png",
"homedecor_alarm_clock_bottom.png",
@@ -77,7 +79,7 @@ local gf_cbox = {
}
homedecor.register("grandfather_clock", {
- description = "Grandfather Clock",
+ description = S("Grandfather Clock"),
mesh = "homedecor_grandfather_clock.obj",
tiles = {
"default_glass.png",
diff --git a/homedecor/cobweb.lua b/homedecor/cobweb.lua
index 9731032..43b7794 100644
--- a/homedecor/cobweb.lua
+++ b/homedecor/cobweb.lua
@@ -1,5 +1,8 @@
+
+local S = homedecor_i18n.gettext
+
minetest.register_node("homedecor:cobweb_corner", {
- description = "Cobweb",
+ description = S("Cobweb"),
drawtype = "torchlike",
tiles = { "homedecor_cobweb_torchlike.png" },
inventory_image = "homedecor_cobweb.png",
@@ -23,7 +26,7 @@ minetest.register_node("homedecor:cobweb_corner", {
})
minetest.register_node("homedecor:cobweb_centered", {
- description = "Cobweb",
+ description = S("Cobweb"),
drawtype = "nodebox",
tiles = { "homedecor_cobweb.png" },
inventory_image = "homedecor_cobweb.png",
@@ -50,7 +53,7 @@ minetest.register_node("homedecor:cobweb_centered", {
})
minetest.register_node("homedecor:cobweb_flat", {
- description = "Cobweb",
+ description = S("Cobweb"),
drawtype = "nodebox",
tiles = { "homedecor_cobweb.png" },
inventory_image = "homedecor_cobweb.png",
@@ -77,7 +80,7 @@ minetest.register_node("homedecor:cobweb_flat", {
})
minetest.register_node("homedecor:cobweb_plantlike", {
- description = "Cobweb",
+ description = S("Cobweb"),
drawtype = "plantlike",
tiles = { "homedecor_cobweb_plantlike.png" },
inventory_image = "homedecor_cobweb.png",
diff --git a/homedecor/electrics.lua b/homedecor/electrics.lua
index 001c703..d8cfa93 100644
--- a/homedecor/electrics.lua
+++ b/homedecor/electrics.lua
@@ -1,5 +1,8 @@
+
+local S = homedecor_i18n.gettext
+
homedecor.register("power_outlet", {
- description = "Power Outlet",
+ description = S("Power Outlet"),
tiles = {
"homedecor_outlet_edges.png",
"homedecor_outlet_edges.png",
@@ -26,7 +29,7 @@ homedecor.register("power_outlet", {
})
homedecor.register("light_switch", {
- description = "Light switch",
+ description = S("Light switch"),
tiles = {
"homedecor_light_switch_edges.png",
"homedecor_light_switch_edges.png",
@@ -58,7 +61,7 @@ homedecor.register("light_switch", {
homedecor.register("doorbell", {
tiles = { "homedecor_doorbell.png" },
inventory_image = "homedecor_doorbell_inv.png",
- description = "Doorbell",
+ description = S("Doorbell"),
groups = {snappy=3},
walkable = false,
node_box = {
diff --git a/homedecor/foyer.lua b/homedecor/foyer.lua
index ad2d54a..c6fb401 100644
--- a/homedecor/foyer.lua
+++ b/homedecor/foyer.lua
@@ -1,8 +1,10 @@
+local S = homedecor_i18n.gettext
+
homedecor.register("coatrack_wallmount", {
tiles = { homedecor.plain_wood },
inventory_image = "homedecor_coatrack_wallmount_inv.png",
- description = "Coatrack (wallmounted)",
+ description = S("Wall-mounted coat rack"),
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
node_box = {
@@ -28,7 +30,7 @@ homedecor.register("coat_tree", {
"homedecor_generic_wood_old.png"
},
inventory_image = "homedecor_coatrack_inv.png",
- description = "Coat tree",
+ description = S("Coat tree"),
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
expand = { top="placeholder" },
@@ -40,9 +42,16 @@ homedecor.register("coat_tree", {
on_rotate = screwdriver.rotate_simple
})
-for _, color in pairs({ "green", "brown", "grey" }) do
+local mat_colors = {
+ { "green", S("Green welcome mat") },
+ { "brown", S("Brown welcome mat") },
+ { "grey", S("Grey welcome mat") },
+}
+
+for _, mat in ipairs(mat_colors) do
+ local color, desc = unpack(mat)
homedecor.register("welcome_mat_"..color, {
- description = "Welcome Mat ("..color..")",
+ description = desc,
tiles = {
"homedecor_welcome_mat_"..color..".png",
"homedecor_welcome_mat_bottom.png",
diff --git a/homedecor/gastronomy.lua b/homedecor/gastronomy.lua
index 052e526..b08ca5c 100644
--- a/homedecor/gastronomy.lua
+++ b/homedecor/gastronomy.lua
@@ -1,4 +1,6 @@
+local S = homedecor_i18n.gettext
+
local cutlery_cbox = {
type = "fixed",
fixed = {
@@ -12,7 +14,7 @@ homedecor.register("cutlery_set", {
mesh = "homedecor_cutlery_set.obj",
tiles = { "homedecor_cutlery_set.png" },
inventory_image = "homedecor_cutlery_set_inv.png",
- description = "Cutlery set",
+ description = S("Cutlery set"),
groups = {snappy=3},
selection_box = cutlery_cbox,
walkable = false,
@@ -33,14 +35,19 @@ local fbottle_cbox = {
}
}
-local bottle_colors = {"brown", "green"}
+local bottle_colors = {
+ { "brown", S("Brown bottle"), S("Four brown bottles") },
+ { "green", S("Green bottle"), S("Four green bottles") },
+}
for _, b in ipairs(bottle_colors) do
- homedecor.register("bottle_"..b, {
- tiles = { "homedecor_bottle_"..b..".png" },
- inventory_image = "homedecor_bottle_"..b.."_inv.png",
- description = "Bottle ("..b..")",
+ local name, desc, desc4 = unpack(b)
+
+ homedecor.register("bottle_"..name, {
+ tiles = { "homedecor_bottle_"..name..".png" },
+ inventory_image = "homedecor_bottle_"..name.."_inv.png",
+ description = desc,
mesh = "homedecor_bottle.obj",
walkable = false,
groups = {snappy=3},
@@ -50,13 +57,13 @@ for _, b in ipairs(bottle_colors) do
-- 4-bottle sets
- homedecor.register("4_bottles_"..b, {
+ homedecor.register("4_bottles_"..name, {
tiles = {
- "homedecor_bottle_"..b..".png",
- "homedecor_bottle_"..b..".png"
+ "homedecor_bottle_"..name..".png",
+ "homedecor_bottle_"..name..".png"
},
- inventory_image = "homedecor_4_bottles_"..b.."_inv.png",
- description = "Four "..b.." bottles",
+ inventory_image = "homedecor_4_bottles_"..name.."_inv.png",
+ description = desc4,
mesh = "homedecor_4_bottles.obj",
walkable = false,
groups = {snappy=3},
@@ -71,7 +78,7 @@ homedecor.register("4_bottles_multi", {
"homedecor_bottle_green.png"
},
inventory_image = "homedecor_4_bottles_multi_inv.png",
- description = "Four misc brown/green bottles",
+ description = S("Four misc brown/green bottles"),
mesh = "homedecor_4_bottles.obj",
groups = {snappy=3},
walkable = false,
@@ -81,7 +88,7 @@ homedecor.register("4_bottles_multi", {
local wine_cbox = homedecor.nodebox.slab_z(-0.75)
homedecor.register("wine_rack", {
- description = "Wine Rack",
+ description = S("Wine rack"),
mesh = "homedecor_wine_rack.obj",
tiles = {
"homedecor_generic_wood_red.png",
@@ -98,7 +105,7 @@ homedecor.register("wine_rack", {
})
homedecor.register("dartboard", {
- description = "Dartboard",
+ description = S("Dartboard"),
mesh = "homedecor_dartboard.obj",
tiles = { "homedecor_dartboard.png" },
inventory_image = "homedecor_dartboard_inv.png",
@@ -114,7 +121,7 @@ homedecor.register("dartboard", {
})
homedecor.register("beer_tap", {
- description = "Beer tap",
+ description = S("Beer tap"),
mesh = "homedecor_beer_taps.obj",
tiles = {
"homedecor_generic_metal_bright.png",
@@ -137,9 +144,11 @@ homedecor.register("beer_tap", {
wielditem:take_item()
puncher:set_wielded_item(wielditem)
inv:add_item("main", "homedecor:beer_mug 1")
- minetest.chat_send_player(puncher:get_player_name(), "Ahh, a frosty cold beer - look in your inventory for it!")
+ minetest.chat_send_player(puncher:get_player_name(),
+ S("Ahh, a frosty cold beer - look in your inventory for it!"))
else
- minetest.chat_send_player(puncher:get_player_name(), "No room in your inventory to add a beer mug!")
+ minetest.chat_send_player(puncher:get_player_name(),
+ S("No room in your inventory to add a beer mug!"))
end
end
end
@@ -160,7 +169,7 @@ local beer_cbox = {
}
homedecor.register("beer_mug", {
- description = "Beer mug",
+ description = S("Beer mug"),
drawtype = "mesh",
mesh = "homedecor_beer_mug.obj",
tiles = { "homedecor_beer_mug.png" },
@@ -178,7 +187,7 @@ local svm_cbox = {
}
homedecor.register("soda_machine", {
- description = "Soda Vending Machine",
+ description = S("Soda vending machine"),
mesh = "homedecor_soda_machine.obj",
tiles = {"homedecor_soda_machine.png"},
groups = {snappy=3},
@@ -201,7 +210,7 @@ homedecor.register("soda_machine", {
pos=pos, max_hear_distance = 5
})
else
- minetest.chat_send_player(puncher:get_player_name(), "Please insert a coin in the machine.")
+ minetest.chat_send_player(puncher:get_player_name(), S("Please insert a coin in the machine."))
end
end
})
diff --git a/homedecor/handlers/expansion.lua b/homedecor/handlers/expansion.lua
index b3e78c8..13c69f9 100644
--- a/homedecor/handlers/expansion.lua
+++ b/homedecor/handlers/expansion.lua
@@ -1,4 +1,6 @@
+local S = homedecor_i18n.gettext
+
-- vectors to place one node next to or behind another
homedecor.fdir_to_right = {
@@ -53,7 +55,7 @@ homedecor.wall_fdir_to_fwd = {
local placeholder_node = "homedecor:expansion_placeholder"
minetest.register_node(placeholder_node, {
- description = "Expansion placeholder (you hacker you!)",
+ description = S("Expansion placeholder (you hacker you!)"),
groups = { not_in_creative_inventory=1 },
drawtype = "airlike",
paramtype = "light",
@@ -193,13 +195,15 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
local placer_name = placer:get_player_name()
if not (def and def.buildable_to) then
- minetest.chat_send_player( placer:get_player_name(), "Not enough room - the space for the headboard is occupied!" )
+ minetest.chat_send_player( placer:get_player_name(),
+ S("Not enough room - the space for the headboard is occupied!"))
minetest.set_node(pos, {name = "air"})
return true
end
if minetest.is_protected(forwardpos, placer_name) then
- minetest.chat_send_player( placer:get_player_name(), "Someone already owns the spot where the headboard goes." )
+ minetest.chat_send_player( placer:get_player_name(),
+ S("Someone already owns the spot where the headboard goes."))
return true
end
@@ -270,12 +274,12 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
local placer_name = placer:get_player_name()
if not (adef and adef.buildable_to) then
- minetest.chat_send_player(placer_name, "Not enough room - the upper space is occupied!" )
+ minetest.chat_send_player(placer_name, S("Not enough room - the upper space is occupied!" ))
return itemstack
end
if minetest.is_protected(abovepos, placer_name) then
- minetest.chat_send_player(placer_name, "Someone already owns that spot." )
+ minetest.chat_send_player(placer_name, S("Someone already owns that spot."))
return itemstack
end
diff --git a/homedecor/kitchen_furniture.lua b/homedecor/kitchen_furniture.lua
index d0712cf..2ecb7bf 100644
--- a/homedecor/kitchen_furniture.lua
+++ b/homedecor/kitchen_furniture.lua
@@ -96,7 +96,7 @@ local cp_cbox = {
}
homedecor.register("copper_pans", {
- description = "Copper pans",
+ description = S("Copper pans"),
mesh = "homedecor_copper_pans.obj",
tiles = { "homedecor_polished_copper.png" },
inventory_image = "homedecor_copper_pans_inv.png",
@@ -115,7 +115,7 @@ homedecor.register("kitchen_faucet", {
mesh = "homedecor_kitchen_faucet.obj",
tiles = { "homedecor_generic_metal_bright.png" },
inventory_image = "homedecor_kitchen_faucet_inv.png",
- description = "Kitchen Faucet",
+ description = S("Kitchen Faucet"),
groups = {snappy=3},
selection_box = kf_cbox,
walkable = false,
diff --git a/homedecor/lighting.lua b/homedecor/lighting.lua
index 0a1edaf..f7314d0 100644
--- a/homedecor/lighting.lua
+++ b/homedecor/lighting.lua
@@ -331,7 +331,7 @@ homedecor.register("ceiling_lantern", {
tiles = { "homedecor_light.png", "homedecor_generic_metal_wrought_iron.png" },
use_texture_alpha = true,
inventory_image = "homedecor_ceiling_lantern_inv.png",
- description = "Ceiling Lantern",
+ description = S("Ceiling Lantern"),
groups = {snappy=3},
light_source = 11,
selection_box = cl_cbox,
diff --git a/homedecor/office.lua b/homedecor/office.lua
index b28c3a3..6e9bbc1 100644
--- a/homedecor/office.lua
+++ b/homedecor/office.lua
@@ -23,7 +23,7 @@ local desk_cbox = {
fixed = { -0.5, -0.5, -0.5, 1.5, 0.5, 0.5 }
}
homedecor.register("desk", {
- description = "Desk",
+ description = S("Desk"),
mesh = "homedecor_desk.obj",
tiles = {
homedecor.plain_wood,
@@ -49,7 +49,7 @@ local globe_cbox = {
}
homedecor.register("desk_globe", {
- description = "Desk globe",
+ description = S("Desk globe"),
mesh = "homedecor_desk_globe.obj",
tiles = {
"homedecor_generic_wood_red.png",
@@ -65,7 +65,7 @@ homedecor.register("desk_globe", {
})
homedecor.register("calendar", {
- description = "Calendar",
+ description = S("Calendar"),
mesh = "homedecor_calendar.obj",
tiles = {"homedecor_calendar.png"},
inventory_image = "homedecor_calendar_inv.png",
@@ -81,11 +81,11 @@ homedecor.register("calendar", {
groups = {choppy=2,attached_node=1},
legacy_wallmounted = true,
sounds = default.node_sound_defaults(),
- infotext = "Date (right-click to update):\n" .. os.date("%Y-%m-%d"), -- ISO 8601 format
+ infotext = S("Date (right-click to update):\n@1", os.date("%Y-%m-%d")), -- ISO 8601 format
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local meta = minetest.get_meta(pos)
local date = os.date("%Y-%m-%d")
- meta:set_string("infotext", "Date (right-click to update):\n"..date)
+ meta:set_string("infotext", S("Date (right-click to update):\n@1", date))
return itemstack
end
})
@@ -104,12 +104,18 @@ local ofchairs_cbox = {
}
}
-for _, c in pairs({"basic", "upscale"}) do
- homedecor.register("office_chair_"..c, {
- description = "Office chair ("..c..")",
+local chairs = {
+ { "basic", S("Basic office chair") },
+ { "upscale", S("Upscale office chair") },
+}
+
+for _, c in pairs(chairs) do
+ local name, desc = unpack(c)
+ homedecor.register("office_chair_"..name, {
+ description = desc,
drawtype = "mesh",
- tiles = { "homedecor_office_chair_"..c..".png" },
- mesh = "homedecor_office_chair_"..c..".obj",
+ tiles = { "homedecor_office_chair_"..name..".png" },
+ mesh = "homedecor_office_chair_"..name..".obj",
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
selection_box = ofchairs_sbox,
diff --git a/homedecor/trash_cans.lua b/homedecor/trash_cans.lua
index 5405700..7da6c04 100644
--- a/homedecor/trash_cans.lua
+++ b/homedecor/trash_cans.lua
@@ -1,4 +1,6 @@
+local S = homedecor_i18n.gettext
+
local tg_cbox = {
type = "fixed",
fixed = { -0.35, -0.5, -0.35, 0.35, 0.4, 0.35 }
@@ -9,7 +11,7 @@ homedecor.register("trash_can_green", {
mesh = "homedecor_trash_can_green.obj",
tiles = { "homedecor_pool_table_baize.png" },
inventory_image = "homedecor_trash_can_green_inv.png",
- description = "Trash Can (green)",
+ description = S("Green Trash Can"),
groups = {snappy=3},
selection_box = tg_cbox,
collision_box = tg_cbox,
@@ -29,7 +31,7 @@ homedecor.register("trash_can_green_open", {
on_punch = function(pos, node, puncher, pointed_thing)
minetest.set_node(pos, {name = "homedecor:trash_can_green", param2 = node.param2})
end,
- infotext="Trash Can",
+ infotext=S("Trash Can"),
inventory= {
size = 9,
formspec = "size[8,9]" .. default.gui_bg .. default.gui_bg_img .. default.gui_slots ..
@@ -57,7 +59,7 @@ homedecor.register("trash_can", {
mesh = "homedecor_trash_can.obj",
tiles = { "homedecor_trash_can.png" },
inventory_image = "homedecor_trash_can_inv.png",
- description = "Trash Can (small)",
+ description = S("Small Trash Can"),
groups = {snappy=3},
selection_box = trash_cbox,
collision_box = trash_cbox,
diff --git a/homedecor/wardrobe.lua b/homedecor/wardrobe.lua
index 986eed5..d0e3538 100644
--- a/homedecor/wardrobe.lua
+++ b/homedecor/wardrobe.lua
@@ -1,4 +1,6 @@
+local S = homedecor_i18n.gettext
+
local wd_cbox = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
@@ -12,14 +14,14 @@ homedecor.register("wardrobe", {
"homedecor_wardrobe_doors.png"
},
inventory_image = "homedecor_wardrobe_inv.png",
- description = "Wardrobe",
+ description = S("Wardrobe"),
groups = {snappy=3},
selection_box = wd_cbox,
collision_box = wd_cbox,
sounds = default.node_sound_wood_defaults(),
expand = { top="placeholder" },
on_rotate = screwdriver.rotate_simple,
- infotext = "Wardrobe",
+ infotext = S("Wardrobe"),
inventory = {
size = 10
},
@@ -34,9 +36,9 @@ homedecor.register("wardrobe", {
"image_button_exit["..(i-1)..".5,2;1.1,2;homedecor_clothes_fe"..skins[i].."_preview.png;fe"..skins[i]..";]"
end
meta:set_string("formspec", "size[5.5,8.5]"..default.gui_bg..default.gui_bg_img..default.gui_slots..
- "vertlabel[0,0.5;CLOTHES]"..
+ "vertlabel[0,0.5;"..minetest.formspec_escape(S("Clothes")).."]"..
clothes_strings..
- "vertlabel[0,5.2;STORAGE]"..
+ "vertlabel[0,5.2;"..minetest.formspec_escape(S("Storage")).."]"..
"list[current_name;main;0.5,4.5;5,2;]"..
"list[current_player;main;0.5,6.8;5,2;]" ..
"listring[]")