translate engine swich to minetest butilin
parent
774a2d79bc
commit
37fd93d9ae
|
@ -1,15 +1,6 @@
|
|||
-- 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
|
||||
|
||||
local armchairs_list = {
|
||||
{ "Red Armchair", "red"},
|
||||
{ "Orange Armchair", "orange"},
|
||||
{ "Orange Armchair", "orange"},
|
||||
{ "Yellow Armchair", "yellow"},
|
||||
{ "Green Armchair", "green"},
|
||||
{ "Blue Armchair", "blue"},
|
||||
|
@ -40,13 +31,13 @@ for i in ipairs(armchairs_list) do
|
|||
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
||||
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
||||
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
||||
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
|
||||
--back
|
||||
{-0.5, 0, 0.3125, 0.5, 0.5, 0.5},
|
||||
|
||||
|
||||
--arms
|
||||
{-0.5, 0, -0.5, -0.3125, 0.25, 0.3125},
|
||||
{0.3125, 0, -0.5, 0.5, 0.25, 0.3125},
|
||||
|
@ -68,7 +59,7 @@ for i in ipairs(armchairs_list) do
|
|||
clicker:set_hp(20)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:armchair_"..colour,
|
||||
recipe = {
|
||||
|
@ -77,7 +68,7 @@ for i in ipairs(armchairs_list) do
|
|||
{"default:stick", "", "", }
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:armchair_"..colour,
|
||||
recipe = {
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
-- 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
|
||||
|
||||
|
||||
minetest.register_node("lrfurn:coffeetable_back", {
|
||||
description = S("Coffee Table"),
|
||||
drawtype = "nodebox",
|
||||
|
@ -23,9 +13,9 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
|||
--legs
|
||||
{-0.375, -0.5, -0.375, -0.3125, -0.0625, -0.3125},
|
||||
{0.3125, -0.5, -0.375, 0.375, -0.0625, -0.3125},
|
||||
|
||||
|
||||
--tabletop
|
||||
{-0.4375, -0.0625, -0.4375, 0.4375, 0, 0.5},
|
||||
{-0.4375, -0.0625, -0.4375, 0.4375, 0, 0.5},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
|
@ -52,7 +42,7 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
|||
minetest.env:set_node(pos, node)
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
on_destruct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local param2 = node.param2
|
||||
|
@ -68,7 +58,7 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
|||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:coffeetable_front" ) then
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||
minetest.env:remove_node(pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
@ -86,7 +76,7 @@ minetest.register_node("lrfurn:coffeetable_front", {
|
|||
--legs
|
||||
{-0.375, -0.5, 0.3125, -0.3125, -0.0625, 0.375},
|
||||
{0.3125, -0.5, 0.3125, 0.375, -0.0625, 0.375},
|
||||
|
||||
|
||||
--tabletop
|
||||
{-0.4375, -0.0625, -0.5, 0.4375, 0, 0.4375},
|
||||
}
|
||||
|
|
13
endtable.lua
13
endtable.lua
|
@ -1,12 +1,3 @@
|
|||
-- 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
|
||||
|
||||
minetest.register_node("lrfurn:endtable", {
|
||||
description = S("End Table"),
|
||||
drawtype = "nodebox",
|
||||
|
@ -24,9 +15,9 @@ minetest.register_node("lrfurn:endtable", {
|
|||
{0.3125, -0.5, -0.375, 0.375, -0.0625, -0.3125},
|
||||
{-0.375, -0.5, 0.3125, -0.3125, -0.0625, 0.375},
|
||||
{0.3125, -0.5, 0.3125, 0.375, -0.0625, 0.375},
|
||||
|
||||
|
||||
--tabletop
|
||||
{-0.4375, -0.0625, -0.4375, 0.4375, 0, 0.4375},
|
||||
{-0.4375, -0.0625, -0.4375, 0.4375, 0, 0.4375},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
|
|
1
init.lua
1
init.lua
|
@ -1,3 +1,4 @@
|
|||
local S = minetest.get_translator("lrfurn")
|
||||
dofile(minetest.get_modpath("lrfurn").."/longsofas.lua")
|
||||
dofile(minetest.get_modpath("lrfurn").."/sofas.lua")
|
||||
dofile(minetest.get_modpath("lrfurn").."/armchairs.lua")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# textdomain: lrfurn
|
||||
# Translation by Xanthin
|
||||
|
||||
### armchairs.lua ###
|
|
@ -1,16 +1,6 @@
|
|||
-- 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
|
||||
|
||||
|
||||
local longsofas_list = {
|
||||
{ "Red Long Sofa", "red"},
|
||||
{ "Orange Long Sofa", "orange"},
|
||||
{ "Orange Long Sofa", "orange"},
|
||||
{ "Yellow Long Sofa", "yellow"},
|
||||
{ "Green Long Sofa", "green"},
|
||||
{ "Blue Long Sofa", "blue"},
|
||||
|
@ -39,13 +29,13 @@ for i in ipairs(longsofas_list) do
|
|||
--legs
|
||||
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
|
||||
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
||||
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
|
||||
--back
|
||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||
|
||||
|
||||
--arm
|
||||
{-0.3125, 0, -0.5, 0.5, 0.25, -0.3125},
|
||||
}
|
||||
|
@ -87,7 +77,7 @@ for i in ipairs(longsofas_list) do
|
|||
end
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
on_destruct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local param2 = node.param2
|
||||
|
@ -115,12 +105,12 @@ for i in ipairs(longsofas_list) do
|
|||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:longsofa_left_"..colour ) then
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||
minetest.env:remove_node(pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
if not clicker:is_player() then
|
||||
return
|
||||
|
@ -144,10 +134,10 @@ for i in ipairs(longsofas_list) do
|
|||
--legs
|
||||
{-0.4375, -0.5, -0.03125, -0.375, -0.375, 0.03125},
|
||||
{0.375, -0.5, -0.03125, 0.4375, -0.375, 0.03125},
|
||||
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
|
||||
--back
|
||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||
}
|
||||
|
@ -159,7 +149,7 @@ for i in ipairs(longsofas_list) do
|
|||
}
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("lrfurn:longsofa_left_"..colour, {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_sofa_left_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_left_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
||||
|
@ -173,13 +163,13 @@ for i in ipairs(longsofas_list) do
|
|||
--legs
|
||||
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
||||
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
||||
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
|
||||
--back
|
||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||
|
||||
|
||||
--arm
|
||||
{-0.3125, 0, 0.3125, 0.5, 0.25, 0.5},
|
||||
}
|
||||
|
@ -191,9 +181,9 @@ for i in ipairs(longsofas_list) do
|
|||
}
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_alias("lrfurn:longsofa_"..colour, "lrfurn:longsofa_right_"..colour)
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "lrfurn:longsofa_"..colour,
|
||||
recipe = {
|
||||
|
|
34
sofas.lua
34
sofas.lua
|
@ -1,16 +1,6 @@
|
|||
-- 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
|
||||
|
||||
|
||||
local sofas_list = {
|
||||
{ "Red Sofa", "red"},
|
||||
{ "Orange Sofa", "orange"},
|
||||
{ "Orange Sofa", "orange"},
|
||||
{ "Yellow Sofa", "yellow"},
|
||||
{ "Green Sofa", "green"},
|
||||
{ "Blue Sofa", "blue"},
|
||||
|
@ -39,13 +29,13 @@ for i in ipairs(sofas_list) do
|
|||
--legs
|
||||
{-0.4375, -0.5, -0.4375, -0.375, -0.375, -0.375},
|
||||
{0.375, -0.5, -0.4375, 0.4375, -0.375, -0.375},
|
||||
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
|
||||
--back
|
||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||
|
||||
|
||||
--arm
|
||||
{-0.3125, 0, -0.5, 0.5, 0.25, -0.3125},
|
||||
}
|
||||
|
@ -74,7 +64,7 @@ for i in ipairs(sofas_list) do
|
|||
minetest.env:set_node(pos, node)
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
on_destruct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local param2 = node.param2
|
||||
|
@ -90,10 +80,10 @@ for i in ipairs(sofas_list) do
|
|||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:sofa_left_"..colour ) then
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||
minetest.env:remove_node(pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
if not clicker:is_player() then
|
||||
return
|
||||
|
@ -103,7 +93,7 @@ for i in ipairs(sofas_list) do
|
|||
clicker:set_hp(20)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("lrfurn:sofa_left_"..colour, {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"lrfurn_sofa_left_top_"..colour..".png", "lrfurn_coffeetable_back.png", "lrfurn_sofa_left_front_"..colour..".png", "lrfurn_sofa_back_"..colour..".png", "lrfurn_sofa_left_side_"..colour..".png", "lrfurn_sofa_right_side_"..colour..".png"},
|
||||
|
@ -117,13 +107,13 @@ for i in ipairs(sofas_list) do
|
|||
--legs
|
||||
{-0.4375, -0.5, 0.375, -0.375, -0.375, 0.4375},
|
||||
{0.375, -0.5, 0.375, 0.4375, -0.375, 0.4375},
|
||||
|
||||
|
||||
--base/cushion
|
||||
{-0.5, -0.375, -0.5, 0.5, 0, 0.5},
|
||||
|
||||
|
||||
--back
|
||||
{-0.5, 0, -0.5, -0.3125, 0.5, 0.5},
|
||||
|
||||
|
||||
--arm
|
||||
{-0.3125, 0, 0.3125, 0.5, 0.25, 0.5},
|
||||
}
|
||||
|
@ -135,7 +125,7 @@ for i in ipairs(sofas_list) do
|
|||
}
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_alias("lrfurn:sofa_"..colour, "lrfurn:sofa_right_"..colour)
|
||||
|
||||
minetest.register_craft({
|
||||
|
|
Loading…
Reference in New Issue