update translate tool_workshop
This commit is contained in:
parent
5b7ff2bb72
commit
de495e315b
@ -163,8 +163,8 @@ Supply Converter=Преобразователь питания
|
|||||||
Switching Station=Коммутационная станция
|
Switching Station=Коммутационная станция
|
||||||
%s Already Present=
|
%s Already Present=
|
||||||
@1. Supply: @2 Demand: @3=
|
@1. Supply: @2 Demand: @3=
|
||||||
%s Has No Network=%s не имеет сети
|
@1 Has No Network=@1 не имеет сети
|
||||||
%s Tool Workshop=%s Инструментальная мастерская
|
@1 Tool Workshop=@1 Инструментальная мастерская
|
||||||
Upgrade Slots=Обновление слотов
|
Upgrade Slots=Обновление слотов
|
||||||
Tree Tap=Деревянный кран
|
Tree Tap=Деревянный кран
|
||||||
Raw Latex=Сырой латекс
|
Raw Latex=Сырой латекс
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
minetest.register_alias("tool_workshop", "technic:tool_workshop")
|
minetest.register_alias("tool_workshop", "technic:tool_workshop")
|
||||||
|
|
||||||
local S = technic.getter
|
local S = minetest.get_translator("technic")
|
||||||
|
|
||||||
local tube_entry = "^pipeworks_tube_connection_wooden.png"
|
local tube_entry = "^pipeworks_tube_connection_wooden.png"
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ local workshop_demand = {5000, 3500, 2000}
|
|||||||
local workshop_formspec =
|
local workshop_formspec =
|
||||||
"size[8,9;]"..
|
"size[8,9;]"..
|
||||||
"list[current_name;src;3,1;1,1;]"..
|
"list[current_name;src;3,1;1,1;]"..
|
||||||
"label[0,0;"..S("%s Tool Workshop"):format("MV").."]"..
|
"label[0,0;"..S("@1 Tool Workshop", "MV").."]"..
|
||||||
"list[current_name;upgrade1;1,3;1,1;]"..
|
"list[current_name;upgrade1;1,3;1,1;]"..
|
||||||
"list[current_name;upgrade2;2,3;1,1;]"..
|
"list[current_name;upgrade2;2,3;1,1;]"..
|
||||||
"label[1,4;"..S("Upgrade Slots").."]"..
|
"label[1,4;"..S("Upgrade Slots").."]"..
|
||||||
@ -38,7 +38,7 @@ local run = function(pos, node)
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
local eu_input = meta:get_int("MV_EU_input")
|
local eu_input = meta:get_int("MV_EU_input")
|
||||||
local machine_name = S("%s Tool Workshop"):format("MV")
|
local machine_name = S("@1 Tool Workshop", "MV")
|
||||||
|
|
||||||
-- Setup meta data if it does not exist.
|
-- Setup meta data if it does not exist.
|
||||||
if not eu_input then
|
if not eu_input then
|
||||||
@ -66,15 +66,15 @@ local run = function(pos, node)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
if not repairable then
|
if not repairable then
|
||||||
meta:set_string("infotext", S("%s Idle"):format(machine_name))
|
meta:set_string("infotext", S("@1 Idle", machine_name))
|
||||||
meta:set_int("MV_EU_demand", 0)
|
meta:set_int("MV_EU_demand", 0)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if eu_input < workshop_demand[EU_upgrade+1] then
|
if eu_input < workshop_demand[EU_upgrade+1] then
|
||||||
meta:set_string("infotext", S("%s Unpowered"):format(machine_name))
|
meta:set_string("infotext", S("@1 Unpowered", machine_name))
|
||||||
elseif eu_input >= workshop_demand[EU_upgrade+1] then
|
elseif eu_input >= workshop_demand[EU_upgrade+1] then
|
||||||
meta:set_string("infotext", S("%s Active"):format(machine_name))
|
meta:set_string("infotext", S("@1 Active", machine_name))
|
||||||
srcstack:add_wear(-1000)
|
srcstack:add_wear(-1000)
|
||||||
inv:set_stack("src", 1, srcstack)
|
inv:set_stack("src", 1, srcstack)
|
||||||
end
|
end
|
||||||
@ -82,7 +82,7 @@ local run = function(pos, node)
|
|||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("technic:tool_workshop", {
|
minetest.register_node("technic:tool_workshop", {
|
||||||
description = S("%s Tool Workshop"):format("MV"),
|
description = S("@1 Tool Workshop", "MV"),
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
tiles = {
|
tiles = {
|
||||||
"technic_workshop_top.png"..tube_entry,
|
"technic_workshop_top.png"..tube_entry,
|
||||||
@ -98,7 +98,7 @@ minetest.register_node("technic:tool_workshop", {
|
|||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("infotext", S("%s Tool Workshop"):format("MV"))
|
meta:set_string("infotext", S("@1 Tool Workshop", "MV"))
|
||||||
meta:set_string("formspec", workshop_formspec)
|
meta:set_string("formspec", workshop_formspec)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("src", 1)
|
inv:set_size("src", 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user