minetest_game/mods/xpanes/init.lua

206 lines
5.4 KiB
Lua
Raw Normal View History

Introducing 'game_intllib' and S() for gettext The new branch 'game_intllib' is aiming at MT internationalization. Please note the about 400 lines of code changed in the Lua code of the existing mods by addition of a S("string") enclosure for GNU gettext. This is in compliance to the GNU gettext toolchain procedures. 'game_intllib' is an attempt at providing internationalization support for the default game mods specifically. Hopefully, we may delay the issue of an optimal translation for the MT server into the future. There is no requirement to include the 'game_intllib' mod into the game code basis if an alternative solution for a translation of user-facing strings of the default mods inside the game is in place. However, the 'game_intllib' and tools may be helpful in assisting the task of translation of user-facing strings of the default mods prior a new release of the game and after introduction of new game code. Please consider to look at my contribution in the MT forum: https://forum.minetest.net/viewtopic.php?f=11&t=4929&p=346791#p346791 This is up to deliberations of the MT developers and the MT game devs. ***************** This is the new branch 'game_intllib' comprising the following: - changed: README.txt - changed: mods/beds/beds.lua - changed: mods/beds/depends.txt - new file: mods/beds/gintllib.lua - changed: mods/binoculars/depends.txt - new file: mods/binoculars/gintllib.lua - changed: mods/binoculars/init.lua - changed: mods/boats/depends.txt - new file: mods/boats/gintllib.lua - changed: mods/boats/init.lua - changed: mods/bones/depends.txt - new file: mods/bones/gintllib.lua - changed: mods/bones/init.lua - changed: mods/bucket/depends.txt - new file: mods/bucket/gintllib.lua - changed: mods/bucket/init.lua - changed: mods/butterflies/depends.txt - new file: mods/butterflies/gintllib.lua - changed: mods/butterflies/init.lua - changed: mods/carts/cart_entity.lua - changed: mods/carts/depends.txt - new file: mods/carts/gintllib.lua - changed: mods/carts/rails.lua - changed: mods/creative/depends.txt - new file: mods/creative/gintllib.lua - changed: mods/creative/init.lua - changed: mods/creative/inventory.lua - changed: mods/default/chests.lua - changed: mods/default/craftitems.lua - changed: mods/default/depends.txt - changed: mods/default/furnace.lua - new file: mods/default/gintllib.lua - changed: mods/default/nodes.lua - changed: mods/default/tools.lua - changed: mods/default/torch.lua - changed: mods/default/trees.lua - changed: mods/doors/depends.txt - new file: mods/doors/gintllib.lua - changed: mods/doors/init.lua - changed: mods/dye/depends.txt - new file: mods/dye/gintllib.lua - changed: mods/dye/init.lua - changed: mods/farming/api.lua - changed: mods/farming/depends.txt - new file: mods/farming/gintllib.lua - changed: mods/farming/hoes.lua - changed: mods/farming/init.lua - changed: mods/farming/nodes.lua - changed: mods/fire/depends.txt - new file: mods/fire/gintllib.lua - changed: mods/fire/init.lua - changed: mods/fireflies/depends.txt - new file: mods/fireflies/gintllib.lua - changed: mods/fireflies/init.lua - changed: mods/flowers/depends.txt - new file: mods/flowers/gintllib.lua - changed: mods/flowers/init.lua - new file: mods/game_commands/depends.txt - new file: mods/game_commands/gintllib.lua - changed: mods/game_commands/init.lua - new file: mods/game_intllib/LICENSE.md - new file: mods/game_intllib/README.md - new file: mods/game_intllib/description.txt - new file: mods/game_intllib/doc/developer.md - new file: mods/game_intllib/doc/localefile.md - new file: mods/game_intllib/doc/translator.md - new file: mods/game_intllib/gettext.lua - new file: mods/game_intllib/init.lua - new file: mods/game_intllib/intltest/README.md - new file: mods/game_intllib/intltest/depends.txt - new file: mods/game_intllib/intltest/gintllib.lua - new file: mods/game_intllib/intltest/init.lua - new file: mods/game_intllib/intltest/locale/es.po - new file: mods/game_intllib/intltest/locale/template.pot - new file: mods/game_intllib/lib.lua - new file: mods/game_intllib/lib/gintllib.lua - new file: mods/game_intllib/license.txt - new file: mods/game_intllib/locale/de.po - new file: mods/game_intllib/locale/template.pot - new file: mods/game_intllib/tools/findtext.lua - new file: mods/game_intllib/tools/updatetext.lua - new file: mods/game_intllib/tools/xgettext.bat - new file: mods/game_intllib/tools/xgettext.sh - changed: mods/map/depends.txt - new file: mods/map/gintllib.lua - changed: mods/map/init.lua - new file: mods/screwdriver/depends.txt - new file: mods/screwdriver/gintllib.lua - changed: mods/screwdriver/init.lua - new file: mods/sethome/depends.txt - new file: mods/sethome/gintllib.lua - changed: mods/sethome/init.lua - changed: mods/stairs/depends.txt - new file: mods/stairs/gintllib.lua - changed: mods/stairs/init.lua - changed: mods/tnt/depends.txt - new file: mods/tnt/gintllib.lua - changed: mods/tnt/init.lua - changed: mods/vessels/depends.txt - new file: mods/vessels/gintllib.lua - changed: mods/vessels/init.lua - changed: mods/walls/depends.txt - new file: mods/walls/gintllib.lua - changed: mods/walls/init.lua - changed: mods/wool/depends.txt - new file: mods/wool/gintllib.lua - changed: mods/wool/init.lua - changed: mods/xpanes/depends.txt - new file: mods/xpanes/gintllib.lua - changed: mods/xpanes/init.lua ***************** The 'game_intllib' internal mod is specifially aimed at default mods internal to the game in the 'minetest_game' folder. The original 'intllib' is an attempt at providing internationalization support for external mods (something Minetest currently lacks). IMHO the 'intllib' mod is a reliable and helpful tool and I have found it to be both robust and compliant to the GNU gettext tool chain. I would like to thank all of the MT developers and certainly @kaeza. [snoopy (Zweihorn)] 2019-05-13
2019-05-13 00:53:58 +02:00
-- xpanes
-- Load support for game_intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP .. "/gintllib.lua")
2014-07-05 22:45:46 +02:00
local function is_pane(pos)
return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0
2014-04-17 20:42:30 +02:00
end
local function connects_dir(pos, name, dir)
local aside = vector.add(pos, minetest.facedir_to_dir(dir))
if is_pane(aside) then
return true
end
local connects_to = minetest.registered_nodes[name].connects_to
if not connects_to then
return false
end
local list = minetest.find_nodes_in_area(aside, aside, connects_to)
if #list > 0 then
return true
end
return false
2014-04-17 20:42:30 +02:00
end
local function swap(pos, node, name, param2)
if node.name == name and node.param2 == param2 then
2014-09-16 17:11:54 +02:00
return
end
minetest.set_node(pos, {name = name, param2 = param2})
2014-04-17 20:42:30 +02:00
end
local function update_pane(pos)
if not is_pane(pos) then
return
end
local node = minetest.get_node(pos)
local name = node.name
if name:sub(-5) == "_flat" then
name = name:sub(1, -6)
end
2015-08-31 18:35:59 +02:00
local any = node.param2
local c = {}
local count = 0
for dir = 0, 3 do
c[dir] = connects_dir(pos, name, dir)
if c[dir] then
any = dir
count = count + 1
end
end
if count == 0 then
swap(pos, node, name .. "_flat", any)
elseif count == 1 then
swap(pos, node, name .. "_flat", (any + 1) % 4)
elseif count == 2 then
if (c[0] and c[2]) or (c[1] and c[3]) then
swap(pos, node, name .. "_flat", (any + 1) % 4)
else
swap(pos, node, name, 0)
end
else
swap(pos, node, name, 0)
end
end
minetest.register_on_placenode(function(pos, node)
if minetest.get_item_group(node, "pane") then
update_pane(pos)
end
for i = 0, 3 do
local dir = minetest.facedir_to_dir(i)
update_pane(vector.add(pos, dir))
end
end)
2014-04-17 20:42:30 +02:00
minetest.register_on_dignode(function(pos)
for i = 0, 3 do
local dir = minetest.facedir_to_dir(i)
update_pane(vector.add(pos, dir))
2015-08-31 18:35:59 +02:00
end
end)
2015-08-31 18:35:59 +02:00
xpanes = {}
function xpanes.register_pane(name, def)
for i = 1, 15 do
minetest.register_alias("xpanes:" .. name .. "_" .. i, "xpanes:" .. name .. "_flat")
2014-09-16 17:11:54 +02:00
end
local flatgroups = table.copy(def.groups)
flatgroups.pane = 1
minetest.register_node(":xpanes:" .. name .. "_flat", {
description = def.description,
drawtype = "nodebox",
paramtype = "light",
is_ground_content = false,
sunlight_propagates = true,
inventory_image = def.inventory_image,
wield_image = def.wield_image,
paramtype2 = "facedir",
tiles = {def.textures[3], def.textures[3], def.textures[1]},
groups = flatgroups,
drop = "xpanes:" .. name .. "_flat",
sounds = def.sounds,
use_texture_alpha = def.use_texture_alpha or false,
node_box = {
type = "fixed",
fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}},
},
selection_box = {
type = "fixed",
fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}},
},
connect_sides = { "left", "right" },
})
local groups = table.copy(def.groups)
groups.pane = 1
groups.not_in_creative_inventory = 1
minetest.register_node(":xpanes:" .. name, {
drawtype = "nodebox",
paramtype = "light",
is_ground_content = false,
sunlight_propagates = true,
description = def.description,
tiles = {def.textures[3], def.textures[3], def.textures[1]},
groups = groups,
drop = "xpanes:" .. name .. "_flat",
sounds = def.sounds,
use_texture_alpha = def.use_texture_alpha or false,
node_box = {
type = "connected",
fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}},
connect_front = {{-1/32, -1/2, -1/2, 1/32, 1/2, -1/32}},
connect_left = {{-1/2, -1/2, -1/32, -1/32, 1/2, 1/32}},
connect_back = {{-1/32, -1/2, 1/32, 1/32, 1/2, 1/2}},
connect_right = {{1/32, -1/2, -1/32, 1/2, 1/2, 1/32}},
},
connects_to = {"group:pane", "group:stone", "group:glass", "group:wood", "group:tree"},
})
2014-04-17 20:42:30 +02:00
minetest.register_craft({
output = "xpanes:" .. name .. "_flat 16",
recipe = def.recipe
})
2014-04-17 20:42:30 +02:00
end
2014-07-05 22:45:46 +02:00
xpanes.register_pane("pane", {
Introducing 'game_intllib' and S() for gettext The new branch 'game_intllib' is aiming at MT internationalization. Please note the about 400 lines of code changed in the Lua code of the existing mods by addition of a S("string") enclosure for GNU gettext. This is in compliance to the GNU gettext toolchain procedures. 'game_intllib' is an attempt at providing internationalization support for the default game mods specifically. Hopefully, we may delay the issue of an optimal translation for the MT server into the future. There is no requirement to include the 'game_intllib' mod into the game code basis if an alternative solution for a translation of user-facing strings of the default mods inside the game is in place. However, the 'game_intllib' and tools may be helpful in assisting the task of translation of user-facing strings of the default mods prior a new release of the game and after introduction of new game code. Please consider to look at my contribution in the MT forum: https://forum.minetest.net/viewtopic.php?f=11&t=4929&p=346791#p346791 This is up to deliberations of the MT developers and the MT game devs. ***************** This is the new branch 'game_intllib' comprising the following: - changed: README.txt - changed: mods/beds/beds.lua - changed: mods/beds/depends.txt - new file: mods/beds/gintllib.lua - changed: mods/binoculars/depends.txt - new file: mods/binoculars/gintllib.lua - changed: mods/binoculars/init.lua - changed: mods/boats/depends.txt - new file: mods/boats/gintllib.lua - changed: mods/boats/init.lua - changed: mods/bones/depends.txt - new file: mods/bones/gintllib.lua - changed: mods/bones/init.lua - changed: mods/bucket/depends.txt - new file: mods/bucket/gintllib.lua - changed: mods/bucket/init.lua - changed: mods/butterflies/depends.txt - new file: mods/butterflies/gintllib.lua - changed: mods/butterflies/init.lua - changed: mods/carts/cart_entity.lua - changed: mods/carts/depends.txt - new file: mods/carts/gintllib.lua - changed: mods/carts/rails.lua - changed: mods/creative/depends.txt - new file: mods/creative/gintllib.lua - changed: mods/creative/init.lua - changed: mods/creative/inventory.lua - changed: mods/default/chests.lua - changed: mods/default/craftitems.lua - changed: mods/default/depends.txt - changed: mods/default/furnace.lua - new file: mods/default/gintllib.lua - changed: mods/default/nodes.lua - changed: mods/default/tools.lua - changed: mods/default/torch.lua - changed: mods/default/trees.lua - changed: mods/doors/depends.txt - new file: mods/doors/gintllib.lua - changed: mods/doors/init.lua - changed: mods/dye/depends.txt - new file: mods/dye/gintllib.lua - changed: mods/dye/init.lua - changed: mods/farming/api.lua - changed: mods/farming/depends.txt - new file: mods/farming/gintllib.lua - changed: mods/farming/hoes.lua - changed: mods/farming/init.lua - changed: mods/farming/nodes.lua - changed: mods/fire/depends.txt - new file: mods/fire/gintllib.lua - changed: mods/fire/init.lua - changed: mods/fireflies/depends.txt - new file: mods/fireflies/gintllib.lua - changed: mods/fireflies/init.lua - changed: mods/flowers/depends.txt - new file: mods/flowers/gintllib.lua - changed: mods/flowers/init.lua - new file: mods/game_commands/depends.txt - new file: mods/game_commands/gintllib.lua - changed: mods/game_commands/init.lua - new file: mods/game_intllib/LICENSE.md - new file: mods/game_intllib/README.md - new file: mods/game_intllib/description.txt - new file: mods/game_intllib/doc/developer.md - new file: mods/game_intllib/doc/localefile.md - new file: mods/game_intllib/doc/translator.md - new file: mods/game_intllib/gettext.lua - new file: mods/game_intllib/init.lua - new file: mods/game_intllib/intltest/README.md - new file: mods/game_intllib/intltest/depends.txt - new file: mods/game_intllib/intltest/gintllib.lua - new file: mods/game_intllib/intltest/init.lua - new file: mods/game_intllib/intltest/locale/es.po - new file: mods/game_intllib/intltest/locale/template.pot - new file: mods/game_intllib/lib.lua - new file: mods/game_intllib/lib/gintllib.lua - new file: mods/game_intllib/license.txt - new file: mods/game_intllib/locale/de.po - new file: mods/game_intllib/locale/template.pot - new file: mods/game_intllib/tools/findtext.lua - new file: mods/game_intllib/tools/updatetext.lua - new file: mods/game_intllib/tools/xgettext.bat - new file: mods/game_intllib/tools/xgettext.sh - changed: mods/map/depends.txt - new file: mods/map/gintllib.lua - changed: mods/map/init.lua - new file: mods/screwdriver/depends.txt - new file: mods/screwdriver/gintllib.lua - changed: mods/screwdriver/init.lua - new file: mods/sethome/depends.txt - new file: mods/sethome/gintllib.lua - changed: mods/sethome/init.lua - changed: mods/stairs/depends.txt - new file: mods/stairs/gintllib.lua - changed: mods/stairs/init.lua - changed: mods/tnt/depends.txt - new file: mods/tnt/gintllib.lua - changed: mods/tnt/init.lua - changed: mods/vessels/depends.txt - new file: mods/vessels/gintllib.lua - changed: mods/vessels/init.lua - changed: mods/walls/depends.txt - new file: mods/walls/gintllib.lua - changed: mods/walls/init.lua - changed: mods/wool/depends.txt - new file: mods/wool/gintllib.lua - changed: mods/wool/init.lua - changed: mods/xpanes/depends.txt - new file: mods/xpanes/gintllib.lua - changed: mods/xpanes/init.lua ***************** The 'game_intllib' internal mod is specifially aimed at default mods internal to the game in the 'minetest_game' folder. The original 'intllib' is an attempt at providing internationalization support for external mods (something Minetest currently lacks). IMHO the 'intllib' mod is a reliable and helpful tool and I have found it to be both robust and compliant to the GNU gettext tool chain. I would like to thank all of the MT developers and certainly @kaeza. [snoopy (Zweihorn)] 2019-05-13
2019-05-13 00:53:58 +02:00
description = S("Glass Pane"),
2018-01-31 20:49:54 +01:00
textures = {"default_glass.png","xpanes_pane_half.png","xpanes_edge.png"},
inventory_image = "default_glass.png",
wield_image = "default_glass.png",
sounds = default.node_sound_glass_defaults(),
groups = {snappy=2, cracky=3, oddly_breakable_by_hand=3},
recipe = {
2015-08-31 18:35:59 +02:00
{"default:glass", "default:glass", "default:glass"},
{"default:glass", "default:glass", "default:glass"}
2014-04-17 20:42:30 +02:00
}
})
2018-01-31 20:49:54 +01:00
xpanes.register_pane("obsidian_pane", {
Introducing 'game_intllib' and S() for gettext The new branch 'game_intllib' is aiming at MT internationalization. Please note the about 400 lines of code changed in the Lua code of the existing mods by addition of a S("string") enclosure for GNU gettext. This is in compliance to the GNU gettext toolchain procedures. 'game_intllib' is an attempt at providing internationalization support for the default game mods specifically. Hopefully, we may delay the issue of an optimal translation for the MT server into the future. There is no requirement to include the 'game_intllib' mod into the game code basis if an alternative solution for a translation of user-facing strings of the default mods inside the game is in place. However, the 'game_intllib' and tools may be helpful in assisting the task of translation of user-facing strings of the default mods prior a new release of the game and after introduction of new game code. Please consider to look at my contribution in the MT forum: https://forum.minetest.net/viewtopic.php?f=11&t=4929&p=346791#p346791 This is up to deliberations of the MT developers and the MT game devs. ***************** This is the new branch 'game_intllib' comprising the following: - changed: README.txt - changed: mods/beds/beds.lua - changed: mods/beds/depends.txt - new file: mods/beds/gintllib.lua - changed: mods/binoculars/depends.txt - new file: mods/binoculars/gintllib.lua - changed: mods/binoculars/init.lua - changed: mods/boats/depends.txt - new file: mods/boats/gintllib.lua - changed: mods/boats/init.lua - changed: mods/bones/depends.txt - new file: mods/bones/gintllib.lua - changed: mods/bones/init.lua - changed: mods/bucket/depends.txt - new file: mods/bucket/gintllib.lua - changed: mods/bucket/init.lua - changed: mods/butterflies/depends.txt - new file: mods/butterflies/gintllib.lua - changed: mods/butterflies/init.lua - changed: mods/carts/cart_entity.lua - changed: mods/carts/depends.txt - new file: mods/carts/gintllib.lua - changed: mods/carts/rails.lua - changed: mods/creative/depends.txt - new file: mods/creative/gintllib.lua - changed: mods/creative/init.lua - changed: mods/creative/inventory.lua - changed: mods/default/chests.lua - changed: mods/default/craftitems.lua - changed: mods/default/depends.txt - changed: mods/default/furnace.lua - new file: mods/default/gintllib.lua - changed: mods/default/nodes.lua - changed: mods/default/tools.lua - changed: mods/default/torch.lua - changed: mods/default/trees.lua - changed: mods/doors/depends.txt - new file: mods/doors/gintllib.lua - changed: mods/doors/init.lua - changed: mods/dye/depends.txt - new file: mods/dye/gintllib.lua - changed: mods/dye/init.lua - changed: mods/farming/api.lua - changed: mods/farming/depends.txt - new file: mods/farming/gintllib.lua - changed: mods/farming/hoes.lua - changed: mods/farming/init.lua - changed: mods/farming/nodes.lua - changed: mods/fire/depends.txt - new file: mods/fire/gintllib.lua - changed: mods/fire/init.lua - changed: mods/fireflies/depends.txt - new file: mods/fireflies/gintllib.lua - changed: mods/fireflies/init.lua - changed: mods/flowers/depends.txt - new file: mods/flowers/gintllib.lua - changed: mods/flowers/init.lua - new file: mods/game_commands/depends.txt - new file: mods/game_commands/gintllib.lua - changed: mods/game_commands/init.lua - new file: mods/game_intllib/LICENSE.md - new file: mods/game_intllib/README.md - new file: mods/game_intllib/description.txt - new file: mods/game_intllib/doc/developer.md - new file: mods/game_intllib/doc/localefile.md - new file: mods/game_intllib/doc/translator.md - new file: mods/game_intllib/gettext.lua - new file: mods/game_intllib/init.lua - new file: mods/game_intllib/intltest/README.md - new file: mods/game_intllib/intltest/depends.txt - new file: mods/game_intllib/intltest/gintllib.lua - new file: mods/game_intllib/intltest/init.lua - new file: mods/game_intllib/intltest/locale/es.po - new file: mods/game_intllib/intltest/locale/template.pot - new file: mods/game_intllib/lib.lua - new file: mods/game_intllib/lib/gintllib.lua - new file: mods/game_intllib/license.txt - new file: mods/game_intllib/locale/de.po - new file: mods/game_intllib/locale/template.pot - new file: mods/game_intllib/tools/findtext.lua - new file: mods/game_intllib/tools/updatetext.lua - new file: mods/game_intllib/tools/xgettext.bat - new file: mods/game_intllib/tools/xgettext.sh - changed: mods/map/depends.txt - new file: mods/map/gintllib.lua - changed: mods/map/init.lua - new file: mods/screwdriver/depends.txt - new file: mods/screwdriver/gintllib.lua - changed: mods/screwdriver/init.lua - new file: mods/sethome/depends.txt - new file: mods/sethome/gintllib.lua - changed: mods/sethome/init.lua - changed: mods/stairs/depends.txt - new file: mods/stairs/gintllib.lua - changed: mods/stairs/init.lua - changed: mods/tnt/depends.txt - new file: mods/tnt/gintllib.lua - changed: mods/tnt/init.lua - changed: mods/vessels/depends.txt - new file: mods/vessels/gintllib.lua - changed: mods/vessels/init.lua - changed: mods/walls/depends.txt - new file: mods/walls/gintllib.lua - changed: mods/walls/init.lua - changed: mods/wool/depends.txt - new file: mods/wool/gintllib.lua - changed: mods/wool/init.lua - changed: mods/xpanes/depends.txt - new file: mods/xpanes/gintllib.lua - changed: mods/xpanes/init.lua ***************** The 'game_intllib' internal mod is specifially aimed at default mods internal to the game in the 'minetest_game' folder. The original 'intllib' is an attempt at providing internationalization support for external mods (something Minetest currently lacks). IMHO the 'intllib' mod is a reliable and helpful tool and I have found it to be both robust and compliant to the GNU gettext tool chain. I would like to thank all of the MT developers and certainly @kaeza. [snoopy (Zweihorn)] 2019-05-13
2019-05-13 00:53:58 +02:00
description = S("Obsidian Glass Pane"),
2018-01-31 20:49:54 +01:00
textures = {"default_obsidian_glass.png","xpanes_pane_half.png","xpanes_edge_obsidian.png"},
inventory_image = "default_obsidian_glass.png",
wield_image = "default_obsidian_glass.png",
sounds = default.node_sound_glass_defaults(),
groups = {snappy=2, cracky=3},
recipe = {
{"default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass"},
{"default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass"}
}
})
2014-07-05 22:45:46 +02:00
xpanes.register_pane("bar", {
Introducing 'game_intllib' and S() for gettext The new branch 'game_intllib' is aiming at MT internationalization. Please note the about 400 lines of code changed in the Lua code of the existing mods by addition of a S("string") enclosure for GNU gettext. This is in compliance to the GNU gettext toolchain procedures. 'game_intllib' is an attempt at providing internationalization support for the default game mods specifically. Hopefully, we may delay the issue of an optimal translation for the MT server into the future. There is no requirement to include the 'game_intllib' mod into the game code basis if an alternative solution for a translation of user-facing strings of the default mods inside the game is in place. However, the 'game_intllib' and tools may be helpful in assisting the task of translation of user-facing strings of the default mods prior a new release of the game and after introduction of new game code. Please consider to look at my contribution in the MT forum: https://forum.minetest.net/viewtopic.php?f=11&t=4929&p=346791#p346791 This is up to deliberations of the MT developers and the MT game devs. ***************** This is the new branch 'game_intllib' comprising the following: - changed: README.txt - changed: mods/beds/beds.lua - changed: mods/beds/depends.txt - new file: mods/beds/gintllib.lua - changed: mods/binoculars/depends.txt - new file: mods/binoculars/gintllib.lua - changed: mods/binoculars/init.lua - changed: mods/boats/depends.txt - new file: mods/boats/gintllib.lua - changed: mods/boats/init.lua - changed: mods/bones/depends.txt - new file: mods/bones/gintllib.lua - changed: mods/bones/init.lua - changed: mods/bucket/depends.txt - new file: mods/bucket/gintllib.lua - changed: mods/bucket/init.lua - changed: mods/butterflies/depends.txt - new file: mods/butterflies/gintllib.lua - changed: mods/butterflies/init.lua - changed: mods/carts/cart_entity.lua - changed: mods/carts/depends.txt - new file: mods/carts/gintllib.lua - changed: mods/carts/rails.lua - changed: mods/creative/depends.txt - new file: mods/creative/gintllib.lua - changed: mods/creative/init.lua - changed: mods/creative/inventory.lua - changed: mods/default/chests.lua - changed: mods/default/craftitems.lua - changed: mods/default/depends.txt - changed: mods/default/furnace.lua - new file: mods/default/gintllib.lua - changed: mods/default/nodes.lua - changed: mods/default/tools.lua - changed: mods/default/torch.lua - changed: mods/default/trees.lua - changed: mods/doors/depends.txt - new file: mods/doors/gintllib.lua - changed: mods/doors/init.lua - changed: mods/dye/depends.txt - new file: mods/dye/gintllib.lua - changed: mods/dye/init.lua - changed: mods/farming/api.lua - changed: mods/farming/depends.txt - new file: mods/farming/gintllib.lua - changed: mods/farming/hoes.lua - changed: mods/farming/init.lua - changed: mods/farming/nodes.lua - changed: mods/fire/depends.txt - new file: mods/fire/gintllib.lua - changed: mods/fire/init.lua - changed: mods/fireflies/depends.txt - new file: mods/fireflies/gintllib.lua - changed: mods/fireflies/init.lua - changed: mods/flowers/depends.txt - new file: mods/flowers/gintllib.lua - changed: mods/flowers/init.lua - new file: mods/game_commands/depends.txt - new file: mods/game_commands/gintllib.lua - changed: mods/game_commands/init.lua - new file: mods/game_intllib/LICENSE.md - new file: mods/game_intllib/README.md - new file: mods/game_intllib/description.txt - new file: mods/game_intllib/doc/developer.md - new file: mods/game_intllib/doc/localefile.md - new file: mods/game_intllib/doc/translator.md - new file: mods/game_intllib/gettext.lua - new file: mods/game_intllib/init.lua - new file: mods/game_intllib/intltest/README.md - new file: mods/game_intllib/intltest/depends.txt - new file: mods/game_intllib/intltest/gintllib.lua - new file: mods/game_intllib/intltest/init.lua - new file: mods/game_intllib/intltest/locale/es.po - new file: mods/game_intllib/intltest/locale/template.pot - new file: mods/game_intllib/lib.lua - new file: mods/game_intllib/lib/gintllib.lua - new file: mods/game_intllib/license.txt - new file: mods/game_intllib/locale/de.po - new file: mods/game_intllib/locale/template.pot - new file: mods/game_intllib/tools/findtext.lua - new file: mods/game_intllib/tools/updatetext.lua - new file: mods/game_intllib/tools/xgettext.bat - new file: mods/game_intllib/tools/xgettext.sh - changed: mods/map/depends.txt - new file: mods/map/gintllib.lua - changed: mods/map/init.lua - new file: mods/screwdriver/depends.txt - new file: mods/screwdriver/gintllib.lua - changed: mods/screwdriver/init.lua - new file: mods/sethome/depends.txt - new file: mods/sethome/gintllib.lua - changed: mods/sethome/init.lua - changed: mods/stairs/depends.txt - new file: mods/stairs/gintllib.lua - changed: mods/stairs/init.lua - changed: mods/tnt/depends.txt - new file: mods/tnt/gintllib.lua - changed: mods/tnt/init.lua - changed: mods/vessels/depends.txt - new file: mods/vessels/gintllib.lua - changed: mods/vessels/init.lua - changed: mods/walls/depends.txt - new file: mods/walls/gintllib.lua - changed: mods/walls/init.lua - changed: mods/wool/depends.txt - new file: mods/wool/gintllib.lua - changed: mods/wool/init.lua - changed: mods/xpanes/depends.txt - new file: mods/xpanes/gintllib.lua - changed: mods/xpanes/init.lua ***************** The 'game_intllib' internal mod is specifially aimed at default mods internal to the game in the 'minetest_game' folder. The original 'intllib' is an attempt at providing internationalization support for external mods (something Minetest currently lacks). IMHO the 'intllib' mod is a reliable and helpful tool and I have found it to be both robust and compliant to the GNU gettext tool chain. I would like to thank all of the MT developers and certainly @kaeza. [snoopy (Zweihorn)] 2019-05-13
2019-05-13 00:53:58 +02:00
description = S("Steel Bars"),
textures = {"xpanes_bar.png","xpanes_bar.png","xpanes_bar_top.png"},
inventory_image = "xpanes_bar.png",
wield_image = "xpanes_bar.png",
groups = {cracky=2},
sounds = default.node_sound_metal_defaults(),
recipe = {
2015-08-31 18:35:59 +02:00
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}
2014-04-17 20:42:30 +02:00
}
})
minetest.register_lbm({
name = "xpanes:gen2",
nodenames = {"group:pane"},
action = function(pos, node)
update_pane(pos)
for i = 0, 3 do
local dir = minetest.facedir_to_dir(i)
update_pane(vector.add(pos, dir))
end
end
})