Rename default chest to "Wooden Chest"
authorZefram <zefram@fysh.org>
Fri, 20 Jun 2014 14:44:05 +0000 (15:44 +0100)
committerRealBadAngel <maciej.kasatkin@o2.pl>
Fri, 20 Jun 2014 23:20:30 +0000 (01:20 +0200)
All the chests added by technic specify their material in their
description, so the description "Chest" for the default chest looks
ambiguous.  Rename it to seamlessly fit into the range of chest types.

technic_chests/init.lua
technic_chests/locale/de.txt
technic_chests/locale/template.txt
technic_chests/wooden_chest.lua [new file with mode: 0644]

index 60030540d4b76210c48a426d6c276bc9491b6360..99af8ad525fcf395d9e062ae5fc3a0e06de90617 100644 (file)
@@ -8,6 +8,7 @@ technic.chests = {}
 
 dofile(modpath.."/common.lua")
 dofile(modpath.."/register.lua")
+dofile(modpath.."/wooden_chest.lua")
 dofile(modpath.."/iron_chest.lua")
 dofile(modpath.."/copper_chest.lua")
 dofile(modpath.."/silver_chest.lua")
index 373261f06b404d3b15c57be51301facd6f729cea..e22d2c24663346702d06b8911a836b99e6fc9e3e 100644 (file)
@@ -32,6 +32,7 @@ Gold = Gold
 Iron = Eisen
 Mithril = Mithril
 Silver = Silber
+Wooden = Holz
 
 # Sorting
 Sort =
index 61e0f048d1f25dff0269264762dc16bf914e5375..4d422b2f4d55989f34c2908487dd40138b602416 100644 (file)
@@ -30,6 +30,7 @@ Gold =
 Iron =
 Mithril =
 Silver =
+Wooden =
 
 # Sorting
 Sort =
diff --git a/technic_chests/wooden_chest.lua b/technic_chests/wooden_chest.lua
new file mode 100644 (file)
index 0000000..8ff33b0
--- /dev/null
@@ -0,0 +1,14 @@
+local S
+if intllib then
+       S = intllib.Getter()
+else
+       S = function(s) return s end
+end
+
+if minetest.registered_nodes["default:chest"].description == "Chest" then
+       minetest.override_item("default:chest", { description = S("%s Chest"):format(S("Wooden")) })
+end
+
+if minetest.registered_nodes["default:chest_locked"].description == "Locked Chest" then
+       minetest.override_item("default:chest_locked", { description = S("%s Locked Chest"):format(S("Wooden")) })
+end