further in-game doc added, German translation started

master
Joachim Stolberg 2019-07-02 21:33:12 +02:00
parent ac0e8f3978
commit ec9c89c377
82 changed files with 1240 additions and 925 deletions

View File

@ -16,15 +16,13 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local S2P = minetest.string_to_pos
local M = minetest.get_meta
-- Consumer Related Data
local CRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).consumer end
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local STANDBY_TICKS = 6
local COUNTDOWN_TICKS = 4
@ -366,7 +364,7 @@ local tubing = {
}
local node_name_ta2, node_name_ta3, node_name_ta4 =
techage.register_consumer("autocrafter", I("Autocrafter"), tiles, {
techage.register_consumer("autocrafter", S("Autocrafter"), tiles, {
drawtype = "normal",
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
@ -409,3 +407,16 @@ minetest.register_craft({
},
})
techage.register_entry_page("ta2", "autocrafter",
S("TA2 Autocrafter"),
S("The Autocrafter allows the automated crafting of items based on configured recipes.@n"..
"It can craft one item every two seconds.@n"..
"Needs axle power: 4"),
"techage:ta2_autocrafter_pas")
techage.register_entry_page("ta3m", "autocrafter",
S("TA3 Autocrafter"),
S("The Autocrafter allows the automated crafting of items based on configured recipes.@n"..
"It can craft two items every two seconds.@n"..
"Needs electrical power: 6"),
"techage:ta3_autocrafter_pas")

View File

@ -12,8 +12,10 @@
]]--
local S = techage.S
minetest.register_node("techage:blackhole", {
description = "Techage Black Hole",
description = S("Techage Black Hole"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta2.png^techage_frame_ta2.png",
@ -28,7 +30,7 @@ minetest.register_node("techage:blackhole", {
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
meta:set_int("push_dir", techage.side_to_indir("L", node.param2))
meta:set_string("infotext","Techage Black Hole (let items disappear)")
meta:set_string("infotext", S("Techage Black Hole (let items disappear)"))
end,
on_rotate = screwdriver.disallow,
@ -38,8 +40,6 @@ minetest.register_node("techage:blackhole", {
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "techage:blackhole",
recipe = {
@ -60,3 +60,9 @@ techage.register_node({"techage:blackhole"}, {
end
end,
})
techage.register_entry_page("ta", "blackhole",
S("Techage Black Hole"),
S("The Techage Black Hole Block let items disappear. If your machine produces to much or unneeded items, push them into the Black Hole."),
"techage:blackhole")

View File

@ -13,13 +13,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local PlayerActions = {}
local InventoryState = {}
@ -95,7 +90,7 @@ local function formspec2()
end
minetest.register_node("techage:chest_ta2", {
description = I("TA2 Protected Chest"),
description = S("TA2 Protected Chest"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta2.png^techage_frame_ta2.png",
@ -118,7 +113,7 @@ minetest.register_node("techage:chest_ta2", {
meta:set_string("number", number)
meta:set_string("owner", placer:get_player_name())
meta:set_string("formspec", formspec2())
meta:set_string("infotext", I("TA2 Protected Chest").." "..number)
meta:set_string("infotext", S("TA2 Protected Chest").." "..number)
end,
can_dig = can_dig,
@ -144,7 +139,7 @@ local function formspec3()
end
minetest.register_node("techage:chest_ta3", {
description = I("TA3 Protected Chest"),
description = S("TA3 Protected Chest"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta3.png^techage_frame_ta3.png",
@ -167,7 +162,7 @@ minetest.register_node("techage:chest_ta3", {
meta:set_string("number", number)
meta:set_string("owner", placer:get_player_name())
meta:set_string("formspec", formspec3())
meta:set_string("infotext", I("TA3 Protected Chest").." "..number)
meta:set_string("infotext", S("TA3 Protected Chest").." "..number)
end,
can_dig = can_dig,
@ -193,7 +188,7 @@ local function formspec4()
end
minetest.register_node("techage:chest_ta4", {
description = I("TA4 Protected Chest"),
description = S("TA4 Protected Chest"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta4.png^techage_frame_ta4_top.png",
@ -216,7 +211,7 @@ minetest.register_node("techage:chest_ta4", {
meta:set_string("number", number)
meta:set_string("owner", placer:get_player_name())
meta:set_string("formspec", formspec4())
meta:set_string("infotext", I("TA4 Protected Chest").." "..number)
meta:set_string("infotext", S("TA4 Protected Chest").." "..number)
end,
can_dig = can_dig,
@ -261,7 +256,7 @@ techage.register_node({"techage:chest_ta2", "techage:chest_ta3", "techage:chest_
local meta = minetest.get_meta(pos)
meta:set_string("dest_num", payload)
local number = meta:get_string("number")
meta:set_string("infotext", I("TA2 Protected Chest").." "..number.." connected with "..payload)
meta:set_string("infotext", S("TA Protected Chest").." "..number.." "..S("connected with").." "..payload)
return true
end
else
@ -282,3 +277,19 @@ minetest.register_craft({
output = "techage:chest_ta3",
recipe = {"techage:chest_ta2", "techage:tubeS", "techage:vacuum_tube"}
})
local help = S("The Protected Chest is useful in protected areas (by means of any protection mod).@n"..
"Only players with interaction rights on that position can take/put item from/to the chest.@n"..
"The Chest supports commands to read the last player action (player-name, take/put, item-name) "..
"and the chest state ('empty', 'loaded', 'full').@n"..
"The chest returns 'loaded' when it is not empty and not full, "..
"'full' is returned, when no empty stack is available.@n")
techage.register_entry_page("ta2", "chest",
S("TA2 Protected Chest"),
S("The Protected Chest is useful in protected areas (by means of any protection mod).@n"..
"Only players with interaction rights on that position can take/put item from/to the chest."),
"techage:chest_ta2")
techage.register_entry_page("ta3m", "chest",
S("TA3 Protected Chest"), help, "techage:chest_ta3")

View File

@ -13,16 +13,12 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local N = minetest.get_node
-- Consumer Related Data
local CRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).consumer end
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local SRC_INV_SIZE = 8
@ -353,7 +349,7 @@ local tubing = {
}
local node_name_ta2, node_name_ta3, node_name_ta4 =
techage.register_consumer("distributor", I("Distributor"), tiles, {
techage.register_consumer("distributor", S("Distributor"), tiles, {
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
formspec = formspec,
@ -414,3 +410,20 @@ minetest.register_craft({
{"", "techage:vacuum_tube", ""},
},
})
local help = S("The Distributor works as filter and pusher. It allows to divide and distribute incoming items into the 4 output ports. "..
"The channels can be switched on/off and individually configured with up to 6 item types. "..
"The filter passes the configured items and restrains all others. "..
"Unconfigured but activated filters are used for items, which do not fit to all other filters. "..
"If the Distributor cant push an item into a block with an inventory (such as a chest) because that inventory is full, "..
"but there is one open and unconfigured output, it will use this output port.")
techage.register_entry_page("ta2", "distributor",
S("TA2 Distributor"),
help..S("@nThe Distributor tries to push 4 items every 2 seconds."),
"techage:ta2_distributor_pas")
techage.register_entry_page("ta3m", "distributor",
S("TA3 Distributor"),
help..S("@nThe Distributor tries to push 12 items every 2 seconds."),
"techage:ta3_distributor_pas")

View File

@ -13,16 +13,11 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Consumer Related Data
local CRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).consumer end
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local STANDBY_TICKS = 10
local COUNTDOWN_TICKS = 6
local CYCLE_TIME = 6
@ -235,7 +230,7 @@ local tubing = {
}
local node_name_ta2, node_name_ta3, node_name_ta4 =
techage.register_consumer("electronic_fab", I("Electronic Fab"), tiles, {
techage.register_consumer("electronic_fab", S("Electronic Fab"), tiles, {
drawtype = "normal",
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
@ -277,19 +272,19 @@ minetest.register_craft({
})
minetest.register_craftitem("techage:vacuum_tube", {
description = I("TA3 Vacuum Tubes"),
description = S("TA3 Vacuum Tubes"),
inventory_image = "techage_vacuum_tube.png",
})
minetest.register_craftitem("techage:wlanchip", {
description = I("TA4 WLAN Chip"),
minetest.register_craftitem("techage:ta4_wlanchip", {
description = S("TA4 WLAN Chip"),
inventory_image = "techage_wlanchip.png",
})
if minetest.global_exists("unified_inventory") then
unified_inventory.register_craft_type("electronic_fab", {
description = I("Electronic Fab"),
description = S("Electronic Fab"),
icon = 'techage_filling_ta2.png^techage_appl_electronic_fab.png^techage_frame_ta2.png',
width = 2,
height = 2,
@ -306,7 +301,19 @@ if minetest.global_exists("unified_inventory") then
})
end
techage.register_help_page(I("TA2 Electronic Fab"),
I([[Used to produce Vacuum Pipes,
needed for TA3 machines.]]), "techage:ta2_electronic_fab_pas")
techage.register_entry_page("ta2", "electronic_fab",
S("TA2 Electronic Fab"),
S("Used to produce Vacuum Pipes, needed for TA3 machines.@n"..
"The fab produces 1 item every 6 seconds.@n"..
"It needs 8 units axle power"),
"techage:ta2_electronic_fab_pas")
techage.register_entry_page("ta3m", "electronic_fab",
S("TA3 Electronic Fab"),
S("Used to produce WLAN Chips, needed for TA4 machines.@n"..
"The fab produces 1 item every 6 seconds.@n"..
"It needs 12 units electrical power."),
"techage:ta3_electronic_fab_pas")

View File

@ -13,9 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local S = techage.S
local function calc_area(pos)
local xpos = (math.floor(pos.x / 16) * 16)
@ -99,9 +99,9 @@ local function formspec(player)
local pos1, pos2 = calc_area(pos)
local ypos = 0.2 + idx * 0.4
tRes[#tRes+1] = "label[0,"..ypos..";"..idx.."]"
tRes[#tRes+1] = "label[0.8,"..ypos..";"..S(pos1).."]"
tRes[#tRes+1] = "label[0.8,"..ypos..";"..P2S(pos1).."]"
tRes[#tRes+1] = "label[3.2,"..ypos..";to]"
tRes[#tRes+1] = "label[4,"..ypos..";"..S(pos2).."]"
tRes[#tRes+1] = "label[4,"..ypos..";"..P2S(pos2).."]"
end
return table.concat(tRes)
end
@ -129,9 +129,9 @@ minetest.register_node("techage:forceload", {
if add_pos(pos, placer) then
minetest.forceload_block(pos, true)
local pos1, pos2, num, max = get_data(pos, placer)
M(pos):set_string("infotext", "Area "..S(pos1).." to "..S(pos2).." loaded!\n"..
M(pos):set_string("infotext", "Area "..P2S(pos1).." to "..P2S(pos2).." loaded!\n"..
"Punch the block to make the area visible.")
chat(placer, "Area ("..num.."/"..max..") "..S(pos1).." to "..S(pos2).." loaded!")
chat(placer, "Area ("..num.."/"..max..") "..P2S(pos1).." to "..P2S(pos2).." loaded!")
techage.mark_region(placer:get_player_name(), pos1, pos2)
M(pos):set_string("owner", placer:get_player_name())
else
@ -200,3 +200,15 @@ minetest.register_on_leaveplayer(function(player)
minetest.forceload_free_block(pos, true)
end
end)
techage.register_entry_page("ta", "forceload",
S("Techage Forceload Block"),
S("The Forceload Block keeps the corresponding area loaded and the machines operational "..
"as far as the player is logged in. If the player leaves the game, all areas will be unloaded.@n"..
"The maximum number of Forceload Blocks per player is configurable (default 16).@n"..
"The loaded area per block is a cube with 16 m side length (according to a Minetest area block). "..
"Punching the block makes the area visible and invisible again."),
"techage:forceload")

View File

@ -13,16 +13,12 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local S = techage.S
-- Consumer Related Data
local CRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).consumer end
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local STANDBY_TICKS = 10
local COUNTDOWN_TICKS = 10
local CYCLE_TIME = 4
@ -252,7 +248,7 @@ local tubing = {
}
local node_name_ta2, node_name_ta3, node_name_ta4 =
techage.register_consumer("rinser", I("Gravel Rinser"), tiles, {
techage.register_consumer("rinser", S("Gravel Rinser"), tiles, {
drawtype = "nodebox",
node_box = {
type = "fixed",
@ -304,7 +300,7 @@ minetest.register_craft({
if minetest.global_exists("unified_inventory") then
unified_inventory.register_craft_type("rinsing", {
description = I("Rinsing"),
description = S("Rinsing"),
icon = "techage_appl_rinser_top.png^techage_frame_ta2_top.png",
width = 2,
height = 2,
@ -343,8 +339,26 @@ minetest.register_lbm({
techage.add_rinser_recipe({input="techage:sieved_gravel", output="techage:usmium_nuggets", probability=40})
techage.add_rinser_recipe({input="techage:sieved_gravel", output="default:copper_lump", probability=20})
techage.register_help_page(I("TA2 Gravel Rinser"),
I([[Used to wash Sieved Gravel to get Usmium Nuggets.
The block has to be placed under flowing water.
The washed-out nuggets must be
sucked in with a Hopper.]]), "techage:ta2_rinser_pas")
local Tube = "techage_tube_knee.png"
local Tube2 = "techage_tube_knee.png^[transformR270"
local Rinser = "techage_filling_ta2.png^techage_appl_rinser.png^techage_frame_ta2.png"
local Hopper = "techage_hopper.png"
local Glass = "default_glass.png"
local Water = "default_water.png"
local Chest = "default_chest_lock.png"
local Dirt = "default_dirt.png"
local Images = {
{false, false, false, false, false, false, false, false},
{false, Glass, false, false, false, false, Water, Glass},
{false, Chest, Hopper, Tube, Rinser, Tube2, Glass, Glass},
}
techage.register_entry_page("ta2", "rinser",
S("TA2 Gravel Rinser"),
S("Used to wash Sieved Gravel to get Usmium Nuggets. The block has to be placed under flowing water. "..
"The washed-out nuggets must be sucked in with a Hopper.@nFor the plant you need a chest, "..
"the Hopper, the Rinser with tube support and a frame around the flowing water (see plan).@n"..
"Hint: You can test the Rinser with some sticks that are washed out immediately.@n"..
"It needs 3 units axle power"),
nil, Images)

View File

@ -13,16 +13,12 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local S = techage.S
-- Consumer Related Data
local CRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).consumer end
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local STANDBY_TICKS = 10
local COUNTDOWN_TICKS = 10
local CYCLE_TIME = 4
@ -189,7 +185,7 @@ local tubing = {
}
local node_name_ta2, node_name_ta3, node_name_ta4 =
techage.register_consumer("gravelsieve", I("Gravel Sieve"), tiles, {
techage.register_consumer("gravelsieve", S("Gravel Sieve"), tiles, {
drawtype = "nodebox",
node_box = {
type = "fixed",
@ -243,3 +239,18 @@ minetest.register_craft({
{"", "techage:vacuum_tube", ""},
},
})
techage.register_entry_page("ta2", "gravelsieve",
S("TA2 Gravel Sieve"),
S("To sieve Gravel and Basalt Gravel to get ores. Use a Grinder to make Gravel from Cobblestone.@n"..
"It can sieve one item every four seconds.@n"..
"It needs 3 units axle power."),
"techage:ta2_gravelsieve_pas")
techage.register_entry_page("ta3m", "gravelsieve",
S("TA3 Gravel Sieve"),
S("To sieve Gravel and Basalt Gravel to get ores. Use a Grinder to make Gravel from Cobblestone.@n"..
"It can sieve two items every four seconds.@n"..
"It needs 4 units electrical power."),
"techage:ta3_gravelsieve_pas")

View File

@ -13,15 +13,11 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Consumer Related Data
local CRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).consumer end
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local STANDBY_TICKS = 6
local COUNTDOWN_TICKS = 4
@ -195,7 +191,7 @@ local tubing = {
}
local node_name_ta2, node_name_ta3, node_name_ta4 =
techage.register_consumer("grinder", I("Grinder"), tiles, {
techage.register_consumer("grinder", S("Grinder"), tiles, {
drawtype = "nodebox",
node_box = {
type = "fixed",
@ -252,7 +248,7 @@ minetest.register_craft({
if minetest.global_exists("unified_inventory") then
unified_inventory.register_craft_type("grinding", {
description = I("Grinding"),
description = S("Grinding"),
icon = 'techage_appl_grinder.png',
width = 2,
height = 2,
@ -295,3 +291,19 @@ techage.add_grinder_recipe({input="default:jungletree", output="default:junglele
techage.add_grinder_recipe({input="default:pine_tree", output="default:pine_needles 8"})
techage.add_grinder_recipe({input="default:acacia_tree", output="default:acacia_leaves 8"})
techage.add_grinder_recipe({input="default:aspen_tree", output="default:aspen_leaves 8"})
techage.register_entry_page("ta2", "grinder",
S("TA2 Grinder"),
S("The Grinder grinds all kinds of cobblestone to gravel, gravel to sand, sand to clay, wood to leaves, and more.@n"..
"It can grind one item every four seconds.@n"..
"It needs 4 units axle power."),
"techage:ta2_grinder_pas")
techage.register_entry_page("ta3m", "grinder",
S("TA3 Grinder"),
S("The Grinder grinds all kinds of cobblestone to gravel, gravel to sand, sand to clay, wood to leaves, and more.@n"..
"It can grind two items every four seconds.@n"..
"It needs 6 units electrical power."),
"techage:ta3_grinder_pas")

View File

@ -23,15 +23,11 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local S = techage.S
-- Consumer Related Data
local CRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).consumer end
local CRDN = function(node) return (minetest.registered_nodes[node.name] or {}).consumer end
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local STANDBY_TICKS = 10
local COUNTDOWN_TICKS = 10
@ -128,7 +124,7 @@ local tubing = {
}
local node_name_ta2, node_name_ta3, node_name_ta4 =
techage.register_consumer("pusher", I("Pusher"), tiles, {
techage.register_consumer("pusher", S("Pusher"), tiles, {
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
tubing = tubing,
@ -167,3 +163,25 @@ minetest.register_craft({
{"", "techage:vacuum_tube", ""},
},
})
techage.register_entry_page("ta2", "pusher",
S("TA2 Pusher"),
S("The Pusher is a pulling/pushing block, moving items from one inventory block to another (e.g. chests). "..
"Start the Pusher with a right-click. It shows the state 'running' as infotext. "..
"The Pusher moves items from left to right (IN to OUT).@n"..
"If the source chest is empty, the Pusher goes into 'standby' state for some seconds. If the destination "..
"chest is full, the Pusher goes into 'blocked' state.@n"..
"The TA2 Pusher moves two items every 2 seconds."),
"techage:ta2_pusher_pas")
techage.register_entry_page("ta3m", "pusher",
S("TA3 Pusher"),
S("The Pusher is a pulling/pushing block, moving items from one inventory block to another (e.g. chests). "..
"Start the Pusher with a right-click. It shows the state 'running' as infotext. "..
"The Pusher moves items from left to right (IN to OUT).@n"..
"If the source chest is empty, the Pusher goes into 'standby' state for some seconds. If the destination "..
"chest is full, the Pusher goes into 'blocked' state.@n"..
"The TA3 Pusher moves 6 items every 2 seconds."),
"techage:ta3_pusher_pas")

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local TA2_Power = techage.Axle
local TA3_Power = techage.SteamPipe
@ -39,7 +35,7 @@ local function formspec(self, pos, mem)
default.gui_slots..
"image[6,0.5;1,2;"..techage.power.formspec_power_bar(PWR_CAPA, mem.provided).."]"..
"image_button[5,1;1,1;".. self:get_state_button_image(mem) ..";state_button;]"..
"button[2.5,1;1.8,1;update;"..I("Update").."]"..
"button[2.5,1;1.8,1;update;"..S("Update").."]"..
"list[current_player;main;0,3;8,4;]"..
default.get_hotbar_bg(0, 3)
end
@ -117,7 +113,7 @@ local function on_rightclick(pos)
end
minetest.register_node("techage:t2_source", {
description = "Axle Power Source",
description = S("Axle Power Source"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta2.png^techage_frame_ta2_top.png",
@ -146,7 +142,7 @@ minetest.register_node("techage:t2_source", {
})
minetest.register_node("techage:t3_source", {
description = "Steam Power Source",
description = S("Steam Power Source"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta3.png^techage_frame_ta3_top.png",
@ -175,7 +171,7 @@ minetest.register_node("techage:t3_source", {
})
minetest.register_node("techage:t4_source", {
description = "Ele Power Source",
description = S("Ele Power Source"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta4.png^techage_frame_ta4_top.png",

View File

@ -1,22 +0,0 @@
--[[
TechAge
=======
Copyright (C) 2019 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
TA2 help pages for basic machines
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
techage.register_help_page(I("TA2 Autocrafter"),
I([[Supports automated crafting of items.
Crafts 1 item in 2 seconds.
Needs axle power: 4]]), "techage:ta2_autocrafter_pas")

View File

@ -1,22 +0,0 @@
--[[
TechAge
=======
Copyright (C) 2019 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
TA3 help pages for basic machines
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
techage.register_help_page(I("TA3 Autocrafter"),
I([[Supports automated crafting of items.
Crafts 2 items in 2 seconds.
Needs electrical power: 6]]), "techage:ta3_autocrafter_pas")

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
techage.assemble = {}
@ -79,14 +75,14 @@ local function check_space(pos, param2, AssemblyPlan, player_name)
local y, path, node_name = item[1], item[2], item[4]
local pos1 = dest_pos(pos, param2, path, y)
if minetest.is_protected(pos1, player_name) then
minetest.chat_send_player(player_name, I("[TA] Area is protected!"))
minetest.chat_send_player(player_name, S("[TA] Area is protected!"))
return false
end
local node = minetest.get_node(pos1)
local ndef = minetest.registered_nodes[node.name]
if not ndef or ndef.walkable and node.name ~= node_name then
minetest.chat_send_player(player_name, I("[TA] Not enough space!"))
minetest.chat_send_player(player_name, S("[TA] Not enough space!"))
return false
end
end

View File

@ -13,12 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
techage.firebox = {}
@ -50,9 +47,9 @@ function techage.firebox.formspec(mem)
"list[current_name;fuel;1,0.5;1,1;]"..
"image[2,0.5;1,1;default_furnace_fire_bg.png^[lowpart:"..
fuel_percent..":default_furnace_fire_fg.png]"..
"label[4.5,0.1;"..I("Power")..":]"..
"label[4.5,0.1;"..S("Power")..":]"..
"dropdown[6,0;1.8;power_level;25%,50%,75%,100%;"..mem.power_level.."]"..
"button[1,1.5;1.8,1;update;"..I("Update").."]"..
"button[1,1.5;1.8,1;update;"..S("Update").."]"..
"list[current_player;main;0,2.8;8,4;]"..
"listring[current_name;fuel]"..
"listring[current_player;main]"..
@ -65,7 +62,7 @@ function techage.firebox.formspec(mem)
"list[current_name;fuel;1,0.5;1,1;]"..
"image[3,0.5;1,1;default_furnace_fire_bg.png^[lowpart:"..
fuel_percent..":default_furnace_fire_fg.png]"..
"button[5,0.5;1.8,1;update;"..I("Update").."]"..
"button[5,0.5;1.8,1;update;"..S("Update").."]"..
"list[current_player;main;0,2;8,4;]"..
"listring[current_name;fuel]"..
"listring[current_player;main]"..
@ -74,7 +71,6 @@ function techage.firebox.formspec(mem)
end
function techage.firebox.can_dig(pos, player)
local mem = tubelib2.get_mem(pos)
local inv = M(pos):get_inventory()
return inv:is_empty("fuel")
end

View File

@ -12,22 +12,77 @@
]]--
local S = techage.S
local Categories = {} -- ordered list of chapters
local EntryOrders = {} -- ordered entry lists of categories
local HelpPages = {} -- help data as key/value table
local formspec_context = {}
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
local DUMMY = {
name = "unknown",
text = "unknown",
item_name = "-",
images = "none"
}
local Recipes = {}
local ItemNames = {}
local RecipeList = {}
local PlanImages = {}
local NamesAsStr = ""
-- formspec list of entries
local function entries_as_string(player_name)
local category = formspec_context[player_name].category or Categories[1]
local tbl = {}
for _,cat in ipairs(Categories) do
if cat == category and not formspec_context[player_name].close_tree then
tbl[#tbl+1] = minetest.formspec_escape("V "..HelpPages[cat][cat].name)
for _,item in ipairs(EntryOrders[category]) do
if item ~= cat then
local name = item
if HelpPages[category][item] then
name = HelpPages[category][item].name
end
tbl[#tbl+1] = minetest.formspec_escape(" +- "..name)
end
end
else
tbl[#tbl+1] = minetest.formspec_escape("> "..HelpPages[cat][cat].name)
end
end
formspec_context[player_name].list_len = #tbl
return table.concat(tbl, ",") or ""
end
-- Translate given index into a HelpPage category and key
local function get_ref(player_name)
local category = formspec_context[player_name].category or Categories[1]
local index = formspec_context[player_name].index or 1
index = techage.range(index, 1, formspec_context[player_name].list_len or 1)
local offs = 0
for idx1,cat in ipairs(Categories) do
if idx1 + offs == index then
formspec_context[player_name].category = cat
formspec_context[player_name].index = idx1
return cat, cat -- category
end
if cat == category and not formspec_context[player_name].close_tree then
for idx2,item in ipairs(EntryOrders[category]) do
if idx1 + idx2 - 1 == index then
formspec_context[player_name].category = cat
formspec_context[player_name].index = index
return cat, item -- no category
end
end
offs = #EntryOrders[category] - 1
end
end
-- return any entry by default
formspec_context[player_name].category = Categories[1]
return Categories[1], Categories[1]
end
-- formspec images
local function plan(images)
local tbl = {}
if images == "none" then return "label[1,3;No plan available" end
if images == "none" then return "label[1,3;"..S("No plan available") end
for y=1,#images do
for x=1,#images[1] do
local img = images[y][x] or false
@ -40,15 +95,19 @@ local function plan(images)
return table.concat(tbl)
end
local function formspec_help(idx)
local function formspec_help(player_name)
local bttn
local cat, key = get_ref(player_name)
local hdef = HelpPages[cat][key] or DUMMY
local index = formspec_context[player_name].index or 1
local box = "box[7.5,0.9;1,1.1;#BBBBBB]"
if ItemNames[idx] == "-" then
if hdef.item_name == "-" then
bttn = ""
elseif ItemNames[idx] == "plan" then
elseif hdef.item_name == "plan" then
bttn = "button[7.6,1;1,1;plan;"..S("Plan").."]"
else
bttn = box.."item_image[7.6,1;1,1;"..ItemNames[idx].."]"
bttn = box.."item_image[7.6,1;1,1;"..hdef.item_name.."]"
end
return "size[9,9]"..
default.gui_bg..
@ -56,19 +115,21 @@ local function formspec_help(idx)
default.gui_slots..
"item_image[7.6,0;1,1;techage:construction_board]"..
bttn..
"table[0.1,0;7,3;page;"..NamesAsStr..";"..idx.."]"..
"textarea[0.3,3.7;9,6.2;help;"..S("Help")..":;"..Recipes[idx].."]"..
"box[0,3.7;8.775,5.25;#000000]"
"table[0.1,0;7,4;page;"..entries_as_string(player_name)..";"..index.."]"..
"textarea[0.3,4.7;9,5.3;help;"..S("Help")..":;"..hdef.text.."]"..
"box[0,4.75;8.775,4.45;#000000]"
end
local function formspec_plan(idx)
local function formspec_plan(player_name)
local cat, key = get_ref(player_name)
local hdef = HelpPages[cat][key] or DUMMY
return "size[9,9]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"label[0,0;"..RecipeList[idx]..":]"..
"label[0,0;"..hdef.name..":]"..
"button[8,0;1,0.8;back;<<]"..
plan(PlanImages[idx])
plan(hdef.images)
end
local board_box = {
@ -88,27 +149,33 @@ minetest.register_node("techage:construction_board", {
after_place_node = function(pos, placer, itemstack)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", formspec_help(1))
local player_name = placer:get_player_name()
formspec_context[player_name] = formspec_context[player_name] or {}
meta:set_string("formspec", formspec_help(player_name))
end,
on_receive_fields = function(pos, formname, fields, player)
if minetest.is_protected(pos, player:get_player_name()) then
local player_name = player:get_player_name()
if minetest.is_protected(pos, player_name) then
return
end
local meta = minetest.get_meta(pos)
local idx = meta:get_int("help_idx")
idx = techage.range(idx, 1, #Recipes)
formspec_context[player_name] = formspec_context[player_name] or {}
if fields.plan then
meta:set_string("formspec", formspec_plan(idx))
meta:set_string("formspec", formspec_plan(player_name))
elseif fields.back then
meta:set_string("formspec", formspec_help(idx))
meta:set_string("formspec", formspec_help(player_name))
elseif fields.page then
local evt = minetest.explode_table_event(fields.page)
if evt.type == "CHG" then
local idx = tonumber(evt.row)
idx = techage.range(idx, 1, #Recipes)
meta:set_int("help_idx", idx)
meta:set_string("formspec", formspec_help(idx))
idx = techage.range(idx, 1, formspec_context[player_name].list_len or 1)
-- unfold/close the tree
if formspec_context[player_name].index == idx then
formspec_context[player_name].close_tree = not formspec_context[player_name].close_tree
end
formspec_context[player_name].index = idx
meta:set_string("formspec", formspec_help(player_name))
end
end
end,
@ -131,18 +198,31 @@ minetest.register_craft({
})
function techage.register_entry_page(category, entry, name, text, item_name, images)
if HelpPages[category] then
HelpPages[category][entry] = {
name = name,
text = text,
item_name = item_name or "plan",
images = images or "none"
}
else
minetest.log("error", "[techage] help category '"..category.."' does not exist!")
end
end
function techage.register_category_page(category, name, text, item_name, entry_order, images)
Categories[#Categories + 1] = category
HelpPages[category] = {}
techage.register_entry_page(category, category, name, text, item_name, images or "none")
table.insert(entry_order, 1, category)
EntryOrders[category] = entry_order
end
function techage.register_help_page(name, text, item_name, images)
RecipeList[#RecipeList+1] = " "..name
ItemNames[#ItemNames+1] = item_name or "plan"
NamesAsStr = table.concat(RecipeList, ",") or ""
Recipes[#Recipes+1] = text
PlanImages[#PlanImages+1] = images or "none"
end
function techage.register_chap_page(name, text, item_name)
RecipeList[#RecipeList+1] = name
ItemNames[#ItemNames+1] = item_name or "-"
NamesAsStr = table.concat(RecipeList, ",") or ""
Recipes[#Recipes+1] = text
PlanImages[#PlanImages+1] = "none"
end

View File

@ -1,45 +0,0 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

View File

@ -13,14 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
-- Input data to generate the Param2ToDir table
local Input = {
8,9,10,11, -- 1

View File

@ -13,13 +13,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local CYCLE_TIME = 2
local PWR_PERF = 10
@ -42,7 +37,7 @@ local function formspec(self, pos, mem)
default.gui_slots..
"image[0,0.5;1,2;"..techage.power.formspec_power_bar(PWR_CAPA, mem.capa).."]"..
"label[0.2,2.5;Load]"..
"button[1.1,1;1.8,1;update;"..I("Update").."]"..
"button[1.1,1;1.8,1;update;"..S("Update").."]"..
"image_button[3,1;1,1;".. self:get_state_button_image(mem) ..";state_button;]"..
"image[4,0.5;1,2;"..techage.power.formspec_load_bar(-(mem.delivered or 0), PWR_PERF).."]"..
"label[4.2,2.5;Flow]"
@ -123,7 +118,7 @@ local function set_capa(pos, oldnode, digger, capa)
capa = techage.power.percent(PWR_CAPA, capa)
capa = (math.floor((capa or 0) / 5)) * 5
meta:set_int("capa", capa)
local text = I("TA3 Akku Box").." ("..capa.." %)"
local text = S("TA3 Akku Box").." ("..capa.." %)"
meta:set_string("description", text)
local inv = minetest.get_inventory({type="player", name=digger:get_player_name()})
local left_over = inv:add_item("main", node)
@ -133,7 +128,7 @@ local function set_capa(pos, oldnode, digger, capa)
end
minetest.register_node("techage:ta3_akku", {
description = I("TA3 Akku Box"),
description = S("TA3 Akku Box"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta3.png^techage_frame_ta3_top.png",
@ -175,10 +170,11 @@ techage.power.register_node({"techage:ta3_akku"}, {
power_network = Power,
})
techage.register_help_page(I("TA3 Akku Box"),
I([[Used to store electrical energy.
Charged in about 10 min,
provides energy for 10 min.]]), "techage:ta3_akku")
techage.register_entry_page("ta3ps", "akku",
S("TA3 Akku Box"),
S("Used to store electrical energy. Charged in about 10 min, provides energy for 10 min.@n"..
"It take and deliver up to 10 units electrical power."),
"techage:ta3_akku")
minetest.register_craft({

View File

@ -13,18 +13,13 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Pipe = techage.SteamPipe
minetest.register_node("techage:coalboiler_base", {
description = I("TA3 Boiler Base"),
description = S("TA3 Boiler Base"),
tiles = {"techage_coal_boiler_mesh_base.png"},
drawtype = "mesh",
mesh = "techage_boiler_large.obj",
@ -69,9 +64,8 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA3 Boiler Base"),
I([[Part of the Coal Power Station.
Has to be placed on top of the
TA3 Coal Power Station Firebox
and filled with water.
(see TA3 Coal Power Station)]]), "techage:coalboiler_base")
techage.register_entry_page("ta3ps", "coalboiler_base",
S("TA3 Boiler Base"),
S("Part of the Coal Power Station. Has to be placed on top of the TA3 Coal Power Station Firebox and filled with water.@n"..
"(see TA3 Coal Power Station)"),
"techage:coalboiler_base")

View File

@ -13,13 +13,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local CYCLE_TIME = 4
local STANDBY_TICKS = 2
@ -58,7 +53,7 @@ local function formspec(self, pos, mem)
temp..":techage_form_temp_fg.png]"..
"image[7,0.5;1,2;"..techage.power.formspec_power_bar(1, ratio).."]"..
"image_button[6,1;1,1;".. self:get_state_button_image(mem) ..";state_button;]"..
"button[3,1.5;2,1;update;"..I("Update").."]"..
"button[3,1.5;2,1;update;"..S("Update").."]"..
"list[current_player;main;0,3;8,4;]"..
"listring[current_name;water]"..
"listring[current_player;main]"..
@ -225,7 +220,7 @@ local function allow_metadata_inventory_take(pos, listname, index, stack, player
end
minetest.register_node("techage:coalboiler_top", {
description = I("TA3 Boiler Top"),
description = S("TA3 Boiler Top"),
tiles = {"techage_coal_boiler_mesh_top.png"},
drawtype = "mesh",
mesh = "techage_boiler_large.obj",
@ -296,7 +291,8 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA3 Boiler Top"),
I([[Part of the Coal Power Station.
Has to be placed on top of TA3 Power Station Boiler Base.
(see TA3 Coal Power Station)]]), "techage:coalboiler_top")
techage.register_entry_page("ta3ps", "coalboiler_top",
S("TA3 Boiler Top"),
S("Part of the Coal Power Station. Has to be placed on top of TA3 Power Station Boiler Base.@n"..
"(see TA3 Coal Power Station)"),
"techage:coalboiler_top")

View File

@ -13,13 +13,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Pipe = techage.SteamPipe
@ -43,7 +38,7 @@ local function after_tube_update(node, pos, out_dir, peer_pos, peer_in_dir)
end
minetest.register_node("techage:cooler", {
description = I("TA3 Cooler"),
description = S("TA3 Cooler"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta3.png^techage_appl_cooler.png^techage_frame_ta3.png",
@ -138,9 +133,9 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA3 Cooler"),
I([[Part of the Coal Power Station.
Has to be placed in the steam circulation
after the Turbine.
(see TA3 Coal Power Station)]]), "techage:cooler")
techage.register_entry_page("ta3ps", "cooler",
S("TA3 Cooler"),
S("Part of the Coal Power Station. Has to be placed in the steam circulation after the Turbine.@n"..
"(see TA3 Coal Power Station)"),
"techage:cooler")

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local firebox = techage.firebox
@ -79,7 +75,7 @@ local function start_firebox(pos, mem)
end
minetest.register_node("techage:coalfirebox", {
description = I("TA3 Coal Power Station Firebox"),
description = S("TA3 Coal Power Station Firebox"),
inventory_image = "techage_coal_boiler_inv.png",
tiles = {"techage_coal_boiler_mesh_top.png"},
drawtype = "mesh",
@ -127,7 +123,7 @@ minetest.register_node("techage:coalfirebox", {
})
minetest.register_node("techage:coalfirehole", {
description = I("TA3 Coal Power Station Firebox"),
description = S("TA3 Coal Power Station Firebox"),
tiles = {
-- up, down, right, left, back, front
"techage_coal_boiler.png",
@ -153,7 +149,7 @@ minetest.register_node("techage:coalfirehole", {
})
minetest.register_node("techage:coalfirehole_on", {
description = I("TA3 Coal Power Station Firebox"),
description = S("TA3 Coal Power Station Firebox"),
tiles = {
-- up, down, right, left, back, front
"techage_coal_boiler.png^[colorize:black:80",

View File

@ -13,13 +13,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local STANDBY_TICKS = 4
local COUNTDOWN_TICKS = 4
@ -37,7 +32,7 @@ local function formspec(self, pos, mem)
default.gui_slots..
"image[6,0.5;1,2;"..techage.power.formspec_power_bar(PWR_CAPA, mem.provided).."]"..
"image_button[5,1;1,1;".. self:get_state_button_image(mem) ..";state_button;]"..
"button[2,1.5;2,1;update;"..I("Update").."]"..
"button[2,1.5;2,1;update;"..S("Update").."]"..
"list[current_player;main;0,3;8,4;]"..
default.get_hotbar_bg(0, 3)
end
@ -65,7 +60,7 @@ local State = techage.NodeStates:new({
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
formspec_func = formspec,
infotext_name = "TA3 Generator",
infotext_name = S("TA3 Generator"),
can_start = can_start,
start_node = start_node,
stop_node = stop_node,
@ -110,7 +105,7 @@ local function on_rightclick(pos)
end
minetest.register_node("techage:generator", {
description = I("TA3 Generator"),
description = S("TA3 Generator"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta3.png^techage_frame_ta3.png",
@ -142,7 +137,7 @@ minetest.register_node("techage:generator", {
})
minetest.register_node("techage:generator_on", {
description = I("TA3 Generator"),
description = S("TA3 Generator"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta3.png^techage_frame_ta3.png",
@ -229,10 +224,9 @@ techage.register_node({"techage:generator", "techage:generator_on"}, {
end,
})
techage.register_help_page(I("TA3 Generator"),
I([[Part of the Coal Power Station.
Has to be placed side by side
with the TA3 Turbine.
Connect the Generator with your TA3 machines
by means of Electric Cables and Junction Boxes
(see TA3 Coal Power Station)]]), "techage:generator")
techage.register_entry_page("ta3ps", "generator",
S("TA3 Generator"),
S("Part of the Coal Power Station. Has to be placed side by side with the TA3 Turbine. "..
"Connect the Generator with your TA3 machines by means of Electric Cables and Junction Boxes@n"..
"(see TA3 Coal Power Station)"),
"techage:generator")

View File

@ -1,89 +0,0 @@
--[[
TechAge
=======
Copyright (C) 2019 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
TA3 Coal Power Station Help
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
techage.register_chap_page(S("Electrical Age (TA3)"), S([[The Electrical Age is the third level of the available technic stages.
The goal of TA3 is to build a Coal Power Station and machines
to produce ores and chips for smart TA4 devices and machines.]]), "techage:wlanchip")
local HelpText = S([[1. Build a Coal Power Station according
to the plan with TA3 Firebox, TA3 Boiler,
Steam Pipes, Cooler, Turbine and Generator.
2. Heat the Firebox with coal/charcoal
3. Fill the boiler with water (more than one bucket is needed)
4. Wait until the water is heated
5. Open the steam ventil
6. Connect the Generator with your machines by means of cables and junction boxes
7. Start the Generator]])
local Images = {
{false, false, false, false, false, false, false},
{"techage_steam_knee.png", 'techage_steam_pipe.png', 'techage_steam_pipe.png',
'techage_steam_pipe.png', 'techage_steam_pipe.png', 'techage_steam_pipe.png', "techage_steam_knee.png^[transformR270"},
{'techage_steam_pipe.png^[transformR90', "techage_boiler_top_ta3.png", 'techage_steam_pipe.png',
'techage_steam_knee.png^[transformR270', 'techage_steam_knee.png',
"techage_filling_ta3.png^techage_frame_ta3.png^techage_cooler.png",
"techage_steam_knee.png^[transformR180"},
{"techage_steam_knee.png^[transformR90", "techage_boiler_bottom_ta3.png", false, 'techage_steam_pipe.png^[transformR90',
'techage_steam_pipe.png^[transformR90'},
{false, "techage_firebox_ta3.png", false, "techage_steam_knee.png^[transformR90",
"techage_filling_ta3.png^techage_appl_turbine.png^techage_frame_ta3.png",
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_generator.png"},
}
techage.register_help_page("Coal Power Station", HelpText, nil, Images)
local PowerConsumption = S([[
Power consumption and supply:
- TA3 Power Station: 80
- TA3 Tiny Generator: 12
- TA3 Akku Box: 10 (in both dirs)
- TA3 Oil Drill Box: 16
- TA3 Oil Pumpjack: 16
- TA3 Electronic Fab: 12
- TA3 Autocrafter: 6
- TA3 Grinder: 6
- TA3 Gravel Sieve: 4
- TA3 Booster: 3
- Lamps: 0.5
- Signs Bot: 8 (while loading)
]])
techage.register_help_page("Power Consumption", PowerConsumption, "techage:t3_source", nil)
local BurnCycles = S([[
Burning times with one oil item for
Stream Engine / Power Station / Tiny Generator:
Power max. : 25 / 80 / 12
Oil burn time/s : 32 / 20 / 100
burn time at power 2 : 400 / 800 / 600
burn time at power 10 : 80 / 160 / 120
burn time at power 20 : 40 / 80 / --
]])
techage.register_help_page("Oil Burning Times", BurnCycles, "techage:t3_source", nil)
techage.register_help_page(S("TA3 Electronic Fab"),
S([[Used to produce WLAN Chips,
needed for TA4 machines.]]), "techage:ta3_electronic_fab_pas")

View File

@ -13,13 +13,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Pipe = techage.SteamPipe
@ -71,7 +66,7 @@ local function after_tube_update(node, pos, out_dir, peer_pos, peer_in_dir)
end
minetest.register_node("techage:turbine", {
description = I("TA3 Turbine"),
description = S("TA3 Turbine"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta3.png^techage_frame_ta3.png^techage_steam_hole.png",
@ -176,11 +171,11 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA3 Turbine"),
I([[Part of the Coal Power Station.
Has to be placed side by side
with the TA3 Generator.
(see TA3 Coal Power Station)]]), "techage:turbine")
techage.register_entry_page("ta3ps", "turbine",
S("TA3 Turbine"),
S("Part of the Coal Power Station. Has to be placed side by side with the TA3 Generator.@n"..
"(see TA3 Coal Power Station)"),
"techage:turbine")
minetest.register_lbm({
label = "[techage] Turbine sound",

25
doc/doc.lua Normal file
View File

@ -0,0 +1,25 @@
--[[
TechAge
=======
Copyright (C) 2019 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
Main module for the in-game documentation
]]--
local S = techage.S
techage.register_category_page("techage", "Tech Age",
S("Tech Age is a technic mod with four technic stages.@n@n"..
"Iron Age (TA1): Use tools like coal pile, coal burner, gravel sieve, hammer and hopper to obtain the necessary metals and ores to further machines and tools for TA2@n@n"..
"Steam Age (TA2): Build a steam engine with drive axles to run first simple machines.@n@n"..
"Oil Age (TA3): Drill and pump oil, build your transport routes with Minecarts and power and control TA3 machines and lamps with electrical energy.@n@n"..
"Future Age (TA4): Build regenerative power plants and intelligent machines, travel at high speed and use other future technologies."),
"techage:ta4_wlanchip",
{}
)

29
doc/ta1_doc.lua Normal file
View File

@ -0,0 +1,29 @@
--[[
TechAge
=======
Copyright (C) 2019 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
Main module for the in-game TA1 documentation
]]--
local S = techage.S
techage.register_category_page("ta1", "Iron Age (TA1)",
S("Iron Age is the first level of the available four technic stages.@n"..
"The goal of TA1 is to collect and craft enough Iron Ingots@n"..
"to be able to build machines for stage 2 (TA2).@n"..
"1. You have to collect dirt and wood to build a Coal Pile.@n"..
" (The Coal Pile is needed to produce charcoal)@n"..
"2. Build a Coal Burner to melt iron to iron ingots.@n"..
"3. Craft a Gravel Sieve and collect gravel.@n"..
" (A Hammer can be used to smash cobble to gravel)@n"..
"4. Sieve the gravel to get the necessary ores or go mining."),
"techage:iron_ingot",
{"coalpile", "burner", "meltingpot", "lighter", "meridium", "iron", "hammer", "sieve", "hopper"}
)

25
doc/ta2_doc.lua Normal file
View File

@ -0,0 +1,25 @@
--[[
TechAge
=======
Copyright (C) 2019 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
Main module for the in-game TA1 documentation
]]--
local S = techage.S
techage.register_category_page("ta2", "Steam Age (TA2)",
S("Steam Age is the second level of the available four technic stages.@n"..
"The goal of TA2 is to build a coal powered stream engine with drive axles "..
"and machines to produce ores and vacuum tubes for the first electronic devices and machines in TA3."),
"techage:charcoal", {
"steam_engine", "boiler1", "boiler2", "cylinder", "flywheel",
"pusher", "distributor", "chest", "grinder", "gravelsieve", "autocrafter", "rinser", "electronic_fab"}
)

105
doc/ta3_doc.lua Normal file
View File

@ -0,0 +1,105 @@
--[[
TechAge
=======
Copyright (C) 2019 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
Main module for the in-game TA1 documentation
]]--
local S = techage.S
techage.register_category_page("ta3",
S("Oil Age (TA3)"),
S("The Oil Age is the third level of the available technic stages. "..
"The goal of TA3 is to build Power Stations, drill for oil, and build "..
"machines to produce ores and chips for smart TA4 devices and machines."),
"techage:oil_source",
{"power", "times"}
)
techage.register_entry_page("ta3", "power",
S("Power Consumption"),
S("Power consumption and supply:@n"..
"- TA3 Power Station: 80@n"..
"- TA3 Tiny Generator: 12@n"..
"- TA3 Akku Box: 10 (in both dirs)@n"..
"- TA3 Oil Drill Box: 16@n"..
"- TA3 Oil Pumpjack: 16@n"..
"- TA3 Electronic Fab: 12@n"..
"- TA3 Autocrafter: 6@n"..
"- TA3 Grinder: 6@n"..
"- TA3 Gravel Sieve: 4@n"..
"- TA3 Booster: 3@n"..
"- Lamps: 0.5@n"..
"@n"..
"- Signs Bot: 8 (while loading)"),
"techage:t3_source", nil)
techage.register_entry_page("ta3", "times",
S("Oil Burning Times"),
S("Burning times with one oil item for@n"..
"Stream Engine / Power Station / Tiny Generator:@n"..
"@n"..
"Power max. : 25 / 80 / 12@n"..
"Oil burn time/s : 32 / 20 / 100 @n"..
"@n"..
"burn time at power 2 : 400 / 800 / 600@n"..
"burn time at power 10 : 80 / 160 / 120@n"..
"burn time at power 20 : 40 / 80 / --"),
"techage:t3_source", nil)
local Images = {
{false, false, false, false, false, false, false},
{"techage_steam_knee.png", 'techage_steam_pipe.png', 'techage_steam_pipe.png',
'techage_steam_pipe.png', 'techage_steam_pipe.png', 'techage_steam_pipe.png', "techage_steam_knee.png^[transformR270"},
{'techage_steam_pipe.png^[transformR90', "techage_boiler_top_ta3.png", 'techage_steam_pipe.png',
'techage_steam_knee.png^[transformR270', 'techage_steam_knee.png',
"techage_filling_ta3.png^techage_frame_ta3.png^techage_cooler.png",
"techage_steam_knee.png^[transformR180"},
{"techage_steam_knee.png^[transformR90", "techage_boiler_bottom_ta3.png", false, 'techage_steam_pipe.png^[transformR90',
'techage_steam_pipe.png^[transformR90'},
{false, "techage_firebox_ta3.png", false, "techage_steam_knee.png^[transformR90",
"techage_filling_ta3.png^techage_appl_turbine.png^techage_frame_ta3.png",
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_generator.png"},
}
--techage.register_entry_page("ta3", "power_station",
techage.register_category_page("ta3ps",
S("TA3: Power Station"),
S("Build a Power Station according to the plan with TA3 Firebox, TA3 Boiler, Steam Pipes, Cooler, Turbine and Generator.@n"..
"- Heat the Firebox with coal/charcoal or oil@n"..
"- Fill the boiler with water (more than one bucket is needed)@n"..
"- Wait until the water is heated@n"..
"- Open the steam ventil@n"..
"- Connect the Generator with your machines by means of cables and junction boxes@n"..
"- Start the Generator"),
nil,
{"coalboiler_base", "coalboiler_top", "turbine", "generator", "cooler", "akku", "tiny_generator"},
Images)
techage.register_category_page("ta3op",
S("TA3: Oil plants"),
S("In the TA3 age, oil (petroleum) serves as an almost infinite fuel. But oil is difficult "..
"and expensive to recover:@n"..
"1: Search for oil with the TA3 Oil Explorer@n"..
"2: Drill for oil with the TA3 Oil Drill Box (oil derrick)@n"..
"3: Recover the oil with the TA3 Oil Pumpjack@n"..
"4: A power station nearby provides the necessary @n"..
" electrical power for the derrick and pumpjack.@n"..
"5: Tubes or rails are used for oil transportation."),
"techage:oilexplorer",
{"oilexplorer", "drillbox", "pumpjack"}
)
techage.register_category_page("ta3m",
S("TA3: Machines"),
S("Collection of TA3 machines, some with eletrical power supply."),
"techage:ta3_autocrafter_pas",
{"pusher", "distributor", "chest", "grinder", "gravelsieve", "autocrafter", "electronic_fab"}
)

32
doc/ta_doc.lua Normal file
View File

@ -0,0 +1,32 @@
--[[
TechAge
=======
Copyright (C) 2019 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
Main module for the in-game TA1 documentation
]]--
local S = techage.S
techage.register_category_page("ta", "Further nodes and tools",
S("This is a collection of further nodes and tools which do not fit to the stages 1 to 4."),
"techage:end_wrench", {"end_wrench", "powerswitch", "trowel", "blackhole", "forceload"}
)
techage.register_entry_page("ta", "powerswitch",
S("TA Power Switch"),
S("To turn electrical power on/off.@n"..
"Has to be placed on a TA Power Switch Box."),
"techage:powerswitch")
techage.register_entry_page("ta", "trowel",
S("TechAge Trowel"),
S("Tool to hide and retrieve electrical wiring in walls and floors.@n"..
"The material for hiding the cables must be in the left stack of the first row in the player inventory."),
"techage:trowel")

View File

@ -13,13 +13,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local PWR_NEEDED = 3
local CYCLE_TIME = 2
@ -29,7 +24,7 @@ local consume_power = techage.power.consume_power
local power_available = techage.power.power_available
local function infotext(pos, state)
M(pos):set_string("infotext", I("TA3 Booster")..": "..state)
M(pos):set_string("infotext", S("TA3 Booster")..": "..state)
end
local function swap_node(pos, name)
@ -61,7 +56,7 @@ local function node_timer(pos, elapsed)
end
minetest.register_node("techage:ta3_booster", {
description = I("TA3 Booster"),
description = S("TA3 Booster"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta3.png^techage_appl_arrow.png^techage_frame_ta3.png",
@ -171,7 +166,7 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA3 Booster"),
I([[Part of the TA3 Industrial Furnace
and further machines.
Used to increase the air/gas pressure.]]), "techage:ta3_booster")
techage.register_entry_page("ta3f", "booster",
S("TA3 Booster"),
S("Part of the TA3 Industrial Furnace and further machines. Used to increase the air/gas pressure."),
"techage:ta3_booster")

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local range = techage.range
@ -140,7 +136,7 @@ end
if minetest.global_exists("unified_inventory") then
unified_inventory.register_craft_type("ta3_melting", {
description = I("TA3 Melting"),
description = S("TA3 Melting"),
icon = "techage_concrete.png^techage_appl_furnace.png^techage_frame_ta3.png",
width = 2,
height = 2,

View File

@ -13,13 +13,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local firebox = techage.firebox
@ -75,7 +70,7 @@ local function booster_cmnd(pos, cmnd)
end
minetest.register_node("techage:furnace_firebox", {
description = I("TA3 Furnace Firebox"),
description = S("TA3 Furnace Firebox"),
tiles = {
-- up, down, right, left, back, front
"techage_concrete.png^techage_appl_open.png^techage_frame_ta3.png",
@ -110,7 +105,7 @@ minetest.register_node("techage:furnace_firebox", {
})
minetest.register_node("techage:furnace_firebox_on", {
description = I("TA3 Furnace Firebox"),
description = S("TA3 Furnace Firebox"),
tiles = {
-- up, down, right, left, back, front
"techage_concrete.png^techage_frame_ta3.png",
@ -219,7 +214,7 @@ minetest.register_lbm({
end
})
techage.register_help_page(I("TA3 Furnace Firebox"),
I([[Part of the TA3 Industrial Furnace.
Faster and more powerful
than the standard furnace.]]), "techage:furnace_firebox")
techage.register_entry_page("ta3f", "firebox",
S("TA3 Furnace Firebox"),
S("Part of the TA3 Industrial Furnace. Faster and more powerful than the standard furnace."),
"techage:furnace_firebox")

View File

@ -13,17 +13,12 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local S = techage.S
-- Consumer Related Data
local CRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).consumer end
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local STANDBY_TICKS = 6
local COUNTDOWN_TICKS = 6
local CYCLE_TIME = 2
@ -50,7 +45,7 @@ local function formspec(self, pos, mem)
"image_button[2,2;1,1;".. self:get_state_button_image(mem) ..";state_button;]"..
"list[context;dst;3,0;2,2;]"..
"label[6,0;"..I("Outp")..": "..idx.."/"..num.."]"..
"label[6,0;"..S("Outp")..": "..idx.."/"..num.."]"..
"item_image_button[6.5,0.5;1,1;"..(output or "")..";b1;]"..
"button[6,1.5;1,1;priv;<<]"..
"button[7,1.5;1,1;next;>>]"..
@ -226,7 +221,7 @@ local tubing = {
}
local _, node_name_ta3, _ =
techage.register_consumer("furnace", I("Furnace Top"), tiles, {
techage.register_consumer("furnace", S("Furnace Top"), tiles, {
drawtype = "normal",
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
@ -264,7 +259,7 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA3 Furnace Top"),
I([[Part of the TA3 Industrial Furnace.
Faster and more powerful
than the standard furnace.]]), "techage:ta3_furnace_pas")
techage.register_entry_page("ta3f", "furnace",
S("TA3 Furnace Top"),
S("Part of the TA3 Industrial Furnace. Faster and more powerful than the standard furnace."),
"techage:ta3_furnace_pas")

View File

@ -12,18 +12,15 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
local S = techage.S
local HelpText = S([[1. Build the Furnace with
TA3 Furnace Firebox, TA3 Furnace Top,
and TA3 Booster according to the plan.
2. Heat the Firebox with coal/charcoal/oil
3. Power the Booster with electrical power.
4. Select one of the possible outputs
5. Connect the TA3 Furnace Top with your machines by means of tubes.
6. Start the Furnace]])
local HelpText = S("Build the Furnace with TA3 Furnace Firebox, TA3 Furnace Top, "..
"and TA3 Booster according to the plan.@n"..
"- Heat the Firebox with coal/charcoal/oil@n"..
"- Power the Booster with electrical power.@n"..
"- Select one of the possible outputs@n"..
"- Connect the TA3 Furnace Top with your machines by means of tubes.@n"..
"- Start the Furnace")
local Cable = "techage_electric_cable_inv.png"
local Tube = "techage_tube_tube.png"
@ -38,6 +35,11 @@ local Images = {
{false, Cable, Booster, Firebox, false, false, false},
}
techage.register_help_page(S("TA3 Industrial Furnace"), HelpText, nil, Images)
techage.register_category_page("ta3f",
S("TA3 Industrial Furnace"),
HelpText,
nil,
{"firebox", "furnace", "booster"},
Images)

View File

@ -20,7 +20,7 @@ techage.furnace.register_recipe({
})
if techage.modified_recipes_enabled then
techage.ironage_register_recipe({
techage.furnace.register_recipe({
output = "default:bronze_ingot 4",
recipe = {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot", "default:tin_ingot"},
time = 2,
@ -33,6 +33,14 @@ if techage.modified_recipes_enabled then
})
end
if minetest.global_exists("wielded_light") then
techage.furnace.register_recipe({
output = "techage:meridium_ingot",
recipe = {"default:steel_ingot", "default:mese_crystal_fragment"},
heat = 4,
time = 3,
})
end
minetest.after(1, function()
for key,_ in pairs(minetest.registered_items) do

39
i18n.py Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generate a template file for translation purposes
import os, fnmatch, re
pattern = re.compile(r'[ \.=^\t]S\("(.+?)"\)', re.DOTALL)
def gen_template(templ_file, lkeyStrings):
lOut = []
lkeyStrings = list(set(lkeyStrings))
lkeyStrings.sort()
for s in lkeyStrings:
lOut.append("%s=" % s)
file(templ_file, "wt").write("\n".join(lOut))
def read_strings(fname):
lOut = []
text = file(fname).read()
for s in pattern.findall(text):
s = re.sub(r'"\.\.\s+"', "", s)
lOut.append(s)
return lOut
def i18n(templ_file):
lOut = []
for root, dirs, files in os.walk('./'):
for name in files:
if fnmatch.fnmatch(name, "*.lua"):
fname = os.path.join(root, name)
found = read_strings(fname)
print fname, len(found)
lOut.extend(found)
gen_template(templ_file, lOut)
i18n("./locale/template.txt")
print "Done.\n"

View File

@ -1,6 +1,3 @@
techage = {
NodeDef = {}, -- node registration info
}
if minetest.global_exists("tubelib") then
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")
@ -11,17 +8,19 @@ elseif minetest.global_exists("techpack") then
elseif minetest.global_exists("tubelib2") and tubelib2.version < 1.4 then
minetest.log("error", "[techage] Techage requires tubelib2 version 1.4 or newer!")
else
techage.max_num_forceload_blocks = tonumber(minetest.setting_get("techage_max_num_forceload_blocks")) or 12
techage = {
NodeDef = {}, -- node registration info
}
techage.max_num_forceload_blocks = tonumber(minetest.setting_get("techage_max_num_forceload_blocks")) or 16
techage.basalt_stone_enabled = minetest.setting_get("techage_basalt_stone_enabled") == "true"
techage.ore_rarity = tonumber(minetest.setting_get("techage_ore_rarity")) or 1
techage.modified_recipes_enabled = minetest.setting_get("techage_modified_recipes_enabled") == "true"
local MP = minetest.get_modpath("techage")
-- Load support for intllib.
dofile(MP.."/basis/intllib.lua")
-- Load support for I18n.
techage.S = minetest.get_translator("techage")
-- Basis features
local MP = minetest.get_modpath("techage")
dofile(MP.."/basis/lib.lua") -- helper functions
dofile(MP.."/basis/gravel_lib.lua") -- ore probability
dofile(MP.."/basis/guide.lua") -- construction guide
@ -31,10 +30,12 @@ else
dofile(MP.."/basis/firebox_lib.lua") -- common firebox functions
dofile(MP.."/basis/mark.lua")
dofile(MP.."/basis/assemble.lua")
-- Tools
dofile(MP.."/tools/trowel.lua")
dofile(MP.."/tools/repairkit.lua")
-- Main doc
dofile(MP.."/doc/doc.lua")
dofile(MP.."/doc/ta1_doc.lua")
dofile(MP.."/doc/ta2_doc.lua")
dofile(MP.."/doc/ta3_doc.lua")
-- Nodes1
dofile(MP.."/nodes/baborium.lua")
@ -76,13 +77,10 @@ else
dofile(MP.."/steam_engine/flywheel.lua")
dofile(MP.."/steam_engine/gearbox.lua")
dofile(MP.."/basic_machines/ta2_help.lua")
-- Basic Machines
dofile(MP.."/basis/consumer.lua") -- consumer base model
dofile(MP.."/basic_machines/source.lua")
dofile(MP.."/basic_machines/pusher.lua")
dofile(MP.."/basic_machines/blackhole.lua")
dofile(MP.."/basic_machines/legacy_nodes.lua")
dofile(MP.."/basic_machines/grinder.lua")
dofile(MP.."/basic_machines/distributor.lua")
@ -90,11 +88,9 @@ else
dofile(MP.."/basic_machines/gravelrinser.lua")
dofile(MP.."/basic_machines/chest.lua")
dofile(MP.."/basic_machines/autocrafter.lua")
dofile(MP.."/basic_machines/forceload.lua")
dofile(MP.."/basic_machines/electronic_fab.lua")
-- Coal power station
dofile(MP.."/coal_power_station/help.lua")
dofile(MP.."/coal_power_station/firebox.lua")
dofile(MP.."/coal_power_station/boiler_base.lua")
dofile(MP.."/coal_power_station/boiler_top.lua")
@ -103,8 +99,6 @@ else
dofile(MP.."/coal_power_station/cooler.lua")
dofile(MP.."/coal_power_station/akkubox.lua")
dofile(MP.."/basic_machines/ta3_help.lua")
-- Industrial Furnace
dofile(MP.."/furnace/help.lua")
dofile(MP.."/furnace/firebox.lua")
@ -113,6 +107,13 @@ else
dofile(MP.."/furnace/booster.lua")
dofile(MP.."/furnace/recipes.lua")
-- Tools
dofile(MP.."/doc/ta_doc.lua")
dofile(MP.."/tools/trowel.lua")
dofile(MP.."/tools/repairkit.lua")
dofile(MP.."/basic_machines/blackhole.lua")
dofile(MP.."/basic_machines/forceload.lua")
-- Lamps
dofile(MP.."/lamps/lib.lua")
dofile(MP.."/lamps/simplelamp.lua")
@ -123,7 +124,6 @@ else
dofile(MP.."/lamps/industriallamp3.lua")
-- Oil
dofile(MP.."/oil/help.lua")
dofile(MP.."/oil/explore.lua")
dofile(MP.."/oil/tower.lua")
dofile(MP.."/oil/drillbox.lua")

View File

@ -1,45 +0,0 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

View File

@ -12,10 +12,7 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
local S = techage.S
local PILE_BURN_TIME = 1200
local COAL_BURN_TIME = 300
@ -212,16 +209,16 @@ minetest.register_lbm({
end
})
local PileHelp = S([[Coal Pile to produce charcoal:
- build a 5x5 block dirt base
- place a lighter in the centre
- build a 3x3x3 wood cube around
- cover all with dirt to a 5x5x5 cube
- keep a hole to the lighter
- ignite the lighter and immediately
- close the pile with one wood and one dirt
- open the pile after the smoke disappeared
(see plan)]])
local PileHelp = S("Coal Pile to produce charcoal:@n"..
"- build a 5x5 block dirt base@n"..
"- place a lighter in the centre@n"..
"- build a 3x3x3 wood cube around@n"..
"- cover all with dirt to a 5x5x5 cube@n"..
"- keep a hole to the lighter@n"..
"- ignite the lighter and immediately@n"..
"- close the pile with one wood and one dirt@n"..
"- open the pile after the smoke disappeared@n"..
"(see plan)")
local PileImages = {
{"default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png"},
@ -231,4 +228,4 @@ local PileImages = {
{"default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png"},
}
techage.register_help_page("Coal Pile", PileHelp, nil, PileImages)
techage.register_entry_page("ta1", "coalpile", "Coal Pile", PileHelp, nil, PileImages)

View File

@ -12,10 +12,7 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
local S = techage.S
local COAL_BURN_TIME = 1200
local CYCLE_TIME = 5
@ -243,21 +240,21 @@ function techage.stop_burner(pos)
end
local BurnerHelp = S([[Coal Burner to heat the melting pot:
- build a 3x3xN cobble tower
- more height means more flame heat
- keep a hole open on one side
- put a lighter in
- fill the tower from the top with charcoal
- ignite the lighter
- place the pot in the flame, (one block above the tower)
- to pause the burner, close the hole temporarily with e.g. dirt
(see plan)]])
local BurnerHelp = S("Coal Burner to heat the melting pot:@n"..
"- build a 3x3xN cobble tower@n"..
"- more height means more flame heat@n"..
"- keep a hole open on one side@n"..
"- put a lighter in@n"..
"- fill the tower from the top with charcoal@n"..
"- ignite the lighter@n"..
"- place the pot in the flame, (one block above the tower)@n"..
"- to pause the burner, close the hole temporarily with e.g. dirt@n"..
"(see plan)")
local BurnerImages = {
{false, false, false, "default_cobble.png^techage_meltingpot.png", false},
{false, false, false, false, false},
{false, false, false, "techage_flame.png", false},
{false, false, "default_cobble.png", "techage_charcoal.png", "default_cobble.png"},
{false, false, "default_cobble.png", "techage_charcoal.png", "default_cobble.png"},
{false, false, "default_cobble.png", "techage_charcoal.png", "default_cobble.png"},
@ -266,4 +263,4 @@ local BurnerImages = {
{false, false, "default_cobble.png", "default_cobble.png", "default_cobble.png"},
}
techage.register_help_page("Coal Burner", BurnerHelp, nil, BurnerImages)
techage.register_entry_page("ta1", "burner", S("Coal Burner"), BurnerHelp, nil, BurnerImages)

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local get_random_gravel_ore = techage.gravelsieve_get_random_gravel_ore
local get_random_basalt_ore = techage.gravelsieve_get_random_basalt_ore
@ -59,7 +55,7 @@ end
local function on_construct(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", I("TA1 Gravel Sieve"))
meta:set_string("infotext", S("TA1 Gravel Sieve"))
local inv = meta:get_inventory()
inv:set_size('src', 1)
end
@ -113,7 +109,7 @@ for idx = 0,3 do
end
minetest.register_node("techage:sieve"..idx, {
description = I("TA1 Gravel Sieve"),
description = S("TA1 Gravel Sieve"),
tiles = tiles_data,
drawtype = "nodebox",
node_box = {
@ -153,14 +149,14 @@ techage.register_node({"techage:sieve0", "techage:sieve1", "techage:sieve2", "te
})
minetest.register_node("techage:sieved_gravel", {
description = I("Sieved Gravel"),
description = S("Sieved Gravel"),
tiles = {"default_gravel.png"},
groups = {crumbly=2, falling_node=1, not_in_creative_inventory=1},
sounds = default.node_sound_gravel_defaults(),
})
minetest.register_node("techage:compressed_gravel", {
description = I("Compressed Gravel"),
description = S("Compressed Gravel"),
tiles = {"techage_compressed_gravel.png"},
groups = {cracky=2, crumbly = 2},
sounds = default.node_sound_gravel_defaults(),
@ -193,11 +189,9 @@ minetest.register_craft({
minetest.register_alias("techage:sieve", "techage:sieve3")
minetest.register_alias("techage:auto_sieve", "techage:auto_sieve3")
techage.register_help_page("TA1 Gravel Sieve", [[To sieve Gravel and Basalt Gravel
to get ores.
Punch the sieve with wielded gravel to
start sieving.
Sieving can be automated by means
of the TA1 Hopper.
Gravel can be found in caves or
generated by means of a TA1 Hammer.]], "techage:sieve3")
techage.register_entry_page("ta1", "sieve",
S("TA1 Gravel Sieve"),
S("To sieve Gravel and Basalt Gravel to get ores. Punch the sieve with wielded gravel to start sieving. "..
"Sieving can be automated by means of the TA1 Hopper. Gravel can be found in caves or "..
"generated by means of a TA1 Hammer."),
"techage:sieve3")

View File

@ -12,9 +12,7 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local function handler(player_name, node, itemstack, digparams)
local pos = techage.dug_node[player_name]
@ -28,8 +26,10 @@ local function handler(player_name, node, itemstack, digparams)
if minetest.get_item_group(node.name, "stone") > 0 then
-- Remove item from players inventory or from the world
local ndef = minetest.registered_nodes[node.name]
if ndef and ndef.drop then
local item = ItemStack(ndef.drop)
print(1)
if ndef then
print(2)
local item = ItemStack(ndef.drop or node.name)
local inv = minetest.get_inventory({type="player", name=player_name})
if inv:room_for_item("main", item) then
local taken = inv:remove_item("main", item)
@ -51,7 +51,7 @@ local function handler(player_name, node, itemstack, digparams)
end
minetest.register_tool("techage:hammer_bronze", {
description = I("TA1 Bronze Hammer (smash stone to gravel)"),
description = S("TA1 Bronze Hammer (smash stone to gravel)"),
inventory_image = "techage_tool_hammer_bronze.png",
tool_capabilities = {
full_punch_interval = 1.0,
@ -70,7 +70,7 @@ minetest.register_tool("techage:hammer_bronze", {
})
minetest.register_tool("techage:hammer_steel", {
description = I("TA1 Steel Hammer (smash stone to gravel)"),
description = S("TA1 Steel Hammer (smash stone to gravel)"),
inventory_image = "techage_tool_hammer_steel.png",
tool_capabilities = {
full_punch_interval = 1.0,
@ -89,7 +89,7 @@ minetest.register_tool("techage:hammer_steel", {
})
minetest.register_tool("techage:hammer_mese", {
description = I("TA1 Mese Hammer (smash stone to gravel)"),
description = S("TA1 Mese Hammer (smash stone to gravel)"),
inventory_image = "techage_tool_hammer_mese.png",
tool_capabilities = {
full_punch_interval = 0.9,
@ -108,7 +108,7 @@ minetest.register_tool("techage:hammer_mese", {
})
minetest.register_tool("techage:hammer_diamond", {
description = I("TA1 Diamond Hammer (smash stone to gravel)"),
description = S("TA1 Diamond Hammer (smash stone to gravel)"),
inventory_image = "techage_tool_hammer_diamond.png",
tool_capabilities = {
full_punch_interval = 0.9,
@ -126,6 +126,35 @@ minetest.register_tool("techage:hammer_diamond", {
end,
})
if minetest.global_exists("wielded_light") then
minetest.register_tool("techage:hammer_meridium", {
description = S("TA1 Meridium Hammer (smash stone to gravel)"),
inventory_image = "techage_tool_hammer_meridium.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=1,
groupcaps={
cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=60, maxlevel=2},
},
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
after_use = function(itemstack, user, node, digparams)
minetest.after(0.01, handler, user:get_player_name(), node)
itemstack:add_wear(digparams.wear)
return itemstack
end,
})
minetest.register_craft({
output = "techage:hammer_meridium 2",
recipe = {
{"techage:meridium_ingot", "group:stick", "techage:meridium_ingot"},
{"techage:meridium_ingot", "group:stick", "techage:meridium_ingot"},
{"", "group:stick", ""},
}
})
end
minetest.register_craft({
output = "techage:hammer_bronze 2",
recipe = {
@ -159,5 +188,6 @@ minetest.register_craft({
}
})
techage.register_help_page("TA1 xxx Hammer", [[Hammer to smash stone to gravel.
techage.register_entry_page("ta1", "hammer",
"TA1 xxx Hammer", [[Hammer to smash stone to gravel.
Available as Bronze, Steel, Mese, and Diamond Hammer.]], "techage:hammer_bronze")

View File

@ -13,13 +13,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local function scan_for_objects(pos, inv)
for _, object in pairs(minetest.get_objects_inside_radius(pos, 1)) do
@ -72,7 +67,7 @@ local function node_timer(pos, elapsed)
end
minetest.register_node("techage:hopper_ta1", {
description = I("TA1 Hopper"),
description = S("TA1 Hopper"),
tiles = {
-- up, down, right, left, back, front
"default_cobble.png^techage_appl_hopper_top.png",
@ -154,9 +149,9 @@ techage.register_node({"techage:hopper_ta1"}, {
end,
})
techage.register_help_page("TA1 Hopper", [[The Hopper collects dropped items
and pushes them to the right side.
Items are sucked up when they
are dropped on top of the Hopper block.
But the Hopper can also pull items out of
chests or furnace blocks, if it is placed below.]], "techage:hopper_ta1")
techage.register_entry_page("ta1", "hopper",
S("TA1 Hopper"),
S("The Hopper collects dropped items and pushes them to the right side.@n"..
"Items are sucked up when they are dropped on top of the Hopper block.@n"..
"But the Hopper can also pull items out of chests or furnace blocks, if it is placed below."),
"techage:hopper_ta1")

View File

@ -12,9 +12,7 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
local S = techage.S
minetest.register_node("techage:lighter_burn", {
tiles = {"techage_lighter_burn.png"},
@ -90,6 +88,7 @@ minetest.register_craft({
}
})
techage.register_help_page("TA1 Lighter", [[lighter to ignite the Coal Burner
and the Coal Pile.]], "techage:lighter")
techage.register_entry_page("ta1", "lighter",
S("TA1 Lighter"),
S("lighter to ignite the Coal Burner and the Coal Pile."), "techage:lighter")

View File

@ -10,10 +10,6 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
function techage.ironage_swap_node(pos, name)
minetest.swap_node(pos, {name = name})
local node = minetest.registered_nodes[name]
@ -31,14 +27,3 @@ function techage.ironage_swap_nodes(pos1, pos2, name1, name2)
end
end
techage.register_chap_page("Iron Age (TA1)", S([[Iron Age is the first level of the available technic stages.
The goal of TA1 is to collect and craft enough Iron Ingots
to be able to build machines for stage 2 (TA2).
1. You have to collect dirt and wood to build a Coal Pile.
(The Coal Pile is needed to produce charcoal)
2. Build a Coal Burner to melt iron to iron ingots.
3. Craft a Gravel Sieve and collect gravel.
(A Hammer can be used to smash cobble to gravel)
4. Sieve the gravel to get the necessary ores or go mining.
]]), "techage:iron_ingot")

View File

@ -12,10 +12,7 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
local S = techage.S
local SMELTING_TIME = 2
@ -482,13 +479,13 @@ minetest.register_craft({
if minetest.global_exists("unified_inventory") then
unified_inventory.register_craft_type("melting", {
description = S("Melting"),
description = S("TA1 Melting"),
icon = "default_cobble.png^techage_meltingpot.png",
width = 2,
height = 2,
})
unified_inventory.register_craft_type("burning", {
description = S("Burning"),
description = S("TA1 Burning"),
icon = "techage_smoke.png",
width = 1,
height = 1,
@ -521,5 +518,7 @@ function techage.ironage_register_recipe(recipe)
end
end
techage.register_help_page("TA1 Melting Pot", [[To melt ores and/or produce alloys.
Place the pot on top of the Coal Burner.]], "techage:meltingpot")
techage.register_entry_page("ta1", "meltingpot",
S("TA1 Melting Pot"),
S("To melt ores and/or produce alloys. Place the pot on top of the Coal Burner."),
"techage:meltingpot")

View File

@ -12,10 +12,7 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
local S = techage.S
minetest.register_craftitem("techage:meridium_ingot", {
description = "Meridium Ingot",
@ -126,3 +123,8 @@ techage.ironage_register_recipe({
heat = 4,
time = 3,
})
techage.register_entry_page("ta1", "meridium",
S("Meridium Ingot"),
S("A brilliant alloy for tools, which are used in the dark. Can be made with Coal Burner and TA3 Industrial Furnace."),
"techage:meridium_ingot")

View File

@ -12,9 +12,7 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
local S = techage.S
--
-- New burner recipes
@ -96,3 +94,8 @@ if techage.modified_recipes_enabled then
}
})
end
techage.register_entry_page("ta1", "iron",
S("TA1 Iron Ingot"),
S("Steel replacement for TA1. Needed for many tools. Can be made with the Coal Burner from iron lumps."),
"techage:iron_ingot")

View File

@ -12,12 +12,10 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
techage.register_lamp("techage:ceilinglamp", {
description = "TA Ceiling Lamp",
description = S("TA Ceiling Lamp"),
tiles = {
-- up, down, right, left, back, front
'techage_ceilinglamp_top.png',
@ -40,7 +38,7 @@ techage.register_lamp("techage:ceilinglamp", {
},
},{
description = "TA Ceiling Lamp",
description = S("TA Ceiling Lamp"),
tiles = {
-- up, down, right, left, back, front
'techage_ceilinglamp_top.png',

View File

@ -12,12 +12,10 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
techage.register_lamp("techage:industriallamp1", {
description = "TA Industrial Lamp 1",
description = S("TA Industrial Lamp 1"),
inventory_image = 'techage_industriallamp_inv1.png',
tiles = {
-- up, down, right, left, back, front

View File

@ -12,14 +12,12 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local size = {x = 8/32, y = 8/32, z = 5/32}
techage.register_lamp("techage:industriallamp2", {
description = "TA Industrial Lamp 2",
description = S("TA Industrial Lamp 2"),
inventory_image = 'techage_industriallamp_inv2.png',
tiles = {
-- up, down, right, left, back, front

View File

@ -12,14 +12,12 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local size = {x = 6/32, y = 4/32, z = 6/32}
techage.register_lamp("techage:industriallamp3", {
description = "TA Industrial Lamp 3",
description = S("TA Industrial Lamp 3"),
inventory_image = 'techage_industriallamp_inv3.png',
tiles = {
-- up, down, right, left, back, front

View File

@ -12,12 +12,10 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
techage.register_lamp("techage:simplelamp", {
description = I("TA Lamp"),
description = S("TA Lamp"),
tiles = {
'techage_electric_button.png',
},
@ -30,7 +28,7 @@ techage.register_lamp("techage:simplelamp", {
is_ground_content = false,
sounds = default.node_sound_wood_defaults(),
},{
description = I("TA Lamp"),
description = S("TA Lamp"),
tiles = {
'techage_electric_button.png',
},

View File

@ -12,12 +12,10 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
techage.register_lamp("techage:streetlamp", {
description = "TA Street Lamp",
description = S("TA Street Lamp"),
tiles = {
-- up, down, right, left, back, front
'techage_streetlamp_top.png',
@ -42,7 +40,7 @@ techage.register_lamp("techage:streetlamp", {
on_rotate = screwdriver.disallow,
conn_sides = {"U", "D"},
},{
description = "TA Street Lamp",
description = S("TA Street Lamp"),
tiles = {
-- up, down, right, left, back, front
'techage_streetlamp_top.png',

44
locale/techage.de.tr Normal file
View File

@ -0,0 +1,44 @@
# textdomain: techage
@nThe Distributor tries to push 12 items every 2 seconds.= Der Verteiler gibt bis zu 12 Gegenstände alle 2 s weiter.
@nThe Distributor tries to push 4 items every 2 seconds.= Der Verteiler gibt bis zu 4 Gegenstände alle 2 s weiter.
A brilliant alloy for tools, which are used in the dark. Can be made with Coal Burner and TA3 Industrial Furnace.=Ein leuchtende Legierung für Werkzeuge, welche im Dunkeln verwendet werden. Kann mit dem Kohlebrenner oder dem TA3 Industrieofen hergestellt werden.
Ash=Asche
Autocrafter=Autocrafter
Axle Power Source=Achsenkraftquelle
Build a Power Station according to the plan with TA3 Firebox, TA3 Boiler, Steam Pipes, Cooler, Turbine and Generator.@n- Heat the Firebox with coal/charcoal or oil@n- Fill the boiler with water (more than one bucket is needed)@n- Wait until the water is heated@n- Open the steam ventil@n- Connect the Generator with your machines by means of cables and junction boxes@n- Start the Generator=Baue ein Kraftwerk gemäß dem Plan mit TA3 Feuerbox, TA3 Kessel, Dampfröhren, Turbine und Generator.@n- Erhitze die Feuerbox mit Kohle/Holzkohle oder Öl@n- Fülle den Kessel mit Wasser (mehr als ein Eimer)@n- Warte bis das Wasser heiß ist@n- Öffne das Dampfventil@n- Verbinde den Generator mit deinen Maschinen mit Hilfe von Kabeln und Verbindungsdosen@n- Starte den Generator
Build a steam engine according to the plan with TA2 Firebox, TA2 Boiler, Steam Pipes, TA2 Cylinder and TA2 Flywheel.@n- Heat the Firebox with coal/charcoal@n- Fill the boiler with water (more than one bucket is needed)@n- Wait until the water is heated@n- Open the steam ventil@n- Start the Flywheel@n- Connect the Flywheel with your machines by means of Axles and Gearboxes=Baue eine Dampfmaschine gemäß dem Plan mit TA2 Feuerbox, TA2 Kessel, Dampfröhren, TA2 Zylinder und TA2 Schwungrad.@n- Erhitze die Feuerbox mit Kohle/Holzkohle oder Öl@n- Fülle den Kessel mit Wasser (mehr als ein Eimer)@n- Warte bis das Wasser heiß ist@n- Öffne das Dampfventil@n- Start das Schwungrad@n- Verbinde das Schwungrad mit deinen Maschinen mit Hilfe der Achsen und Achsgetriebeboxen.
Build derrick=Errichte Ölturm
Build the Furnace with TA3 Furnace Firebox, TA3 Furnace Top, and TA3 Booster according to the plan.@n- Heat the Firebox with coal/charcoal/oil@n- Power the Booster with electrical power.@n- Select one of the possible outputs@n- Connect the TA3 Furnace Top with your machines by means of tubes.@n- Start the Furnace=Baue den Ofen mit Hilfe von Feuerbox, TA3 Ofenoberteil und TA3 Gebläse.@n- Fülle die Feuerbox mit Kohle/Holzkohle oder Öl@n- Versorge das Gebläse mit Strom@n- Wähle das Rezept im Ofen@n- Verbinde das Ofenoberteil mit deinen Maschinen mit Hilfe der Röhren.
Burning times with one oil item for@nStream Engine / Power Station / Tiny Generator:@n@nPower max. : 25 / 80 / 12@nOil burn time/s : 32 / 20 / 100 @n@nburn time at power 2 : 400 / 800 / 600@nburn time at power 10 : 80 / 160 / 120@nburn time at power 20 : 40 / 80 / --=Brennzeiten mit einer Öl-Einheit für@nDampfmaschine / Kraftwerk / Kleingenerator:@n@nKraft max. : 25 / 80 / 12@nÖlbrennzeit/s : 32 / 20 / 100 @n@nBrennzeit bei Kraft 2 : 400 / 800 / 600@nBrennzeit bei Kraft 10 : 80 / 160 / 120@nBrennzeit bei Kraft 20 : 40 / 80 / --
Coal Burner=Kohlebrenner
Coal Burner to heat the melting pot:@n- build a 3x3xN cobble tower@n- more height means more flame heat@n- keep a hole open on one side@n- put a lighter in@n- fill the tower from the top with charcoal@n- ignite the lighter@n- place the pot in the flame, (one block above the tower)@n- to pause the burner, close the hole temporarily with e.g. dirt@n(see plan)=Kohlebrenner um den Schmelztiegel zu erhitzen:@n- Baue einen 3x3xN Cobblestone-Turm@n- mehr Höhe bedeutet auch mehr Hitze@n- Lasse ein Loch an einer Seite offen@n- Lege einen Anzünder hinein@n- Fülle den Turm von oben mit Holzkohle@n- Zünde den Anzünder an@n- Platziere den Schmelztiegel in die Flamme (einen Block über dem Turm)@nUm den Brenner anzuhalten, schließe das Loch vorübergehend bspw. mit einem Erdblock.@n(siehe Plan)
Coal Pile to produce charcoal:@n- build a 5x5 block dirt base@n- place a lighter in the centre@n- build a 3x3x3 wood cube around@n- cover all with dirt to a 5x5x5 cube@n- keep a hole to the lighter@n- ignite the lighter and immediately@n- close the pile with one wood and one dirt@n- open the pile after the smoke disappeared@n(see plan)=Köhler um Holzkohle herzustellen:@n- Baue eine 5x5 große Fläche aus Erde (dirt)@n- Platziere in die Mitte einen Anzünder@n- Baue aus Holz (wood) einen 3x3x3 größen Würfel darüber@n -Überdecke alles mit einer Schicht Erde zu einem 5x5x5 großen Würfel@n- Lasse ein Loch zum Anzünder@n- Zünde den Anzünder an und verschließe das Loch sofort mit jeweils einem Block Holz und Erde@n- Öffne den Köhler erst, wenn der Rauch verschwunden ist
Collection of TA3 machines, some with eletrical power supply.=Sammlung von TA3 Maschinen, einige mit Stromversorgung.
Compressed Gravel=Komprimiertes Kies
Depth=Tiefe
Dirt with Ash=Erde mit Asche
Distributor=Verteiler
Drill Bit=Bohrstange
Ele Power Source=Ele Kraftquelle
Electronic Fab=Elektronikfabrik
Flint and Iron=Flint and Iron
Flowing Oil=Fließendes Öl
Furnace Top=Ofenoberteil
Gravel Rinser=Kiesspüler
Gravel Sieve=Kiessieb
Grinder=Mühle
Grinding=Mahlen
Heat=Hitze
Help=Hilfe

195
locale/template.txt Normal file
View File

@ -0,0 +1,195 @@
@nThe Distributor tries to push 12 items every 2 seconds.=
@nThe Distributor tries to push 4 items every 2 seconds.=
A brilliant alloy for tools, which are used in the dark. Can be made with Coal Burner and TA3 Industrial Furnace.=
Ash=
Autocrafter=
Axle Power Source=
Build a Power Station according to the plan with TA3 Firebox, TA3 Boiler, Steam Pipes, Cooler, Turbine and Generator.@n- Heat the Firebox with coal/charcoal or oil@n- Fill the boiler with water (more than one bucket is needed)@n- Wait until the water is heated@n- Open the steam ventil@n- Connect the Generator with your machines by means of cables and junction boxes@n- Start the Generator=
Build a steam engine according to the plan with TA2 Firebox, TA2 Boiler, Steam Pipes, TA2 Cylinder and TA2 Flywheel.@n- Heat the Firebox with coal/charcoal@n- Fill the boiler with water (more than one bucket is needed)@n- Wait until the water is heated@n- Open the steam ventil@n- Start the Flywheel@n- Connect the Flywheel with your machines by means of Axles and Gearboxes=
Build derrick=
Build the Furnace with TA3 Furnace Firebox, TA3 Furnace Top, and TA3 Booster according to the plan.@n- Heat the Firebox with coal/charcoal/oil@n- Power the Booster with electrical power.@n- Select one of the possible outputs@n- Connect the TA3 Furnace Top with your machines by means of tubes.@n- Start the Furnace=
Burning times with one oil item for@nStream Engine / Power Station / Tiny Generator:@n@nPower max. : 25 / 80 / 12@nOil burn time/s : 32 / 20 / 100 @n@nburn time at power 2 : 400 / 800 / 600@nburn time at power 10 : 80 / 160 / 120@nburn time at power 20 : 40 / 80 / --=
Coal Burner=
Coal Burner to heat the melting pot:@n- build a 3x3xN cobble tower@n- more height means more flame heat@n- keep a hole open on one side@n- put a lighter in@n- fill the tower from the top with charcoal@n- ignite the lighter@n- place the pot in the flame, (one block above the tower)@n- to pause the burner, close the hole temporarily with e.g. dirt@n(see plan)=
Coal Pile to produce charcoal:@n- build a 5x5 block dirt base@n- place a lighter in the centre@n- build a 3x3x3 wood cube around@n- cover all with dirt to a 5x5x5 cube@n- keep a hole to the lighter@n- ignite the lighter and immediately@n- close the pile with one wood and one dirt@n- open the pile after the smoke disappeared@n(see plan)=
Collection of TA3 machines, some with eletrical power supply.=
Compressed Gravel=
Depth=
Dirt with Ash=
Distributor=
Drill Bit=
Ele Power Source=
Electronic Fab=
Flint and Iron=
Flowing Oil=
Furnace Top=
Gravel Rinser=
Gravel Sieve=
Grinder=
Grinding=
Heat=
Help=
In the TA3 age, oil (petroleum) serves as an almost infinite fuel. But oil is difficult and expensive to recover:@n1: Search for oil with the TA3 Oil Explorer@n2: Drill for oil with the TA3 Oil Drill Box (oil derrick)@n3: Recover the oil with the TA3 Oil Pumpjack@n4: A power station nearby provides the necessary @n electrical power for the derrick and pumpjack.@n5: Tubes or rails are used for oil transportation.=
Iron Age is the first level of the available four technic stages.@nThe goal of TA1 is to collect and craft enough Iron Ingots@nto be able to build machines for stage 2 (TA2).@n1. You have to collect dirt and wood to build a Coal Pile.@n (The Coal Pile is needed to produce charcoal)@n2. Build a Coal Burner to melt iron to iron ingots.@n3. Craft a Gravel Sieve and collect gravel.@n (A Hammer can be used to smash cobble to gravel)@n4. Sieve the gravel to get the necessary ores or go mining.=
Melting Guide=
Melting Pot active (heat==
Melting Pot inactive (heat==
Melting Pot inactive (heat=0)=
Menu=
Menu,Recipes=
Meridium Axe=
Meridium Ingot=
Meridium Pickaxe=
Meridium Shovel=
Meridium Sword=
No plan available=
Oil Age (TA3)=
Oil Burning Times=
Oil Source=
Oil amount:=
Outp=
Part of the Coal Power Station. Has to be placed in the steam circulation after the Turbine.@n(see TA3 Coal Power Station)=
Part of the Coal Power Station. Has to be placed on top of TA3 Power Station Boiler Base.@n(see TA3 Coal Power Station)=
Part of the Coal Power Station. Has to be placed on top of the TA3 Coal Power Station Firebox and filled with water.@n(see TA3 Coal Power Station)=
Part of the Coal Power Station. Has to be placed side by side with the TA3 Generator.@n(see TA3 Coal Power Station)=
Part of the Coal Power Station. Has to be placed side by side with the TA3 Turbine. Connect the Generator with your TA3 machines by means of Electric Cables and Junction Boxes@n(see TA3 Coal Power Station)=
Part of the TA3 Industrial Furnace and further machines. Used to increase the air/gas pressure.=
Part of the TA3 Industrial Furnace. Faster and more powerful than the standard furnace.=
Part of the steam engine. Has to be placed on top of TA2 Boiler Base.@n(see TA2 Steam Engine)=
Part of the steam engine. Has to be placed on top of the Firebox and filled with water.@n(see TA2 Steam Engine)=
Part of the steam engine. Has to be placed side by side with the TA2 Cylinder.@nUsed to turn on/off the steam engine. Connect the Flywheel with your TA2 machines by means of Axles and Gearboxes.@n(see TA2 Steam Engine)=
Part of the steam engine. Has to be placed side by side with the TA2 Flywheel.@n(see TA2 Steam Engine)=
Plan=
Power=
Power Consumption=
Power consumption and supply:@n- TA3 Power Station: 80@n- TA3 Tiny Generator: 12@n- TA3 Akku Box: 10 (in both dirs)@n- TA3 Oil Drill Box: 16@n- TA3 Oil Pumpjack: 16@n- TA3 Electronic Fab: 12@n- TA3 Autocrafter: 6@n- TA3 Grinder: 6@n- TA3 Gravel Sieve: 4@n- TA3 Booster: 3@n- Lamps: 0.5@n@n- Signs Bot: 8 (while loading)=
Pusher=
Remove derrick=
Rinsing=
Sieved Gravel=
Small electrical power generator. Needs oil as fuel.@nIt provides 12 units electrical power@nOil burn time: 100s=
Steam Age is the second level of the available four technic stages.@nThe goal of TA2 is to build a coal powered stream engine with drive axles and machines to produce ores and vacuum tubes for the first electronic devices and machines in TA3.=
Steam Engine=
Steam Power Source=
Steel replacement for TA1. Needed for many tools. Can be made with the Coal Burner from iron lumps.=
TA Ceiling Lamp=
TA Construction Board=
TA Electric Cable=
TA Electric Junction Box=
TA Industrial Lamp 1=
TA Industrial Lamp 2=
TA Industrial Lamp 3=
TA Lamp=
TA Power Line=
TA Power Pole=
TA Power Switch=
TA Power Switch Box=
TA Protected Chest=
TA Street Lamp=
TA1 Bronze Hammer (smash stone to gravel)=
TA1 Burning=
TA1 Charcoal=
TA1 Diamond Hammer (smash stone to gravel)=
TA1 Gravel Sieve=
TA1 Hopper=
TA1 Iron Ingot=
TA1 Lighter=
TA1 Melting=
TA1 Melting Pot=
TA1 Meridium Hammer (smash stone to gravel)=
TA1 Mese Hammer (smash stone to gravel)=
TA1 Steel Hammer (smash stone to gravel)=
TA2 Autocrafter=
TA2 Boiler Base=
TA2 Boiler Top=
TA2 Cylinder=
TA2 Distributor=
TA2 Drive Axle=
TA2 Electronic Fab=
TA2 Firebox=
TA2 Flywheel=
TA2 Gearbox=
TA2 Gravel Rinser=
TA2 Gravel Sieve=
TA2 Grinder=
TA2 Protected Chest=
TA2 Pusher=
TA2 Steam Pipe=
TA3 Akku Box=
TA3 Autocrafter=
TA3 Biogas Pipe=
TA3 Boiler Base=
TA3 Boiler Top=
TA3 Booster=
TA3 Coal Power Station Firebox=
TA3 Cooler=
TA3 Derrick=
TA3 Distributor=
TA3 Drill Bit=
TA3 Electronic Fab=
TA3 Furnace Firebox=
TA3 Furnace Top=
TA3 Generator=
TA3 Gravel Sieve=
TA3 Grinder=
TA3 Industrial Furnace=
TA3 Melting=
TA3 Oil Drill Box=
TA3 Oil Explorer=
TA3 Oil Pumpjack=
TA3 Oil Storage=
TA3 Protected Chest=
TA3 Pusher=
TA3 Tiny Power Generator=
TA3 Turbine=
TA3 Vacuum Tubes=
TA3: Machines=
TA3: Oil plants=
TA3: Power Station=
TA4 Derrick=
TA4 Protected Chest=
TA4 WLAN Chip=
Tech Age is a technic mod with four technic stages.@n@nIron Age (TA1): Use tools like coal pile, coal burner, gravel sieve, hammer and hopper to obtain the necessary metals and ores to further machines and tools for TA2@n@nSteam Age (TA2): Build a steam engine with drive axles to run first simple machines.@n@nOil Age (TA3): Drill and pump oil, build your transport routes with Minecarts and power and control TA3 machines and lamps with electrical energy.@n@nFuture Age (TA4): Build regenerative power plants and intelligent machines, travel at high speed and use other future technologies.=
TechAge End Wrench=
TechAge End Wrench (use = read status, place = cmd: on/off)=
TechAge Repair Kit=
TechAge Trowel=
Techage Black Hole=
Techage Black Hole (let items disappear)=
Techage Forceload Block=
The Autocrafter allows the automated crafting of items based on configured recipes.@nIt can craft one item every two seconds.@nNeeds axle power: 4=
The Autocrafter allows the automated crafting of items based on configured recipes.@nIt can craft two items every two seconds.@nNeeds electrical power: 6=
The Distributor works as filter and pusher. It allows to divide and distribute incoming items into the 4 output ports. The channels can be switched on/off and individually configured with up to 6 item types. The filter passes the configured items and restrains all others. Unconfigured but activated filters are used for items, which do not fit to all other filters. If the Distributor cant push an item into a block with an inventory (such as a chest) because that inventory is full, but there is one open and unconfigured output, it will use this output port.=
The End Wrench is a tool to read any kind od status information from a node with command inderface.@n- use (left mouse button) = read status@n- place (right mouse button) = send command: on/off=
The Forceload Block keeps the corresponding area loaded and the machines operational as far as the player is logged in. If the player leaves the game, all areas will be unloaded.@nThe maximum number of Forceload Blocks per player is configurable (default 16).@nThe loaded area per block is a cube with 16 m side length (according to a Minetest area block). Punching the block makes the area visible and invisible again.=
The Grinder grinds all kinds of cobblestone to gravel, gravel to sand, sand to clay, wood to leaves, and more.@nIt can grind one item every four seconds.@nIt needs 4 units axle power.=
The Grinder grinds all kinds of cobblestone to gravel, gravel to sand, sand to clay, wood to leaves, and more.@nIt can grind two items every four seconds.@nIt needs 6 units electrical power.=
The Hopper collects dropped items and pushes them to the right side.@nItems are sucked up when they are dropped on top of the Hopper block.@nBut the Hopper can also pull items out of chests or furnace blocks, if it is placed below.=
The Oil Age is the third level of the available technic stages. The goal of TA3 is to build Power Stations, drill for oil, and build machines to produce ores and chips for smart TA4 devices and machines.=
The Protected Chest is useful in protected areas (by means of any protection mod).@nOnly players with interaction rights on that position can take/put item from/to the chest.=
The Protected Chest is useful in protected areas (by means of any protection mod).@nOnly players with interaction rights on that position can take/put item from/to the chest.@nThe Chest supports commands to read the last player action (player-name, take/put, item-name) and the chest state ('empty', 'loaded', 'full').@nThe chest returns 'loaded' when it is not empty and not full, 'full' is returned, when no empty stack is available.@n=
The Pumpjack works similar to a pusher. It pumps one oil item every 8 seconds. It needs 16 units of electrical power.=
The Pusher is a pulling/pushing block, moving items from one inventory block to another (e.g. chests). Start the Pusher with a right-click. It shows the state 'running' as infotext. The Pusher moves items from left to right (IN to OUT).@nIf the source chest is empty, the Pusher goes into 'standby' state for some seconds. If the destination chest is full, the Pusher goes into 'blocked' state.@nThe TA2 Pusher moves two items every 2 seconds.=
The Pusher is a pulling/pushing block, moving items from one inventory block to another (e.g. chests). Start the Pusher with a right-click. It shows the state 'running' as infotext. The Pusher moves items from left to right (IN to OUT).@nIf the source chest is empty, the Pusher goes into 'standby' state for some seconds. If the destination chest is full, the Pusher goes into 'blocked' state.@nThe TA3 Pusher moves 6 items every 2 seconds.=
The Techage Black Hole Block let items disappear. If your machine produces to much or unneeded items, push them into the Black Hole.=
The box automatically unfolds to a derrick when you press the button.@n1: Place the box in the middle of the marked position@n (the derrick requires a free area of 3x3m)@n2: Press the build button@n3: Supply the drill with electricity@n4: Supply the drill with Drill Bits@n5: Press the start button@n6: Remove the excavated material with Tubes/Pusher@n7: The drill stops when oil is found@n (drill speed is 1m/16s)@n8: Replace the drill with the Pumpjack.@nIt needs 16 units electrical power=
This is a collection of further nodes and tools which do not fit to the stages 1 to 4.=
Time=
To melt ores and/or produce alloys. Place the pot on top of the Coal Burner.=
To sieve Gravel and Basalt Gravel to get ores. Punch the sieve with wielded gravel to start sieving. Sieving can be automated by means of the TA1 Hopper. Gravel can be found in caves or generated by means of a TA1 Hammer.=
To sieve Gravel and Basalt Gravel to get ores. Use a Grinder to make Gravel from Cobblestone.@nIt can sieve one item every four seconds.@nIt needs 3 units axle power.=
To sieve Gravel and Basalt Gravel to get ores. Use a Grinder to make Gravel from Cobblestone.@nIt can sieve two items every four seconds.@nIt needs 4 units electrical power.=
To turn electrical power on/off.@nHas to be placed on a TA Power Switch Box.=
Tool to hide and retrieve electrical wiring in walls and floors.@nThe material for hiding the cables must be in the left stack of the first row in the player inventory.=
Update=
Used to find oil (petroleum). Oil can be used as fuel for the Power Station and others. Place the block and right-click on the block to explore the underground. The block will explore a 16x16 field with a depth of up to 400 m. To search deeper, click the block several times. When oil is found, the position for the derrick (Drill Box) is highlighted.@nHint: Mark and protect the position for later use.=
Used to produce Vacuum Pipes, needed for TA3 machines.@nThe fab produces 1 item every 6 seconds.@nIt needs 8 units axle power=
Used to produce WLAN Chips, needed for TA4 machines.@nThe fab produces 1 item every 6 seconds.@nIt needs 12 units electrical power.=
Used to store electrical energy. Charged in about 10 min, provides energy for 10 min.@nIt take and deliver up to 10 units electrical power.=
Used to wash Sieved Gravel to get Usmium Nuggets. The block has to be placed under flowing water. The washed-out nuggets must be sucked in with a Hopper.@nFor the plant you need a chest, the Hopper, the Rinser with tube support and a frame around the flowing water (see plan).@nHint: You can test the Rinser with some sticks that are washed out immediately.@nIt needs 3 units axle power=
[TA] Area is protected!=
[TA] Derrick is being built!=
[TA] Derrick is being removed!=
[TA] Not enough space!=
connected with=
lighter to ignite the Coal Burner and the Coal Pile.=

View File

@ -13,16 +13,12 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local S = techage.S
-- Consumer Related Data
local CRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).consumer end
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local STANDBY_TICKS = 4
local COUNTDOWN_TICKS = 6
local CYCLE_TIME = 16
@ -32,7 +28,7 @@ local formspec0 = "size[5,4]"..
default.gui_bg_img..
default.gui_slots..
"image[1,0;3.4,3.4;techage_oil_tower_inv.png]"..
"button_exit[1,3.2;3,1;build;"..I("Build derrick").."]"
"button_exit[1,3.2;3,1;build;"..S("Build derrick").."]"
local function play_sound(pos)
local mem = tubelib2.get_mem(pos)
@ -66,14 +62,14 @@ local function formspec(self, pos, mem)
"list[context;src;1,1;1,1;]"..
"label[1.3,0.5;IN]"..
"item_image[1,1;1,1;techage:oil_drillbit]"..
"label[1,2;"..I("Drill Bit").."]"..
"label[0.5,3;"..I("Depth")..": "..curr_depth.."/"..depth.."]"..
"label[1,2;"..S("Drill Bit").."]"..
"label[0.5,3;"..S("Depth")..": "..curr_depth.."/"..depth.."]"..
"image[3.5,0;1,1;"..techage.get_power_image(pos, mem).."]"..
"image[3.5,1;1,1;techage_form_arrow.png]"..
"image_button[3.5,2;1,1;".. self:get_state_button_image(mem) ..";state_button;]"..
"label[6.2,0.5;OUT]"..
"list[context;dst;6,1;1,1;]"..
"button_exit[5,3;3,1;remove;"..I("Remove derrick").."]"..
"button_exit[5,3;3,1;remove;"..S("Remove derrick").."]"..
"list[current_player;main;0,4;8,4;]"..
"listring[context;dst]"..
"listring[current_player;main]"..
@ -250,7 +246,7 @@ local tubing = {
}
local _, node_name_ta3, _ =
techage.register_consumer("drillbox", I("TA3 Oil Drill Box"), tiles, {
techage.register_consumer("drillbox", S("TA3 Oil Drill Box"), tiles, {
drawtype = "normal",
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
@ -295,19 +291,21 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA3 Oil Drill Box"),
I([[The box automatically unfolds to a
derrick when you press the button.
1: Place the box in the middle of the marked position
(the derrick requires a free area of 3x3m)
2: Press the build button
3: Supply the drill with electricity
4: Supply the drill with Drill Bits
5: Press the start button
6: Remove the excavated material with Tubes/Pusher
7: The drill stops when oil is found
(drill speed is 1m/16s)
8: Replace the drill with the Pumpjack]]), node_name_ta3)
techage.register_entry_page("ta3op", "drillbox",
S("TA3 Oil Drill Box"),
S("The box automatically unfolds to a derrick when you press the button.@n"..
"1: Place the box in the middle of the marked position@n"..
" (the derrick requires a free area of 3x3m)@n"..
"2: Press the build button@n"..
"3: Supply the drill with electricity@n"..
"4: Supply the drill with Drill Bits@n"..
"5: Press the start button@n"..
"6: Remove the excavated material with Tubes/Pusher@n"..
"7: The drill stops when oil is found@n"..
" (drill speed is 1m/16s)@n"..
"8: Replace the drill with the Pumpjack.@n"..
"It needs 16 units electrical power"),
node_name_ta3)
minetest.register_lbm({
label = "[techage] Oil Tower sound",

View File

@ -1,12 +1,7 @@
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,IS = dofile(MP.."/intllib.lua")
local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local S = techage.S
local PROBABILITY = 80
local OIL_MIN = 2000
@ -103,7 +98,7 @@ local function status(pos, player_name, depth, amount)
depth = depth + pos.y
local posC = {x = center(pos.x), y = pos.y, z = center(pos.z)}
minetest.chat_send_player(player_name,
"[TA Oil] "..S(posC).." depth: "..depth..", Oil: "..amount.." ")
"[TA Oil] "..P2S(posC).." depth: "..depth..", Oil: "..amount.." ")
end
local function marker(player_name, pos)
@ -174,7 +169,7 @@ end
-- Used as storage for already explored blocks
minetest.register_node("techage:oilstorage", {
description = I("TA3 Oil Storage"),
description = S("TA3 Oil Storage"),
tiles = {"default_stone.png"},
groups = {not_in_creative_inventory=1},
diggable = false,
@ -183,7 +178,7 @@ minetest.register_node("techage:oilstorage", {
})
minetest.register_node("techage:oilexplorer", {
description = I("TA3 Oil Explorer"),
description = S("TA3 Oil Explorer"),
tiles = {
"techage_filling_ta3.png^techage_appl_oilexplorer_top.png^techage_frame_ta3_top.png",
"techage_filling_ta3.png^techage_frame_ta3.png",
@ -202,7 +197,7 @@ minetest.register_node("techage:oilexplorer", {
})
minetest.register_node("techage:oilexplorer_on", {
description = I("TA3 Oil Explorer"),
description = S("TA3 Oil Explorer"),
tiles = {
{
image = "techage_filling4_ta3.png^techage_appl_oilexplorer_top4.png^techage_frame4_ta3_top.png",
@ -233,7 +228,7 @@ minetest.register_node("techage:oilexplorer_on", {
})
minetest.register_node("techage:oil_source", {
description = "Oil Source",
description = S("Oil Source"),
drawtype = "liquid",
paramtype = "light",
@ -279,7 +274,7 @@ minetest.register_node("techage:oil_source", {
minetest.register_node("techage:oil_flowing", {
description = I("Flowing Oil"),
description = S("Flowing Oil"),
drawtype = "flowingliquid",
tiles = {"techage_oil.png"},
special_tiles = {
@ -344,15 +339,15 @@ bucket.register_liquid(
"techage_bucket_oil.png",
"Oil Bucket")
techage.register_help_page(I("TA3 Oil Explorer"),
I([[Used to find oil (petroleum).
Oil can be used as fuel for the Coal Power Stations and others.
Place the block and right-click on the block to explore the underground.
The block will explore a 16x16 field with a depth of up to 400 m.
To search deeper, click the block several times.
When oil is found, the position for the Oil Tower is highlighted.
Hint: Mark and protect the position for later use.]]),
"techage:oilexplorer")
techage.register_entry_page("ta3op", "oilexplorer",
S("TA3 Oil Explorer"),
S("Used to find oil (petroleum). Oil can be used as fuel for the Power Station and others. "..
"Place the block and right-click on the block to explore the underground. "..
"The block will explore a 16x16 field with a depth of up to 400 m. "..
"To search deeper, click the block several times. "..
"When oil is found, the position for the derrick (Drill Box) is highlighted.@n"..
"Hint: Mark and protect the position for later use."),
"techage:oilexplorer")
techage.explore = {}

View File

@ -13,13 +13,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Power = techage.ElectricCable
local provide_power = techage.power.provide_power
@ -42,7 +37,7 @@ local function formspec(self, pos, mem)
"list[current_name;fuel;0.5,1;1,1;]"..
"image[1.5,1;1,1;default_furnace_fire_bg.png^[lowpart:"..
fuel_percent..":default_furnace_fire_fg.png]"..
"button[3,1;1.8,1;update;"..I("Update").."]"..
"button[3,1;1.8,1;update;"..S("Update").."]"..
"image_button[5.5,1;1,1;".. self:get_state_button_image(mem) ..";state_button;]"..
"image[6.5,0.5;1,2;"..techage.power.formspec_power_bar(PWR_CAPA, mem.provided).."]"..
"list[current_player;main;0,3;8,4;]"..
@ -145,7 +140,7 @@ local function on_rightclick(pos)
end
minetest.register_node("techage:tiny_generator", {
description = "TA3 Tiny Power Generator",
description = S("TA3 Tiny Power Generator"),
tiles = {
-- up, down, right, left, back, front
"techage_appl_electric_gen_top.png^techage_frame_ta3_top.png",
@ -181,7 +176,7 @@ minetest.register_node("techage:tiny_generator", {
})
minetest.register_node("techage:tiny_generator_on", {
description = "TA3 Tiny Power Generator",
description = S("TA3 Tiny Power Generator"),
tiles = {
-- up, down, right, left, back, front
"techage_appl_electric_gen_top.png^techage_frame_ta3_top.png",
@ -253,8 +248,10 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA3 Tiny Power Generator"),
I([[Small electrical power generator. Need oil as fuel.
Provides power: 12
Oil burn time: 100s]]), "techage:tiny_generator")
techage.register_entry_page("ta3ps", "tiny_generator",
S("TA3 Tiny Power Generator"),
S("Small electrical power generator. Needs oil as fuel.@n"..
"It provides 12 units electrical power@n"..
"Oil burn time: 100s"),
"techage:tiny_generator")

View File

@ -1,31 +0,0 @@
--[[
TechAge
=======
Copyright (C) 2019 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
TA3 Oil Help
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
local HelpText = S([[In the TA3 age, oil (petroleum)
serves as an almost infinite fuel.
But oil is difficult and expensive to recover:
1: Search for oil with the TA3 Oil Explorer
2: Drill for oil with the TA3 Oil Drill Box (oil derrick)
3: Recover the oil with the TA3 Oil Pumpjack
4: A power station nearby provides the necessary
electrical power for the derrick and pumpjack.
5: Tubes or rails are used for oil transportation.
]])
techage.register_chap_page(S("TA3 Oil Age"), HelpText, "techage:oil_source")

View File

@ -13,15 +13,13 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local P = minetest.string_to_pos
local S = techage.S
-- Consumer Related Data
local CRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).consumer end
local CRDN = function(node) return (minetest.registered_nodes[node.name] or {}).consumer end
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local STANDBY_TICKS = 10
local COUNTDOWN_TICKS = 10
@ -56,8 +54,8 @@ local function formspec(self, pos, mem)
default.gui_slots..
"image[0.5,0;1,1;techage_oil_inv.png]"..
"image[2,0;1,1;"..techage.get_power_image(pos, mem).."]"..
"label[0,1.3;"..I("Oil amount:")..": "..amount.."]"..
"button[3,1.1;2,1;update;"..I("Update").."]"..
"label[0,1.3;"..S("Oil amount:")..": "..amount.."]"..
"button[3,1.1;2,1;update;"..S("Update").."]"..
"image_button[2,2.2;1,1;".. self:get_state_button_image(mem) ..";state_button;]"
end
@ -156,7 +154,7 @@ local tubing = {
}
local _, node_name_ta3, _ =
techage.register_consumer("pumpjack", I("TA3 Oil Pumpjack"), tiles, {
techage.register_consumer("pumpjack", S("TA3 Oil Pumpjack"), tiles, {
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
formspec = formspec,
@ -192,6 +190,7 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA3 Oil Pumpjack"),
I([[The Pumpjack works similar to a pusher but needs
electricity for operation.]]), "techage:ta3_pumpjack_pas")
techage.register_entry_page("ta3op", "pumpjack",
S("TA3 Oil Pumpjack"),
S("The Pumpjack works similar to a pusher. It pumps one oil item every 8 seconds. It needs 16 units of electrical power."),
"techage:ta3_pumpjack_pas")

View File

@ -13,17 +13,12 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
minetest.register_node("techage:oiltower1", {
description = I("TA3 Oil Tower"),
description = S("TA3 Derrick"),
tiles = {
"techage_oil_tower1.png",
},
@ -49,7 +44,7 @@ minetest.register_node("techage:oiltower1", {
})
minetest.register_node("techage:oiltower2", {
description = I("TA3 Oil Tower"),
description = S("TA3 Derrick"),
tiles = {
-- up, down, right, left, back, front
"techage_oil_tower_top.png^[transformR180",
@ -81,7 +76,7 @@ minetest.register_node("techage:oiltower2", {
})
minetest.register_node("techage:oiltower3", {
description = I("TA3 Oil Tower"),
description = S("TA3 Derrick"),
tiles = {
-- up, down, right, left, back, front
"techage_oil_tower_top.png^[transformR180",
@ -113,7 +108,7 @@ minetest.register_node("techage:oiltower3", {
})
minetest.register_node("techage:oiltower4", {
description = I("TA3 Oil Tower"),
description = S("TA3 Derrick"),
tiles = {
-- up, down, right, left, back, front
"techage_oil_tower_top.png^[transformR180",
@ -145,7 +140,7 @@ minetest.register_node("techage:oiltower4", {
})
minetest.register_node("techage:oiltower5", {
description = I("TA4 Oil Tower"),
description = S("TA4 Derrick"),
tiles = {
-- up, down, right, left, back, front
"techage_oil_tower1.png",
@ -167,7 +162,7 @@ minetest.register_node("techage:oiltower5", {
})
minetest.register_node("techage:oil_drillbit", {
description = I("TA3 Drill Bit"),
description = S("TA3 Drill Bit"),
drawtype = "plantlike",
tiles = {"techage_oil_drillbit.png"},
inventory_image = "techage_oil_drillbit_inv.png",
@ -180,7 +175,7 @@ minetest.register_node("techage:oil_drillbit", {
})
minetest.register_node("techage:oil_drillbit2", {
description = I("TA3 Drill Bit"),
description = S("TA3 Drill Bit"),
drawtype = "plantlike",
tiles = {"techage_oil_drillbit.png"},
inventory_image = "techage_oil_drillbit_inv.png",
@ -274,12 +269,12 @@ techage.oiltower = {}
-- 1) mem.assemble_locked is true while the tower is being assembled/disassembled
-- 2) mem.assemble_build is true if the tower is assembled
function techage.oiltower.build(pos, player_name)
minetest.chat_send_player(player_name, I("[TA] Tower is being built!"))
minetest.chat_send_player(player_name, S("[TA] Derrick is being built!"))
techage.assemble.build(pos, AssemblyPlan, player_name)
end
function techage.oiltower.remove(pos, player_name)
minetest.chat_send_player(player_name, I("[TA] Tower is being removed!"))
minetest.chat_send_player(player_name, S("[TA] Derrick is being removed!"))
techage.assemble.remove(pos, AssemblyPlan, player_name)
end

View File

@ -13,14 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Pipe = tubelib2.Tube:new({
dirs_to_check = {1,2,3,4,5,6},
@ -63,7 +58,7 @@ end)
minetest.register_node("techage:biogas_pipeS", {
description = I("TA3 Biogas Pipe"),
description = S("TA3 Biogas Pipe"),
tiles = {
"techage_gaspipe.png^[transformR90",
"techage_gaspipe.png^[transformR90",
@ -105,7 +100,7 @@ minetest.register_node("techage:biogas_pipeS", {
})
minetest.register_node("techage:biogas_pipeA", {
description = I("TA3 Biogas Pipe"),
description = S("TA3 Biogas Pipe"),
tiles = {
"techage_gaspipe_knee2.png",
"techage_gaspipe_hole2.png^[transformR180",

View File

@ -13,14 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Axle = tubelib2.Tube:new({
dirs_to_check = {1,2,3,4,5,6},
@ -45,7 +40,7 @@ end)
techage.Axle = Axle
minetest.register_node("techage:axle", {
description = I("TA2 Drive Axle"),
description = S("TA2 Drive Axle"),
tiles = {
"techage_axleR.png",
"techage_axleR.png",
@ -84,7 +79,7 @@ minetest.register_node("techage:axle", {
})
minetest.register_node("techage:axle_on", {
description = I("TA2 Drive Axle"),
description = S("TA2 Drive Axle"),
tiles = {
{
image = "techage_axle4R.png",

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Cable = tubelib2.Tube:new({
dirs_to_check = {1,2,3,4,5,6},
@ -56,7 +52,7 @@ end
minetest.register_node("techage:electric_cableS", {
description = I("TA Electric Cable"),
description = S("TA Electric Cable"),
tiles = {
-- up, down, right, left, back, front
"techage_electric_cable.png",
@ -99,7 +95,7 @@ minetest.register_node("techage:electric_cableS", {
})
minetest.register_node("techage:electric_cableA", {
description = I("TA Electric Cable"),
description = S("TA Electric Cable"),
tiles = {
-- up, down, right, left, back, front
"techage_electric_cable.png",

View File

@ -14,13 +14,11 @@
-- for lazy programmers
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Cable = techage.ElectricCable
local power_switched = techage.power.power_switched
local power_available = techage.power.power_available
local size = 3/32
local Boxes = {
@ -33,7 +31,7 @@ local Boxes = {
}
techage.register_junction("techage:electric_junction", 2/8, Boxes, Cable, {
description = I("TA Electric Junction Box"),
description = S("TA Electric Junction Box"),
tiles = {"techage_electric_junction.png"},
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, techage_trowel = 1},
sounds = default.node_sound_defaults(),
@ -44,7 +42,14 @@ techage.register_junction("techage:electric_junction", 2/8, Boxes, Cable, {
minetest.swap_node(pos, {name = name, param2 = 0})
power_switched(pos)
end,
})
is_power_available = function(pos)
if power_available(pos) then
return "on"
else
return "off"
end
end,
})
minetest.register_craft({
output = "techage:electric_junction0 2",

View File

@ -12,20 +12,15 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Cable = techage.ElectricCable
-- Primary techage.ElectricCable node
minetest.register_node("techage:power_line", {
description = I("TA Power Line"),
description = S("TA Power Line"),
tiles = {"techage_power_line.png"},
inventory_image = 'techage_power_line_inv.png',
after_place_node = function(pos, placer, itemstack, pointed_thing)
@ -64,7 +59,7 @@ minetest.register_node("techage:power_line", {
})
minetest.register_node("techage:power_pole", {
description = I("TA Power Pole"),
description = S("TA Power Pole"),
--tiles = {"techage_power_pole.png"},
tiles = {
"default_wood.png^techage_power_pole_top.png",

View File

@ -13,13 +13,10 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local S = techage.S
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local Cable = techage.ElectricCable
local power_cut = techage.power.power_cut
@ -67,7 +64,7 @@ end
minetest.register_node("techage:powerswitch", {
description = I("TA Power Switch"),
description = S("TA Power Switch"),
inventory_image = "techage_appl_switch_inv.png",
tiles = {
'techage_appl_switch_off.png',
@ -97,7 +94,7 @@ minetest.register_node("techage:powerswitch", {
minetest.register_node("techage:powerswitch_on", {
description = I("TA Power Switch"),
description = S("TA Power Switch"),
inventory_image = "techage_appl_switch_inv.png",
tiles = {
'techage_appl_switch_on.png',
@ -143,7 +140,7 @@ local function on_rotate(pos, node, user, mode, new_param2)
end
minetest.register_node("techage:powerswitch_box", {
description = I("TA Power Switch Box"),
description = S("TA Power Switch Box"),
tiles = {
-- up, down, right, left, back, front
'techage_electric_switch.png',

View File

@ -13,14 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Pipe = tubelib2.Tube:new({
dirs_to_check = {1,2,3,4,5,6},
@ -43,7 +38,7 @@ techage.SteamPipe = Pipe
minetest.register_node("techage:steam_pipeS", {
description = I("TA2 Steam Pipe"),
description = S("TA2 Steam Pipe"),
tiles = {
"techage_steam_pipe.png^[transformR90",
"techage_steam_pipe.png^[transformR90",
@ -82,7 +77,7 @@ minetest.register_node("techage:steam_pipeS", {
})
minetest.register_node("techage:steam_pipeA", {
description = I("TA2 Steam Pipe"),
description = S("TA2 Steam Pipe"),
tiles = {
"techage_steam_knee2.png",
"techage_steam_hole2.png^[transformR180",

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local CYCLE_TIME = 4
local STANDBY_TICKS = 2
@ -53,7 +49,7 @@ local function formspec(self, pos, mem)
temp..":techage_form_temp_fg.png]"..
"image[7,0.5;1,2;"..techage.power.formspec_power_bar(1, ratio).."]"..
"image_button[6,1;1,1;".. self:get_state_button_image(mem) ..";state_button;]"..
"button[3,1.5;2,1;update;"..I("Update").."]"..
"button[3,1.5;2,1;update;"..S("Update").."]"..
"list[current_player;main;0,3;8,4;]"..
"listring[current_name;water]"..
"listring[current_player;main]"..
@ -215,7 +211,7 @@ local function allow_metadata_inventory_take(pos, listname, index, stack, player
end
minetest.register_node("techage:boiler1", {
description = I("TA2 Boiler Base"),
description = S("TA2 Boiler Base"),
tiles = {"techage_boiler.png"},
drawtype = "mesh",
mesh = "techage_boiler.obj",
@ -232,7 +228,7 @@ minetest.register_node("techage:boiler1", {
-- boiler2: Main part, needed as generator
minetest.register_node("techage:boiler2", {
description = I("TA2 Boiler Top"),
description = S("TA2 Boiler Top"),
tiles = {"techage_boiler2.png"},
drawtype = "mesh",
mesh = "techage_boiler.obj",
@ -316,13 +312,12 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA2 Boiler Base"),
I([[Part of the steam engine.
Has to be placed on top of the Firebox
and filled with water.
(see TA2 Steam Engine)]]), "techage:boiler1")
techage.register_entry_page("ta2", "boiler1",
S("TA2 Boiler Base"),
S("Part of the steam engine. Has to be placed on top of the Firebox and filled with water.@n"..
"(see TA2 Steam Engine)"), "techage:boiler1")
techage.register_help_page(I("TA2 Boiler Top"),
I([[Part of the steam engine.
Has to be placed on top of TA2 Boiler Base.
(see TA2 Steam Engine)]]), "techage:boiler2")
techage.register_entry_page("ta2", "boiler2",
S("TA2 Boiler Top"),
S("Part of the steam engine. Has to be placed on top of TA2 Boiler Base.@n(see TA2 Steam Engine)"),
"techage:boiler2")

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local Pipe = techage.SteamPipe
@ -40,7 +36,7 @@ local function after_tube_update(node, pos, out_dir, peer_pos, peer_in_dir)
end
minetest.register_node("techage:cylinder", {
description = I("TA2 Cylinder"),
description = S("TA2 Cylinder"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta2.png^techage_frame_ta2.png",
@ -60,7 +56,7 @@ minetest.register_node("techage:cylinder", {
})
minetest.register_node("techage:cylinder_on", {
description = I("TA2 Cylinder"),
description = S("TA2 Cylinder"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta2.png^techage_frame_ta2.png",
@ -110,8 +106,7 @@ techage.register_node({"techage:cylinder", "techage:cylinder_on"}, {
if topic == "trigger" then
local power = techage.transfer(pos, "R", "trigger", nil, nil, {
"techage:flywheel", "techage:flywheel_on"}) or 0
--print("trigger", power, mem.running)
if not power then
return 0
elseif power > 0 and not mem.running then
@ -141,8 +136,8 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA2 Cylinder"),
I([[Part of the steam engine.
Has to be placed side by side
with the TA2 Flywheel.
(see TA2 Steam Engine)]]), "techage:cylinder")
techage.register_entry_page("ta2", "cylinder",
S("TA2 Cylinder"),
S("Part of the steam engine. Has to be placed side by side with the TA2 Flywheel.@n"..
"(see TA2 Steam Engine)"),
"techage:cylinder")

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local firebox = techage.firebox
@ -56,7 +52,7 @@ local function node_timer(pos, elapsed)
end
minetest.register_node("techage:firebox", {
description = I("TA2 Firebox"),
description = S("TA2 Firebox"),
tiles = {
-- up, down, right, left, back, front
"techage_firebox.png^techage_appl_open.png^techage_frame_ta2.png",
@ -103,7 +99,7 @@ minetest.register_node("techage:firebox", {
})
minetest.register_node("techage:firebox_on", {
description = I("TA2 Firebox"),
description = S("TA2 Firebox"),
tiles = {
-- up, down, right, left, back, front
"techage_firebox.png^techage_frame_ta2.png",

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local STANDBY_TICKS = 4
local COUNTDOWN_TICKS = 4
@ -37,7 +33,7 @@ local function formspec(self, pos, mem)
default.gui_slots..
"image[6,0.5;1,2;"..techage.power.formspec_power_bar(PWR_CAPA, mem.provided).."]"..
"image_button[5,1;1,1;".. self:get_state_button_image(mem) ..";state_button;]"..
"button[2,1.5;2,1;update;"..I("Update").."]"..
"button[2,1.5;2,1;update;"..S("Update").."]"..
"list[current_player;main;0,3;8,4;]"..
default.get_hotbar_bg(0, 3)
end
@ -124,7 +120,7 @@ local function on_rightclick(pos)
end
minetest.register_node("techage:flywheel", {
description = I("TA2 Flywheel"),
description = S("TA2 Flywheel"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta2.png^techage_frame_ta2.png",
@ -155,7 +151,7 @@ minetest.register_node("techage:flywheel", {
})
minetest.register_node("techage:flywheel_on", {
description = I("TA2 Flywheel"),
description = S("TA2 Flywheel"),
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta2.png^techage_frame_ta2.png",
@ -234,11 +230,9 @@ minetest.register_craft({
},
})
techage.register_help_page(I("TA2 Flywheel"),
I([[Part of the steam engine.
Has to be placed side by side
with the TA2 Cylinder.
Used to turn on/off the steam engine.
Connect the Flywheel with your TA2 machines
by means of Axles and Gearboxes
(see TA2 Steam Engine)]]), "techage:flywheel")
techage.register_entry_page("ta2", "flywheel",
S("TA2 Flywheel"),
S("Part of the steam engine. Has to be placed side by side with the TA2 Cylinder.@n"..
"Used to turn on/off the steam engine. Connect the Flywheel with your TA2 machines "..
"by means of Axles and Gearboxes.@n"..
"(see TA2 Steam Engine)"), "techage:flywheel")

View File

@ -13,13 +13,9 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
local S = techage.S
local PWR_NEEDED = 1
local CYCLE_TIME = 2
@ -60,7 +56,7 @@ local function after_place_node(pos, placer, itemstack, pointed_thing)
end
minetest.register_node("techage:gearbox", {
description = I("TA2 Gearbox"),
description = S("TA2 Gearbox"),
tiles = {"techage_filling_ta2.png^techage_axle_gearbox.png^techage_frame_ta2.png"},
on_construct = tubelib2.init_mem,

View File

@ -12,24 +12,15 @@
]]--
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local S, NS = dofile(MP.."/intllib.lua")
local S = techage.S
techage.register_chap_page(S("Steam Age (TA2)"), S([[Steam Age is the second level of the available technic stages.
The goal of TA2 is build a steam engine and machines
to produce ores and vacuum tubes for the first
electronic devices and machines in TA3.]]), "techage:vacuum_tube")
local HelpText = S([[1. Build a steam engine according
to the plan with TA2 Firebox, TA2 Boiler,
Steam Pipes, TA2 Cyclinder and TA2 Flywheel.
2. Heat the Firebox with coal/charcoal
3. Fill the boiler with water (more than one bucket is needed)
4. Wait until the water is heated
5. Open the steam ventil
6. Start the Flywheel
7. Connect the Flywheel with your machines by means of Axles and Gearboxes]])
local HelpText = S("Build a steam engine according to the plan with TA2 Firebox, TA2 Boiler, Steam Pipes, TA2 Cylinder and TA2 Flywheel.@n"..
"- Heat the Firebox with coal/charcoal@n"..
"- Fill the boiler with water (more than one bucket is needed)@n"..
"- Wait until the water is heated@n"..
"- Open the steam ventil@n"..
"- Start the Flywheel@n"..
"- Connect the Flywheel with your machines by means of Axles and Gearboxes")
local Images = {
@ -44,6 +35,7 @@ local Images = {
"techage_filling_ta2.png^techage_frame_ta2.png^techage_flywheel.png^[transformFX]"},
}
techage.register_help_page("Steam Engine", HelpText, nil, Images)
techage.register_entry_page("ta2", "steam_engine",
S("Steam Engine"), HelpText, nil, Images)

BIN
textures/techage_flame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

BIN
textures/techage_hopper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -12,9 +12,8 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local S = techage.S
--local function destroy_node(itemstack, placer, pointed_thing)
-- if pointed_thing.type == "node" then
@ -42,8 +41,8 @@ local function read_state(itemstack, user, pointed_thing)
local pos = pointed_thing.under
if pos and user then
local number = techage.get_node_number(pos)
local ndef = minetest.registered_nodes[minetest.get_node(pos).name]
if number then
local ndef = minetest.registered_nodes[minetest.get_node(pos).name]
if ndef and ndef.description then
local state = techage.send_single(number, "state", nil)
if state and state ~= "" and state ~= "unsupported" then
@ -61,15 +60,26 @@ local function read_state(itemstack, user, pointed_thing)
if load and load ~= "" and load ~= "unsupported" then
minetest.chat_send_player(user:get_player_name(), ndef.description.." "..number..": load = "..load.." % ")
end
local power = techage.send_single(number, "power", nil)
if power and power ~= "" and power ~= "unsupported" then
minetest.chat_send_player(user:get_player_name(), ndef.description.." "..number..": power = "..power.." % ")
end
itemstack:add_wear(65636/200)
return itemstack
end
elseif ndef and ndef.description then
if ndef.is_power_available then
local power = ndef.is_power_available(pos)
minetest.chat_send_player(user:get_player_name(), ndef.description..": power = "..power.." ")
end
itemstack:add_wear(65636/200)
return itemstack
end
end
end
minetest.register_tool("techage:repairkit", {
description = "TechAge Repair Kit",
description = S("TechAge Repair Kit"),
inventory_image = "techage_repairkit.png",
wield_image = "techage_repairkit.png^[transformR270",
groups = {cracky=1, book=1},
@ -80,7 +90,7 @@ minetest.register_tool("techage:repairkit", {
minetest.register_tool("techage:end_wrench", {
description = "TechAge End Wrench (use = read status, place = cmd: on/off)",
description = S("TechAge End Wrench (use = read status, place = cmd: on/off)"),
inventory_image = "techage_end_wrench.png",
wield_image = "techage_end_wrench.png",
groups = {cracky=1, book=1},
@ -107,3 +117,11 @@ minetest.register_craft({
{"default:steel_ingot", "", ""},
},
})
techage.register_entry_page("ta", "end_wrench",
S("TechAge End Wrench"),
S("The End Wrench is a tool to read any kind od status information from a node with command inderface.@n"..
"- use (left mouse button) = read status@n"..
"- place (right mouse button) = send command: on/off"),
"techage:end_wrench")

View File

@ -13,13 +13,10 @@
]]--
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local S = techage.S
-- Load support for intllib.
local MP = minetest.get_modpath("techage")
local I,_ = dofile(MP.."/intllib.lua")
-- used by other tools: dug_node[player_name] = pos
techage.dug_node = {}
@ -81,7 +78,7 @@ local function replace_node(itemstack, placer, pointed_thing)
end
minetest.register_node("techage:trowel", {
description = I("TechAge Trowel (uses items from the first, left inventory stack)"),
description = S("TechAge Trowel"),
inventory_image = "techage_trowel.png",
wield_image = "techage_trowel.png",
use_texture_alpha = true,
@ -114,3 +111,9 @@ minetest.register_craft({
{"", "", "default:stick"},
},
})
techage.register_entry_page("ta", "trowel",
S("TechAge Trowel"),
S("Tool to hide and retrieve electrical wiring in walls and floors.@n"..
"The material for hiding the cables must be in the left stack of the first row in the player inventory."),
"techage:trowel")