Add MT 5.0 translation support

This commit is contained in:
Wuzzy 2020-02-23 19:59:17 +01:00
parent 68c1729990
commit 1cd496292d
34 changed files with 231 additions and 163 deletions

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_blinkyplant")
-- The BLINKY_PLANT
local toggle_timer = function (pos)
@ -20,7 +22,7 @@ local on_timer = function (pos)
end
mesecon.register_node("mesecons_blinkyplant:blinky_plant", {
description="Blinky Plant",
description=S("Blinky Plant"),
drawtype = "plantlike",
inventory_image = "jeija_blinky_plant_off.png",
paramtype = "light",

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_button")
-- WALL BUTTON
-- A button that when pressed emits power for 1 second
-- and then turns off again
@ -42,7 +44,7 @@ minetest.register_node("mesecons_button:button_off", {
}
},
groups = {dig_immediate=2, mesecon_needs_receiver = 1},
description = "Button",
description = S("Button"),
on_rightclick = function (pos, node)
minetest.swap_node(pos, {name = "mesecons_button:button_on", param2=node.param2})
mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node))
@ -88,7 +90,7 @@ minetest.register_node("mesecons_button:button_on", {
},
groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
drop = 'mesecons_button:button_off',
description = "Button",
description = S("Button"),
sounds = default.node_sound_stone_defaults(),
mesecons = {receptor = {
state = mesecon.state.on,

View File

@ -1,6 +1,9 @@
local S = minetest.get_translator("mesecons_commandblock")
local F = minetest.formspec_escape
minetest.register_chatcommand("say", {
params = "<text>",
description = "Say <text> as the server",
params = S("<text>"),
description = S("Say <text> as the server"),
privs = {server=true},
func = function(name, param)
minetest.chat_send_all(name .. ": " .. param)
@ -8,36 +11,36 @@ minetest.register_chatcommand("say", {
})
minetest.register_chatcommand("tell", {
params = "<name> <text>",
description = "Say <text> to <name> privately",
params = S("<name> <text>"),
description = S("Say <text> to <name> privately"),
func = function(name, param)
local found, _, target, message = param:find("^([^%s]+)%s+(.*)$")
if found == nil then
minetest.chat_send_player(name, "Invalid usage: " .. param)
minetest.chat_send_player(name, S("Invalid usage: @1", param))
return
end
if not minetest.get_player_by_name(target) then
minetest.chat_send_player(name, "Invalid target: " .. target)
minetest.chat_send_player(name, S("Invalid target: @1", target))
end
minetest.chat_send_player(target, name .. " whispers: " .. message, false)
minetest.chat_send_player(target, S("@1 whispers: @2", name, message), false)
end
})
minetest.register_chatcommand("hp", {
params = "<name> <value>",
description = "Set health of <name> to <value> hitpoints",
params = S("<name> <value>"),
description = S("Set health of <name> to <value> hitpoints"),
privs = {ban=true},
func = function(name, param)
local found, _, target, value = param:find("^([^%s]+)%s+(%d+)$")
if found == nil then
minetest.chat_send_player(name, "Invalid usage: " .. param)
minetest.chat_send_player(name, S("Invalid usage: @1", param))
return
end
local player = minetest.get_player_by_name(target)
if player then
player:set_hp(value)
else
minetest.chat_send_player(name, "Invalid target: " .. target)
minetest.chat_send_player(name, S("Invalid target: @1", target))
end
end
})
@ -46,18 +49,19 @@ local function initialize_data(meta)
local commands = minetest.formspec_escape(meta:get_string("commands"))
meta:set_string("formspec",
"invsize[9,5;]" ..
"textarea[0.5,0.5;8.5,4;commands;Commands;"..commands.."]" ..
"label[1,3.8;@nearest, @farthest, and @random are replaced by the respective player names]" ..
"button_exit[3.3,4.5;2,1;submit;Submit]")
"textarea[0.5,0.5;8.5,4;commands;"..F(S("Commands"))..";"..commands.."]" ..
"label[1,3.8;"..F(S("@@nearest, @@farthest, and @@random are replaced by the respective player names.")).."]" ..
"button_exit[3.3,4.5;2,1;submit;"..F(S("Submit")).."]")
local owner = meta:get_string("owner")
local ownstr = ""
if owner == "" then
owner = "not owned"
ownstr = S("(not owned)")
else
owner = "owned by " .. owner
ownstr = S("(owned by @1)", owner)
end
meta:set_string("infotext", "Command Block\n" ..
"(" .. owner .. ")\n" ..
"Commands: "..commands)
meta:set_string("infotext", S("Command Block").."\n" ..
ownstr .. "\n" ..
S("Commands: @1", commands))
end
local function construct(pos)
@ -150,15 +154,15 @@ local function commandblock_action_on(pos, node)
end
local cmddef = minetest.chatcommands[cmd]
if not cmddef then
minetest.chat_send_player(owner, "The command "..cmd.." does not exist")
minetest.chat_send_player(owner, S("The command @1 does not exist", cmd))
return
end
local has_privs, missing_privs = minetest.check_player_privs(owner, cmddef.privs)
if not has_privs then
minetest.chat_send_player(owner, "You don't have permission "
.."to run "..cmd
.." (missing privileges: "
..table.concat(missing_privs, ", ")..")")
minetest.chat_send_player(owner,
S("You don't have permission to run @1 (missing privileges: @2)",
cmd,
table.concat(missing_privs, ", ")))
return
end
cmddef.func(owner, param)
@ -178,7 +182,7 @@ local function can_dig(pos, player)
end
minetest.register_node("mesecons_commandblock:commandblock_off", {
description = "Command Block",
description = S("Command Block"),
tiles = {"jeija_commandblock_off.png"},
inventory_image = minetest.inventorycube("jeija_commandblock_off.png"),
is_ground_content = false,

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_delayer")
-- Function that get the input/output rules of the delayer
local delayer_get_output_rules = function(node)
local rules = {{x = 0, y = 0, z = 1}}
@ -80,7 +82,7 @@ if i > 1 then
end
local off_state = {
description = "Delayer",
description = S("Delayer"),
tiles = {
"mesecons_delayer_off_"..tostring(i)..".png",
"mesecons_delayer_bottom.png",
@ -123,7 +125,6 @@ minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), off_state)
-- Activated delayer definition defaults
local on_state = {
description = "You hacker you",
tiles = {
"mesecons_delayer_on_"..tostring(i)..".png",
"mesecons_delayer_bottom.png",

View File

@ -1,3 +1,6 @@
local S = minetest.get_translator("mesecons_detector")
local F = minetest.formspec_escape
local GET_COMMAND = "GET"
-- Object detector
@ -7,9 +10,9 @@ local GET_COMMAND = "GET"
local function object_detector_make_formspec(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "size[9,2.5]" ..
"field[0.3, 0;9,2;scanname;Name of player to scan for (empty for any):;${scanname}]"..
"field[0.3,1.5;4,2;digiline_channel;Digiline Channel (optional):;${digiline_channel}]"..
"button_exit[7,0.75;2,3;;Save]")
"field[0.3, 0;9,2;scanname;"..F(S("Name of player to scan for (empty for any):"))..";${scanname}]"..
"field[0.3,1.5;4,2;digiline_channel;"..F(S("Digiline Channel (optional):"))..";${digiline_channel}]"..
"button_exit[7,0.75;2,3;;"..F(S("Save")).."]")
end
local function object_detector_on_receive_fields(pos, formname, fields, sender)
@ -69,7 +72,7 @@ minetest.register_node("mesecons_detector:object_detector_off", {
is_ground_content = false,
walkable = true,
groups = {cracky=3},
description="Player Detector",
description=S("Player Detector"),
mesecons = {receptor = {
state = mesecon.state.off,
rules = mesecon.rules.pplate
@ -150,10 +153,10 @@ local function node_detector_make_formspec(pos)
local meta = minetest.get_meta(pos)
if meta:get_string("distance") == "" then meta:set_string("distance", "0") end
meta:set_string("formspec", "size[9,2.5]" ..
"field[0.3, 0;9,2;scanname;Name of node to scan for (empty for any):;${scanname}]"..
"field[0.3,1.5;2.5,2;distance;Distance (0-"..mesecon.setting("node_detector_distance_max", 10).."):;${distance}]"..
"field[3,1.5;4,2;digiline_channel;Digiline Channel (optional):;${digiline_channel}]"..
"button_exit[7,0.75;2,3;;Save]")
"field[0.3, 0;9,2;scanname;"..F(S("Name of node to scan for (empty for any):"))..";${scanname}]"..
"field[0.3,1.5;2.5,2;distance;"..F(S("Distance (0-@1):", mesecon.setting("node_detector_distance_max", 10)))..";${distance}]"..
"field[3,1.5;4,2;digiline_channel;"..F(S("Digiline Channel (optional):"))..";${digiline_channel}]"..
"button_exit[7,0.75;2,3;;"..F(S("Save")).."]")
end
local function node_detector_on_receive_fields(pos, fieldname, fields, sender)
@ -262,7 +265,7 @@ minetest.register_node("mesecons_detector:node_detector_off", {
is_ground_content = false,
walkable = true,
groups = {cracky=3},
description="Node Detector",
description=S("Node Detector"),
mesecons = {receptor = {
state = mesecon.state.off
}},

View File

@ -1,3 +1,4 @@
local S = minetest.get_translator("mesecons_extrawires")
local screwdriver_exists = minetest.global_exists("screwdriver")
local corner_nodebox = {
@ -56,7 +57,7 @@ minetest.register_node("mesecons_extrawires:corner_on", {
minetest.register_node("mesecons_extrawires:corner_off", {
drawtype = "nodebox",
description = "Insulated Mesecon Corner",
description = S("Insulated Mesecon Corner"),
tiles = {
"jeija_insulated_wire_curved_tb_off.png",
"jeija_insulated_wire_curved_tb_off.png^[transformR270",

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_extrawires")
local function crossover_get_rules(node)
return {
{--first wire
@ -19,7 +21,7 @@ local crossover_states = {
}
minetest.register_node("mesecons_extrawires:crossover_off", {
description = "Insulated Mesecon Crossover",
description = S("Insulated Mesecon Crossover"),
drawtype = "mesh",
mesh = "mesecons_extrawires_crossover.b3d",
tiles = {
@ -45,7 +47,6 @@ minetest.register_node("mesecons_extrawires:crossover_off", {
})
minetest.register_node("mesecons_extrawires:crossover_01", {
description = "You hacker you!",
drop = "mesecons_extrawires:crossover_off",
drawtype = "mesh",
mesh = "mesecons_extrawires_crossover.b3d",
@ -72,7 +73,6 @@ minetest.register_node("mesecons_extrawires:crossover_01", {
})
minetest.register_node("mesecons_extrawires:crossover_10", {
description = "You hacker you!",
drop = "mesecons_extrawires:crossover_off",
drawtype = "mesh",
mesh = "mesecons_extrawires_crossover.b3d",
@ -99,7 +99,6 @@ minetest.register_node("mesecons_extrawires:crossover_10", {
})
minetest.register_node("mesecons_extrawires:crossover_on", {
description = "You hacker you!",
drop = "mesecons_extrawires:crossover_off",
drawtype = "mesh",
mesh = "mesecons_extrawires_crossover.b3d",

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_extrawires")
local screwdriver_exists = minetest.global_exists("screwdriver")
local tjunction_nodebox = {
@ -57,7 +59,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", {
minetest.register_node("mesecons_extrawires:tjunction_off", {
drawtype = "nodebox",
description = "Insulated Mesecon T-junction",
description = S("Insulated Mesecon T-junction"),
tiles = {
"jeija_insulated_wire_tjunction_tb_off.png",
"jeija_insulated_wire_tjunction_tb_off.png^[transformR180",

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_extrawires")
local vertical_box = {
type = "fixed",
fixed = {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}
@ -77,7 +79,7 @@ end
-- Vertical wire
mesecon.register_node("mesecons_extrawires:vertical", {
description = "Vertical Mesecon",
description = S("Vertical Mesecon"),
drawtype = "nodebox",
walkable = false,
paramtype = "light",
@ -110,7 +112,7 @@ mesecon.register_node("mesecons_extrawires:vertical", {
-- Vertical wire top
mesecon.register_node("mesecons_extrawires:vertical_top", {
description = "Vertical mesecon",
description = S("Vertical Mesecon"),
drawtype = "nodebox",
walkable = false,
paramtype = "light",
@ -142,7 +144,7 @@ mesecon.register_node("mesecons_extrawires:vertical_top", {
-- Vertical wire bottom
mesecon.register_node("mesecons_extrawires:vertical_bottom", {
description = "Vertical mesecon",
description = S("Vertical Mesecon"),
drawtype = "nodebox",
walkable = false,
paramtype = "light",

View File

@ -1,3 +1,6 @@
local S = minetest.get_translator("mesecons_fpga")
local F = minetest.formspec_escape
local plg = {}
plg.rules = {}
-- per-player formspec positions
@ -59,7 +62,7 @@ plg.register_nodes = function(template)
end
plg.register_nodes({
description = "FPGA",
description = S("FPGA"),
drawtype = "nodebox",
tiles = {
"", -- replaced later
@ -94,7 +97,7 @@ plg.register_nodes({
meta:set_string("instr", lcore.serialize(is))
meta:set_int("valid", 0)
meta:set_string("infotext", "FPGA")
meta:set_string("infotext", S("FPGA"))
end,
on_rightclick = function(pos, node, clicker)
if not minetest.is_player(clicker) then
@ -138,13 +141,13 @@ plg.register_nodes({
dir = 1
if user and user:is_player() then
minetest.chat_send_player(user:get_player_name(),
"FPGA ports have been rotated clockwise.")
S("FPGA ports have been rotated clockwise."))
end
elseif mode == screwdriver.ROTATE_AXIS then -- counter-clockwise
dir = -1
if user and user:is_player() then
minetest.chat_send_player(user:get_player_name(),
"FPGA ports have been rotated counter-clockwise.")
S("FPGA ports have been rotated counter-clockwise."))
end
end
@ -202,17 +205,17 @@ plg.to_formspec_string = function(is, err)
x, y, name, table.concat(titles, ","), selected)
end
local s = "size[9,9]"..
"label[3.4,-0.15;FPGA gate configuration]"..
"button[7,7.5;2,2.5;program;Program]"..
"label[3.4,-0.15;"..F(S("FPGA gate configuration")).."]"..
"button[7,7.5;2,2.5;program;"..F(S("Program")).."]"..
"box[4.2,0.5;0.03,7;#ffffff]"..
"label[0.25,0.25;op. 1]"..
"label[1.0,0.25;gate type]"..
"label[2.125,0.25;op. 2]"..
"label[3.15,0.25;dest]"..
"label[4.5,0.25;op. 1]"..
"label[5.25,0.25;gate type]"..
"label[6.375,0.25;op. 2]"..
"label[7.4,0.25;dest]"
"label[0.25,0.25;"..F(S("op. 1")).."]"..
"label[1.0,0.25;"..F(S("gate type")).."]"..
"label[2.125,0.25;"..F(S("op. 2")).."]"..
"label[3.15,0.25;"..F(S("dest")).."]"..
"label[4.5,0.25;"..F(S("op. 1")).."]"..
"label[5.25,0.25;"..F(S("gate type")).."]"..
"label[6.375,0.25;"..F(S("op. 2")).."]"..
"label[7.4,0.25;"..F(S("dest")).."]"
local x = 1 - 0.75
local y = 1 - 0.25
for i = 1, 14 do
@ -232,7 +235,7 @@ plg.to_formspec_string = function(is, err)
if err then
local fmsg = minetest.colorize("#ff0000", minetest.formspec_escape(err.msg))
s = s .. plg.red_box_around(err.i) ..
"label[0.25,8.25;The gate configuration is erroneous in the marked area:]"..
"label[0.25,8.25;"..F(S("The gate configuration is erroneous in the marked area:")).."]"..
"label[0.25,8.5;" .. fmsg .. "]"
end
return s
@ -276,10 +279,10 @@ plg.update_meta = function(pos, is)
local err = lcore.validate(is)
if err == nil then
meta:set_int("valid", 1)
meta:set_string("infotext", "FPGA (functional)")
meta:set_string("infotext", S("FPGA (functional)"))
else
meta:set_int("valid", 0)
meta:set_string("infotext", "FPGA")
meta:set_string("infotext", S("FPGA"))
end
-- reset ports and run programmed logic
@ -316,7 +319,7 @@ plg.update = function(pos)
elseif mesecon.do_overheat(pos) then
plg.setports(pos, false, false, false, false)
meta:set_int("valid", 0)
meta:set_string("infotext", "FPGA (overheated)")
meta:set_string("infotext", S("FPGA (overheated)"))
return
end

View File

@ -1,3 +1,4 @@
local S = minetest.get_translator("mesecons_fpga")
local lg = {}
@ -132,34 +133,34 @@ lg.validate_single = function(t, i)
-- check for completeness
if not gate_data then
return {i = i, msg = "Gate type is required"}
return {i = i, msg = S("Gate type is required")}
elseif gate_data.unary then
if elem.op1 ~= nil or elem.op2 == nil or elem.dst == nil then
return {i = i, msg = "Second operand (only) and destination are required"}
return {i = i, msg = S("Second operand (only) and destination are required")}
end
else
if elem.op1 == nil or elem.op2 == nil or elem.dst == nil then
return {i = i, msg = "Operands and destination are required"}
return {i = i, msg = S("Operands and destination are required")}
end
end
-- check whether operands/destination are identical
if compare_op(elem.op1, elem.op2) then
return {i = i, msg = "Operands cannot be identical"}
return {i = i, msg = S("Operands cannot be identical")}
end
if compare_op(elem.op1, elem.dst, true) or compare_op(elem.op2, elem.dst, true) then
return {i = i, msg = "Destination and operands must be different"}
return {i = i, msg = S("Destination and operands must be different")}
end
-- check whether operands point to defined registers
if elem.op1 ~= nil and elem.op1.type == "reg"
and not is_reg_written_to(t, elem.op1.n, i) then
return {i = i, msg = "First operand is undefined register"}
return {i = i, msg = S("First operand is undefined register")}
end
if elem.op2.type == "reg" and not is_reg_written_to(t, elem.op2.n, i) then
return {i = i, msg = "Second operand is undefined register"}
return {i = i, msg = S("Second operand is undefined register")}
end
-- check whether destination points to undefined register
if elem.dst.type == "reg" and is_reg_written_to(t, elem.dst.n, i) then
return {i = i, msg = "Destination is already used register"}
return {i = i, msg = S("Destination is already used register")}
end
return nil

View File

@ -1,8 +1,10 @@
local S = minetest.get_translator("mesecons_fpga")
return function(plg)
minetest.register_tool("mesecons_fpga:programmer", {
description = "FPGA Programmer",
description = S("FPGA Programmer"),
inventory_image = "jeija_fpga_programmer.png",
stack_max = 1,
on_place = function(itemstack, placer, pointed_thing)
@ -17,11 +19,11 @@ minetest.register_tool("mesecons_fpga:programmer", {
local meta = minetest.get_meta(pos)
if meta:get_string("instr") == "//////////////" then
minetest.chat_send_player(placer:get_player_name(), "This FPGA is unprogrammed.")
minetest.chat_send_player(placer:get_player_name(), S("This FPGA is unprogrammed."))
return itemstack
end
itemstack:set_metadata(meta:get_string("instr"))
minetest.chat_send_player(placer:get_player_name(), "FPGA gate configuration was successfully copied!")
minetest.chat_send_player(placer:get_player_name(), S("FPGA gate configuration was successfully copied!"))
return itemstack
end,
@ -42,14 +44,14 @@ minetest.register_tool("mesecons_fpga:programmer", {
local imeta = itemstack:get_metadata()
if imeta == "" then
minetest.chat_send_player(player_name, "Use shift+right-click to copy a gate configuration first.")
minetest.chat_send_player(player_name, S("Use shift+right-click to copy a gate configuration first."))
return itemstack
end
local meta = minetest.get_meta(pos)
meta:set_string("instr", imeta)
plg.update_meta(pos, imeta)
minetest.chat_send_player(player_name, "Gate configuration was successfully written to FPGA!")
minetest.chat_send_player(player_name, S("Gate configuration was successfully written to FPGA!"))
return itemstack
end

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_gates")
local nodebox = {
type = "fixed",
fixed = {{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }},
@ -57,7 +59,10 @@ end
local function register_gate(name, inputnumber, assess, recipe, description)
local get_inputrules = inputnumber == 2 and gate_get_input_rules_twoinputs or
gate_get_input_rules_oneinput
description = "Logic Gate: "..name
if not description then
description = S("Logic Gate: @1", name)
end
local basename = "mesecons_gates:"..name
mesecon.register_node(basename, {
@ -106,38 +111,38 @@ end
register_gate("diode", 1, function (input) return input end,
{{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons_torch:mesecon_torch_on"}},
"Diode")
S("Diode"))
register_gate("not", 1, function (input) return not input end,
{{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons:mesecon"}},
"NOT Gate")
S("NOT Gate"))
register_gate("and", 2, function (val1, val2) return val1 and val2 end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons_materials:silicon", "mesecons:mesecon"},
{"mesecons:mesecon", "", ""}},
"AND Gate")
S("AND Gate"))
register_gate("nand", 2, function (val1, val2) return not (val1 and val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons_materials:silicon", "mesecons_torch:mesecon_torch_on"},
{"mesecons:mesecon", "", ""}},
"NAND Gate")
S("NAND Gate"))
register_gate("xor", 2, function (val1, val2) return (val1 or val2) and not (val1 and val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons_materials:silicon", "mesecons_materials:silicon"},
{"mesecons:mesecon", "", ""}},
"XOR Gate")
S("XOR Gate"))
register_gate("nor", 2, function (val1, val2) return not (val1 or val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons:mesecon", "mesecons_torch:mesecon_torch_on"},
{"mesecons:mesecon", "", ""}},
"NOR Gate")
S("NOR Gate"))
register_gate("or", 2, function (val1, val2) return (val1 or val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons:mesecon", "mesecons:mesecon"},
{"mesecons:mesecon", "", ""}},
"OR Gate")
S("OR Gate"))

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_hydroturbine")
-- HYDRO_TURBINE
-- Water turbine:
-- Active if flowing >water< above it
@ -16,7 +18,7 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", {
is_ground_content = false,
wield_scale = {x=0.75, y=0.75, z=0.75},
groups = {dig_immediate=2},
description="Water Turbine",
description=S("Water Turbine"),
paramtype = "light",
selection_box = {
type = "fixed",
@ -45,7 +47,7 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_on", {
inventory_image = "jeija_hydro_turbine_inv.png",
drop = "mesecons_hydroturbine:hydro_turbine_off 1",
groups = {dig_immediate=2,not_in_creative_inventory=1},
description="Water Turbine",
description=S("Water Turbine"),
paramtype = "light",
selection_box = {
type = "fixed",

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_hydroturbine")
local screwdriver_exists = minetest.global_exists("screwdriver")
local function insulated_wire_get_rules(node)
@ -11,7 +13,7 @@ end
minetest.register_node("mesecons_insulated:insulated_on", {
drawtype = "nodebox",
description = "Straight Insulated Mesecon",
description = S("Straight Insulated Mesecon"),
tiles = {
"jeija_insulated_wire_sides_on.png",
"jeija_insulated_wire_sides_on.png",
@ -48,7 +50,7 @@ minetest.register_node("mesecons_insulated:insulated_on", {
minetest.register_node("mesecons_insulated:insulated_off", {
drawtype = "nodebox",
description = "Straight Insulated Mesecon",
description = S("Straight Insulated Mesecon"),
tiles = {
"jeija_insulated_wire_sides_off.png",
"jeija_insulated_wire_sides_off.png",

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_lamp")
-- MESELAMPS
-- A lamp is "is an electrical device used to create artificial light" (wikipedia)
-- guess what?
@ -46,7 +48,7 @@ minetest.register_node("mesecons_lamp:lamp_off", {
node_box = mesecon_lamp_box,
selection_box = mesecon_lamp_box,
groups = {dig_immediate=3, mesecon_receptor_off = 1, mesecon_effector_off = 1},
description = "Mesecon Lamp",
description = S("Mesecon Lamp"),
sounds = default.node_sound_glass_defaults(),
mesecons = {effector = {
action_on = function (pos, node)

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_lightstone")
local lightstone_rules = {
{x=0, y=0, z=-1},
{x=1, y=0, z=0},
@ -16,7 +18,7 @@ local lightstone_rules = {
function mesecon.lightstone_add(name, base_item, texture_off, texture_on, desc)
if not desc then
desc = name .. " Lightstone"
desc = S("Lightstone (@1)", name)
end
minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_off", {
tiles = {texture_off},
@ -59,15 +61,15 @@ function mesecon.lightstone_add(name, base_item, texture_off, texture_on, desc)
end
mesecon.lightstone_add("red", "dye:red", "jeija_lightstone_red_off.png", "jeija_lightstone_red_on.png", "Red Lightstone")
mesecon.lightstone_add("green", "dye:green", "jeija_lightstone_green_off.png", "jeija_lightstone_green_on.png", "Green Lightstone")
mesecon.lightstone_add("blue", "dye:blue", "jeija_lightstone_blue_off.png", "jeija_lightstone_blue_on.png", "Blue Lightstone")
mesecon.lightstone_add("gray", "dye:grey", "jeija_lightstone_gray_off.png", "jeija_lightstone_gray_on.png", "Grey Lightstone")
mesecon.lightstone_add("darkgray", "dye:dark_grey", "jeija_lightstone_darkgray_off.png", "jeija_lightstone_darkgray_on.png", "Dark Grey Lightstone")
mesecon.lightstone_add("yellow", "dye:yellow", "jeija_lightstone_yellow_off.png", "jeija_lightstone_yellow_on.png", "Yellow Lightstone")
mesecon.lightstone_add("orange", "dye:orange", "jeija_lightstone_orange_off.png", "jeija_lightstone_orange_on.png", "Orange Lightstone")
mesecon.lightstone_add("white", "dye:white", "jeija_lightstone_white_off.png", "jeija_lightstone_white_on.png", "White Lightstone")
mesecon.lightstone_add("pink", "dye:pink", "jeija_lightstone_pink_off.png", "jeija_lightstone_pink_on.png", "Pink Lightstone")
mesecon.lightstone_add("magenta", "dye:magenta", "jeija_lightstone_magenta_off.png", "jeija_lightstone_magenta_on.png", "Magenta Lightstone")
mesecon.lightstone_add("cyan", "dye:cyan", "jeija_lightstone_cyan_off.png", "jeija_lightstone_cyan_on.png", "Cyan Lightstone")
mesecon.lightstone_add("violet", "dye:violet", "jeija_lightstone_violet_off.png", "jeija_lightstone_violet_on.png", "Violet Lightstone")
mesecon.lightstone_add("red", "dye:red", "jeija_lightstone_red_off.png", "jeija_lightstone_red_on.png", S("Red Lightstone"))
mesecon.lightstone_add("green", "dye:green", "jeija_lightstone_green_off.png", "jeija_lightstone_green_on.png", S("Green Lightstone"))
mesecon.lightstone_add("blue", "dye:blue", "jeija_lightstone_blue_off.png", "jeija_lightstone_blue_on.png", S("Blue Lightstone"))
mesecon.lightstone_add("gray", "dye:grey", "jeija_lightstone_gray_off.png", "jeija_lightstone_gray_on.png", S("Grey Lightstone"))
mesecon.lightstone_add("darkgray", "dye:dark_grey", "jeija_lightstone_darkgray_off.png", "jeija_lightstone_darkgray_on.png", S("Dark Grey Lightstone"))
mesecon.lightstone_add("yellow", "dye:yellow", "jeija_lightstone_yellow_off.png", "jeija_lightstone_yellow_on.png", S("Yellow Lightstone"))
mesecon.lightstone_add("orange", "dye:orange", "jeija_lightstone_orange_off.png", "jeija_lightstone_orange_on.png", S("Orange Lightstone"))
mesecon.lightstone_add("white", "dye:white", "jeija_lightstone_white_off.png", "jeija_lightstone_white_on.png", S("White Lightstone"))
mesecon.lightstone_add("pink", "dye:pink", "jeija_lightstone_pink_off.png", "jeija_lightstone_pink_on.png", S("Pink Lightstone"))
mesecon.lightstone_add("magenta", "dye:magenta", "jeija_lightstone_magenta_off.png", "jeija_lightstone_magenta_on.png", S("Magenta Lightstone"))
mesecon.lightstone_add("cyan", "dye:cyan", "jeija_lightstone_cyan_off.png", "jeija_lightstone_cyan_on.png", S("Cyan Lightstone"))
mesecon.lightstone_add("violet", "dye:violet", "jeija_lightstone_violet_off.png", "jeija_lightstone_violet_on.png", S("Violet Lightstone"))

View File

@ -1,3 +1,6 @@
local S = minetest.get_translator("mesecons_luacontroller")
local F = minetest.formspec_escape
-- ______
-- |
-- |
@ -273,7 +276,7 @@ if mesecon.setting("luacontroller_lightweight_interrupts", false) then
get_interrupt = function(pos, itbl, send_warning)
return (function(time, iid)
if type(time) ~= "number" then error("Delay must be a number") end
if iid ~= nil then send_warning("Interrupt IDs are disabled on this server") end
if iid ~= nil then send_warning(S("Interrupt IDs are disabled on this server")) end
table.insert(itbl, function() minetest.get_node_timer(pos):start(time) end)
end)
end
@ -297,7 +300,7 @@ else
if #msg_ser <= mesecon.setting("luacontroller_interruptid_maxlen", 256) then
mesecon.queue:add_action(pos, "lc_interrupt", {luac_id, iid}, time, iid, 1)
else
send_warning("An interrupt ID was too large!")
send_warning(S("An interrupt ID was too large!"))
end
end)
end
@ -403,18 +406,18 @@ local function get_digiline_send(pos, itbl, send_warning)
-- Make sure channel is string, number or boolean
if type(channel) == "string" then
if #channel > chan_maxlen then
send_warning("Channel string too long.")
send_warning(S("Channel string too long."))
return false
end
elseif (type(channel) ~= "string" and type(channel) ~= "number" and type(channel) ~= "boolean") then
send_warning("Channel must be string, number or boolean.")
send_warning(S("Channel must be string, number or boolean."))
return false
end
local msg_cost
msg, msg_cost = clean_and_weigh_digiline_message(msg)
if msg == nil or msg_cost > maxlen then
send_warning("Message was too complex, or contained invalid data.")
send_warning(S("Message was too complex, or contained invalid data."))
return false
end
@ -587,7 +590,7 @@ local function run_inner(pos, code, event)
-- 'Last warning' label.
local warning = ""
local function send_warning(str)
warning = "Warning: " .. str
warning = S("Warning: @1", str)
end
-- Create environment
@ -607,7 +610,7 @@ local function run_inner(pos, code, event)
-- End string true sandboxing
if not success then return false, msg end
if type(env.port) ~= "table" then
return false, "Ports set are invalid."
return false, S("Ports set are invalid.")
end
-- Actually set the ports
@ -633,9 +636,10 @@ local function reset_formspec(meta, code, errmsg)
errmsg = minetest.formspec_escape(tostring(errmsg or ""))
meta:set_string("formspec", "size[12,10]"
.."background[-0.2,-0.25;12.4,10.75;jeija_luac_background.png]"
.."label[5.5,-0.375;"..F(S("Luacontroller")).."]"
.."label[0.1,8.3;"..errmsg.."]"
.."textarea[0.2,0.2;12.2,9.5;code;;"..code.."]"
.."image_button[4.75,8.75;2.5,1;jeija_luac_runbutton.png;program;]"
.."button[4.75,8.75;2.5,1;program;"..F(S("Execute")).."]"
.."image_button_exit[11.72,-0.25;0.425,0.4;jeija_close_window.png;exit;]"
)
end
@ -807,7 +811,7 @@ for d = 0, 1 do
}
minetest.register_node(node_name, {
description = "Luacontroller",
description = S("Luacontroller"),
drawtype = "nodebox",
tiles = {
top,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 655 B

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,14 +1,16 @@
local S = minetest.get_translator("mesecons_materials")
-- Glue and fiber
minetest.register_craftitem("mesecons_materials:glue", {
image = "mesecons_glue.png",
on_place_on_ground = minetest.craftitem_place_item,
description="Glue",
description=S("Glue"),
})
minetest.register_craftitem("mesecons_materials:fiber", {
image = "mesecons_fiber.png",
on_place_on_ground = minetest.craftitem_place_item,
description="Fiber",
description=S("Fiber"),
})
minetest.register_craft({
@ -29,7 +31,7 @@ minetest.register_craft({
minetest.register_craftitem("mesecons_materials:silicon", {
image = "mesecons_silicon.png",
on_place_on_ground = minetest.craftitem_place_item,
description="Silicon",
description=S("Silicon"),
})
minetest.register_craft({

View File

@ -1,3 +1,6 @@
local S = minetest.get_translator("mesecons_microcontroller")
local F = minetest.formspec_escape
local EEPROM_SIZE = 255
local microc_rules = {}
@ -56,7 +59,7 @@ if nodename ~= "mesecons_microcontroller:microcontroller0000" then
end
minetest.register_node(nodename, {
description = "Microcontroller",
description = S("Microcontroller"),
drawtype = "nodebox",
tiles = {
top,
@ -89,15 +92,15 @@ minetest.register_node(nodename, {
local meta = minetest.get_meta(pos)
meta:set_string("code", "")
meta:set_string("formspec", "size[9,2.5]"..
"field[0.256,-0.2;9,2;code;Code:;]"..
"button[0 ,0.2;1.5,3;band;AND]"..
"button[1.5,0.2;1.5,3;bxor;XOR]"..
"button[3 ,0.2;1.5,3;bnot;NOT]"..
"button[4.5,0.2;1.5,3;bnand;NAND]"..
"button[6 ,0.2;1.5,3;btflop;T-Flop]"..
"button[7.5,0.2;1.5,3;brsflop;RS-Flop]"..
"button_exit[3.5,1;2,3;program;Program]")
meta:set_string("infotext", "Unprogrammed Microcontroller")
"field[0.256,-0.2;9,2;code;"..F(S("Code:"))..";]"..
"button[0 ,0.2;1.5,3;band;"..F(S("AND")).."]"..
"button[1.5,0.2;1.5,3;bxor;"..F(S("XOR")).."]"..
"button[3 ,0.2;1.5,3;bnot;"..F(S("NOT")).."]"..
"button[4.5,0.2;1.5,3;bnand;"..F(S("NAND")).."]"..
"button[6 ,0.2;1.5,3;btflop;"..F(S("T-Flop")).."]"..
"button[7.5,0.2;1.5,3;brsflop;"..F(S("RS-Flop")).."]"..
"button_exit[3.5,1;2,3;program;"..F(S("Program")).."]")
meta:set_string("infotext", S("Unprogrammed Microcontroller"))
local r = ""
for i=1, EEPROM_SIZE+1 do r=r.."0" end --Generate a string with EEPROM_SIZE*"0"
meta:set_string("eeprom", r)
@ -127,15 +130,15 @@ minetest.register_node(nodename, {
meta:set_string("code", fields.code)
meta:set_string("formspec", "size[9,2.5]"..
"field[0.256,-0.2;9,2;code;Code:;"..minetest.formspec_escape(fields.code).."]"..
"button[0 ,0.2;1.5,3;band;AND]"..
"button[1.5,0.2;1.5,3;bxor;XOR]"..
"button[3 ,0.2;1.5,3;bnot;NOT]"..
"button[4.5,0.2;1.5,3;bnand;NAND]"..
"button[6 ,0.2;1.5,3;btflop;T-Flop]"..
"button[7.5,0.2;1.5,3;brsflop;RS-Flop]"..
"button_exit[3.5,1;2,3;program;Program]")
meta:set_string("infotext", "Programmed Microcontroller")
"field[0.256,-0.2;9,2;code;"..F(S("Code:"))..";"..minetest.formspec_escape(fields.code).."]"..
"button[0 ,0.2;1.5,3;band;"..F(S("AND")).."]"..
"button[1.5,0.2;1.5,3;bxor;"..F(S("XOR")).."]"..
"button[3 ,0.2;1.5,3;bnot;"..F(S("NOT")).."]"..
"button[4.5,0.2;1.5,3;bnand;"..F(S("NAND")).."]"..
"button[6 ,0.2;1.5,3;btflop;"..F(S("T-Flop")).."]"..
"button[7.5,0.2;1.5,3;brsflop;"..F(S("RS-Flop")).."]"..
"button_exit[3.5,1;2,3;program;"..F(S("Program")).."]")
meta:set_string("infotext", S("Programmed Microcontroller"))
yc.reset (pos)
yc.update(pos)
end,
@ -199,9 +202,9 @@ yc.update = function(pos)
code = string.gsub(code, " ", "") --Remove all spaces
code = string.gsub(code, " ", "") --Remove all tabs
if yc.parsecode(code, pos) == nil then
meta:set_string("infotext", "Code not valid!\n"..code)
meta:set_string("infotext", S("Code not valid!").."\n"..code)
else
meta:set_string("infotext", "Working Microcontroller\n"..code)
meta:set_string("infotext", S("Working Microcontroller").."\n"..code)
end
end
@ -467,12 +470,12 @@ yc.command_after_execute = function(params)
local meta = minetest.get_meta(params.pos)
if meta:get_int("afterid") == params.afterid then --make sure the node has not been changed
if yc.parsecode(params.code, params.pos) == nil then
meta:set_string("infotext", "Code in after() not valid!")
meta:set_string("infotext", S("Code in after() not valid!"))
else
if code ~= nil then
meta:set_string("infotext", "Working Microcontroller\n"..code)
meta:set_string("infotext", S("Working Microcontroller").."\n"..code)
else
meta:set_string("infotext", "Working Microcontroller")
meta:set_string("infotext", S("Working Microcontroller"))
end
end
end

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_movestone")
-- MOVESTONE
-- Non-sticky:
-- Moves along mesecon lines
@ -127,7 +129,7 @@ mesecon.register_movestone("mesecons_movestones:movestone", {
"jeija_movestone_arrows.png",
},
groups = {cracky = 3},
description = "Movestone",
description = S("Movestone"),
sounds = default.node_sound_stone_defaults()
}, false, false)
@ -141,7 +143,7 @@ mesecon.register_movestone("mesecons_movestones:sticky_movestone", {
"jeija_sticky_movestone.png",
},
groups = {cracky = 3},
description = "Sticky Movestone",
description = S("Sticky Movestone"),
sounds = default.node_sound_stone_defaults(),
}, true, false)
@ -155,7 +157,7 @@ mesecon.register_movestone("mesecons_movestones:movestone_vertical", {
"jeija_movestone_arrows.png^[transformR90",
},
groups = {cracky = 3},
description = "Vertical Movestone",
description = S("Vertical Movestone"),
sounds = default.node_sound_stone_defaults()
}, false, true)
@ -169,7 +171,7 @@ mesecon.register_movestone("mesecons_movestones:sticky_movestone_vertical", {
"jeija_movestone_arrows.png^[transformR90",
},
groups = {cracky = 3},
description = "Vertical Sticky Movestone",
description = S("Vertical Sticky Movestone"),
sounds = default.node_sound_stone_defaults(),
}, true, true)

View File

@ -1,5 +1,7 @@
local S = minetest.get_translator("mesecons_noteblock")
minetest.register_node("mesecons_noteblock:noteblock", {
description = "Noteblock",
description = S("Noteblock"),
tiles = {"mesecons_noteblock.png"},
is_ground_content = false,
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2},

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_pistons")
local specs = {
normal = {
offname = "mesecons_pistons:piston_normal_off",
@ -274,7 +276,7 @@ local piston_on_box = {
-- Normal (non-sticky) Pistons:
-- offstate
minetest.register_node("mesecons_pistons:piston_normal_off", {
description = "Piston",
description = S("Piston"),
tiles = {
"mesecons_piston_top.png",
"mesecons_piston_bottom.png",
@ -299,7 +301,7 @@ minetest.register_node("mesecons_pistons:piston_normal_off", {
-- onstate
minetest.register_node("mesecons_pistons:piston_normal_on", {
description = "Activated Piston Base",
description = S("Activated Piston Base"),
drawtype = "nodebox",
tiles = {
"mesecons_piston_top.png",
@ -328,7 +330,7 @@ minetest.register_node("mesecons_pistons:piston_normal_on", {
-- pusher
minetest.register_node("mesecons_pistons:piston_pusher_normal", {
description = "Piston Pusher",
description = S("Piston Pusher"),
drawtype = "nodebox",
tiles = {
"mesecons_piston_pusher_top.png",
@ -353,7 +355,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_normal", {
-- Sticky ones
-- offstate
minetest.register_node("mesecons_pistons:piston_sticky_off", {
description = "Sticky Piston",
description = S("Sticky Piston"),
tiles = {
"mesecons_piston_top.png",
"mesecons_piston_bottom.png",
@ -378,7 +380,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", {
-- onstate
minetest.register_node("mesecons_pistons:piston_sticky_on", {
description = "Activated Sticky Piston Base",
description = S("Activated Sticky Piston Base"),
drawtype = "nodebox",
tiles = {
"mesecons_piston_top.png",
@ -407,7 +409,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
-- pusher
minetest.register_node("mesecons_pistons:piston_pusher_sticky", {
description = "Sticky Piston Pusher",
description = S("Sticky Piston Pusher"),
drawtype = "nodebox",
tiles = {
"mesecons_piston_pusher_top.png",

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_powerplant")
-- The POWER_PLANT
-- Just emits power. always.
@ -11,7 +13,7 @@ minetest.register_node("mesecons_powerplant:power_plant", {
walkable = false,
groups = {dig_immediate=3, mesecon = 2},
light_source = minetest.LIGHT_MAX-9,
description="Power Plant",
description=S("Power Plant"),
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, -0.5+0.7, 0.3},

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_pressureplates")
local pp_box_off = {
type = "fixed",
fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 },
@ -89,7 +91,7 @@ end
mesecon.register_pressure_plate(
"mesecons_pressureplates:pressure_plate_wood",
"Wooden Pressure Plate",
S("Wooden Pressure Plate"),
{"jeija_pressure_plate_wood_off.png","jeija_pressure_plate_wood_off.png","jeija_pressure_plate_wood_off_edges.png"},
{"jeija_pressure_plate_wood_on.png","jeija_pressure_plate_wood_on.png","jeija_pressure_plate_wood_on_edges.png"},
"jeija_pressure_plate_wood_wield.png",
@ -100,7 +102,7 @@ mesecon.register_pressure_plate(
mesecon.register_pressure_plate(
"mesecons_pressureplates:pressure_plate_stone",
"Stone Pressure Plate",
S("Stone Pressure Plate"),
{"jeija_pressure_plate_stone_off.png","jeija_pressure_plate_stone_off.png","jeija_pressure_plate_stone_off_edges.png"},
{"jeija_pressure_plate_stone_on.png","jeija_pressure_plate_stone_on.png","jeija_pressure_plate_stone_on_edges.png"},
"jeija_pressure_plate_stone_wield.png",

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_random")
-- REMOVESTONE
minetest.register_node("mesecons_random:removestone", {
@ -5,7 +7,7 @@ minetest.register_node("mesecons_random:removestone", {
is_ground_content = false,
inventory_image = minetest.inventorycube("jeija_removestone_inv.png"),
groups = {cracky=3},
description="Removestone",
description=S("Removestone"),
sounds = default.node_sound_stone_defaults(),
mesecons = {effector = {
action_on = function (pos, node)
@ -29,7 +31,7 @@ minetest.register_craft({
-- GHOSTSTONE
minetest.register_node("mesecons_random:ghoststone", {
description="Ghoststone",
description=S("Ghoststone"),
tiles = {"jeija_ghoststone.png"},
is_ground_content = false,
inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"),

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_solarpanel")
-- Solar Panel
minetest.register_node("mesecons_solarpanel:solar_panel_on", {
drawtype = "nodebox",
@ -53,7 +55,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_off", {
wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 },
},
groups = {dig_immediate=3},
description = "Solar Panel",
description = S("Solar Panel"),
sounds = default.node_sound_glass_defaults(),
mesecons = {receptor = {
state = mesecon.state.off,

View File

@ -1,10 +1,12 @@
local S = minetest.get_translator("mesecons_stickyblocks")
-- Sticky blocks can be used together with pistons or movestones to push / pull
-- structures that are "glued" together using sticky blocks
-- All sides sticky block
minetest.register_node("mesecons_stickyblocks:sticky_block_all", {
-- TODO: Rename to “All-Faces Sticky Block” when other sticky blocks become available
description = "Sticky Block",
description = S("Sticky Block"),
tiles = {"mesecons_stickyblocks_sticky.png"},
is_ground_content = false,
groups = {choppy=3, oddly_breakable_by_hand=2},

View File

@ -1,8 +1,10 @@
local S = minetest.get_translator("mesecons_switch")
-- mesecons_switch
mesecon.register_node("mesecons_switch:mesecon_switch", {
paramtype2="facedir",
description="Switch",
description=S("Switch"),
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
on_rightclick = function (pos, node)

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_torch")
--MESECON TORCHES
local rotate_torch_rules = function (rules, param2)
@ -81,7 +83,7 @@ minetest.register_node("mesecons_torch:mesecon_torch_on", {
selection_box = torch_selectionbox,
groups = {dig_immediate=3},
light_source = minetest.LIGHT_MAX-5,
description="Mesecon Torch",
description=S("Mesecon Torch"),
sounds = default.node_sound_defaults(),
mesecons = {receptor = {
state = mesecon.state.on,

View File

@ -1,8 +1,10 @@
local S = minetest.get_translator("mesecons_walllever")
-- WALL LEVER
-- Basically a switch that can be attached to a wall
-- Powers the block 2 nodes behind (using a receiver)
mesecon.register_node("mesecons_walllever:wall_lever", {
description="Lever",
description=S("Lever"),
drawtype = "mesh",
inventory_image = "jeija_wall_lever_inv.png",
wield_image = "jeija_wall_lever_inv.png",

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_wires")
-- naming scheme: wire:(xp)(zp)(xm)(zm)(xpyp)(zpyp)(xmyp)(zmyp)_on/off
-- where x= x direction, z= z direction, y= y direction, p = +1, m = -1, e.g. xpym = {x=1, y=-1, z=0}
-- The (xp)/(zpyp)/.. statements shall be replaced by either 0 or 1
@ -202,7 +204,7 @@ local function register_wires()
end
mesecon.register_node(":mesecons:wire_"..nodeid, {
description = "Mesecon",
description = S("Mesecon"),
drawtype = "nodebox",
inventory_image = "mesecons_wire_inv.png",
wield_image = "mesecons_wire_inv.png",