mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-07-25 00:20:15 +02:00
Added localization support
This commit is contained in:
31
crafts.lua
31
crafts.lua
@ -6,6 +6,15 @@
|
||||
-- License: GPL
|
||||
--
|
||||
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S
|
||||
if (minetest.get_modpath("intllib")) then
|
||||
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
else
|
||||
S = function ( s ) return s end
|
||||
end
|
||||
|
||||
-- Some recipes need white paint. If Unified Dyes isn't present,
|
||||
-- implement the standard white paint production method here instead,
|
||||
-- plus some alternate recipes in the event of material shorages.
|
||||
@ -13,7 +22,7 @@
|
||||
if ( minetest.get_modpath("unifieddyes") ) == nil then
|
||||
|
||||
minetest.register_craftitem(":unifieddyes:titanium_dioxide", {
|
||||
description = "Titanium Dioxide",
|
||||
description = S("Titanium Dioxide"),
|
||||
inventory_image = "homedecor_titanium_dioxide.png",
|
||||
})
|
||||
|
||||
@ -24,7 +33,7 @@ if ( minetest.get_modpath("unifieddyes") ) == nil then
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":unifieddyes:white_paint", {
|
||||
description = "Bucket of white paint",
|
||||
description = S("Bucket of white paint"),
|
||||
inventory_image = "homedecor_white_paint.png",
|
||||
})
|
||||
|
||||
@ -66,7 +75,7 @@ end
|
||||
-- misc stuff :D
|
||||
|
||||
minetest.register_craftitem("homedecor:terracotta_base", {
|
||||
description = "Uncooked Terracotta Base",
|
||||
description = S("Uncooked Terracotta Base"),
|
||||
inventory_image = "homedecor_terracotta_base.png",
|
||||
})
|
||||
|
||||
@ -82,7 +91,7 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craftitem("homedecor:roof_tile_terracotta", {
|
||||
description = "Terracotta Roof Tile",
|
||||
description = S("Terracotta Roof Tile"),
|
||||
inventory_image = "homedecor_roof_tile_terracotta.png",
|
||||
})
|
||||
|
||||
@ -111,12 +120,12 @@ minetest.register_craft( {
|
||||
--
|
||||
|
||||
minetest.register_craftitem("homedecor:plastic_sheeting", {
|
||||
description = "Plastic sheet",
|
||||
description = S("Plastic sheet"),
|
||||
inventory_image = "homedecor_plastic_sheeting.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("homedecor:plastic_base", {
|
||||
description = "Unprocessed Plastic base",
|
||||
description = S("Unprocessed Plastic base"),
|
||||
wield_image = "homedecor_plastic_base.png",
|
||||
inventory_image = "homedecor_plastic_base_inv.png",
|
||||
})
|
||||
@ -680,7 +689,7 @@ minetest.register_craft({
|
||||
--
|
||||
|
||||
minetest.register_craftitem("homedecor:drawer_small", {
|
||||
description = "Small Wooden Drawer",
|
||||
description = S("Small Wooden Drawer"),
|
||||
inventory_image = "homedecor_drawer_small.png",
|
||||
})
|
||||
|
||||
@ -792,7 +801,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craftitem("homedecor:brass_ingot", {
|
||||
description = "Brass Ingot",
|
||||
description = S("Brass Ingot"),
|
||||
inventory_image = "homedecor_brass_ingot.png",
|
||||
})
|
||||
|
||||
@ -826,7 +835,7 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craftitem("homedecor:utility_table_legs", {
|
||||
description = "Legs for Small Utility table",
|
||||
description = S("Legs for Small Utility table"),
|
||||
inventory_image = "homedecor_utility_table_legs.png",
|
||||
})
|
||||
|
||||
@ -870,7 +879,7 @@ minetest.register_craft( {
|
||||
if ( minetest.get_modpath("mesecons") ) == nil then
|
||||
|
||||
minetest.register_craftitem(":mesecons_materials:silicon", {
|
||||
description = "Silicon lump",
|
||||
description = S("Silicon lump"),
|
||||
inventory_image = "homedecor_silicon.png",
|
||||
})
|
||||
|
||||
@ -893,7 +902,7 @@ minetest.register_craft( {
|
||||
})
|
||||
|
||||
minetest.register_craftitem("homedecor:ic", {
|
||||
description = "Simple Integrated Circuit",
|
||||
description = S("Simple Integrated Circuit"),
|
||||
inventory_image = "homedecor_ic.png",
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user