forked from MTSR/techage_modpack
built on 05/11/2023 13:18:27
This commit is contained in:
parent
af08095665
commit
320a788112
25
README.md
25
README.md
@ -46,6 +46,31 @@ ta4_jetpack requires the modpack 3d_armor. 3d_armor is itself a modpack and can'
|
||||
|
||||
### History
|
||||
|
||||
#### 2023-11-05
|
||||
|
||||
Updated Mods:
|
||||
|
||||
- techage v1.18:
|
||||
- see readme.md
|
||||
- ta4_jetpack:
|
||||
- Fix translation issue
|
||||
- minecart:
|
||||
- Fix bug with missing techage mod
|
||||
- signs_bot:
|
||||
- Fix bug #36 (pattern/copy 5x3 is off center)
|
||||
- Adapt bot box for techage assembly tool
|
||||
- Escape equal sign in german translation (Niklp09)
|
||||
- autobahn:
|
||||
- Add support for player_monoids (Niklp09)
|
||||
- compost:
|
||||
- User proper player creative check (Niklp09)
|
||||
- Fix drop bug
|
||||
- techpack_stairway:
|
||||
- Add stairways without handrails
|
||||
- networks:
|
||||
- Add support for colored nodes by unifieddyes
|
||||
- Improve debugging tool
|
||||
|
||||
#### 2023-08-25
|
||||
|
||||
**The mod doclib is a new hard dependency !**
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
]]--
|
||||
local S = minetest.get_translator("autobahn")
|
||||
local mod_player_monoids = minetest.get_modpath("player_monoids")
|
||||
|
||||
autobahn = {}
|
||||
|
||||
@ -39,42 +40,46 @@ local function is_active(player)
|
||||
end
|
||||
|
||||
local function set_player_privs(player)
|
||||
local physics = player:get_physics_override()
|
||||
local meta = player:get_meta()
|
||||
-- Check access conflicts with other mods
|
||||
if meta:get_int("player_physics_locked") == 0 then
|
||||
meta:set_int("player_physics_locked", 1)
|
||||
if meta and physics then
|
||||
if mod_player_monoids then
|
||||
player_monoids.speed:add_change(player, 3.5, "autobahn:speed")
|
||||
else
|
||||
local physics = player:get_physics_override()
|
||||
-- store the player privs default values
|
||||
meta:set_float("autobahn_speed", physics.speed)
|
||||
-- set operator privs
|
||||
meta:set_int("autobahn_isactive", 1)
|
||||
physics.speed = 3.5
|
||||
minetest.sound_play("autobahn_motor", {
|
||||
pos = player:get_pos(),
|
||||
gain = 0.5,
|
||||
max_hear_distance = 5,
|
||||
})
|
||||
-- write back
|
||||
player:set_physics_override(physics)
|
||||
end
|
||||
-- set operator privs
|
||||
meta:set_int("autobahn_isactive", 1)
|
||||
minetest.sound_play("autobahn_motor", {
|
||||
pos = player:get_pos(),
|
||||
gain = 0.5,
|
||||
max_hear_distance = 5,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
local function reset_player_privs(player)
|
||||
local physics = player:get_physics_override()
|
||||
local meta = player:get_meta()
|
||||
if meta and physics then
|
||||
-- restore the player privs default values
|
||||
meta:set_int("autobahn_isactive", 0)
|
||||
-- restore the player privs default values
|
||||
meta:set_int("autobahn_isactive", 0)
|
||||
if mod_player_monoids then
|
||||
player_monoids.speed:del_change(player, "autobahn:speed")
|
||||
else
|
||||
local physics = player:get_physics_override()
|
||||
physics.speed = meta:get_float("autobahn_speed")
|
||||
if physics.speed == 0 then physics.speed = 1 end
|
||||
-- delete stored default values
|
||||
meta:set_string("autobahn_speed", "")
|
||||
-- write back
|
||||
player:set_physics_override(physics)
|
||||
meta:set_int("player_physics_locked", 0)
|
||||
end
|
||||
meta:set_int("player_physics_locked", 0)
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
|
@ -2,4 +2,4 @@ name=autobahn
|
||||
title=Autobahn
|
||||
description=Street mod for faster travelling.
|
||||
depends=default
|
||||
optional_depends=moreblocks, techage, minecart
|
||||
optional_depends=moreblocks, techage, minecart, player_monoids
|
||||
|
@ -77,7 +77,7 @@ end)
|
||||
|
||||
local function next_state(pos, elapsed)
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
|
||||
if node.name == "compost:wood_barrel_1" then
|
||||
minetest.swap_node(pos, {name = "compost:wood_barrel_2"})
|
||||
elseif node.name == "compost:wood_barrel_2" then
|
||||
@ -102,13 +102,13 @@ end
|
||||
local function add_item(pos, stack)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local num = meta:get_int("num") or 0
|
||||
|
||||
|
||||
if num < NUM_LEAVES then
|
||||
-- add futher leaves
|
||||
meta:set_int("num", num + stack:get_count())
|
||||
stack:set_count(0)
|
||||
end
|
||||
|
||||
|
||||
start_composter(pos)
|
||||
return stack
|
||||
end
|
||||
@ -121,7 +121,6 @@ local function minecart_hopper_additem(pos, stack)
|
||||
end
|
||||
|
||||
local function minecart_hopper_takeitem(pos, num)
|
||||
local node = minetest.get_node(pos)
|
||||
minetest.swap_node(pos, {name = "compost:wood_barrel"})
|
||||
start_composter(pos)
|
||||
return ItemStack("compost:compost")
|
||||
@ -152,7 +151,7 @@ minetest.register_node("compost:wood_barrel", {
|
||||
if compost.can_compost(wielded_item) then
|
||||
minetest.swap_node(pos, {name = "compost:wood_barrel_1"})
|
||||
local w = puncher:get_wielded_item()
|
||||
if not(minetest.setting_getbool("creative_mode")) then
|
||||
if not minetest.is_creative_enabled(puncher:get_player_name()) then
|
||||
w:take_item(1)
|
||||
puncher:set_wielded_item(w)
|
||||
end
|
||||
@ -180,6 +179,7 @@ minetest.register_node("compost:wood_barrel_1", {
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 3, not_in_creative_inventory=1},
|
||||
drop = "compost:wood_barrel",
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_timer = next_state,
|
||||
minecart_hopper_untakeitem = minecart_hopper_untakeitem,
|
||||
@ -201,6 +201,7 @@ minetest.register_node("compost:wood_barrel_2", {
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 3, not_in_creative_inventory=1},
|
||||
drop = "compost:wood_barrel",
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_timer = next_state,
|
||||
minecart_hopper_untakeitem = minecart_hopper_untakeitem,
|
||||
@ -222,6 +223,7 @@ minetest.register_node("compost:wood_barrel_3", {
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 3, not_in_creative_inventory=1},
|
||||
drop = "compost:wood_barrel",
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_punch = function(pos, node, player, pointed_thing)
|
||||
local p = {x = pos.x + math.random(0, 5)/5 - 0.5, y = pos.y+1, z = pos.z + math.random(0, 5)/5 - 0.5}
|
||||
@ -273,7 +275,7 @@ minetest.register_craft({
|
||||
if minetest.global_exists("techage") then
|
||||
techage.register_node(
|
||||
{
|
||||
"compost:wood_barrel",
|
||||
"compost:wood_barrel",
|
||||
"compost:wood_barrel_1",
|
||||
"compost:wood_barrel_2",
|
||||
"compost:wood_barrel_3",
|
||||
@ -300,6 +302,6 @@ if minetest.global_exists("techage") then
|
||||
minetest.swap_node(pos, {name = "compost:wood_barrel_2"})
|
||||
return true
|
||||
end,
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -14,6 +14,113 @@
|
||||
|
||||
local MP = minetest.get_modpath("minecart")
|
||||
|
||||
if not minetest.global_exists("techage") and
|
||||
minetest.global_exists("doclib") then
|
||||
|
||||
minetest.register_node("minecart:manual", {
|
||||
description = "Minecart Manual (EN)",
|
||||
inventory_image = "minecart_book_inv.png",
|
||||
tiles = {
|
||||
-- up, down, right, left, back, front
|
||||
"minecart_book.png",
|
||||
"minecart_book.png",
|
||||
"minecart_book.png^[transformR270",
|
||||
"minecart_book.png^[transformR90",
|
||||
"minecart_book.png^[transformR180",
|
||||
"minecart_book.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/32, -16/32, -12/32, 8/32, -12/32, 12/32},
|
||||
},
|
||||
},
|
||||
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
minetest.get_meta(pos):set_string("infotext", "Minecart Manual (EN)")
|
||||
minetest.get_meta(pos):set_string("formspec", doclib.formspec(pos, "minecart", "EN"))
|
||||
end,
|
||||
|
||||
on_receive_fields = function(pos, formname, fields, player)
|
||||
local player_name = player:get_player_name()
|
||||
if minetest.is_protected(pos, player_name) then
|
||||
return
|
||||
end
|
||||
minetest.get_meta(pos):set_string("formspec", doclib.formspec(pos, "minecart", "EN", fields))
|
||||
end,
|
||||
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "clip",
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_node("minecart:handbuch", {
|
||||
description = "Minecart Handbuch (DE)",
|
||||
inventory_image = "minecart_book_inv.png",
|
||||
tiles = {
|
||||
-- up, down, right, left, back, front
|
||||
"minecart_book.png",
|
||||
"minecart_book.png",
|
||||
"minecart_book.png^[transformR270",
|
||||
"minecart_book.png^[transformR90",
|
||||
"minecart_book.png^[transformR180",
|
||||
"minecart_book.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/32, -16/32, -12/32, 8/32, -12/32, 12/32},
|
||||
},
|
||||
},
|
||||
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
minetest.get_meta(pos):set_string("infotext", "Minecart Handbuch (DE)")
|
||||
minetest.get_meta(pos):set_string("formspec", doclib.formspec(pos, "minecart", "DE"))
|
||||
end,
|
||||
|
||||
on_receive_fields = function(pos, formname, fields, player)
|
||||
local player_name = player:get_player_name()
|
||||
if minetest.is_protected(pos, player_name) then
|
||||
return
|
||||
end
|
||||
minetest.get_meta(pos):set_string("formspec", doclib.formspec(pos, "minecart", "DE", fields))
|
||||
end,
|
||||
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "clip",
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "minecart:manual",
|
||||
recipe = {
|
||||
{"dye:red", "default:paper", "default:paper"},
|
||||
{"dye:black", "default:paper", "default:paper"},
|
||||
{"dye:red", "default:paper", "default:paper"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "minecart:handbuch",
|
||||
recipe = {"minecart:manual"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "minecart:manual",
|
||||
recipe = {"minecart:handbuch"},
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_on_mods_loaded(function()
|
||||
if minetest.global_exists("techage") then
|
||||
|
||||
@ -38,108 +145,5 @@ minetest.register_on_mods_loaded(function()
|
||||
local content = dofile(MP.."/manual_DE.lua")
|
||||
doclib.add_to_manual("minecart", "DE", content)
|
||||
|
||||
minetest.register_node("minecart:manual", {
|
||||
description = "Minecart Manual (EN)",
|
||||
inventory_image = "minecart_book_inv.png",
|
||||
tiles = {
|
||||
-- up, down, right, left, back, front
|
||||
"minecart_book.png",
|
||||
"minecart_book.png",
|
||||
"minecart_book.png^[transformR270",
|
||||
"minecart_book.png^[transformR90",
|
||||
"minecart_book.png^[transformR180",
|
||||
"minecart_book.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/32, -16/32, -12/32, 8/32, -12/32, 12/32},
|
||||
},
|
||||
},
|
||||
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
minetest.get_meta(pos):set_string("infotext", "Minecart Manual (EN)")
|
||||
minetest.get_meta(pos):set_string("formspec", doclib.formspec(pos, "minecart", "EN"))
|
||||
end,
|
||||
|
||||
on_receive_fields = function(pos, formname, fields, player)
|
||||
local player_name = player:get_player_name()
|
||||
if minetest.is_protected(pos, player_name) then
|
||||
return
|
||||
end
|
||||
minetest.get_meta(pos):set_string("formspec", doclib.formspec(pos, "minecart", "EN", fields))
|
||||
end,
|
||||
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "clip",
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_node("minecart:handbuch", {
|
||||
description = "Minecart Handbuch (DE)",
|
||||
inventory_image = "minecart_book_inv.png",
|
||||
tiles = {
|
||||
-- up, down, right, left, back, front
|
||||
"minecart_book.png",
|
||||
"minecart_book.png",
|
||||
"minecart_book.png^[transformR270",
|
||||
"minecart_book.png^[transformR90",
|
||||
"minecart_book.png^[transformR180",
|
||||
"minecart_book.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/32, -16/32, -12/32, 8/32, -12/32, 12/32},
|
||||
},
|
||||
},
|
||||
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
minetest.get_meta(pos):set_string("infotext", "Minecart Handbuch (DE)")
|
||||
minetest.get_meta(pos):set_string("formspec", doclib.formspec(pos, "minecart", "DE"))
|
||||
end,
|
||||
|
||||
on_receive_fields = function(pos, formname, fields, player)
|
||||
local player_name = player:get_player_name()
|
||||
if minetest.is_protected(pos, player_name) then
|
||||
return
|
||||
end
|
||||
minetest.get_meta(pos):set_string("formspec", doclib.formspec(pos, "minecart", "DE", fields))
|
||||
end,
|
||||
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "clip",
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "minecart:manual",
|
||||
recipe = {
|
||||
{"dye:red", "default:paper", "default:paper"},
|
||||
{"dye:black", "default:paper", "default:paper"},
|
||||
{"dye:red", "default:paper", "default:paper"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "minecart:handbuch",
|
||||
recipe = {"minecart:manual"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "minecart:manual",
|
||||
recipe = {"minecart:handbuch"},
|
||||
})
|
||||
|
||||
end
|
||||
end)
|
@ -36,7 +36,7 @@ The mod uses a whitelist for filling material. The function
|
||||
Liquid networks consists of following node types:
|
||||
|
||||
- Pumps, nodes pumping liquids from/to tanks
|
||||
- Tanks, storuing liquids
|
||||
- Tanks, storing liquids
|
||||
- Junctions, to connect pipes to networks
|
||||
- Valves, to turn on/off pipe segments
|
||||
|
||||
|
@ -103,6 +103,8 @@ function networks.hide_node(pos, node, placer)
|
||||
local ndef = minetest.registered_nodes[taken:get_name()]
|
||||
if ndef.paramtype2 and ndef.paramtype2 == "facedir" then
|
||||
param2 = minetest.dir_to_facedir(placer:get_look_dir(), true)
|
||||
elseif ndef.paramtype2 and ndef.paramtype2 == "color" then
|
||||
param2 = taken:get_meta():get_int("palette_index")
|
||||
end
|
||||
minetest.swap_node(pos, {name = taken:get_name(), param2 = param2})
|
||||
inv:set_stack("main", 1, stack)
|
||||
@ -121,8 +123,13 @@ function networks.open_node(pos, node, placer)
|
||||
minetest.swap_node(pos, {name = name, param2 = param2 % 32 + M(pos):get_int("netw_color_param2")})
|
||||
local meta = M(pos)
|
||||
meta:set_string("netw_name", "")
|
||||
local stack = ItemStack(node.name)
|
||||
local inv = placer:get_inventory()
|
||||
inv:add_item("main", ItemStack(node.name))
|
||||
local ndef = minetest.registered_nodes[node.name]
|
||||
if ndef and ndef.paramtype2 == "color" then
|
||||
stack:get_meta():set_int("palette_index", node.param2)
|
||||
end
|
||||
inv:add_item("main", stack)
|
||||
return true
|
||||
end
|
||||
|
||||
|
@ -81,6 +81,11 @@ local function print_liquid_network_data(pos, api, netw_type, outdir)
|
||||
end
|
||||
end
|
||||
|
||||
local function is_junction(pos, tlib2)
|
||||
local ndef = networks.net_def(pos, tlib2.tube_type)
|
||||
return ndef.ntype == "junc"
|
||||
end
|
||||
|
||||
local function print_netID(pos, api, netw_type)
|
||||
local tlib2 = networks.registered_networks[api][netw_type]
|
||||
for _,outdir in ipairs(networks.get_outdirs(pos, tlib2)) do
|
||||
@ -93,6 +98,12 @@ local function print_netID(pos, api, netw_type)
|
||||
elseif api == "power" then
|
||||
print_power_network_data(pos, api, netw_type, outdir)
|
||||
end
|
||||
elseif is_junction(pos, tlib2) then
|
||||
netID = networks.get_netID(pos, 0)
|
||||
if netID then
|
||||
print("- " .. s .. ": Junction netwNum: " .. networks.netw_num(netID))
|
||||
break
|
||||
end
|
||||
else
|
||||
print("- " .. s .. ": Node has no '" .. netw_type .. "' netID!!!")
|
||||
end
|
||||
@ -160,7 +171,7 @@ local function debug_print(pos)
|
||||
print("#####################")
|
||||
end
|
||||
|
||||
local function action(itemstack, placer, pointed_thing)
|
||||
local function on_use(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
local pos = pointed_thing.under
|
||||
networks.register_observe_pos(pos)
|
||||
@ -174,14 +185,28 @@ local function action(itemstack, placer, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_place(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
local pos = pointed_thing.under
|
||||
networks.register_observe_pos(nil)
|
||||
if placer:get_player_control().sneak then
|
||||
debug_print(pos)
|
||||
else
|
||||
debug_print(pos)
|
||||
end
|
||||
else
|
||||
networks.register_observe_pos(nil)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_tool("networks:tool2", {
|
||||
description = "Debugging Tool",
|
||||
inventory_image = "networks_tool.png",
|
||||
wield_image = "networks_tool.png",
|
||||
use_texture_alpha = "clip",
|
||||
groups = {cracky=1},
|
||||
on_use = action,
|
||||
on_place = action,
|
||||
on_use = on_use,
|
||||
on_place = on_place,
|
||||
node_placement_prediction = "",
|
||||
stack_max = 1,
|
||||
})
|
||||
|
@ -260,7 +260,7 @@ end
|
||||
local function start_pos(robot_pos, robot_param2, x_size, lvl_offs)
|
||||
local pos = next_pos(robot_pos, robot_param2)
|
||||
pos = {x=pos.x, y=pos.y+lvl_offs, z=pos.z}
|
||||
if x_size == 5 then
|
||||
if tonumber(x_size) == 5 then
|
||||
return dest_pos(pos, robot_param2, {3,3})
|
||||
else
|
||||
return dest_pos(pos, robot_param2, {3})
|
||||
|
@ -105,7 +105,7 @@ Used to cut flowers on a 3x3 field.=Benötigt um ein 3x3 Blumenfeld zu ernten.
|
||||
|
||||
### cmd_item.lua ###
|
||||
|
||||
Take <num> items from a chest like node@nand put it into the item inventory.@n<slot> is the bot inventory slot@n(1..8) or 0 for any one=Nehme <num> Gegenstände aus der@nKiste oder dem Kisten-ähnlichen Block@nund tue diese in das eigene Inventar@nan der Position <slot>. Slot = (1..8)@noder 0 für irgend eine Position
|
||||
Take <num> items from a chest like node@nand put it into the item inventory.@n<slot> is the bot inventory slot@n(1..8) or 0 for any one=Nehme <num> Gegenstände aus der@nKiste oder dem Kisten-ähnlichen Block@nund tue diese in das eigene Inventar@nan der Position <slot>. Slot @= (1..8)@noder 0 für irgend eine Position
|
||||
Check if there are <num>@nitems in the chest like node.@nIf not, jump to <label>@n<slot> is the bot inventory slot@n(1..8) to specify the item, or 0 for any item=Prüfe, ob sich <num> Gegenstände@nin dem Kisten-ähnlichen Block befinden.@nWenn nicht, springe zu <label>@n<slot> ist der Bot-Inventar-Slot@n(1..8) um einen Gegenstand auszuwählen, oder 0 für irgendeinen Gegenstand
|
||||
Add <num> items to a chest like node@ntaken from the item inventory.@n<slot> is the bot inventory slot (1..8) or 0 for any one=Lege <num> Gegenstände aus dem@neigenen Inventar in die andere Kiste.@n<slot> ist die Position im@neigenen Inventar (1--8).@noder 0 für irgend eine Position
|
||||
Add <num> fuel to a furnace like node@ntaken from the item inventory.@n<slot> is the bot inventory slot (1..8) or 0 for any one=Lege <num> Brennstoffe aus dem@neigenen Inventar in den anderen Block.@n<slot> ist die Position im@neigenen Inventar (1--8).@noder 0 für irgend eine Position
|
||||
|
@ -18,7 +18,7 @@ local S = signs_bot.S
|
||||
local MAX_CAPA = signs_bot.MAX_CAPA
|
||||
local PWR_NEEDED = 8
|
||||
|
||||
if minetest.get_modpath("techage") then
|
||||
if minetest.global_exists("techage") then
|
||||
|
||||
local function on_power(pos)
|
||||
local mem = tubelib2.get_mem(pos)
|
||||
@ -361,6 +361,8 @@ send_cmnd 3465 pull*default:dirt*2]]),
|
||||
techage.register_node_for_v1_transition({"signs_bot:box"}, function(pos, node)
|
||||
power.update_network(pos, nil, Cable)
|
||||
end)
|
||||
|
||||
techage.disable_block_for_assembly_tool("signs_bot:box")
|
||||
else
|
||||
function signs_bot.formspec_battery_capa(max_capa, current_capa)
|
||||
return ""
|
||||
|
@ -154,7 +154,7 @@ local function check_player_load(player)
|
||||
local bags_meta = meta:get_string("unified_inventory:bags")
|
||||
if bags_meta then
|
||||
if next(minetest.deserialize(bags_meta) or {}) then
|
||||
return S("You are too heavy: Check your bags!")
|
||||
return S("You are too heavy: Please remove your bags!")
|
||||
end
|
||||
end
|
||||
for _, stack in ipairs(inv:get_list("craft") or {}) do
|
||||
|
@ -1,5 +1,5 @@
|
||||
# textdomain: ta4_jetpack
|
||||
You are too heavy: Check your bags!=Du bist zu schwer: Prüfe deine Rucksäcke!
|
||||
You are too heavy: Please remove your bags!=Du bist zu schwer: Entferne deine Rucksäcke!
|
||||
You are too heavy: Check your crafting menu!=Du bist zu schwer: Prüfe dein Crafting Menü!
|
||||
You are too heavy: Check your inventory!=Du bist zu schwer: Prüfe dein Inventar!
|
||||
You may not transport @1 with a jetpack!=Du darfst @1 nicht mit dem Jetpack transportieren!
|
||||
|
@ -1,5 +1,5 @@
|
||||
# textdomain: ta4_jetpack
|
||||
You are too heavy: Check your bags!=
|
||||
You are too heavy: Please remove your bags!=
|
||||
You are too heavy: Check your crafting menu!=
|
||||
You are too heavy: Check your inventory!=
|
||||
You may not transport @1 with a jetpack!=
|
||||
@ -11,3 +11,9 @@ TA4 Jetpack Controller On=
|
||||
TA4 Jetpack Controller Off=
|
||||
TA4 Jetpack=
|
||||
Jetpack Training Mat=
|
||||
|
||||
|
||||
##### not used anymore #####
|
||||
|
||||
# textdomain: ta4_jetpack
|
||||
You are too heavy: Check your bags!=
|
||||
|
@ -95,6 +95,24 @@ Available worlds will be converted to 'lsqlite3', but there is no way back, so:
|
||||
|
||||
### History
|
||||
|
||||
**2023-11-05 V1.18**
|
||||
|
||||
- Add TA2 clutch
|
||||
- TA5 Generator: Add generator menu
|
||||
- TA4 Injector: Allow rotation with a screwdriver
|
||||
- Escape equal sign in german translation (Niklp09)
|
||||
- Autocrafter: Add Beduino command interface
|
||||
- Autocrafter: Add flush command
|
||||
- Fix converter stores mesecon signals (Niklp09)
|
||||
- TA1 Gravel Sieve: Use proper player creative check (Niklp09)
|
||||
- TA4 Chest: Add storesize command
|
||||
- Improve Assembly Tool
|
||||
- Furnace: Fix burn time issue
|
||||
- Allow further types of cobblestone for the coalburner
|
||||
- Fix water mill river water bug (alwayshopeless)
|
||||
- Improve manual
|
||||
- Further improvements
|
||||
|
||||
**2023-08-25 V1.17**
|
||||
|
||||
- Add support for doclib / remove techage internal doc support
|
||||
|
@ -214,3 +214,12 @@ techage.furnace.register_recipe({
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Assembly Tool
|
||||
|
||||
Disable a block from being removed by the assembly tool:
|
||||
|
||||
```lua
|
||||
techage.disable_block_for_assembly_tool(block_name)
|
||||
```
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
TechAge
|
||||
=======
|
||||
|
||||
Copyright (C) 2019-2020 Joachim Stolberg
|
||||
Copyright (C) 2019-2023 Joachim Stolberg
|
||||
|
||||
AGPL v3
|
||||
See LICENSE.txt for more information
|
||||
@ -68,6 +68,21 @@ local function count_index(invlist)
|
||||
return index
|
||||
end
|
||||
|
||||
local function flush_input_inventory(pos)
|
||||
local inv = M(pos):get_inventory()
|
||||
if not inv:is_empty("src") then
|
||||
for idx = 1, 16 do
|
||||
local stack = inv:get_stack("src", idx)
|
||||
if not inv:room_for_item("dst", stack) then
|
||||
return false
|
||||
end
|
||||
inv:add_item("dst", stack)
|
||||
inv:set_stack("src", idx, nil)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
-- caches some recipe data
|
||||
local autocrafterCache = {}
|
||||
|
||||
@ -224,13 +239,18 @@ local function on_output_change(pos, inventory, stack)
|
||||
end
|
||||
|
||||
local function determine_recipe_items(pos, input)
|
||||
if input and type(input) == "string" then
|
||||
-- Test if "<node-number>.<recipe-number>" input
|
||||
local num, idx = unpack(string.split(input, ".", false, 1))
|
||||
if num and idx then
|
||||
input = get_input_from_recipeblock(pos, num, idx)
|
||||
end
|
||||
local num, idx
|
||||
|
||||
if input and type(input) == "string" then -- Lua controller
|
||||
-- Test if "<node-number>.<recipe-number>" input
|
||||
num, idx = unpack(string.split(input, ".", false, 1))
|
||||
elseif input and type(input) == "table" then -- Beduino
|
||||
num = tostring(input[1] * 65536 + input[2])
|
||||
idx = tostring(input[3])
|
||||
end
|
||||
|
||||
if num and idx then
|
||||
input = get_input_from_recipeblock(pos, num, idx)
|
||||
if input then
|
||||
-- "<item>,<item>,..." input
|
||||
local items = string.split(input, ",", true, 8)
|
||||
@ -243,28 +263,24 @@ end
|
||||
|
||||
local function on_new_recipe(pos, input)
|
||||
local items = determine_recipe_items(pos, input)
|
||||
local inv = M(pos):get_inventory()
|
||||
if items then
|
||||
input = {
|
||||
method = "normal",
|
||||
width = 3,
|
||||
items = items,
|
||||
}
|
||||
local output, _ = minetest.get_craft_result(input)
|
||||
if output.item:get_name() ~= "" then
|
||||
local inv = M(pos):get_inventory()
|
||||
for i = 1, 9 do
|
||||
inv:set_stack("recipe", i, input.items[i])
|
||||
end
|
||||
after_recipe_change(pos, inv)
|
||||
for i = 1, 9 do
|
||||
inv:set_stack("recipe", i, items[i])
|
||||
end
|
||||
else
|
||||
local inv = M(pos):get_inventory()
|
||||
inv:set_list("recipe", {})
|
||||
after_recipe_change(pos, inv)
|
||||
end
|
||||
local hash = minetest.hash_node_position(pos)
|
||||
autocrafterCache[hash] = nil
|
||||
local craft = get_craft(pos, inv, hash)
|
||||
if craft.output and craft.output.item then
|
||||
inv:set_stack("output", 1, craft.output.item)
|
||||
else
|
||||
inv:set_stack("output", 1, nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
|
||||
if listname == "output" then
|
||||
return 0
|
||||
@ -443,19 +459,36 @@ local tubing = {
|
||||
on_recv_message = function(pos, src, topic, payload)
|
||||
if topic == "recipe" and CRD(pos).stage == 4 then
|
||||
if payload and payload ~= "" then
|
||||
local inv = M(pos):get_inventory()
|
||||
on_new_recipe(pos, payload)
|
||||
return true
|
||||
else
|
||||
local inv = M(pos):get_inventory()
|
||||
return inv:get_stack("output", 1):get_name()
|
||||
end
|
||||
elseif topic == "flush" and CRD(pos).stage == 4 then
|
||||
return flush_input_inventory(pos)
|
||||
elseif topic == "info" and CRD(pos).stage == 4 then
|
||||
return INFO
|
||||
else
|
||||
return CRD(pos).State:on_receive_message(pos, topic, payload)
|
||||
end
|
||||
end,
|
||||
on_beduino_receive_cmnd = function(pos, src, topic, payload)
|
||||
if topic == 10 and CRD(pos).stage == 4 then
|
||||
on_new_recipe(pos, payload)
|
||||
return 1, ""
|
||||
elseif topic == 11 and CRD(pos).stage == 4 then
|
||||
if flush_input_inventory(pos) then
|
||||
return 1, ""
|
||||
else
|
||||
return 0, ""
|
||||
end
|
||||
end
|
||||
return CRD(pos).State:on_beduino_receive_cmnd(pos, topic, payload)
|
||||
end,
|
||||
on_beduino_request_data = function(pos, src, topic, payload)
|
||||
return CRD(pos).State:on_beduino_request_data(pos, topic, payload)
|
||||
end,
|
||||
on_node_load = function(pos)
|
||||
CRD(pos).State:on_node_load(pos)
|
||||
end,
|
||||
|
@ -72,7 +72,11 @@ end
|
||||
techage.register_node(names, {
|
||||
on_push_item = function(pos, in_dir, stack)
|
||||
local push_dir = M(pos):get_int("push_dir")
|
||||
return techage.safe_push_items(pos, push_dir, stack)
|
||||
if networks.Flip[push_dir] ~= in_dir then
|
||||
return techage.safe_push_items(pos, push_dir, stack)
|
||||
else
|
||||
return stack
|
||||
end
|
||||
end,
|
||||
is_pusher = true, -- is a pulling/pushing node
|
||||
})
|
||||
@ -121,7 +125,11 @@ end
|
||||
techage.register_node(names, {
|
||||
on_push_item = function(pos, in_dir, stack)
|
||||
local push_dir = M(pos):get_int("push_dir")
|
||||
return techage.safe_push_items(pos, push_dir, stack)
|
||||
if networks.Flip[push_dir] ~= in_dir then
|
||||
return techage.safe_push_items(pos, push_dir, stack)
|
||||
else
|
||||
return stack
|
||||
end
|
||||
end,
|
||||
is_pusher = true, -- is a pulling/pushing node
|
||||
})
|
||||
|
@ -636,6 +636,8 @@ techage.register_node({"techage:ta4_chest"}, {
|
||||
elseif topic == "itemstring" then
|
||||
local nvm = techage.get_nvm(pos)
|
||||
return get_itemstring(nvm, tonumber(payload or 0) or 0)
|
||||
elseif topic == "storesize" then
|
||||
return get_stacksize(pos)
|
||||
elseif topic == "state" then
|
||||
local nvm = techage.get_nvm(pos)
|
||||
return inv_state(nvm)
|
||||
@ -650,6 +652,8 @@ techage.register_node({"techage:ta4_chest"}, {
|
||||
elseif topic == 140 and payload[1] == 2 then -- Inventory Item Name
|
||||
local nvm = techage.get_nvm(pos)
|
||||
return 0, get_itemstring(nvm, tonumber(payload[2] or 0) or 0)
|
||||
elseif topic == 140 and payload[1] == 3 then -- storesize
|
||||
return 0, {get_stacksize(pos)}
|
||||
elseif topic == 131 then -- Chest State
|
||||
local nvm = techage.get_nvm(pos)
|
||||
return 0, {inv_state_num(nvm)}
|
||||
|
@ -19,6 +19,7 @@ local S = techage.S
|
||||
-- Consumer Related Data
|
||||
local CRD = function(pos) return (minetest.registered_nodes[techage.get_node_lvm(pos).name] or {}).consumer end
|
||||
local tooltip = S("Switch to pull mode \nto pull items out of inventory slots \naccording the injector configuration")
|
||||
local Tube = techage.Tube
|
||||
|
||||
local STANDBY_TICKS = 2
|
||||
local COUNTDOWN_TICKS = 3
|
||||
@ -198,7 +199,7 @@ local tiles = {}
|
||||
-- '{power}' will be replaced by the power PNG
|
||||
tiles.pas = {
|
||||
"techage_filling_ta#.png^techage_frame_ta#_top.png^techage_appl_arrow.png",
|
||||
"techage_filling_ta#.png^techage_frame_ta#.png",
|
||||
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_arrow.png",
|
||||
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_outp.png",
|
||||
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_inp.png",
|
||||
"techage_appl_pusher.png^[transformR180]^techage_frame_ta#.png^techage_appl_injector.png",
|
||||
@ -207,7 +208,7 @@ tiles.pas = {
|
||||
tiles.act = {
|
||||
-- up, down, right, left, back, front
|
||||
"techage_filling_ta#.png^techage_frame_ta#_top.png^techage_appl_arrow.png",
|
||||
"techage_filling_ta#.png^techage_frame_ta#.png",
|
||||
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_arrow.png",
|
||||
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_outp.png",
|
||||
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_inp.png",
|
||||
{
|
||||
@ -270,6 +271,18 @@ local _, node_name_ta3, node_name_ta4 =
|
||||
local nvm = techage.get_nvm(pos)
|
||||
M(pos):set_string("formspec", formspec(CRD(pos).State, pos, nvm))
|
||||
end,
|
||||
ta_rotate_node = function(pos, node, new_param2)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
if CRD(pos).State:get_state(nvm) == techage.STOPPED then
|
||||
Tube:after_dig_node(pos)
|
||||
minetest.swap_node(pos, {name = node.name, param2 = new_param2})
|
||||
Tube:after_place_node(pos)
|
||||
local meta = M(pos)
|
||||
meta:set_int("pull_dir", techage.side_to_outdir("L", new_param2))
|
||||
meta:set_int("push_dir", techage.side_to_outdir("R", new_param2))
|
||||
M(pos):set_string("formspec", formspec(CRD(pos).State, pos, nvm))
|
||||
end
|
||||
end,
|
||||
|
||||
allow_metadata_inventory_put = allow_metadata_inventory_put,
|
||||
allow_metadata_inventory_take = allow_metadata_inventory_take,
|
||||
|
@ -43,7 +43,7 @@ local function formspec(pos)
|
||||
return "size[8,9]"..
|
||||
"box[0,-0.1;7.8,0.5;#c6e8ff]" ..
|
||||
"label[0.2,-0.1;" .. minetest.colorize( "#000000", title) .. "]" ..
|
||||
"label[0.2,2;Inventory access on client side disabled\ndue to minetest core issues!]" ..
|
||||
"label[0.2,2;Inventory access on this node is disabled\ndue to minetest engine issues!]" ..
|
||||
"list[current_player;main;0,5.3;8,4;]"
|
||||
else
|
||||
return menu.generate_formspec(pos, ndef, hyperloop.SUBMENU)
|
||||
|
@ -180,6 +180,14 @@ end)
|
||||
-- API helper functions
|
||||
-------------------------------------------------------------------
|
||||
|
||||
-- Check if both strings are the same or one string starts with the other string.
|
||||
function techage.string_compare(s1, s2)
|
||||
if s1 and s2 then
|
||||
local minLength = math.min(#s1, #s2)
|
||||
return string.sub(s1, 1, minLength) == string.sub(s2, 1, minLength)
|
||||
end
|
||||
end
|
||||
|
||||
-- Function returns { pos, name } for the node referenced by number
|
||||
function techage.get_node_info(dest_num)
|
||||
return NodeInfoCache[dest_num] or update_nodeinfo(dest_num)
|
||||
@ -283,6 +291,18 @@ function techage.pack_node(pos, oldnode, number)
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------
|
||||
-- Used by the assembly tool
|
||||
-------------------------------------------------------------------
|
||||
function techage.pre_add_node(pos, number)
|
||||
local key = minetest.hash_node_position(pos)
|
||||
NumbersToBeRecycled[key] = number
|
||||
end
|
||||
|
||||
function techage.post_remove_node(pos)
|
||||
local key = minetest.hash_node_position(pos)
|
||||
NumbersToBeRecycled[key] = nil
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------
|
||||
-- Node register function
|
||||
|
@ -20,14 +20,14 @@ local S = techage.S
|
||||
techage.firebox = {}
|
||||
|
||||
techage.firebox.Burntime = {
|
||||
["techage:charcoal"] = true, -- will be replaced by burntime
|
||||
["default:coal_lump"] = true,
|
||||
["default:coalblock"] = true,
|
||||
["techage:oil_source"] = true,
|
||||
["techage:gas"] = true,
|
||||
["techage:gasoline"] = true,
|
||||
["techage:naphtha"] = true,
|
||||
["techage:fueloil"] = true,
|
||||
["techage:charcoal"] = 1, -- will be replaced by burntime
|
||||
["default:coal_lump"] = 1,
|
||||
["default:coalblock"] = 1,
|
||||
["techage:oil_source"] = 1,
|
||||
["techage:gas"] = 1,
|
||||
["techage:gasoline"] = 1,
|
||||
["techage:naphtha"] = 1,
|
||||
["techage:fueloil"] = 1,
|
||||
}
|
||||
|
||||
techage.firebox.ValidOilFuels = {
|
||||
@ -44,7 +44,7 @@ local function determine_burntimes()
|
||||
techage.firebox.Burntime[k] = fuel.time
|
||||
end
|
||||
end
|
||||
minetest.after(1, determine_burntimes)
|
||||
minetest.register_on_mods_loaded(determine_burntimes)
|
||||
|
||||
function techage.firebox.formspec(nvm)
|
||||
local fuel_percent = 0
|
||||
|
@ -481,7 +481,7 @@ end
|
||||
|
||||
function techage.wrench_tooltip(x, y)
|
||||
local tooltip = S("Block has an\nadditional wrench menu")
|
||||
return "label["..x..","..y..";"..minetest.colorize("#000000", minetest.formspec_escape("[?]")).."]"..
|
||||
return "image["..x.."," .. y .. ";0.5,0.5;techage_inv_wrench.png]" ..
|
||||
"tooltip["..x..","..y..";0.5,0.5;"..tooltip..";#0C3D32;#FFFFFF]"
|
||||
end
|
||||
|
||||
|
@ -28,6 +28,22 @@ local VTube = techage.VTube
|
||||
local power = networks.power
|
||||
local liquid = networks.liquid
|
||||
|
||||
local function is_junction(pos, side)
|
||||
local node = techage.get_node_lvm(techage.get_pos(pos, side))
|
||||
return node and techage.string_compare(node.name, "techage:ta3_junction")
|
||||
end
|
||||
|
||||
-- Turn the magnet to the right direction
|
||||
local function handle_legacy_magnet(pos)
|
||||
if M(pos):get_string("version") ~= "V2" then
|
||||
if is_junction(pos, "B") and not is_junction(pos, "F") then
|
||||
node.param2 = (node.param2 + 2) % 4
|
||||
minetest.swap_node(pos, node)
|
||||
end
|
||||
end
|
||||
M(pos):set_string("version", "V2")
|
||||
end
|
||||
|
||||
minetest.register_node("techage:ta4_colliderblock", {
|
||||
description = S("TA4 Collider Steel Block"),
|
||||
tiles = {
|
||||
@ -60,7 +76,7 @@ minetest.register_node("techage:ta4_magnet", {
|
||||
description = S("TA4 Collider Magnet"),
|
||||
inventory_image = minetest.inventorycube(
|
||||
"techage_collider_magnet.png^techage_appl_hole_electric.png",
|
||||
"techage_collider_magnet.png^techage_appl_hole_pipe.png",
|
||||
"techage_collider_magnet.png^techage_collider_magnet_appl.png^techage_appl_hole_pipe.png^techage_collider_magnet_sign.png",
|
||||
"techage_collider_magnet.png^techage_collider_magnet_tube.png"),
|
||||
tiles = {
|
||||
-- up, down, right, left, back, front
|
||||
@ -68,7 +84,7 @@ minetest.register_node("techage:ta4_magnet", {
|
||||
"techage_collider_magnet.png",
|
||||
"techage_collider_magnet.png^techage_collider_magnet_tube.png",
|
||||
"techage_collider_magnet.png^techage_collider_magnet_tube.png",
|
||||
"techage_collider_magnet.png^techage_collider_magnet_appl.png^techage_appl_hole_pipe.png^techage_collider_magnet_sign.png",
|
||||
"techage_collider_magnet.png^techage_collider_magnet_appl.png^techage_collider_magnet_sign.png",
|
||||
"techage_collider_magnet.png^techage_collider_magnet_appl.png^techage_appl_hole_pipe.png^techage_collider_magnet_sign.png",
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
@ -111,6 +127,7 @@ minetest.register_node("techage:ta4_magnet", {
|
||||
Cable:after_place_node(pos)
|
||||
VTube:after_place_node(pos)
|
||||
M(pos):set_string("infotext", S("TA4 Collider Magnet") .. " #0")
|
||||
M(pos):set_string("version", "V2")
|
||||
end,
|
||||
|
||||
-- To be called by the detector
|
||||
@ -157,7 +174,7 @@ minetest.register_node("techage:ta4_magnet", {
|
||||
})
|
||||
|
||||
power.register_nodes({"techage:ta4_magnet"}, Cable, "con", {"U"})
|
||||
liquid.register_nodes({"techage:ta4_magnet"}, Pipe, "tank", {"F", "B"}, {
|
||||
liquid.register_nodes({"techage:ta4_magnet"}, Pipe, "tank", {"F"}, {
|
||||
capa = CAPACITY,
|
||||
peek = function(pos, indir)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
@ -223,6 +240,7 @@ techage.register_node({"techage:ta4_magnet"}, {
|
||||
return send_to_next(pos, in_dir, topic, payload)
|
||||
end
|
||||
elseif topic == "test" then
|
||||
handle_legacy_magnet(pos)
|
||||
if payload and tonumber(payload) == nvm.number then
|
||||
if not nvm.liquid or not nvm.liquid.amount or nvm.liquid.amount < CAPACITY then
|
||||
return false, "no gas"
|
||||
|
@ -12,6 +12,7 @@ return {
|
||||
"2,TA2 Energiespeicher",
|
||||
"3,TA2 Seilwinde / TA2 Winch",
|
||||
"3,TA2 Gewichtekiste / TA2 Weight Chest",
|
||||
"3,TA2 Kupplung / TA2 Clutch",
|
||||
"2,Items schieben und sortieren",
|
||||
"3,Röhren / TechAge Tube",
|
||||
"3,Röhren Konzentrator / Tube Concentrator",
|
||||
@ -79,7 +80,7 @@ return {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Die Antriebsachsen dienen zur Kraftübertragung von der Dampfmaschine zu anderen Maschinen. Die maximale Länge einer Antriebsachse beträgt 10 Blöcke. Über Getriebeboxen können auch größere Strecken überbrückt\\, sowie Abzweigungen und Richtungswechsel realisiert werden.\n"..
|
||||
"Die Antriebsachsen dienen zur Kraftübertragung von der Dampfmaschine zu anderen Maschinen. Die maximale Länge einer Antriebsachse beträgt 10 Blöcke. Über Getriebeblöcke können auch größere Strecken überbrückt\\, sowie Abzweigungen und Richtungswechsel realisiert werden.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
@ -95,11 +96,11 @@ return {
|
||||
"\n"..
|
||||
"Der Energiespeicher besteht aus mehreren Blöcken und muss wie im Plan rechts abgebildet\\, zusammen gebaut werden.\n"..
|
||||
"\n"..
|
||||
"Um die maximale Speicherkapazität zu erreichen\\, muss die Kiste mit Gewichten komplett gefüllt\\, und der Mast inklusive der zwei Getriebeboxen 12 Blöcke hoch sein. Kleinere Aufbauten sind aber auch möglich.\n"..
|
||||
"Um die maximale Speicherkapazität zu erreichen\\, muss die Kiste mit Gewichten komplett gefüllt\\, und der Mast inklusive der zwei Getriebeblöcke 12 Blöcke hoch sein. Kleinere Aufbauten sind aber auch möglich.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Die Seilwinde muss mit einer Getriebebox verbunden werden und kann so überschüssige Energie aufnehmen und damit eine Gewichtekiste nach oben ziehen. Die maximale Seillänge beträgt 10 Blöcke.\n"..
|
||||
"Die Seilwinde muss mit einem Getriebeblock verbunden werden und kann so überschüssige Energie aufnehmen und damit eine Gewichtekiste nach oben ziehen. Achte beim Aufbau der Seilwinde darauf\\, dass der Pfeil auf der Blockoberseite zum Getriebeblock zeigt. Die maximale Seillänge beträgt 10 Blöcke.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
@ -107,6 +108,10 @@ return {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Mit der Kupplung können Achsen und Maschinen vom Energiespeicher getrennt werden. Damit kommen die Achsen nach der Kupplung zum Stillstand und Maschinenanlagen können umgebaut werden. Achte beim Aufbau der Kupplung darauf\\, dass der Pfeil auf der Blockoberseite zum Energiespeicher zeigt. \n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Um Gegenstände (Items) von einer Verarbeitungsstation zur nächsten weiter zu transportieren\\, werden Schieber und Röhren verwendet. Siehe Plan.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
@ -247,6 +252,7 @@ return {
|
||||
"",
|
||||
"ta2_winch",
|
||||
"ta2_weight_chest",
|
||||
"techage:ta2_clutch_off",
|
||||
"",
|
||||
"tube",
|
||||
"concentrator",
|
||||
@ -279,6 +285,7 @@ return {
|
||||
"ta2_storage",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"itemtransport",
|
||||
"",
|
||||
"",
|
||||
|
@ -12,6 +12,7 @@ return {
|
||||
"2,TA2 energy storage",
|
||||
"3,TA2 Winch",
|
||||
"3,TA2 Weight Chest",
|
||||
"3,TA2 Clutch",
|
||||
"2,Push and sort items",
|
||||
"3,TechAge Tube",
|
||||
"3,Tube Concentrator",
|
||||
@ -97,7 +98,9 @@ return {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The cable winch must be connected to a gear box and can absorb excess energy and thus pull a weight chest upwards. The maximum rope length is 10 blocks. \n"..
|
||||
"The cable winch must be connected to a gear box and can absorb excess energy and thus pull a weight chest upwards. \n"..
|
||||
"When assembling the cable winch\\, make sure that the arrow on the top of the block points to the gearbox.\n"..
|
||||
"The maximum rope length is 10 blocks. \n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
@ -105,6 +108,10 @@ return {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"With the clutch\\, axles and machines can be separated from the energy storage. This means that the axles after the clutch come to a standstill and machine systems can be rebuilt. When assembling the clutch\\, make sure that the arrow on the top of the block points to the energy storage system.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"In order to transport objects from one processing station to the next\\, pushers and tubes are used. See plan.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
@ -245,6 +252,7 @@ return {
|
||||
"",
|
||||
"ta2_winch",
|
||||
"ta2_weight_chest",
|
||||
"techage:ta2_clutch_off",
|
||||
"",
|
||||
"tube",
|
||||
"concentrator",
|
||||
@ -277,6 +285,7 @@ return {
|
||||
"ta2_storage",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"itemtransport",
|
||||
"",
|
||||
"",
|
||||
|
@ -20,7 +20,7 @@ return {
|
||||
"3,TA Stromschalter klein / Power Switch Small",
|
||||
"3,TA Stromschalterbox / Power Switch Box",
|
||||
"3,TA3 Kleiner Stromgenerator / Tiny Power Generator",
|
||||
"3,TA3 Akku Block / Akku Box",
|
||||
"3,TA3 Akku Block / TA3 Accu Box",
|
||||
"3,TA3 Strom Terminal / Power Terminal",
|
||||
"3,TA3 Elektromotor / TA3 Electric Motor",
|
||||
"2,TA3 Industrieofen",
|
||||
@ -84,7 +84,8 @@ return {
|
||||
"3,TechAge Programmer",
|
||||
"3,TechAge Kelle / Trowel",
|
||||
"3,TA3 Bohrgestängezange / TA3 Drill Pipe Wrench",
|
||||
"3,Techage Schraubendreher",
|
||||
"3,Techage Schraubendreher / Screwdriver",
|
||||
"3,TechAge Montagewerkzeug / Assembly Tool",
|
||||
},
|
||||
texts = {
|
||||
"Bei TA3 gilt es\\, die Dampf-betriebenen Maschinen durch leistungsfähigere und mit elektrischem Strom betriebene Maschinen abzulösen.\n"..
|
||||
@ -436,7 +437,10 @@ return {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Neben den Röhren für Warentransport\\, sowie den Gas- und Stromleitungen gibt es auch noch eine drahtlose Kommunikationsebene\\, über die Blöcke untereinander Daten austauschen können. Dafür müssen keine Leitungen gezogen werden\\, sondern die Verbindung zwischen Sender und Empfänger erfolgt nur über die Blocknummer. Alle Blöcke\\, die an dieser Kommunikation teilnehmen können\\, zeigen die Blocknummer als Info-Text an\\, wenn man mit dem Mauscursor den Block fixiert.\n"..
|
||||
"Neben den Röhren für Warentransport\\, sowie den Gas- und Stromleitungen gibt es auch noch eine drahtlose Kommunikationsebene\\, über die Blöcke untereinander Daten austauschen können. Dafür müssen keine Leitungen gezogen werden\\, sondern die Verbindung zwischen Sender und Empfänger erfolgt nur über die Blocknummer. \n"..
|
||||
"\n"..
|
||||
"*Info:* Eine *Blocknummer* ist eine eindeutige Zahl\\, die von Techage beim Setzen von vielen Techage Blöcken generiert wird. Die Blocknummer dient zur Adressierung bei der Kommunikation zwischen Techage Controllern und Maschinen. Alle Blöcke\\, die an dieser Kommunikation teilnehmen können\\, zeigen die Blocknummer als Info-Text an\\, wenn man mit dem Mauscursor den Block fixiert.\n"..
|
||||
"\n"..
|
||||
"Welche Kommandos ein Block unterstützt\\, kann mit dem TechAge Info Werkzeug (Schraubenschlüssel) ausgelesen und angezeigt werden.\n"..
|
||||
"Die einfachsten Kommandos\\, die von fast allen Blöcken unterstützt werden\\, sind:\n"..
|
||||
"\n"..
|
||||
@ -741,6 +745,15 @@ return {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Das TechAge Montagewerkzeug dient zum Entfernen und wieder Setzen von Techage Blöcken\\, ohne dass diese Blöcke ihre Blocknummer verlieren\\, bzw. beim Setzen eine neue Nummer zugeteilt bekommen. Dies ist bspw. bei Steinbrechern hilfreich\\, da diese oft umgesetzt werden müssen.\n"..
|
||||
"\n"..
|
||||
" - Linke Taste: Entfernen eines Blocks\n"..
|
||||
" - Rechte Taste: Setzen eines Blocks\n"..
|
||||
"\n"..
|
||||
"Der Block\\, der zuvor mit dem Montagewerkzeug entfernt wurde und wieder gesetzt werden soll\\, muss sich im Spieler-Inventar ganz links befinden.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
},
|
||||
images = {
|
||||
"techage_ta3",
|
||||
@ -828,6 +841,7 @@ return {
|
||||
"ta3_trowel",
|
||||
"ta3_drill_pipe_wrench",
|
||||
"ta3_screwdriver",
|
||||
"techage:assembly_tool",
|
||||
},
|
||||
plans = {
|
||||
"",
|
||||
@ -915,5 +929,6 @@ return {
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@ return {
|
||||
"3,TA Power Switch Small",
|
||||
"3,TA Power Switch Box",
|
||||
"3,TA3 Small Power Generator",
|
||||
"3,TA3 Battery Block",
|
||||
"3,TA3 Accu Block",
|
||||
"3,TA3 Power Terminal",
|
||||
"3,TA3 Electric Motor",
|
||||
"2,TA3 Industrial Furnace",
|
||||
@ -85,6 +85,7 @@ return {
|
||||
"3,TechAge Trowel / Trowel",
|
||||
"3,TA3 drill pipe wrench",
|
||||
"3,Techage Screwdriver",
|
||||
"3,TechAge Assembly Tool",
|
||||
},
|
||||
texts = {
|
||||
"At TA3 it is important to replace the steam-powered machines with more powerful and electric-powered machines.\n"..
|
||||
@ -227,11 +228,11 @@ return {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The battery block is used to store excess energy and automatically delivers power in the event of a power failure (if available).\n"..
|
||||
"Several battery blocks together form a TA3 energy storage system. Each battery block has a display for the charging state and for the stored load.\n"..
|
||||
"The accu block (rechargeable battery) is used to store excess energy and automatically delivers power in the event of a power failure (if available).\n"..
|
||||
"Several accu blocks together form a TA3 energy storage system. Each accu block has a display for the charging state and for the stored load.\n"..
|
||||
"The values for the entire network are always displayed here. The stored load is displayed in \"kud\" or \"ku-days\" (analogous to kWh) 5 kud thus corresponds\\, for example\\, to 5 ku for a game day (20 min) or 1 ku for 5 game days.\n"..
|
||||
"\n"..
|
||||
"A battery block has 3.33 kud\n"..
|
||||
"A accu block has 3.33 kud\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
@ -437,7 +438,10 @@ return {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"In addition to the tubes for goods transport\\, as well as the gas and power pipes\\, there is also a wireless communication level through which blocks can exchange data with each other. No lines have to be drawn for this\\, the connection between transmitter and receiver is only made via the block number. All blocks that can participate in this communication show the block number as info text if you fix the block with the mouse cursor.\n"..
|
||||
"In addition to the tubes for goods transport\\, as well as the gas and power pipes\\, there is also a wireless communication level through which blocks can exchange data with each other. No lines have to be drawn for this\\, the connection between transmitter and receiver is only made via the block number. \n"..
|
||||
"\n"..
|
||||
"*Info:* A block number is a unique number that is generated by Techage when many Techage blocks are placed. The block number is used for addressing during communication between Techage controllers and machines. All blocks that can participate in this communication show the block number as info text if you fix the block with the mouse cursor.\n"..
|
||||
"\n"..
|
||||
"Which commands a block supports can be read out and displayed with the TechAge Info Tool (wrench).\n"..
|
||||
"The simplest commands supported by almost all blocks are:\n"..
|
||||
"\n"..
|
||||
@ -738,6 +742,15 @@ return {
|
||||
"\n"..
|
||||
" \n"..
|
||||
"\n",
|
||||
"The TechAge Assembly Tool is used to remove and reposition Techage blocks without these blocks losing their block number or being assigned a new number when setting. This is helpful\\, for example\\, for quarries\\, as they often have to be moved.\n"..
|
||||
"\n"..
|
||||
" - Left button: Remove a block\n"..
|
||||
" - Right button: Set a block\n"..
|
||||
"\n"..
|
||||
"The block that was previously removed with the assembly tool and is to be placed again must be on the far left of the player inventory.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
},
|
||||
images = {
|
||||
"techage_ta3",
|
||||
@ -825,6 +838,7 @@ return {
|
||||
"ta3_trowel",
|
||||
"ta3_drill_pipe_wrench",
|
||||
"ta3_screwdriver",
|
||||
"techage:assembly_tool",
|
||||
},
|
||||
plans = {
|
||||
"",
|
||||
@ -912,5 +926,6 @@ return {
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
}
|
||||
}
|
@ -70,6 +70,7 @@ return {
|
||||
"2,TA4 Teilchenbeschleuniger / Collider",
|
||||
"3,Detektor",
|
||||
"3,Steuerung / TA4 Terminal",
|
||||
"3,Kühlung und Strom",
|
||||
"3,Aufbau",
|
||||
"2,Weitere TA4 Blöcke",
|
||||
"3,TA4 Rezept Block",
|
||||
@ -637,9 +638,7 @@ return {
|
||||
"Ein Teilchenbeschleuniger besteht aus einem \"Ring\" aus Röhren und Magneten sowie dem Detektor mit Kühlanlage. \n"..
|
||||
"\n"..
|
||||
" - Der Detektor ist das Herz der Anlage. Hier finden die wissenschaftlichen Experimente statt. Der Detektor ist 3x3x7 Blöcke groß.\n"..
|
||||
" - 22 TA4 Collider Magnete (nicht die TA4 Collider Detector Magnete!) müssen über jeweils 5 Blöcken der TA4 Vakuumröhre miteinander verbunden werden. Jeder Magnet benötigt zusätzlich Strom und einen Gasanschluss für die Kühlung. Das ganze bildet (wie rechts im Plan abgebildet) ein Quadrat mit einer Kantenlänge von 37 Metern.\n"..
|
||||
" - Zusätzlich wird eine Kühlung benötigt\\, welche zusätzlich beim Detektor aufgebaut werden muss. Für die Kühlung wird Isobutan benötigt.\n"..
|
||||
" - Die Anlage benötigt einiges an Strom. Daher ist eine eigene Stromversorgung sinnvoll.\n"..
|
||||
" - 22 TA4 Collider Magnete (nicht die TA4 Collider Detector Magnete!) müssen über jeweils 5 Blöcken der TA4 Vakuumröhre miteinander verbunden werden. Das ganze bildet (wie rechts im Plan abgebildet) ein Quadrat mit einer Kantenlänge von 37 Metern.\n"..
|
||||
"\n"..
|
||||
"Der Plan zeigt die Anlage von oben:\n"..
|
||||
"\n"..
|
||||
@ -676,11 +675,15 @@ return {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Für den Teilchenbeschleunigers wird außer den Blöcken für den Bau folgendes benötigt:\n"..
|
||||
"Jeder TA4 Collider Magnet muss zusätzlich (wie rechts im Plan abgebildet) mit Strom sowie mit Isobutan zur Kühlung versorgt werden:\n"..
|
||||
"\n"..
|
||||
" - Strom (145 ku)\n"..
|
||||
" - TA4 Tank mit mindestens 250 Einheiten Isobutan\n"..
|
||||
" - Der Anschluss für den Strom ist auf der Oberseite des Magneten.\n"..
|
||||
" - Der Anschluss für die Kühlung ist auf der Vorderseite des Magneten.\n"..
|
||||
" - Für die Kühlung der gesamten Anlage wird zusätzlich eine TA4 Pumpe und ein TA4 Tank mit mindestens 250 Einheiten Isobutan benötigt.\n"..
|
||||
" - Die Anlage benötigt auch einiges an Strom. Daher ist eine eigene Stromversorgung mit mindestens 145 ku sinnvoll.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Beim Aufbau des Teilchenbeschleunigers empfiehlt sich folgende Reihenfolge:\n"..
|
||||
"\n"..
|
||||
" - Einen Forceload Block setzen. Nur der Detektor mit der Kühlanlage muss sich im Bereich des Forceload Blockes befinden.\n"..
|
||||
@ -713,12 +716,14 @@ return {
|
||||
"\n"..
|
||||
"Zusätzlich unterstützt der TA4 Autocrafter die Auswahl unterschiedlicher Rezepte über folgende Kommandos:\n"..
|
||||
"\n"..
|
||||
"'recipe <number>.<index>' schaltet den Autocrafter auf ein Rezept des TA4 Rezept Blocks um. '<number>' ist die Nummer des Rezept Blocks\\, '<index>' die Rezept-Nummer. Beispiel: '$send_cmnd(1234\\, \"recipe\"\\, 5467.1)'\n"..
|
||||
"'recipe \"<number>.<index>\"' schaltet den Autocrafter auf ein Rezept des TA4 Rezept Blocks um. '<number>' ist die Nummer des Rezept Blocks\\, '<index>' die Rezept-Nummer. Beispiel: '$send_cmnd(1234\\, \"recipe\"\\, \"5467.1\")'\n"..
|
||||
"\n"..
|
||||
"Alternativ kann ein Rezept auch über die Zutatenliste ausgewählt werden\\, wie bspw.:\n"..
|
||||
"'$send_cmnd(1234\\, \"recipe\"\\, \"default:coal_lump\\,\\,\\,default:stick\")'\n"..
|
||||
"Hier müssen alle technische Namen eines Rezeptes durch Kommas getrennt angegeben werden. Siehe auch das Kommando 'input' beim TA4 Rezept Block.\n"..
|
||||
"\n"..
|
||||
"Das Kommando 'flush' verschiebt alle Artikel vom Eingabeinventar in das Ausgabeinventar. Das Kommando liefert 'true' zurück\\, wenn das Eingabeinventar dabei vollständig geleert wurde. Falls 'false' zurückgeliefert wurde (Ausgabeinventar voll)\\, muss das Kommando zu einem späteren Zeitpunkt wiederholt werden.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Siehe TA3 Tank.\n"..
|
||||
@ -800,6 +805,7 @@ return {
|
||||
"Der Kiste besitzt ein zusätzliches Kommandos für den Lua Controller:\n"..
|
||||
"\n"..
|
||||
" - 'count' dient zur Anfrage\\, wie viele Items in der Kiste sind.\nBeispiel 1: '$send_cmnd(CHEST\\, \"count\")' --> Summe der Items über alle 8 Speicher\nBeispiel 2: '$send_cmnd(CHEST\\, \"count\"\\, 2)' --> Anzahl der Items in Speicher 2 (zweiter von links)\n"..
|
||||
" - 'storesize' wird verwendet\\, um die Größe eines der acht Speicher auszulesen\nBeispiel: '$send_cmnd(CHEST\\, \"storesize\")' -> Funktion liefert bspw. 6000 zurück\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
@ -926,6 +932,7 @@ return {
|
||||
"",
|
||||
"",
|
||||
"ta4_terminal",
|
||||
"",
|
||||
"techage_ta4c",
|
||||
"",
|
||||
"ta4_recipeblock",
|
||||
@ -1019,6 +1026,7 @@ return {
|
||||
"techage_collider_plan",
|
||||
"ta4_cooler",
|
||||
"",
|
||||
"techage_collider_plan2",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
|
@ -70,6 +70,7 @@ return {
|
||||
"2,TA4 Collider (Particle Accelerator)",
|
||||
"3,Detector",
|
||||
"3,Control / TA4 Terminal",
|
||||
"3,Cooling and power",
|
||||
"3,Construction",
|
||||
"2,More TA4 Blocks",
|
||||
"3,TA4 Recipe Block",
|
||||
@ -636,8 +637,6 @@ return {
|
||||
"\n"..
|
||||
" - The detector is the heart of the system. This is where the scientific experiments take place. The detector is 3x3x7 blocks in size.\n"..
|
||||
" - 22 TA4 Collider Magnets (not the TA4 Collider Detector Magnets!) must be connected to each other via 5 blocks of the TA4 vacuum tube. Each magnet also requires electricity and a gas connection for cooling. The whole thing forms (as shown in the plan on the right) a square with an edge length of 37 meters.\n"..
|
||||
" - In addition\\, cooling is required\\, which must also be installed at the detector. Isobutane is required for cooling.\n"..
|
||||
" - The system requires quite a bit of electricity. Therefore\\, it makes sense to have your own power supply.\n"..
|
||||
"\n"..
|
||||
"The plan shows the facility from above:\n"..
|
||||
"\n"..
|
||||
@ -657,6 +656,9 @@ return {
|
||||
"Note: The arrow on the heat exchanger must point away from the detector. The heat exchanger must also be supplied with electricity.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
" - In addition\\, cooling is required\\, which must also be installed at the detector. Isobutane is required for cooling.\n"..
|
||||
" - The system requires quite a bit of electricity. Therefore\\, it makes sense to have your own power supply.\n"..
|
||||
"\n",
|
||||
"The collider is controlled via a TA4 terminal (not via the TA4 Lua controller terminal).\n"..
|
||||
"\n"..
|
||||
@ -674,11 +676,15 @@ return {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"In addition to the building blocks\\, the following is required for the collider:\n"..
|
||||
"Each TA4 Collider magnet must also be supplied with electricity (as shown on the right in the plan) and with Isobutane for cooling:\n"..
|
||||
"\n"..
|
||||
" - electricity (145 ku)\n"..
|
||||
" - TA4 tank with at least 250 units of isobutane\n"..
|
||||
" - The connection for the power is on the top of the magnet.\n"..
|
||||
" - The connection for the cooling is on the front of the magnet.\n"..
|
||||
" - A TA4 pump and a TA4 tank with at least 250 units of isobutane are also required to cool the entire system.\n"..
|
||||
" - The system also requires a lot of electricity. It therefore makes sense to have your own power supply with at least 145 ku.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The following sequence is recommended when setting up the collider:\n"..
|
||||
"\n"..
|
||||
" - Put a forceload block. Only the detector with the cooling system has to be in the area of the forceload block.\n"..
|
||||
@ -711,12 +717,14 @@ return {
|
||||
"\n"..
|
||||
"In addition\\, the TA4 Autocrafter supports the selection of different recipes using the following commands:\n"..
|
||||
"\n"..
|
||||
"'recipe <number>.<index>' switches the autocrafter to a recipe from the TA4 Recipe Block. '<number>' is the number of the recipe block\\, '<index>' the recipe number. Example: '$send_cmnd(1234\\, \"recipe\"\\, 5467.1)'\n"..
|
||||
"'recipe \"<number>.<index>\"' switches the autocrafter to a recipe from the TA4 Recipe Block. '<number>' is the number of the recipe block\\, '<index>' the recipe number. Example: '$send_cmnd(1234\\, \"recipe\"\\, \"5467.1\")'\n"..
|
||||
"\n"..
|
||||
"Alternatively\\, a recipe can also be selected via the list of ingredients\\, such as:\n"..
|
||||
"'$send_cmnd(1234\\, \"recipe\"\\, \"default:coal_lump\\,\\,\\,default:stick\")'\n"..
|
||||
"All technical names of a recipe must be specified here\\, separated by commas. See also the command 'input' in the TA4 recipe block.\n"..
|
||||
"\n"..
|
||||
"The 'flush' command moves all items from the input inventory to the output inventory. The command returns 'true' if the input inventory was completely emptied. If 'false' was returned (output inventory full)\\, the command must be repeated at a later time.\n"..
|
||||
"\n"..
|
||||
" \n"..
|
||||
"\n",
|
||||
"See TA3 tank.\n"..
|
||||
@ -798,6 +806,7 @@ return {
|
||||
"The chest has an additional command for the Lua controller:\n"..
|
||||
"\n"..
|
||||
" - 'count' is used to request how many items are in the chest.\nExample 1: '$send_cmnd(CHEST\\, \"count\")' -> Sum of items across all 8 stores\nExample 2: '$send_cmnd(CHEST\\, \"count\"\\, 2)' -> number of items in store 2 (second from left)\n"..
|
||||
" - 'storesize' is used to read the size of one of the eight stores:\nExample: '$send_cmnd(CHEST\\, \"storesize\")' -> function returns e.g. 6000\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
@ -925,6 +934,7 @@ return {
|
||||
"",
|
||||
"",
|
||||
"ta4_terminal",
|
||||
"",
|
||||
"techage_ta4c",
|
||||
"",
|
||||
"ta4_recipeblock",
|
||||
@ -1018,6 +1028,7 @@ return {
|
||||
"techage_collider_plan",
|
||||
"ta4_cooler",
|
||||
"",
|
||||
"techage_collider_plan2",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
|
@ -26,6 +26,7 @@ local IMG43 = {"", "techage_reactor_inv.png"}
|
||||
local IMG44 = {"", "techage_ta4_filter.png"}
|
||||
local IMG45 = {"10x10", "techage_collider_plan.png"}
|
||||
local IMG46 = {"5x4", "techage_fusion_reactor.png"}
|
||||
local IMG47 = {"5x4", "techage_collider_plan2.png"}
|
||||
|
||||
local TOP_V = {"top_view", ""}
|
||||
local SIDEV = {"side_view", ""}
|
||||
@ -175,6 +176,7 @@ local AXL90 = {"techage_axle.png^[transformR90", "techage:axle"}
|
||||
local WINCH = {"techage_filling_ta2.png^techage_appl_winch.png^techage_frame_ta2.png", "techage:ta2_winch"}
|
||||
local ROPE_ = {"techage_rope_inv.png", "techage:ta2_rope"}
|
||||
local WCHST = {"techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_chest_back_ta3.png^techage_weight_side.png", "techage:ta2_weight_chest"}
|
||||
local CLTCH = {"techage_filling_ta2.png^techage_appl_clutch.png^techage_frame_ta2.png", "techage:ta2_clutch_off"}
|
||||
|
||||
plans["ta2_storage"] = {
|
||||
{false, false, false, GRBOX, WINCH, false, SIDEV},
|
||||
@ -186,7 +188,7 @@ plans["ta2_storage"] = {
|
||||
{false, false, false, AXL90, ROPE_, false, false},
|
||||
{false, false, false, AXL90, WCHST, false, false},
|
||||
{false, false, false, AXL90, false, false, false},
|
||||
{AXL00, AXL00, AXL00, GRBOX, false, false, false},
|
||||
{AXL00, CLTCH, AXL00, GRBOX, false, false, false},
|
||||
}
|
||||
|
||||
--
|
||||
@ -481,6 +483,15 @@ plans["techage_collider_plan"] = {
|
||||
{false, false, false, false},
|
||||
}
|
||||
|
||||
plans["techage_collider_plan2"] = {
|
||||
{false, false, false, false},
|
||||
{false, false, false, false},
|
||||
{false, false, IMG47, false},
|
||||
{false, false, false, false},
|
||||
{false, false, false, false},
|
||||
{false, false, false, false},
|
||||
}
|
||||
|
||||
--
|
||||
-- TA4 Detector Cooler
|
||||
--
|
||||
|
@ -13,7 +13,7 @@
|
||||
techage = {}
|
||||
|
||||
-- Version for compatibility checks, see readme.md/history
|
||||
techage.version = 1.17
|
||||
techage.version = 1.18
|
||||
|
||||
if minetest.global_exists("tubelib") then
|
||||
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")
|
||||
@ -166,6 +166,7 @@ dofile(MP.."/steam_engine/flywheel.lua")
|
||||
dofile(MP.."/ta2_energy_storage/ta2_rope.lua")
|
||||
dofile(MP.."/ta2_energy_storage/ta2_winch.lua")
|
||||
dofile(MP.."/ta2_energy_storage/ta2_weight_chest.lua")
|
||||
dofile(MP.."/ta2_energy_storage/ta2_clutch.lua")
|
||||
|
||||
-- Liquids I
|
||||
dofile(MP.."/liquids/liquid_pipe.lua")
|
||||
@ -225,7 +226,8 @@ dofile(MP.."/furnace/recipes.lua")
|
||||
|
||||
-- Tools
|
||||
dofile(MP.."/tools/trowel.lua")
|
||||
dofile(MP.."/tools/repairkit.lua")
|
||||
dofile(MP.."/tools/end_wrench.lua")
|
||||
dofile(MP.."/tools/assembly_tool.lua")
|
||||
dofile(MP.."/tools/pipe_wrench.lua")
|
||||
dofile(MP.."/basic_machines/blackhole.lua")
|
||||
dofile(MP.."/basic_machines/forceload.lua")
|
||||
|
@ -27,7 +27,7 @@ end
|
||||
local function num_cobble(pos, height)
|
||||
local pos1 = {x=pos.x-1, y=pos.y+1, z=pos.z-1}
|
||||
local pos2 = {x=pos.x+1, y=pos.y+height, z=pos.z+1}
|
||||
local nodes = minetest.find_nodes_in_area(pos1, pos2, {"default:cobble", "default:desert_cobble"})
|
||||
local nodes = minetest.find_nodes_in_area(pos1, pos2, {"default:cobble", "default:desert_cobble", "default:mossycobble", "techage:basalt_cobble", "techage:bauxite_cobble"})
|
||||
return #nodes
|
||||
end
|
||||
|
||||
|
@ -88,7 +88,7 @@ local function on_punch(pos, node, puncher, pointed_thing)
|
||||
minetest.swap_node(pos, {name = "techage:sieve0"})
|
||||
minetest.get_node_timer(pos):start(1.5)
|
||||
local w = puncher:get_wielded_item()
|
||||
if not(minetest.setting_getbool("creative_mode")) then
|
||||
if not minetest.is_creative_enabled(puncher:get_player_name()) then
|
||||
w:take_item(1)
|
||||
puncher:set_wielded_item(w)
|
||||
end
|
||||
|
@ -18,9 +18,10 @@ local S = techage.S
|
||||
|
||||
local Pipe = techage.LiquidPipe
|
||||
local liquid = networks.liquid
|
||||
local water_level = tonumber(minetest.get_mapgen_setting("water_level")) or 1
|
||||
|
||||
local function is_ocean(pos)
|
||||
if pos.y > 1 then
|
||||
if pos.y > water_level then
|
||||
M(pos):set_string("infotext", S("Error: Not on sea level!"))
|
||||
return false
|
||||
end
|
||||
|
@ -4,8 +4,7 @@
|
||||
|
||||
### akkubox.lua ###
|
||||
|
||||
TA3 Accu Box=Akkublock
|
||||
TA3 Akku Box=TA3 Akku Block
|
||||
TA3 Accu Box=TA3 Akkublock
|
||||
|
||||
### aluminium.lua ###
|
||||
|
||||
@ -21,6 +20,10 @@ Red Mud Canister=Rotschlamm Kanister
|
||||
[TA] Area is protected!=[TA] Bereich ist geschützt
|
||||
[TA] Not enough space!=[TA] Nicht ausreichend Platz!
|
||||
|
||||
### assembly_tool.lua ###
|
||||
|
||||
TechAge Assembly Tool=TechAge Montagewerkzeug
|
||||
|
||||
### autocrafter.lua ###
|
||||
|
||||
Autocrafter=Autocrafter
|
||||
@ -482,6 +485,21 @@ TA2 Ele Fab=TA2 E-Fabrik
|
||||
TA3 Ele Fab=TA3 E-Fabrik
|
||||
TA4 Ele Fab=TA4 E-Fabrik
|
||||
|
||||
### end_wrench.lua ###
|
||||
|
||||
Biome=Biom
|
||||
Node owner=Blockbesitzer
|
||||
Position=Position
|
||||
Position temperature=Positionstemperatur
|
||||
Pump connected to no/empty tank(s).=Pumpe an keine/leere Tank(s) angeschlossen.
|
||||
Pump connected to tank(s) with: @1=Pumpe an Tank(s) angeschlossen mit: @1
|
||||
TechAge Info Tool (use @= read status info)=TechAge Info Werkzeug
|
||||
|
||||
### end_wrench.lua ###
|
||||
### meltingpot.lua ###
|
||||
|
||||
Time=Zeit
|
||||
|
||||
### epoxy.lua ###
|
||||
|
||||
Epoxide Resin=Epoxidharz
|
||||
@ -912,11 +930,6 @@ TA1 Burning=TA1 Brennen
|
||||
TA1 Melting=TA1 Schmelzen
|
||||
TA1 Melting Pot=TA1 Schmelztiegel
|
||||
|
||||
### meltingpot.lua ###
|
||||
### repairkit.lua ###
|
||||
|
||||
Time=Zeit
|
||||
|
||||
### meridium.lua ###
|
||||
|
||||
Meridium Axe=Meridium Axt
|
||||
@ -1173,17 +1186,6 @@ Red Stone=Rotstein
|
||||
Red Stone Block=Rotsteinblock
|
||||
Red Stone Brick=Rotsteinziegel
|
||||
|
||||
### repairkit.lua ###
|
||||
|
||||
Biome=Biom
|
||||
Node owner=Blockbesitzer
|
||||
Position=Position
|
||||
Position temperature=Positionstemperatur
|
||||
Pump connected to no/empty tank(s).=Pumpe an keine/leere Tank(s) angeschlossen.
|
||||
Pump connected to tank(s) with: @1=Pumpe an Tank(s) angeschlossen mit: @1
|
||||
TechAge Info Tool (use @= read status info)=TechAge Info Werkzeug
|
||||
TechAge Repair Kit=TechAge Reparaturset
|
||||
|
||||
### repeater.lua ###
|
||||
|
||||
TA3 Repeater=TA3 Wiederholer
|
||||
@ -1347,7 +1349,7 @@ TA1 Axle Bearing=TA1 Achsenlager
|
||||
|
||||
### ta2_clutch.lua ###
|
||||
|
||||
TA2 Clutch=
|
||||
TA2 Clutch=TA2 Kupplung
|
||||
|
||||
### ta2_weight_chest.lua ###
|
||||
|
||||
@ -1373,7 +1375,7 @@ Never completely empty the slots@nwith the pusher to keep the item assignment=Sp
|
||||
Size=Größe
|
||||
TA4 8x2000 Chest=TA4 8x2000 Kiste
|
||||
Unlock=Entsperren
|
||||
Unlock connected chest@nif all slots are below 2000=Nachfolgende Kiste entsperren,@nsofern alle Speicherplätze <= 2000
|
||||
Unlock connected chest@nif all slots are below 2000=Nachfolgende Kiste entsperren,@nsofern alle Speicherplätze <@= 2000
|
||||
right to left=von rechts nach links
|
||||
|
||||
### ta4_doser.lua ###
|
||||
@ -1576,21 +1578,4 @@ TA4 Collider Detector Worker=TA4 Collider Detektor Worker
|
||||
|
||||
##### not used anymore #####
|
||||
|
||||
No plan available=Kein Plan verfügar
|
||||
Plan=Plan
|
||||
Sectional view=Schnittbild
|
||||
Side view=Seitenansicht
|
||||
Top view=Draufsicht
|
||||
Blocks are back=Blöcke sind wieder da
|
||||
Blocks are disappeared=Blöcke sind verschwunden
|
||||
Remove=Entfernen
|
||||
Set=Setzen
|
||||
Commands@nhelp . . . print this text@ncls . . . . . clear screen@ngen . . . . print all generators@nsto . . . . . print all storage systems@ncon . . . . . print main consumers@n=Kommandos@nhelp . . . diesen Text ausgeben@ncls . . . . . Bildschirm löschen@ngen . . . . Alle Generatoren ausgeben@nsto . . . . . Alle Speichersysteme ausgeben@ncon . . . . . Hauptverbraucher ausgeben@n
|
||||
Handover to A=Übergabe an A
|
||||
Handover to B=Übergabe an B
|
||||
Number of the next movecontroller=Nummer des nächsten Move Controllers
|
||||
Number of the previous movecontroller=Nummer des vorhergehenden Move Controllers
|
||||
TechAge Signal Lamp=TechAge Signallampe
|
||||
TechAge Signal Lamp 2 =TechAge Signallampe 2
|
||||
TA4 Collider Terminal=TA4 Collider Terminal
|
||||
Error: Max. length of the flight route exceeded !!=Fehler: Max. Flugstreckenlänge überschritten !!
|
||||
TA3 Akku Box=TA3 Akku Block
|
||||
|
@ -5,7 +5,6 @@
|
||||
### akkubox.lua ###
|
||||
|
||||
TA3 Accu Box=
|
||||
TA3 Akku Box=
|
||||
|
||||
### aluminium.lua ###
|
||||
|
||||
@ -21,6 +20,10 @@ Red Mud Canister=
|
||||
[TA] Area is protected!=
|
||||
[TA] Not enough space!=
|
||||
|
||||
### assembly_tool.lua ###
|
||||
|
||||
TechAge Assembly Tool=
|
||||
|
||||
### autocrafter.lua ###
|
||||
|
||||
Autocrafter=
|
||||
@ -482,6 +485,21 @@ TA2 Ele Fab=
|
||||
TA3 Ele Fab=
|
||||
TA4 Ele Fab=
|
||||
|
||||
### end_wrench.lua ###
|
||||
|
||||
Biome=
|
||||
Node owner=
|
||||
Position=
|
||||
Position temperature=
|
||||
Pump connected to no/empty tank(s).=
|
||||
Pump connected to tank(s) with: @1=
|
||||
TechAge Info Tool (use @= read status info)=
|
||||
|
||||
### end_wrench.lua ###
|
||||
### meltingpot.lua ###
|
||||
|
||||
Time=
|
||||
|
||||
### epoxy.lua ###
|
||||
|
||||
Epoxide Resin=
|
||||
@ -912,11 +930,6 @@ TA1 Burning=
|
||||
TA1 Melting=
|
||||
TA1 Melting Pot=
|
||||
|
||||
### meltingpot.lua ###
|
||||
### repairkit.lua ###
|
||||
|
||||
Time=
|
||||
|
||||
### meridium.lua ###
|
||||
|
||||
Meridium Axe=
|
||||
@ -1173,17 +1186,6 @@ Red Stone=
|
||||
Red Stone Block=
|
||||
Red Stone Brick=
|
||||
|
||||
### repairkit.lua ###
|
||||
|
||||
Biome=
|
||||
Node owner=
|
||||
Position=
|
||||
Position temperature=
|
||||
Pump connected to no/empty tank(s).=
|
||||
Pump connected to tank(s) with: @1=
|
||||
TechAge Info Tool (use @= read status info)=
|
||||
TechAge Repair Kit=
|
||||
|
||||
### repeater.lua ###
|
||||
|
||||
TA3 Repeater=
|
||||
|
@ -143,7 +143,7 @@ minetest.register_node("techage:ta3_mesecons_converter_on", {
|
||||
|
||||
mesecons = {
|
||||
receptor = {
|
||||
state = mesecon.state.on,
|
||||
state = mesecon.state.off,
|
||||
rules = mesecon.rules.default,
|
||||
},
|
||||
effector = {
|
||||
@ -164,7 +164,7 @@ minetest.register_node("techage:ta3_mesecons_converter_on", {
|
||||
paramtype = "light",
|
||||
light_source = 5,
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy=2, cracky=2, crumbly=2},
|
||||
groups = {choppy=2, cracky=2, crumbly=2, not_in_creative_inventory=1},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
drop = "techage:ta3_mesecons_converter",
|
||||
|
@ -66,7 +66,7 @@ Teil der Dampfmaschine. Der Boiler muss mit dem Zylinder über die Dampfleitunge
|
||||
|
||||
### TA2 Antriebsachsen / TA2 Drive Axle
|
||||
|
||||
Die Antriebsachsen dienen zur Kraftübertragung von der Dampfmaschine zu anderen Maschinen. Die maximale Länge einer Antriebsachse beträgt 10 Blöcke. Über Getriebeboxen können auch größere Strecken überbrückt, sowie Abzweigungen und Richtungswechsel realisiert werden.
|
||||
Die Antriebsachsen dienen zur Kraftübertragung von der Dampfmaschine zu anderen Maschinen. Die maximale Länge einer Antriebsachse beträgt 10 Blöcke. Über Getriebeblöcke können auch größere Strecken überbrückt, sowie Abzweigungen und Richtungswechsel realisiert werden.
|
||||
|
||||
[ta2_driveaxle|image]
|
||||
|
||||
@ -87,7 +87,7 @@ Bei größeren Anlagen mit mehreren Dampfmaschinen oder vielen angetriebenen Mas
|
||||
|
||||
Der Energiespeicher besteht aus mehreren Blöcken und muss wie im Plan rechts abgebildet, zusammen gebaut werden.
|
||||
|
||||
Um die maximale Speicherkapazität zu erreichen, muss die Kiste mit Gewichten komplett gefüllt, und der Mast inklusive der zwei Getriebeboxen 12 Blöcke hoch sein. Kleinere Aufbauten sind aber auch möglich.
|
||||
Um die maximale Speicherkapazität zu erreichen, muss die Kiste mit Gewichten komplett gefüllt, und der Mast inklusive der zwei Getriebeblöcke 12 Blöcke hoch sein. Kleinere Aufbauten sind aber auch möglich.
|
||||
|
||||
[ta2_storage|plan]
|
||||
|
||||
@ -95,7 +95,7 @@ Um die maximale Speicherkapazität zu erreichen, muss die Kiste mit Gewichten ko
|
||||
|
||||
### TA2 Seilwinde / TA2 Winch
|
||||
|
||||
Die Seilwinde muss mit einer Getriebebox verbunden werden und kann so überschüssige Energie aufnehmen und damit eine Gewichtekiste nach oben ziehen. Die maximale Seillänge beträgt 10 Blöcke.
|
||||
Die Seilwinde muss mit einem Getriebeblock verbunden werden und kann so überschüssige Energie aufnehmen und damit eine Gewichtekiste nach oben ziehen. Achte beim Aufbau der Seilwinde darauf, dass der Pfeil auf der Blockoberseite zum Getriebeblock zeigt. Die maximale Seillänge beträgt 10 Blöcke.
|
||||
|
||||
[ta2_winch|image]
|
||||
|
||||
@ -109,6 +109,14 @@ Diese Kiste muss mit bis zu 10 Blöcken Abstand unter die Seilwinde gesetzt und
|
||||
|
||||
|
||||
|
||||
### TA2 Kupplung / TA2 Clutch
|
||||
|
||||
Mit der Kupplung können Achsen und Maschinen vom Energiespeicher getrennt werden. Damit kommen die Achsen nach der Kupplung zum Stillstand und Maschinenanlagen können umgebaut werden. Achte beim Aufbau der Kupplung darauf, dass der Pfeil auf der Blockoberseite zum Energiespeicher zeigt.
|
||||
|
||||
[techage:ta2_clutch_off|image]
|
||||
|
||||
|
||||
|
||||
## Items schieben und sortieren
|
||||
|
||||
Um Gegenstände (Items) von einer Verarbeitungsstation zur nächsten weiter zu transportieren, werden Schieber und Röhren verwendet. Siehe Plan.
|
||||
|
@ -94,7 +94,9 @@ In order to achieve the maximum storage capacity, the chest must be completely f
|
||||
|
||||
### TA2 Winch
|
||||
|
||||
The cable winch must be connected to a gear box and can absorb excess energy and thus pull a weight chest upwards. The maximum rope length is 10 blocks.
|
||||
The cable winch must be connected to a gear box and can absorb excess energy and thus pull a weight chest upwards.
|
||||
When assembling the cable winch, make sure that the arrow on the top of the block points to the gearbox.
|
||||
The maximum rope length is 10 blocks.
|
||||
|
||||
[ta2_winch|image]
|
||||
|
||||
@ -108,6 +110,14 @@ This chest must be placed under the winch with a distance of up to 10 blocks and
|
||||
|
||||
|
||||
|
||||
### TA2 Clutch
|
||||
|
||||
With the clutch, axles and machines can be separated from the energy storage. This means that the axles after the clutch come to a standstill and machine systems can be rebuilt. When assembling the clutch, make sure that the arrow on the top of the block points to the energy storage system.
|
||||
|
||||
[techage:ta2_clutch_off|image]
|
||||
|
||||
|
||||
|
||||
## Push and sort items
|
||||
|
||||
In order to transport objects from one processing station to the next, pushers and tubes are used. See plan.
|
||||
|
@ -197,7 +197,7 @@ Der Stromgenerator kann nur 50 Einheiten Benzin aufnehmen. Ein zusätzlicher Tan
|
||||
[ta3_tinygenerator|image]
|
||||
|
||||
|
||||
### TA3 Akku Block / Akku Box
|
||||
### TA3 Akku Block / TA3 Accu Box
|
||||
|
||||
Der Akku Block dient zur Speicherung von überschüssiger Energie und gibt bei Stromausfall automatisch Strom ab (soweit vorhanden).
|
||||
Mehrere Akku Blocks zusammen bilden ein TA3 Energiespeichersystem. Jeder Akku Block hat eine Anzeige für den Ladezustand und für die gespeicherte Ladung, wobei hier immer die Werte für das gesamte Netzwerk angezeigt werden. Die gespeicherte Ladung wird in "kud" also "ku-days" angezeigt (analog zu kWh) 5 kud entspricht damit bspw. 5 ku für einen Spieltag (20 min) oder 1 ku für 5 Spieltage.
|
||||
@ -489,7 +489,10 @@ Dazu muss der Aufkocher über einen Pumpe mit Erdöl versorgt werden.
|
||||
|
||||
## Logik-/Schalt-Blöcke
|
||||
|
||||
Neben den Röhren für Warentransport, sowie den Gas- und Stromleitungen gibt es auch noch eine drahtlose Kommunikationsebene, über die Blöcke untereinander Daten austauschen können. Dafür müssen keine Leitungen gezogen werden, sondern die Verbindung zwischen Sender und Empfänger erfolgt nur über die Blocknummer. Alle Blöcke, die an dieser Kommunikation teilnehmen können, zeigen die Blocknummer als Info-Text an, wenn man mit dem Mauscursor den Block fixiert.
|
||||
Neben den Röhren für Warentransport, sowie den Gas- und Stromleitungen gibt es auch noch eine drahtlose Kommunikationsebene, über die Blöcke untereinander Daten austauschen können. Dafür müssen keine Leitungen gezogen werden, sondern die Verbindung zwischen Sender und Empfänger erfolgt nur über die Blocknummer.
|
||||
|
||||
**Info:** Eine **Blocknummer** ist eine eindeutige Zahl, die von Techage beim Setzen von vielen Techage Blöcken generiert wird. Die Blocknummer dient zur Adressierung bei der Kommunikation zwischen Techage Controllern und Maschinen. Alle Blöcke, die an dieser Kommunikation teilnehmen können, zeigen die Blocknummer als Info-Text an, wenn man mit dem Mauscursor den Block fixiert.
|
||||
|
||||
Welche Kommandos ein Block unterstützt, kann mit dem TechAge Info Werkzeug (Schraubenschlüssel) ausgelesen und angezeigt werden.
|
||||
Die einfachsten Kommandos, die von fast allen Blöcken unterstützt werden, sind:
|
||||
|
||||
@ -886,7 +889,7 @@ Mit diesem Werkzeug lassen sich die Bohrgestängezange Blöcke wieder entfernen,
|
||||
|
||||
[ta3_drill_pipe_wrench|image]
|
||||
|
||||
### Techage Schraubendreher
|
||||
### Techage Schraubendreher / Screwdriver
|
||||
|
||||
Der Techage Schraubendreher dient als Ersatz für den normalen Schraubendreher. Es besitzt folgende Funktionen:
|
||||
|
||||
@ -896,3 +899,14 @@ Der Techage Schraubendreher dient als Ersatz für den normalen Schraubendreher.
|
||||
- Shift+Rechtsklick: Die gespeicherte Ausrichtung auf den angeklickten Block anwenden
|
||||
|
||||
[ta3_screwdriver|image]
|
||||
|
||||
### TechAge Montagewerkzeug / Assembly Tool
|
||||
|
||||
Das TechAge Montagewerkzeug dient zum Entfernen und wieder Setzen von Techage Blöcken, ohne dass diese Blöcke ihre Blocknummer verlieren, bzw. beim Setzen eine neue Nummer zugeteilt bekommen. Dies ist bspw. bei Steinbrechern hilfreich, da diese oft umgesetzt werden müssen.
|
||||
|
||||
- Linke Taste: Entfernen eines Blocks
|
||||
- Rechte Taste: Setzen eines Blocks
|
||||
|
||||
Der Block, der zuvor mit dem Montagewerkzeug entfernt wurde und wieder gesetzt werden soll, muss sich im Spieler-Inventar ganz links befinden.
|
||||
|
||||
[techage:assembly_tool|image]
|
@ -200,13 +200,13 @@ The power generator can only hold 50 units of gasoline. An additional tank and a
|
||||
[ta3_tinygenerator|image]
|
||||
|
||||
|
||||
### TA3 Battery Block
|
||||
### TA3 Accu Block
|
||||
|
||||
The battery block is used to store excess energy and automatically delivers power in the event of a power failure (if available).
|
||||
Several battery blocks together form a TA3 energy storage system. Each battery block has a display for the charging state and for the stored load.
|
||||
The accu block (rechargeable battery) is used to store excess energy and automatically delivers power in the event of a power failure (if available).
|
||||
Several accu blocks together form a TA3 energy storage system. Each accu block has a display for the charging state and for the stored load.
|
||||
The values for the entire network are always displayed here. The stored load is displayed in "kud" or "ku-days" (analogous to kWh) 5 kud thus corresponds, for example, to 5 ku for a game day (20 min) or 1 ku for 5 game days.
|
||||
|
||||
A battery block has 3.33 kud
|
||||
A accu block has 3.33 kud
|
||||
|
||||
[ta3_akkublock|image]
|
||||
|
||||
@ -491,7 +491,10 @@ To do this, the reboiler must be supplied with oil via a pump.
|
||||
|
||||
## Logic / Switching Blocks
|
||||
|
||||
In addition to the tubes for goods transport, as well as the gas and power pipes, there is also a wireless communication level through which blocks can exchange data with each other. No lines have to be drawn for this, the connection between transmitter and receiver is only made via the block number. All blocks that can participate in this communication show the block number as info text if you fix the block with the mouse cursor.
|
||||
In addition to the tubes for goods transport, as well as the gas and power pipes, there is also a wireless communication level through which blocks can exchange data with each other. No lines have to be drawn for this, the connection between transmitter and receiver is only made via the block number.
|
||||
|
||||
**Info:** A block number is a unique number that is generated by Techage when many Techage blocks are placed. The block number is used for addressing during communication between Techage controllers and machines. All blocks that can participate in this communication show the block number as info text if you fix the block with the mouse cursor.
|
||||
|
||||
Which commands a block supports can be read out and displayed with the TechAge Info Tool (wrench).
|
||||
The simplest commands supported by almost all blocks are:
|
||||
|
||||
@ -887,3 +890,15 @@ The Techage Screwdriver serves as a replacement for the normal screwdriver. It h
|
||||
- Shift + right click: apply the saved alignment to the clicked block
|
||||
|
||||
[ta3_screwdriver|image]
|
||||
|
||||
### TechAge Assembly Tool
|
||||
|
||||
The TechAge Assembly Tool is used to remove and reposition Techage blocks without these blocks losing their block number or being assigned a new number when setting. This is helpful, for example, for quarries, as they often have to be moved.
|
||||
|
||||
- Left button: Remove a block
|
||||
- Right button: Set a block
|
||||
|
||||
The block that was previously removed with the assembly tool and is to be placed again must be on the far left of the player inventory.
|
||||
|
||||
[techage:assembly_tool|image]
|
||||
|
||||
|
@ -740,9 +740,7 @@ Pro Spieler kann nur ein Teilchenbeschleuniger betrieben werden. Es macht also k
|
||||
Ein Teilchenbeschleuniger besteht aus einem "Ring" aus Röhren und Magneten sowie dem Detektor mit Kühlanlage.
|
||||
|
||||
- Der Detektor ist das Herz der Anlage. Hier finden die wissenschaftlichen Experimente statt. Der Detektor ist 3x3x7 Blöcke groß.
|
||||
- 22 TA4 Collider Magnete (nicht die TA4 Collider Detector Magnete!) müssen über jeweils 5 Blöcken der TA4 Vakuumröhre miteinander verbunden werden. Jeder Magnet benötigt zusätzlich Strom und einen Gasanschluss für die Kühlung. Das ganze bildet (wie rechts im Plan abgebildet) ein Quadrat mit einer Kantenlänge von 37 Metern.
|
||||
- Zusätzlich wird eine Kühlung benötigt, welche zusätzlich beim Detektor aufgebaut werden muss. Für die Kühlung wird Isobutan benötigt.
|
||||
- Die Anlage benötigt einiges an Strom. Daher ist eine eigene Stromversorgung sinnvoll.
|
||||
- 22 TA4 Collider Magnete (nicht die TA4 Collider Detector Magnete!) müssen über jeweils 5 Blöcken der TA4 Vakuumröhre miteinander verbunden werden. Das ganze bildet (wie rechts im Plan abgebildet) ein Quadrat mit einer Kantenlänge von 37 Metern.
|
||||
|
||||
Der Plan zeigt die Anlage von oben:
|
||||
|
||||
@ -783,15 +781,19 @@ Tritt beim `start` an einem Magneten ein Fehler auf, so wird die Nummer des Magn
|
||||
|
||||
[ta4_terminal|image]
|
||||
|
||||
### Kühlung und Strom
|
||||
|
||||
Jeder TA4 Collider Magnet muss zusätzlich (wie rechts im Plan abgebildet) mit Strom sowie mit Isobutan zur Kühlung versorgt werden:
|
||||
|
||||
- Der Anschluss für den Strom ist auf der Oberseite des Magneten.
|
||||
- Der Anschluss für die Kühlung ist auf der Vorderseite des Magneten.
|
||||
- Für die Kühlung der gesamten Anlage wird zusätzlich eine TA4 Pumpe und ein TA4 Tank mit mindestens 250 Einheiten Isobutan benötigt.
|
||||
- Die Anlage benötigt auch einiges an Strom. Daher ist eine eigene Stromversorgung mit mindestens 145 ku sinnvoll.
|
||||
|
||||
[techage_collider_plan2|plan]
|
||||
|
||||
### Aufbau
|
||||
|
||||
Für den Teilchenbeschleunigers wird außer den Blöcken für den Bau folgendes benötigt:
|
||||
|
||||
- Strom (145 ku)
|
||||
- TA4 Tank mit mindestens 250 Einheiten Isobutan
|
||||
|
||||
Beim Aufbau des Teilchenbeschleunigers empfiehlt sich folgende Reihenfolge:
|
||||
|
||||
- Einen Forceload Block setzen. Nur der Detektor mit der Kühlanlage muss sich im Bereich des Forceload Blockes befinden.
|
||||
@ -832,12 +834,16 @@ Die Verarbeitungsleistung beträgt 4 Items alle 4 s. Der Autocrafter benötigt h
|
||||
|
||||
Zusätzlich unterstützt der TA4 Autocrafter die Auswahl unterschiedlicher Rezepte über folgende Kommandos:
|
||||
|
||||
`recipe <number>.<index>` schaltet den Autocrafter auf ein Rezept des TA4 Rezept Blocks um. `<number>` ist die Nummer des Rezept Blocks, `<index>` die Rezept-Nummer. Beispiel: `$send_cmnd(1234, "recipe", 5467.1)`
|
||||
`recipe "<number>.<index>"` schaltet den Autocrafter auf ein Rezept des TA4 Rezept Blocks um. `<number>` ist die Nummer des Rezept Blocks, `<index>` die Rezept-Nummer. Beispiel: `$send_cmnd(1234, "recipe", "5467.1")`
|
||||
|
||||
Alternativ kann ein Rezept auch über die Zutatenliste ausgewählt werden, wie bspw.:
|
||||
`$send_cmnd(1234, "recipe", "default:coal_lump,,,default:stick")`
|
||||
Hier müssen alle technische Namen eines Rezeptes durch Kommas getrennt angegeben werden. Siehe auch das Kommando `input` beim TA4 Rezept Block.
|
||||
|
||||
Das Kommando `flush` verschiebt alle Artikel vom Eingabeinventar in das Ausgabeinventar. Das Kommando liefert `true` zurück, wenn das Eingabeinventar dabei vollständig geleert wurde. Falls `false` zurückgeliefert wurde (Ausgabeinventar voll), muss das Kommando zu einem späteren Zeitpunkt wiederholt werden.
|
||||
|
||||
|
||||
|
||||
[ta4_autocrafter|image]
|
||||
|
||||
### TA4 Tank / TA4 Tank
|
||||
@ -943,6 +949,8 @@ Der Kiste besitzt ein zusätzliches Kommandos für den Lua Controller:
|
||||
- `count` dient zur Anfrage, wie viele Items in der Kiste sind.
|
||||
Beispiel 1: `$send_cmnd(CHEST, "count")` --> Summe der Items über alle 8 Speicher
|
||||
Beispiel 2: `$send_cmnd(CHEST, "count", 2)` --> Anzahl der Items in Speicher 2 (zweiter von links)
|
||||
- `storesize` wird verwendet, um die Größe eines der acht Speicher auszulesen
|
||||
Beispiel: `$send_cmnd(CHEST, "storesize")` -> Funktion liefert bspw. 6000 zurück
|
||||
|
||||
[ta4_8x2000_chest|image]
|
||||
|
||||
|
@ -732,8 +732,6 @@ A collider consists of a "ring" made of tubes and magnets as well as a detector
|
||||
|
||||
- The detector is the heart of the system. This is where the scientific experiments take place. The detector is 3x3x7 blocks in size.
|
||||
- 22 TA4 Collider Magnets (not the TA4 Collider Detector Magnets!) must be connected to each other via 5 blocks of the TA4 vacuum tube. Each magnet also requires electricity and a gas connection for cooling. The whole thing forms (as shown in the plan on the right) a square with an edge length of 37 meters.
|
||||
- In addition, cooling is required, which must also be installed at the detector. Isobutane is required for cooling.
|
||||
- The system requires quite a bit of electricity. Therefore, it makes sense to have your own power supply.
|
||||
|
||||
The plan shows the facility from above:
|
||||
|
||||
@ -756,6 +754,10 @@ Note: The arrow on the heat exchanger must point away from the detector. The hea
|
||||
|
||||
[ta4_cooler|plan]
|
||||
|
||||
|
||||
- In addition, cooling is required, which must also be installed at the detector. Isobutane is required for cooling.
|
||||
- The system requires quite a bit of electricity. Therefore, it makes sense to have your own power supply.
|
||||
|
||||
### Control / TA4 Terminal
|
||||
|
||||
The collider is controlled via a TA4 terminal (not via the TA4 Lua controller terminal).
|
||||
@ -774,15 +776,19 @@ If an error occurs on a magnet during the `start`, the number of the magnet is o
|
||||
|
||||
[ta4_terminal|image]
|
||||
|
||||
### Cooling and power
|
||||
|
||||
Each TA4 Collider magnet must also be supplied with electricity (as shown on the right in the plan) and with Isobutane for cooling:
|
||||
|
||||
- The connection for the power is on the top of the magnet.
|
||||
- The connection for the cooling is on the front of the magnet.
|
||||
- A TA4 pump and a TA4 tank with at least 250 units of isobutane are also required to cool the entire system.
|
||||
- The system also requires a lot of electricity. It therefore makes sense to have your own power supply with at least 145 ku.
|
||||
|
||||
[techage_collider_plan2|plan]
|
||||
|
||||
### Construction
|
||||
|
||||
In addition to the building blocks, the following is required for the collider:
|
||||
|
||||
- electricity (145 ku)
|
||||
- TA4 tank with at least 250 units of isobutane
|
||||
|
||||
The following sequence is recommended when setting up the collider:
|
||||
|
||||
- Put a forceload block. Only the detector with the cooling system has to be in the area of the forceload block.
|
||||
@ -823,12 +829,14 @@ The processing power is 4 items every 4 s. The autocrafter requires 9 ku of elec
|
||||
|
||||
In addition, the TA4 Autocrafter supports the selection of different recipes using the following commands:
|
||||
|
||||
`recipe <number>.<index>` switches the autocrafter to a recipe from the TA4 Recipe Block. `<number>` is the number of the recipe block, `<index>` the recipe number. Example: `$send_cmnd(1234, "recipe", 5467.1)`
|
||||
`recipe "<number>.<index>"` switches the autocrafter to a recipe from the TA4 Recipe Block. `<number>` is the number of the recipe block, `<index>` the recipe number. Example: `$send_cmnd(1234, "recipe", "5467.1")`
|
||||
|
||||
Alternatively, a recipe can also be selected via the list of ingredients, such as:
|
||||
`$send_cmnd(1234, "recipe", "default:coal_lump,,,default:stick")`
|
||||
All technical names of a recipe must be specified here, separated by commas. See also the command `input` in the TA4 recipe block.
|
||||
|
||||
The `flush` command moves all items from the input inventory to the output inventory. The command returns `true` if the input inventory was completely emptied. If `false` was returned (output inventory full), the command must be repeated at a later time.
|
||||
|
||||
[ta4_autocrafter|image]
|
||||
|
||||
### TA4 Tank
|
||||
@ -933,6 +941,8 @@ The chest has an additional command for the Lua controller:
|
||||
- `count` is used to request how many items are in the chest.
|
||||
Example 1: `$send_cmnd(CHEST, "count")` -> Sum of items across all 8 stores
|
||||
Example 2: `$send_cmnd(CHEST, "count", 2)` -> number of items in store 2 (second from left)
|
||||
- `storesize` is used to read the size of one of the eight stores:
|
||||
Example: `$send_cmnd(CHEST, "storesize")` -> function returns e.g. 6000
|
||||
|
||||
[ta4_8x2000_chest|image]
|
||||
|
||||
|
@ -1,272 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
|
||||
import re
|
||||
import sys
|
||||
import pprint
|
||||
import mistune # must be v0.8.4, install with 'sudo pip install mistune==0.8.4'
|
||||
|
||||
def formspec_escape(text):
|
||||
text = text.replace("\\", "")
|
||||
text = text.replace("[", "\\\\[")
|
||||
text = text.replace("]", "\\\\]")
|
||||
text = text.replace(";", "\\\\;")
|
||||
text = text.replace(",", "\\\\,")
|
||||
text = text.replace('"', '\\"')
|
||||
text = text.replace('\n', '\\n')
|
||||
#print ">>>>"+text+"<<<<"
|
||||
return text
|
||||
|
||||
def header_escsape(header):
|
||||
header = header.lower()
|
||||
header = header.replace(" ", "-")
|
||||
header = header.replace("/", "")
|
||||
return header
|
||||
|
||||
lTitel = []
|
||||
lText = []
|
||||
lItemName = []
|
||||
lPlanTable = []
|
||||
lTocLinks = []
|
||||
|
||||
def reset():
|
||||
global lTitel, lText, lItemName, lPlanTable, lTocLinks
|
||||
|
||||
lTitel = []
|
||||
lText = []
|
||||
lItemName = []
|
||||
lPlanTable = []
|
||||
lTocLinks = []
|
||||
|
||||
|
||||
def lua_table(name, lData):
|
||||
lOut = []
|
||||
lOut.append("%s = {" % name)
|
||||
for line in lData:
|
||||
lOut.append(' "%s",' % line)
|
||||
lOut.append("}\n\n")
|
||||
return "\n".join(lOut)
|
||||
|
||||
def lua_text_table(name, lData):
|
||||
lOut = []
|
||||
lOut.append("%s = {" % name)
|
||||
for lines in lData:
|
||||
for line in lines[:-1]:
|
||||
line = line.replace('<br>', '\\n')
|
||||
lOut.append(' "%s\\n"..' % line)
|
||||
if len(lines) > 0:
|
||||
lOut.append(' "%s\\n",' % lines[-1])
|
||||
else:
|
||||
lOut.append(' "",')
|
||||
lOut.append("}\n\n")
|
||||
return "\n".join(lOut)
|
||||
|
||||
class WikiLinkInlineLexer(mistune.InlineLexer):
|
||||
def enable_wiki_link(self):
|
||||
# add wiki_link rules
|
||||
self.rules.wiki_link = re.compile(
|
||||
r'\[' # [
|
||||
r'([\s\S]+?\|[\s\S]+?)' # name| img-type
|
||||
r'\](?!\])' # ]
|
||||
)
|
||||
|
||||
# Add wiki_link parser to default rules
|
||||
# you can insert it some place you like
|
||||
# but place matters, maybe 3 is not good
|
||||
self.default_rules.insert(3, 'wiki_link')
|
||||
|
||||
def output_wiki_link(self, m):
|
||||
text = m.group(1)
|
||||
name, itype = text.split('|')
|
||||
# you can create an custom render
|
||||
# you can also return the html if you like
|
||||
return self.renderer.wiki_link(name, itype)
|
||||
|
||||
class MyRenderer(mistune.Renderer):
|
||||
def __init__(self, *args, **kwargs):
|
||||
mistune.Renderer.__init__(self, *args, **kwargs)
|
||||
self.TextChunck = []
|
||||
self.ItemName = ""
|
||||
self.PlanTable = ""
|
||||
self.is_first_header = True
|
||||
|
||||
def add_last_paragraph(self):
|
||||
"""
|
||||
Used to add a text block before the next header or at the end of the document
|
||||
"""
|
||||
lText.append(self.TextChunck)
|
||||
self.TextChunck = []
|
||||
lItemName.append(self.ItemName)
|
||||
self.ItemName = ""
|
||||
lPlanTable.append(self.PlanTable)
|
||||
self.PlanTable = ""
|
||||
##
|
||||
## Block Level
|
||||
##
|
||||
def block_code(self, code, lang):
|
||||
text = formspec_escape(code.strip())
|
||||
lines = text.split("\\n")
|
||||
lines = [" " + item for item in lines]
|
||||
self.TextChunck.extend(lines)
|
||||
self.TextChunck.append("")
|
||||
return ""
|
||||
|
||||
# ~ def block_quote(self, text):
|
||||
# ~ print "block_quote", text
|
||||
# ~ self.TextChunck.append("\n%s\n" % text)
|
||||
# ~ return ""
|
||||
|
||||
def header(self, text, level, raw=None):
|
||||
if not self.is_first_header:
|
||||
self.add_last_paragraph()
|
||||
self.is_first_header = False
|
||||
lTitel.append("%u,%s" % (level, formspec_escape(text)))
|
||||
lTocLinks.append({"level": level, "header": formspec_escape(text), "link": self.src_name})
|
||||
return ""
|
||||
|
||||
def hrule(self):
|
||||
self.TextChunck.append("\n----------------------------------------------------\n")
|
||||
return ""
|
||||
|
||||
def paragraph(self, text):
|
||||
lines = text.split("\\n") + [""]
|
||||
self.TextChunck.extend(lines)
|
||||
return ""
|
||||
|
||||
def list(self, body, ordered=True):
|
||||
lines = body.split("\n")
|
||||
self.TextChunck.extend(lines)
|
||||
return ""
|
||||
|
||||
def list_item(self, text):
|
||||
return " - %s\n" % text.strip()
|
||||
##
|
||||
## Span Level
|
||||
##
|
||||
def emphasis(self, text):
|
||||
return "*%s*" % formspec_escape(text)
|
||||
|
||||
def double_emphasis(self, text):
|
||||
return "*%s*" % formspec_escape(text)
|
||||
|
||||
def codespan(self, text):
|
||||
return "'%s'" % formspec_escape(text)
|
||||
|
||||
def text(self, text):
|
||||
return formspec_escape(text)
|
||||
|
||||
def link(self, link, title, content):
|
||||
"""
|
||||
Used for plans and images:
|
||||
[myimage](/image/)
|
||||
[myplan](/plan/)
|
||||
"""
|
||||
if link == "/image/":
|
||||
self.ItemName = content
|
||||
elif link == "/plan/":
|
||||
self.PlanTable = content
|
||||
return ""
|
||||
|
||||
def wiki_link(self, name, itype):
|
||||
"""
|
||||
Used for plans and images:
|
||||
[myimage|image]
|
||||
[myplan|plan]
|
||||
"""
|
||||
if itype == "image":
|
||||
self.ItemName = name
|
||||
elif itype == "plan":
|
||||
self.PlanTable = name
|
||||
return ""
|
||||
|
||||
def autolink(self, link, is_email=False):
|
||||
return link
|
||||
|
||||
def linebreak(self):
|
||||
return "\\n"
|
||||
|
||||
def newline(self):
|
||||
return "\\n"
|
||||
|
||||
def inline_html(self, text):
|
||||
print(text)
|
||||
# ~
|
||||
# ~ double_emphasis(text)
|
||||
# ~ image(src, title, alt_text)
|
||||
# ~ link(link, title, content)
|
||||
# ~ strikethrough(text)
|
||||
# ~ inline_html(text)
|
||||
|
||||
|
||||
def parse_md_file(src_name, mod, manual):
|
||||
print("Read Lua file '%s'" % src_name)
|
||||
renderer = MyRenderer()
|
||||
inline = WikiLinkInlineLexer(renderer)
|
||||
# enable the feature
|
||||
inline.enable_wiki_link()
|
||||
md = mistune.Markdown(renderer=renderer, inline=inline)
|
||||
md.renderer.src_name = src_name
|
||||
md.render(open(src_name, 'r').read())
|
||||
md.renderer.add_last_paragraph()
|
||||
|
||||
def gen_lua_file(dest_name):
|
||||
print("Write Lua file '%s'" % dest_name)
|
||||
lOut = ["%s.%s = {}\n\n" % (mod, manual)]
|
||||
lOut.append(lua_table("%s.%s.aTitel" % (mod, manual), lTitel))
|
||||
lOut.append(lua_text_table("%s.%s.aText" % (mod, manual), lText))
|
||||
lOut.append(lua_table("%s.%s.aItemName" % (mod, manual), lItemName))
|
||||
lOut.append(lua_table("%s.%s.aPlanTable" % (mod, manual), lPlanTable))
|
||||
open(dest_name, "w").write("".join(lOut))
|
||||
|
||||
def gen_toc_md_file(dest_name, titel, level_range=[1,6]):
|
||||
print("Write MD file '%s'" % dest_name)
|
||||
lOut = ["# "+ titel]
|
||||
lOut.append("")
|
||||
for item in lTocLinks:
|
||||
if item["level"] in range(*level_range):
|
||||
list_item = " " * (item["level"] - level_range[0]) + "-"
|
||||
link = "%s#%s" % (item["link"], header_escsape(item["header"]))
|
||||
lOut.append("%s [%s](%s)" % (list_item, item["header"], link))
|
||||
open(dest_name, "w").write("\n".join(lOut))
|
||||
|
||||
def gen_file_local_toc(dest_name, level_range=[1,6]):
|
||||
lOut = []
|
||||
for item in lTocLinks:
|
||||
if item["level"] in range(*level_range):
|
||||
list_item = " " * (item["level"] - level_range[0]) + "-"
|
||||
link = "#%s" % (item["header"].replace(" ", "-").replace("\\", ""))
|
||||
lOut.append("%s [%s](%s)" % (list_item, item["header"].replace("\\", ""), link))
|
||||
open(dest_name, "w").write("\n".join(lOut))
|
||||
|
||||
########################### German #########################
|
||||
mod = "techage"
|
||||
manual = "manual_DE"
|
||||
parse_md_file("./manual_DE.md", mod, manual)
|
||||
parse_md_file("./manual_ta1_DE.md", mod, manual)
|
||||
parse_md_file("./manual_ta2_DE.md", mod, manual)
|
||||
parse_md_file("./manual_ta3_DE.md", mod, manual)
|
||||
parse_md_file("./manual_ta4_DE.md", mod, manual)
|
||||
parse_md_file("./manual_ta5_DE.md", mod, manual)
|
||||
gen_lua_file("../doc/manual_DE.lua")
|
||||
gen_toc_md_file("./toc_DE.md", "Inhaltsverzeichnis")
|
||||
|
||||
########################### English #########################
|
||||
reset()
|
||||
mod = "techage"
|
||||
manual = "manual_EN"
|
||||
parse_md_file("./manual_EN.md", mod, manual)
|
||||
parse_md_file("./manual_ta1_EN.md", mod, manual)
|
||||
parse_md_file("./manual_ta2_EN.md", mod, manual)
|
||||
parse_md_file("./manual_ta3_EN.md", mod, manual)
|
||||
parse_md_file("./manual_ta4_EN.md", mod, manual)
|
||||
parse_md_file("./manual_ta5_EN.md", mod, manual)
|
||||
gen_lua_file("../doc/manual_EN.lua")
|
||||
gen_toc_md_file("./toc_EN.md", "Table of Contents")
|
||||
|
||||
########################### Lua Manual #########################
|
||||
reset()
|
||||
parse_md_file("./ta4_lua_controller_EN.md", mod, manual)
|
||||
gen_file_local_toc("toc.txt", level_range=[2,4])
|
||||
|
||||
|
@ -48,7 +48,7 @@ Für jede Regel kann eine der folgenden Bedingungen konfiguriert werden. Pro Reg
|
||||
|
||||
- `inputs` - Damit kann der empfangene Wert `on` / `off` eines Kommandos (Ereignis) ausgewertet werden. Hier bitte beachten: Bei Regeln, die Ereignis-gesteuert ausgeführt werden sollen, muss als Zykluszeit 0 angegeben werden.
|
||||
|
||||
- `read block state` - Damit kann der Status einer Maschine abgefragt werden. Die Nummer der Maschine muss eingegeben werden. Mögliche Maschinenzustände sind:
|
||||
- `read block state` - Damit kann der Status einer Maschine abgefragt werden. Die Nummer der Maschine (Blocknummer) muss eingegeben werden. Mögliche Maschinenzustände sind:
|
||||
|
||||
- `running` --> Maschine ist am arbeiten
|
||||
- `stopped` --> Maschine ist ausgeschaltet
|
||||
@ -59,8 +59,10 @@ Für jede Regel kann eine der folgenden Bedingungen konfiguriert werden. Pro Reg
|
||||
|
||||
Ist eine konfigurierte Bedingung erfüllt, also bspw. `block nummer 456 is stopped`, so wird die Aktion ausgeführt.
|
||||
|
||||
Welche Maschinen welche Statusinformationen liefern, kann am einfachsten mit dem Schraubenschlüssel /Techage Info Werkzeug direkt an der Maschine festgestellt werden.
|
||||
**Info:** Eine **Blocknummer** ist eine eindeutige Zahl, die von Techage beim Setzen von vielen Techage Blöcken generiert und als Infotext hinter dem Blocknamen angezeigt wird. Die Blocknummer dient zur Adressierung bei der Kommunikation zwischen Techage Controllern und Maschinen.
|
||||
|
||||
Welche Maschinen welche Statusinformationen liefern, kann am einfachsten mit dem Schraubenschlüssel /Techage Info Werkzeug direkt an der Maschine festgestellt werden.
|
||||
|
||||
- `read amount of fuel` - Damit kann ausgelesen werden, wie viel Sprit eine Maschine noch hat (typisch 0-99 Einheiten) und mit einem Wert auf 'größer' oder 'kleiner' verglichen werden. Ist die konfigurierte Bedingung erfüllt, wird die Aktion ausgeführt.
|
||||
`read power/liquid load` - Damit kann die Ladung eines Akkus oder des Wärmespeichers in Prozent (Werte von 0..100) abgefragt und mit der konfigurierten Bedingung auf 'größer'/'kleiner' geprüft werden. Ist die Bedingung erfüllt, wird die Aktion ausgeführt.
|
||||
|
||||
|
@ -48,7 +48,7 @@ One of the following conditions can be configured for each rule. However, only o
|
||||
|
||||
- `inputs` - This enables the received value `on` / `off` of a command (event) to be evaluated. Please note here: For rules that are to be executed event-controlled, cycle time 0 must be specified.
|
||||
|
||||
- `read block state` - This allows the status of a machine to be queried. The machine number must be entered. Possible machine states are:
|
||||
- `read block state` - This allows the status of a machine to be queried. The machine number (block number) must be entered. Possible machine states are:
|
||||
|
||||
- `running` -> machine is working
|
||||
- `stopped` -> machine is switched off
|
||||
@ -59,8 +59,10 @@ One of the following conditions can be configured for each rule. However, only o
|
||||
|
||||
If a configured condition is fulfilled, e.g. `block number 456 is stopped`, the action is carried out.
|
||||
|
||||
The easiest way to determine which machines provide which status information is with the wrench / Techage Info tool directly on the machine.
|
||||
**Info:** A **block number** is a unique number that is generated by Techage when many Techage blocks are placed and is displayed as information text behind the block name. The block number is used for addressing during communication between Techage controllers and machines.
|
||||
|
||||
The easiest way to determine which machines provide which status information is with the wrench / Techage Info tool directly on the machine.
|
||||
|
||||
- `read amount of fuel` - This can be used to read out how much fuel a machine still has (typically 0-99 units) and to compare it with a value of 'larger' or 'smaller'. If the configured condition is met, the action is carried out.
|
||||
`read power / liquid load` - This means that the charge of a battery or the heat storage device can be queried in percent (values from 0..100) and checked for 'larger' / 'smaller' with the configured condition. If the condition is met, the action is carried out.
|
||||
|
||||
|
@ -24,13 +24,19 @@ local Axle = tubelib2.Tube:new({
|
||||
max_tube_length = 10,
|
||||
show_infotext = false,
|
||||
tube_type = "axle",
|
||||
primary_node_names = {"techage:axle", "techage:axle_on"},
|
||||
primary_node_names = {"techage:axle", "techage:axle_on", "techage:ta2_clutch_on"},
|
||||
secondary_node_names = {},
|
||||
after_place_tube = function(pos, param2, tube_type, num_tubes, state)
|
||||
if state == "on" then
|
||||
minetest.swap_node(pos, {name = "techage:axle_on", param2 = param2})
|
||||
local node = minetest.get_node(pos)
|
||||
local name = node.name
|
||||
if name == "techage:axle_on" or name == "techage:axle" then
|
||||
if state == "on" then -- texture state
|
||||
minetest.swap_node(pos, {name = "techage:axle_on", param2 = param2})
|
||||
else
|
||||
minetest.swap_node(pos, {name = "techage:axle", param2 = param2})
|
||||
end
|
||||
else
|
||||
minetest.swap_node(pos, {name = "techage:axle", param2 = param2})
|
||||
minetest.swap_node(pos, {name = name, param2 = param2})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
@ -187,7 +187,7 @@ end
|
||||
function techage.generator_formspec(self, pos, nvm, label, provided, max_available, ta2)
|
||||
local tooltip = ""
|
||||
if not ta2 then
|
||||
tooltip = techage.wrench_tooltip(4.4, -0.1)
|
||||
tooltip = techage.wrench_tooltip(4.4, -0.05)
|
||||
end
|
||||
return "size[5,4]" ..
|
||||
default.gui_bg ..
|
||||
|
@ -275,7 +275,7 @@ techage.register_node({"techage:powerswitch", "techage:powerswitch_on",
|
||||
end,
|
||||
on_beduino_request_data = function(pos, src, topic, payload)
|
||||
local node = techage.get_node_lvm(pos)
|
||||
if topic == 142 then
|
||||
if topic == 131 or topic == 142 then
|
||||
if node.name == "techage:powerswitch_on" or
|
||||
node.name == "techage:powerswitchsmall_on" then
|
||||
return 0, {1}
|
||||
|
BIN
techage/sounds/techage_tool1.ogg
Normal file
BIN
techage/sounds/techage_tool1.ogg
Normal file
Binary file not shown.
BIN
techage/sounds/techage_tool2.ogg
Normal file
BIN
techage/sounds/techage_tool2.ogg
Normal file
Binary file not shown.
Binary file not shown.
@ -49,7 +49,7 @@ local function water_flowing(pos, facedir, tRes)
|
||||
local pos2 = vector.add(pos, dir)
|
||||
pos2.y = pos2.y + 1
|
||||
local node = minetest.get_node(pos2)
|
||||
if node.name == "default:water_flowing" then
|
||||
if node.name == "default:water_flowing" or node.name == "default:river_water_flowing" then
|
||||
tRes.backward = false
|
||||
return true
|
||||
end
|
||||
@ -57,7 +57,7 @@ local function water_flowing(pos, facedir, tRes)
|
||||
pos2 = vector.subtract(pos, dir)
|
||||
pos2.y = pos2.y + 1
|
||||
node = minetest.get_node(pos2)
|
||||
if node.name == "default:water_flowing" then
|
||||
if node.name == "default:water_flowing" or node.name == "default:river_water_flowing" then
|
||||
tRes.backward = true
|
||||
return true
|
||||
end
|
||||
|
128
techage/ta2_energy_storage/ta2_clutch.lua
Normal file
128
techage/ta2_energy_storage/ta2_clutch.lua
Normal file
@ -0,0 +1,128 @@
|
||||
--[[
|
||||
|
||||
TechAge
|
||||
=======
|
||||
|
||||
Copyright (C) 2019-2023 Joachim Stolberg
|
||||
|
||||
AGPL v3
|
||||
See LICENSE.txt for more information
|
||||
|
||||
TA2 Axle clutch
|
||||
|
||||
]]--
|
||||
|
||||
-- for lazy programmers
|
||||
local P2S = minetest.pos_to_string
|
||||
local M = minetest.get_meta
|
||||
local S = techage.S
|
||||
|
||||
local DESCR = S("TA2 Clutch")
|
||||
|
||||
local Axle = techage.Axle
|
||||
local power = networks.power
|
||||
local control = networks.control
|
||||
|
||||
-- Search for a gearbox, which is part of the axle network
|
||||
local function get_gearbox_pos(pos)
|
||||
local outdir = M(pos):get_int("outdir")
|
||||
local pos1, dir1 = Axle:get_connected_node_pos(pos, outdir)
|
||||
if pos1 then
|
||||
local node = minetest.get_node(pos1)
|
||||
--print("get_gearbox_pos", node.name)
|
||||
if node.name == "techage:gearbox_on" or node.name == "techage:gearbox" then
|
||||
return pos1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Send to the winches
|
||||
local function control_cmnd(pos, topic)
|
||||
-- The clutch is not part of the axle network,
|
||||
-- so we have to use a helper function to be able
|
||||
-- to send a command into the network.
|
||||
local pos1 = get_gearbox_pos(pos)
|
||||
if pos1 then
|
||||
control.send(pos1, Axle, 0, "sto", topic)
|
||||
end
|
||||
end
|
||||
|
||||
local function switch_on(pos, node)
|
||||
if node.name == "techage:ta2_clutch_off" then
|
||||
control_cmnd(pos, "on")
|
||||
node.name = "techage:ta2_clutch_on"
|
||||
minetest.swap_node(pos, node)
|
||||
Axle:after_place_tube(pos)
|
||||
minetest.sound_play("techage_button", {
|
||||
pos = pos,
|
||||
gain = 0.5,
|
||||
max_hear_distance = 5})
|
||||
end
|
||||
end
|
||||
|
||||
local function switch_off(pos, node)
|
||||
if node.name == "techage:ta2_clutch_on" then
|
||||
control_cmnd(pos, "off")
|
||||
minetest.swap_node(pos, {name = "techage:ta2_clutch_off", param2 = M(pos):get_int("outdir") - 1})
|
||||
Axle:after_dig_tube(pos, node)
|
||||
minetest.sound_play("techage_button", {
|
||||
pos = pos,
|
||||
gain = 0.5,
|
||||
max_hear_distance = 5})
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node("techage:ta2_clutch_off", {
|
||||
description = DESCR,
|
||||
tiles = {
|
||||
-- up, down, right, left, back, front
|
||||
"techage_filling_ta2.png^techage_appl_clutch.png^techage_appl_arrow3.png^techage_frame_ta2.png^[transformR90",
|
||||
"techage_filling_ta2.png^techage_appl_clutch.png^techage_appl_arrow3.png^techage_frame_ta2.png^[transformR270",
|
||||
"techage_filling_ta2.png^techage_appl_clutch.png^techage_frame_ta2.png",
|
||||
"techage_filling_ta2.png^techage_appl_clutch.png^techage_frame_ta2.png^[transformR180",
|
||||
"techage_filling_ta2.png^techage_frame_ta2.png^techage_clutch_clutch.png",
|
||||
"techage_filling_ta2.png^techage_frame_ta2.png^techage_clutch_clutch.png",
|
||||
},
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
M(pos):set_int("outdir", networks.side_to_outdir(pos, "B"))
|
||||
end,
|
||||
on_rightclick = switch_on,
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=2, crumbly=2, choppy=2},
|
||||
on_rotate = screwdriver.disallow,
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("techage:ta2_clutch_on", {
|
||||
description = DESCR,
|
||||
tiles = {
|
||||
-- up, down, right, left, back, front
|
||||
"techage_filling_ta2.png^techage_appl_clutch_on.png^techage_frame_ta2.png^[transformR90",
|
||||
"techage_filling_ta2.png^techage_appl_clutch_on.png^techage_frame_ta2.png^[transformR270",
|
||||
"techage_filling_ta2.png^techage_appl_clutch_on.png^techage_frame_ta2.png",
|
||||
"techage_filling_ta2.png^techage_appl_clutch_on.png^techage_frame_ta2.png^[transformR180",
|
||||
"techage_filling_ta2.png^techage_frame_ta2.png^techage_clutch_clutch.png",
|
||||
"techage_filling_ta2.png^techage_frame_ta2.png^techage_clutch_clutch.png",
|
||||
},
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
Axle:after_dig_tube(pos, oldnode, oldmetadata)
|
||||
end,
|
||||
on_rightclick = switch_off,
|
||||
paramtype2 = "facedir",
|
||||
drop = "techage:ta2_clutch_off",
|
||||
groups = {cracky=2, crumbly=2, choppy=2, not_in_creative_inventory=1},
|
||||
on_rotate = screwdriver.disallow,
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:ta2_clutch_off",
|
||||
recipe = {
|
||||
{"default:junglewood", "techage:axle", "default:wood"},
|
||||
{"techage:axle", "basic_materials:gear_steel", "techage:axle"},
|
||||
{"default:wood", "techage:axle", "default:junglewood"},
|
||||
},
|
||||
})
|
@ -24,6 +24,7 @@ local CYCLE_TIME = 2
|
||||
|
||||
local Axle = techage.Axle
|
||||
local power = networks.power
|
||||
local control = networks.control
|
||||
|
||||
|
||||
local function chest_pos(pos)
|
||||
@ -42,7 +43,7 @@ local function chest_load(nvm, pos)
|
||||
nvm.stored_items[i] = {name = stack:get_name(), count = stack:get_count()}
|
||||
amount = amount + stack:get_count()
|
||||
end
|
||||
return amount
|
||||
return amount * 3
|
||||
end
|
||||
|
||||
local function chest_full(pos)
|
||||
@ -136,24 +137,28 @@ minetest.register_node("techage:ta2_winch", {
|
||||
nvm.capa = nvm.capa or 1
|
||||
nvm.load = nvm.load or 0
|
||||
|
||||
if nvm.blocked then
|
||||
-- Keep the network active
|
||||
power.get_storage_load(pos, Axle, outdir, nvm.capa)
|
||||
return true
|
||||
end
|
||||
if not nvm.running and power.power_available(pos, Axle, outdir) and chest_full(pos) then
|
||||
remove_chest(pos)
|
||||
nvm.running = true
|
||||
power.start_storage_calc(pos, Axle, outdir)
|
||||
elseif not nvm.running then
|
||||
techage.renew_rope(pos, 50)
|
||||
elseif nvm.running and nvm.load == 0 and not power.power_available(pos, Axle, outdir) then
|
||||
elseif nvm.running and nvm.load < 2 and not power.power_available(pos, Axle, outdir) then
|
||||
add_chest(pos)
|
||||
nvm.running = false
|
||||
power.start_storage_calc(pos, Axle, outdir)
|
||||
end
|
||||
|
||||
if nvm.running then
|
||||
local val = power.get_storage_load(pos, Axle, outdir, nvm.capa) or 0
|
||||
if val > 0 then
|
||||
nvm.load = val
|
||||
nvm.load = power.get_storage_load(pos, Axle, outdir, nvm.capa) or 0
|
||||
if nvm.load > 2 then
|
||||
add_chest_entity(pos, nvm)
|
||||
end
|
||||
else
|
||||
techage.renew_rope(pos, 50)
|
||||
end
|
||||
return true
|
||||
end,
|
||||
@ -170,7 +175,7 @@ minetest.register_node("techage:ta2_winch", {
|
||||
get_storage_data = function(pos, outdir, tlib2)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
nvm.capa = nvm.capa or 1
|
||||
if nvm.running then
|
||||
if nvm.running and not nvm.blocked then
|
||||
return {level = (nvm.load or 0) / nvm.capa, capa = nvm.capa}
|
||||
end
|
||||
end,
|
||||
@ -193,6 +198,23 @@ techage.register_node({"techage:ta2_winch"}, {
|
||||
end,
|
||||
})
|
||||
|
||||
control.register_nodes({"techage:ta2_winch"}, {
|
||||
on_receive = function(pos, tlib2, topic, payload)
|
||||
--print("on_receive", topic)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
if topic == "on" then
|
||||
nvm.blocked = false
|
||||
local outdir = M(pos):get_int("outdir")
|
||||
power.start_storage_calc(pos, Axle, outdir)
|
||||
elseif topic == "off" then
|
||||
nvm.blocked = true
|
||||
local outdir = M(pos):get_int("outdir")
|
||||
power.start_storage_calc(pos, Axle, outdir)
|
||||
end
|
||||
end,
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:ta2_winch",
|
||||
recipe = {
|
||||
|
@ -33,7 +33,7 @@ local function formspec(self, pos, nvm)
|
||||
local outdir = M(pos):get_int("outdir")
|
||||
data = power.get_network_data(pos, Cable, outdir)
|
||||
end
|
||||
return techage.storage_formspec(self, pos, nvm, S("TA3 Akku Box"), data, nvm.capa, PWR_CAPA)
|
||||
return techage.storage_formspec(self, pos, nvm, S("TA3 Accu Box"), data, nvm.capa, PWR_CAPA)
|
||||
end
|
||||
|
||||
local function start_node(pos, nvm, state)
|
||||
|
BIN
techage/textures/techage_appl_arrow3.png
Normal file
BIN
techage/textures/techage_appl_arrow3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 112 B |
BIN
techage/textures/techage_appl_clutch.png
Normal file
BIN
techage/textures/techage_appl_clutch.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 201 B |
BIN
techage/textures/techage_appl_clutch_on.png
Normal file
BIN
techage/textures/techage_appl_clutch_on.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 165 B |
BIN
techage/textures/techage_clutch_clutch.png
Normal file
BIN
techage/textures/techage_clutch_clutch.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 184 B |
BIN
techage/textures/techage_collider_plan2.png
Normal file
BIN
techage/textures/techage_collider_plan2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
171
techage/tools/assembly_tool.lua
Normal file
171
techage/tools/assembly_tool.lua
Normal file
@ -0,0 +1,171 @@
|
||||
--[[
|
||||
|
||||
TechAge
|
||||
=======
|
||||
|
||||
Copyright (C) 2017-2023 Joachim Stolberg
|
||||
|
||||
AGPL v3
|
||||
See LICENSE.txt for more information
|
||||
|
||||
]]--
|
||||
|
||||
-- for lazy programmers
|
||||
local M = minetest.get_meta
|
||||
local S = techage.S
|
||||
local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end
|
||||
|
||||
local InvalidBlocks = {}
|
||||
|
||||
local function base_checks(user, pointed_thing, place)
|
||||
if pointed_thing.type ~= "node" then
|
||||
return false
|
||||
end
|
||||
|
||||
if not user then
|
||||
return false
|
||||
end
|
||||
|
||||
local pos = place and pointed_thing.above or pointed_thing.under
|
||||
local player_name = user:get_player_name()
|
||||
|
||||
if minetest.is_protected(pos, player_name) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true, pos, player_name
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
local function add_to_inventory(pos, item, user)
|
||||
local inv = user:get_inventory()
|
||||
if inv and item and inv:room_for_item("main", item) then
|
||||
inv:add_item("main", item)
|
||||
else
|
||||
minetest.item_drop(item, user, pos)
|
||||
end
|
||||
end
|
||||
|
||||
local function take_from_inventory(user)
|
||||
local inv = user:get_inventory()
|
||||
local stack = inv:get_stack("main", 1)
|
||||
local taken = stack:take_item(1)
|
||||
|
||||
if taken:get_count() == 1 then
|
||||
local imeta = taken:get_meta()
|
||||
if imeta:get_string("node_number") ~= "" then
|
||||
inv:set_stack("main", 1, stack)
|
||||
return taken
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
local function remove_node(pos, digger)
|
||||
local node = minetest.get_node(pos)
|
||||
local number = M(pos):get_string("node_number")
|
||||
local item = ItemStack(node.name)
|
||||
local imeta = item:get_meta()
|
||||
local ndef = minetest.registered_nodes[node.name]
|
||||
local oldmetadata = minetest.get_meta(pos):to_table()
|
||||
|
||||
if InvalidBlocks[node.name] then
|
||||
return
|
||||
end
|
||||
|
||||
if number ~= "" and ndef and ndef.after_dig_node then
|
||||
minetest.remove_node(pos)
|
||||
ndef.after_dig_node(pos, node, oldmetadata, digger)
|
||||
techage.post_remove_node(pos)
|
||||
imeta:set_string("node_number", number)
|
||||
imeta:set_string("description", ndef.description .. " : " .. number)
|
||||
return item
|
||||
end
|
||||
end
|
||||
|
||||
local function place_node(pos, item, placer, pointed_thing)
|
||||
local imeta = item:get_meta()
|
||||
local number = imeta:get_string("node_number")
|
||||
local name = item:get_name()
|
||||
local param2 = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local ndef = minetest.registered_nodes[name]
|
||||
|
||||
if number ~= "" and ndef and ndef.after_place_node then
|
||||
techage.pre_add_node(pos, number)
|
||||
minetest.add_node(pos, {name = name, param2 = param2})
|
||||
ndef.after_place_node(pos, placer, item, pointed_thing)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
local function on_place_node(itemstack, pos, user, player_name, pointed_thing)
|
||||
local item = take_from_inventory(user)
|
||||
if item then
|
||||
if place_node(pos, item, user, pointed_thing) then
|
||||
itemstack:add_wear(65636/200)
|
||||
minetest.sound_play("techage_tool2", {
|
||||
pos = pos,
|
||||
gain = 1,
|
||||
max_hear_distance = 10})
|
||||
return itemstack
|
||||
else
|
||||
add_to_inventory(pos, item, user)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function on_remove_node(itemstack, pos, user, player_name)
|
||||
local item = remove_node(pos, user)
|
||||
if item then
|
||||
add_to_inventory(pos, item, user)
|
||||
itemstack:add_wear(65636/200)
|
||||
minetest.sound_play("techage_tool1", {
|
||||
pos = pos,
|
||||
gain = 1,
|
||||
max_hear_distance = 10})
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
local function on_place(itemstack, user, pointed_thing)
|
||||
local res, pos, player_name = base_checks(user, pointed_thing, true)
|
||||
if res then
|
||||
return on_place_node(itemstack, pos, user, player_name, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_use(itemstack, user, pointed_thing)
|
||||
local res, pos, player_name = base_checks(user, pointed_thing, false)
|
||||
if res then
|
||||
return on_remove_node(itemstack, pos, user, player_name)
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
minetest.register_tool("techage:assembly_tool", {
|
||||
description = S("TechAge Assembly Tool"),
|
||||
inventory_image = "techage_repairkit.png",
|
||||
wield_image = "techage_repairkit.png^[transformR270",
|
||||
groups = {cracky=1, book=1},
|
||||
on_use = on_use,
|
||||
on_place = on_place,
|
||||
node_placement_prediction = "",
|
||||
stack_max = 1,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:assembly_tool",
|
||||
recipe = {
|
||||
{"", "techage:screwdriver", ""},
|
||||
{"basic_materials:plastic_sheet", "basic_materials:plastic_strip", "basic_materials:plastic_sheet"},
|
||||
{"", "techage:end_wrench", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_alias("techage:repairkit", "techage:assembly_tool")
|
||||
|
||||
function techage.disable_block_for_assembly_tool(block_name)
|
||||
InvalidBlocks[block_name] = true
|
||||
end
|
@ -3,7 +3,7 @@
|
||||
TechAge
|
||||
=======
|
||||
|
||||
Copyright (C) 2017-2021 Joachim Stolberg
|
||||
Copyright (C) 2017-2023 Joachim Stolberg
|
||||
|
||||
AGPL v3
|
||||
See LICENSE.txt for more information
|
||||
@ -222,34 +222,6 @@ local function on_place(itemstack, placer, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
local function repair(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type == "node" then
|
||||
local pos = pointed_thing.under
|
||||
if not placer or minetest.is_protected(pos, placer:get_player_name()) then
|
||||
return
|
||||
end
|
||||
local number = techage.get_node_number(pos)
|
||||
if number and not techage.get_node_info(number) then
|
||||
techage.repair_number(pos)
|
||||
minetest.chat_send_player(placer:get_player_name(), "Node repaired!")
|
||||
itemstack:add_wear(65636/200)
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_tool("techage:repairkit", {
|
||||
description = S("TechAge Repair Kit"),
|
||||
inventory_image = "techage_repairkit.png",
|
||||
wield_image = "techage_repairkit.png^[transformR270",
|
||||
groups = {cracky=1, book=1},
|
||||
on_use = repair,
|
||||
on_place = repair,
|
||||
node_placement_prediction = "",
|
||||
stack_max = 1,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_tool("techage:end_wrench", {
|
||||
description = S("TechAge Info Tool (use = read status info)"),
|
||||
inventory_image = "techage_end_wrench.png",
|
||||
@ -270,12 +242,3 @@ minetest.register_craft({
|
||||
{"default:steel_ingot", "", ""},
|
||||
},
|
||||
})
|
||||
|
||||
--minetest.register_craft({
|
||||
-- output = "techage:repairkit",
|
||||
-- recipe = {
|
||||
-- {"", "", ""},
|
||||
-- {"", "techage:end_wrench", ""},
|
||||
-- {"", "", ""},
|
||||
-- },
|
||||
--})
|
@ -29,7 +29,7 @@ minetest.register_node("techpack_stairway:grating", {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-17/32, -15/32, -17/32, 17/32, -14/32, 17/32}
|
||||
{-17/32, -17/32, -17/32, 17/32, -15/32, 17/32}
|
||||
},
|
||||
},
|
||||
|
||||
@ -198,7 +198,7 @@ minetest.register_node("techpack_stairway:bridge1", {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-17/32, -17/32, -17/32, -15/32, 17/32, 17/32},
|
||||
{-17/32, -15/32, -17/32, 17/32, -14/32, 17/32}
|
||||
{-17/32, -17/32, -17/32, 17/32, -15/32, 17/32}
|
||||
},
|
||||
},
|
||||
|
||||
@ -232,7 +232,7 @@ minetest.register_node("techpack_stairway:bridge2", {
|
||||
fixed = {
|
||||
{ 15/32, -17/32, -17/32, 17/32, 17/32, 17/32},
|
||||
{-17/32, -17/32, -17/32, -15/32, 17/32, 17/32},
|
||||
{-17/32, -15/32, -17/32, 17/32, -14/32, 17/32}
|
||||
{-17/32, -17/32, -17/32, 17/32, -15/32, 17/32}
|
||||
},
|
||||
},
|
||||
|
||||
@ -266,7 +266,7 @@ minetest.register_node("techpack_stairway:bridge3", {
|
||||
fixed = {
|
||||
{-17/32, -17/32, 15/32, 17/32, 17/32, 17/32},
|
||||
{-17/32, -17/32, -17/32, -15/32, 17/32, 17/32},
|
||||
{-17/32, -15/32, -17/32, 17/32, -14/32, 17/32}
|
||||
{-17/32, -17/32, -17/32, 17/32, -15/32, 17/32}
|
||||
},
|
||||
},
|
||||
|
||||
@ -301,7 +301,7 @@ minetest.register_node("techpack_stairway:bridge4", {
|
||||
{-17/32, -17/32, 15/32, 17/32, 17/32, 17/32},
|
||||
{ 15/32, -17/32, -17/32, 17/32, 17/32, 17/32},
|
||||
{-17/32, -17/32, -17/32, -15/32, 17/32, 17/32},
|
||||
{-17/32, -15/32, -17/32, 17/32, -14/32, 17/32}
|
||||
{-17/32, -17/32, -17/32, 17/32, -15/32, 17/32}
|
||||
},
|
||||
},
|
||||
|
||||
@ -322,8 +322,125 @@ minetest.register_node("techpack_stairway:bridge4", {
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("techpack_stairway:stairway1", {
|
||||
description = S("TechPack Stairway 1"),
|
||||
tiles = {
|
||||
'techpack_stairway_steps.png',
|
||||
'techpack_stairway_steps.png',
|
||||
'techpack_stairway_side.png',
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--{ 15/32, -1/32, -1/32, 17/32, 49/32, 17/32},
|
||||
--{-17/32, -1/32, -1/32, -15/32, 49/32, 17/32},
|
||||
{-17/32, -1/32, -1/32, 17/32, 1/32, 17/32},
|
||||
|
||||
--{ 15/32, -17/32, -17/32, 17/32, 33/32, 1/32},
|
||||
--{-17/32, -17/32, -17/32, -15/32, 33/32, 1/32},
|
||||
{-17/32, -17/32, -17/32, 17/32, -15/32, 1/32},
|
||||
},
|
||||
},
|
||||
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-16/32, -16/32, -16/32, 16/32, -10/32, 0/32},
|
||||
{-16/32, -16/32, 0/32, 16/32, 2/32, 16/32},
|
||||
},
|
||||
},
|
||||
|
||||
--climbable = true,
|
||||
paramtype2 = "facedir",
|
||||
paramtype = "light",
|
||||
use_texture_alpha = CLIP,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("techpack_stairway:stairway2", {
|
||||
description = S("TechPack Stairway 2"),
|
||||
tiles = {
|
||||
'techpack_stairway_steps.png',
|
||||
'techpack_stairway_steps.png',
|
||||
'techpack_stairway_side.png',
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--{ 15/32, -1/32, -1/32, 17/32, 49/32, 17/32},
|
||||
{-17/32, -1/32, -1/32, -15/32, 49/32, 17/32},
|
||||
{-17/32, -1/32, -1/32, 17/32, 1/32, 17/32},
|
||||
|
||||
--{ 15/32, -17/32, -17/32, 17/32, 33/32, 1/32},
|
||||
{-17/32, -17/32, -17/32, -15/32, 33/32, 1/32},
|
||||
{-17/32, -17/32, -17/32, 17/32, -15/32, 1/32},
|
||||
},
|
||||
},
|
||||
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-16/32, -16/32, -16/32, 16/32, -10/32, 0/32},
|
||||
{-16/32, -16/32, 0/32, 16/32, 2/32, 16/32},
|
||||
},
|
||||
},
|
||||
|
||||
--climbable = true,
|
||||
paramtype2 = "facedir",
|
||||
paramtype = "light",
|
||||
use_texture_alpha = CLIP,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("techpack_stairway:stairway3", {
|
||||
description = S("TechPack Stairway 3"),
|
||||
tiles = {
|
||||
'techpack_stairway_steps.png',
|
||||
'techpack_stairway_steps.png',
|
||||
'techpack_stairway_side.png',
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ 15/32, -1/32, -1/32, 17/32, 49/32, 17/32},
|
||||
--{-17/32, -1/32, -1/32, -15/32, 49/32, 17/32},
|
||||
{-17/32, -1/32, -1/32, 17/32, 1/32, 17/32},
|
||||
|
||||
{ 15/32, -17/32, -17/32, 17/32, 33/32, 1/32},
|
||||
--{-17/32, -17/32, -17/32, -15/32, 33/32, 1/32},
|
||||
{-17/32, -17/32, -17/32, 17/32, -15/32, 1/32},
|
||||
},
|
||||
},
|
||||
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-16/32, -16/32, -16/32, 16/32, -10/32, 0/32},
|
||||
{-16/32, -16/32, 0/32, 16/32, 2/32, 16/32},
|
||||
},
|
||||
},
|
||||
|
||||
--climbable = true,
|
||||
paramtype2 = "facedir",
|
||||
paramtype = "light",
|
||||
use_texture_alpha = CLIP,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("techpack_stairway:stairway", {
|
||||
description = S("TechPack Stairway"),
|
||||
description = S("TechPack Stairway 4"),
|
||||
tiles = {
|
||||
'techpack_stairway_steps.png',
|
||||
'techpack_stairway_steps.png',
|
||||
@ -591,7 +708,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techpack_stairway:stairway 3",
|
||||
output = "techpack_stairway:stairway1 6",
|
||||
recipe = {
|
||||
{"", "", "default:steel_ingot"},
|
||||
{"dye:dark_grey", "default:tin_ingot", "default:coal_lump"},
|
||||
@ -599,6 +716,33 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techpack_stairway:stairway2",
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"techpack_stairway:handrail1", "techpack_stairway:stairway1", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techpack_stairway:stairway3",
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"", "techpack_stairway:stairway1", "techpack_stairway:handrail1"},
|
||||
{"", "", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techpack_stairway:stairway",
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"techpack_stairway:handrail1", "techpack_stairway:stairway1", "techpack_stairway:handrail1"},
|
||||
{"", "", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techpack_stairway:ladder1 3",
|
||||
recipe = {
|
||||
|
@ -18,4 +18,7 @@ TechPack Ladder 3=TechPack Leiter 3
|
||||
TechPack Ladder 4=TechPack Leiter 4
|
||||
TechPack Lattice=TechPack Gitterrahmen
|
||||
TechPack Lattice Slope=TechPack Gitterrahmenrampe
|
||||
TechPack Stairway=TechPack Treppe
|
||||
TechPack Stairway 1=TechPack Treppe 1
|
||||
TechPack Stairway 2=TechPack Treppe 2
|
||||
TechPack Stairway 3=TechPack Treppe 3
|
||||
TechPack Stairway 4=TechPack Treppe 4
|
||||
|
@ -19,4 +19,7 @@ TechPack Ladder 3=
|
||||
TechPack Ladder 4=
|
||||
TechPack Lattice=
|
||||
TechPack Lattice Slope=
|
||||
TechPack Stairway=
|
||||
TechPack Stairway 1=
|
||||
TechPack Stairway 2=
|
||||
TechPack Stairway 3=
|
||||
TechPack Stairway 4=
|
||||
|
@ -7,12 +7,12 @@ Ladders, stairways, and bridges for your machines
|
||||
|
||||
|
||||
### License
|
||||
Copyright (C) 2018-2021 Joachim Stolberg
|
||||
Copyright (C) 2018-2023 Joachim Stolberg
|
||||
Code: Licensed under the GNU LGPL version 2.1 or later. See LICENSE.txt
|
||||
|
||||
|
||||
### Dependencies
|
||||
none
|
||||
default
|
||||
|
||||
### History
|
||||
- 2018-12-29 v0.01 * first draft
|
||||
@ -20,3 +20,4 @@ none
|
||||
- 2020-10-08 v1.01 * Lattice Slope node added
|
||||
- 2020-10-10 v1.02 * German translation added
|
||||
- 2021-03-20 v1.03 * Adapted for MT 5.4
|
||||
- 2023-09-23 v1.04 * Add stairways without handrails
|
||||
|
@ -10,6 +10,7 @@
|
||||
]]--
|
||||
|
||||
local DAYS_WITHOUT_USE = 72 * 5
|
||||
local mod_player_monoids = minetest.get_modpath("player_monoids")
|
||||
|
||||
-- for lazy programmers
|
||||
local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end
|
||||
@ -69,25 +70,30 @@ end
|
||||
|
||||
local function set_operator_privs(player, pos)
|
||||
local privs = minetest.get_player_privs(player:get_player_name())
|
||||
local physics = player:get_physics_override()
|
||||
local meta = player:get_meta()
|
||||
-- Check access conflicts with other mods
|
||||
if meta:get_int("player_physics_locked") == 0 then
|
||||
if pos and meta and privs and physics then
|
||||
if pos and meta and privs then
|
||||
meta:set_string("towercrane_pos", P2S(pos))
|
||||
-- store the player privs default values
|
||||
meta:set_string("towercrane_fast", privs["fast"] and "true" or "false")
|
||||
meta:set_string("towercrane_fly", privs["fly"] and "true" or "false")
|
||||
meta:set_int("towercrane_speed", physics.speed)
|
||||
-- set operator privs
|
||||
meta:set_int("towercrane_isoperator", 1)
|
||||
meta:set_int("player_physics_locked", 1)
|
||||
privs["fly"] = true
|
||||
privs["fast"] = nil
|
||||
physics.speed = 0.7
|
||||
-- write back
|
||||
player:set_physics_override(physics)
|
||||
minetest.set_player_privs(player:get_player_name(), privs)
|
||||
|
||||
if mod_player_monoids then
|
||||
player_monoids.speed:add_change(player, 0.7, "towercrane:crane")
|
||||
else
|
||||
local physics = player:get_physics_override()
|
||||
meta:set_int("towercrane_speed", physics.speed)
|
||||
physics.speed = 0.7
|
||||
-- write back
|
||||
player:set_physics_override(physics)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
@ -96,24 +102,29 @@ end
|
||||
|
||||
local function reset_operator_privs(player)
|
||||
local privs = minetest.get_player_privs(player:get_player_name())
|
||||
local physics = player:get_physics_override()
|
||||
local meta = player:get_meta()
|
||||
if meta and privs and physics then
|
||||
if meta and privs then
|
||||
meta:set_string("towercrane_pos", "")
|
||||
-- restore the player privs default values
|
||||
meta:set_int("towercrane_isoperator", 0)
|
||||
meta:set_int("player_physics_locked", 0)
|
||||
privs["fast"] = meta:get_string("towercrane_fast") == "true" or nil
|
||||
privs["fly"] = meta:get_string("towercrane_fly") == "true" or nil
|
||||
physics.speed = meta:get_int("towercrane_speed")
|
||||
if physics.speed == 0 then physics.speed = 1 end
|
||||
minetest.set_player_privs(player:get_player_name(), privs)
|
||||
-- delete stored default values
|
||||
meta:set_string("towercrane_fast", "")
|
||||
meta:set_string("towercrane_fly", "")
|
||||
meta:set_string("towercrane_speed", "")
|
||||
-- write back
|
||||
player:set_physics_override(physics)
|
||||
minetest.set_player_privs(player:get_player_name(), privs)
|
||||
|
||||
if mod_player_monoids then
|
||||
player_monoids.speed:del_change(player, "towercrane:crane")
|
||||
else
|
||||
local physics = player:get_physics_override()
|
||||
physics.speed = meta:get_int("towercrane_speed")
|
||||
meta:set_string("towercrane_speed", "")
|
||||
if physics.speed == 0 then physics.speed = 1 end
|
||||
-- write back
|
||||
player:set_physics_override(physics)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
name = towercrane
|
||||
depends = default
|
||||
optional_depends = player_monoids
|
||||
description = A crane for easier construction of buildings. The crane forms a working area in which the player gets fly privs.
|
@ -191,7 +191,8 @@ dofile(modpath.."/register.lua")
|
||||
if minetest.settings:get_bool("unified_inventory_bags") ~= false then
|
||||
dofile(modpath.."/bags.lua")
|
||||
end
|
||||
|
||||
dofile(modpath.."/item_names.lua")
|
||||
if minetest.settings:get_bool("unified_inventory_item_names") ~= false then
|
||||
dofile(modpath.."/item_names.lua")
|
||||
end
|
||||
dofile(modpath.."/waypoints.lua")
|
||||
dofile(modpath.."/legacy.lua") -- mod compatibility
|
||||
|
@ -3,6 +3,8 @@
|
||||
local item_names = {} -- [player_name] = { hud, dtime, itemname }
|
||||
local dlimit = 3 -- HUD element will be hidden after this many seconds
|
||||
local hudbars_mod = minetest.get_modpath("hudbars")
|
||||
local only_names = minetest.settings:get_bool("unified_inventory_only_names", true)
|
||||
local max_length = tonumber(minetest.settings:get("unified_inventory_max_item_name_length")) or 80
|
||||
|
||||
local function set_hud(player)
|
||||
local player_name = player:get_player_name()
|
||||
@ -60,6 +62,7 @@ minetest.register_globalstep(function(dtime)
|
||||
data.itemname = itemname
|
||||
data.index = index
|
||||
data.dtime = 0
|
||||
local lang_code = minetest.get_player_information(player:get_player_name()).lang_code
|
||||
|
||||
local desc = stack.get_meta
|
||||
and stack:get_meta():get_string("description")
|
||||
@ -69,6 +72,14 @@ minetest.register_globalstep(function(dtime)
|
||||
local def = minetest.registered_items[itemname]
|
||||
desc = def and def.description or ""
|
||||
end
|
||||
if only_names and desc and string.find(desc, "\n") then
|
||||
desc = string.match(desc, "([^\n]*)")
|
||||
end
|
||||
desc = minetest.get_translated_string(lang_code, desc)
|
||||
desc = minetest.strip_colors(desc)
|
||||
if string.len(desc) > max_length and max_length > 0 then
|
||||
desc = string.sub(desc, 1, max_length) .. " [...]"
|
||||
end
|
||||
player:hud_change(data.hud, 'text', desc)
|
||||
end
|
||||
end
|
||||
|
@ -15,3 +15,9 @@ unified_inventory_hide_disabled_buttons (Hide disabled buttons) bool false
|
||||
|
||||
|
||||
unified_inventory_automatic_categorization (Items automatically added to categories) bool true
|
||||
|
||||
unified_inventory_item_names (Item names are shown above hotbar) bool true
|
||||
|
||||
unified_inventory_only_names (Show only item name) bool true
|
||||
|
||||
unified_inventory_max_item_name_length (Maximum length of an item name before it's truncated, 0 disables option) int 80
|
||||
|
Loading…
Reference in New Issue
Block a user