Add TA4 node detector

This commit is contained in:
Joachim Stolberg 2023-06-30 14:30:15 +02:00
parent cbd8b0ca52
commit d85de971a7
14 changed files with 308 additions and 44 deletions

View File

@ -208,6 +208,7 @@ techage.Items = {
ta4_recipeblock = "techage:ta4_recipeblock",
ta4_chargedetector = "techage:ta4_chargedetector_off",
ta4_gaze_sensor = "techage:ta4_gaze_sensor_off",
ta4_nodedetector = "techage:ta4_nodedetector_off",
----------------------------
techage_ta5 = "techage:ta5_fr_nucleus",
ta5_flycontroller = "techage:ta5_flycontroller",

View File

@ -194,6 +194,7 @@ techage.manual_DE.aTitel = {
"3,TA4 Spieler Detektor / Player Detector",
"3,TA4 Zustandssammler / State Collector",
"3,TA4 Detektor / Detector",
"3,TA4 Block Detektor / Node Detector",
"3,TA4 Energiespeicher-Ladungsdetektor / Energy Storage Charge Detector",
"3,TA4 Blicksensor / Gaze Sensor",
"3,TA4 Sequenzer",
@ -1707,6 +1708,14 @@ techage.manual_DE.aText = {
"\n"..
"\n"..
"\n",
"Die Funktionalität ist gleich wie beim TA3 Block Detektor. \n"..
"\n"..
"Im Unterschied zum TA3 Block Detektor können hier die Positionen\\, die überwacht werden sollen\\, individuell konfiguriert werden. Dazu muss der \"Aufzeichnen\" Button gedrückt werden. Dann müssen alle Blöcke angeklickt werden\\, von denen die Position überprüft werden soll. Danach muss der \"Fertig\" Button gedrückt werden. \n"..
"\n"..
"Es können bis zu 4 Blöcke ausgewählt werden. \n"..
"\n"..
"\n"..
"\n",
"Der Ladungsdetektor misst alle 8 s den Ladezustand des Energiespeichers des Stromnetzwerkes.\n"..
"\n"..
"Fällt der Wert unter eine konfigurierbare Schwelle (Schaltpunkt)\\, wird ein Kommando (default: \"off\") versendet. Steigt der Wert wieder über diesen Schaltpunkt\\, so wird ein zweites Kommando (default: \"on\") gesendet. Damit lassen sich Verbraucher vom Netz trennen\\, wenn der Ladezustand des Energiespeichers unter den angegebenen Schaltpunkt sinkt.\n"..
@ -2138,7 +2147,7 @@ techage.manual_DE.aText = {
"\n"..
"Mit der Taste \"Test\" wird die Flugstrecke mit den absoluten Koordinaten zur Überprüfung im Chat ausgegeben.\n"..
"\n"..
"Die maximale Distanz für die gesammte Flugstrecke beträgt 1000 m. Es können bis zu 32 Blöcke antrainiert werden.\n"..
"Die maximale Distanz für die gesammte Flugstrecke beträgt 1500 m. Es können bis zu 32 Blöcke antrainiert werden.\n"..
"\n"..
"Die Nutzung des TA5 Flug Controllers benötigt 40 Erfahrungspunkte.\n"..
"\n"..
@ -2405,6 +2414,7 @@ techage.manual_DE.aItemName = {
"ta4_playerdetector",
"ta4_collector",
"ta4_detector",
"ta4_nodedetector",
"ta4_chargedetector",
"ta4_gaze_sensor",
"ta4_sequencer",
@ -2676,6 +2686,7 @@ techage.manual_DE.aPlanTable = {
"",
"",
"",
"",
"ta4_liquid_filter_base",
"ta4_liquid_filter_gravel",
"ta4_liquid_filter_top",

View File

@ -124,7 +124,7 @@ techage.manual_EN.aTitel = {
"2,Detectors",
"3,TA3 Detector",
"3,TA3 Cart Detector",
"3,TA3 Block Detector",
"3,TA3 Node Detector",
"3,TA3 Player Detector",
"3,TA3 Light Detector",
"2,TA3 Machines",
@ -196,6 +196,7 @@ techage.manual_EN.aTitel = {
"3,TA4 Player Detector",
"3,TA4 State Collector",
"3,TA4 Detector",
"3,TA4 Node Detector",
"3,TA4 Energy Storage Charge Detector",
"3,TA4 Gaze Sensor",
"3,TA4 Sequencer",
@ -1225,7 +1226,7 @@ techage.manual_EN.aText = {
"\n"..
"\n"..
"\n",
"The block detector sends an 'on' command if it detects that blocks appear or disappear in front of it\\, but must be configured accordingly. After switching the detector back to the standard state (gray block)\\, an 'off' command is sent. Valid blocks are all types of blocks and plants\\, but not animals or players. The sensor range is 3 blocks / meter in the direction of the arrow.\n"..
"The node detector sends an 'on' command if it detects that nodes (blocks) appear or disappear in front of it\\, but must be configured accordingly. After switching the detector back to the standard state (gray block)\\, an 'off' command is sent. Valid blocks are all types of blocks and plants\\, but not animals or players. The sensor range is 3 blocks / meter in the direction of the arrow.\n"..
"\n"..
"\n"..
"\n",
@ -1718,6 +1719,14 @@ techage.manual_EN.aText = {
"\n"..
"\n"..
"\n",
"The functionality is the same as with the TA3 Node Detector.\n"..
"\n"..
"In contrast to the TA3 node detector\\, the positions to be monitored can be configured individually here. To do this\\, the \"Record\" button must be pressed. Then all blocks must be clicked\\, the position of which is to be checked. Then the \"Done\" button must be pressed.\n"..
"\n"..
"Up to 4 blocks can be selected.\n"..
"\n"..
"\n"..
"\n",
"The charge detector measures the state of charge of the power grid's energy storage every 8 s.\n"..
"\n"..
"If the value falls below a configurable threshold (switching point)\\, a command (default: \"off\") is sent. If the value rises above this switching point again\\, a second command (default: \"on\") is sent. This allows consumers to be disconnected from the grid when the charge level of the energy storage device falls below the specified switching point.\n"..
@ -2150,7 +2159,7 @@ techage.manual_EN.aText = {
"\n"..
"With the \"Test\" button\\, the flight route with the absolute coordinates is output for checking in the chat.\n"..
"\n"..
"The maximum distance for the entire flight distance is 1000 m. Up to 32 blocks can be trained.\n"..
"The maximum distance for the entire flight distance is 1500 m. Up to 32 blocks can be trained.\n"..
"\n"..
"The use of the TA5 Flight Controller requires 40 experience points.\n"..
"\n"..
@ -2417,6 +2426,7 @@ techage.manual_EN.aItemName = {
"ta4_playerdetector",
"ta4_collector",
"ta4_detector",
"ta4_nodedetector",
"ta4_chargedetector",
"ta4_gaze_sensor",
"ta4_sequencer",
@ -2689,6 +2699,7 @@ techage.manual_EN.aPlanTable = {
"",
"",
"",
"",
"ta4_liquid_filter_base",
"ta4_liquid_filter_gravel",
"ta4_liquid_filter_top",

View File

@ -143,6 +143,7 @@ Number=Nummer
### cart_detector.lua ###
### command_converter.lua ###
### detector.lua ###
### flipflop.lua ###
### light_detector.lua ###
### lua_logic.lua ###
### mesecons_converter.lua ###
@ -157,6 +158,7 @@ Insert destination node number(s)=Gebe Zielnummer(n) ein
### command_converter.lua ###
### detector.lua ###
### doorcontroller.lua ###
### flipflop.lua ###
### mesecons_converter.lua ###
### repeater.lua ###
### sequencer2.lua ###
@ -387,13 +389,20 @@ with door sound=mit Türgeräusch
### doorcontroller2.lua ###
### flycontroller.lua ###
### movecontroller.lua ###
### node_detector.lua ###
### turncontroller.lua ###
Done=Fertig
Record=Aufzeichnen
Recording...=Aufzeichnung...
block positions are stored.=Block Positionen gespeichert.
### doorcontroller2.lua ###
### flycontroller.lua ###
### movecontroller.lua ###
### turncontroller.lua ###
Recording...=Aufzeichnung...
### doorcontroller2.lua ###
### movecontroller.lua ###
@ -502,6 +511,10 @@ TA3 Power Station Firebox=TA3 Kraftwerks-Feuerbox
Firebox=Feuerkasten
### flipflop.lua ###
TA3 Flip-Flop=TA3 FlipFlop
### fly_lib.lua ###
Destination position is protected=Zielposition ist geschützt
@ -624,7 +637,6 @@ TechAge Gate Block=TechAge Torblock
Command to send when sensor is no longer viewed=Befehl zum Senden, wenn der Sensor nicht mehr angesehen wird
Command to send when sensor is viewed=Befehl zum Senden, wenn der Sensor angesehen wird
Input the player name(s) separated by blanks.@nIf empty, only the owner is accepted.=Geben den/die Spielernamen durch Leerzeichen getrennt ein.@nWenn leer, wird nur der Besitzer akzeptiert.
Player Names=Spielernamen
TA4 Gaze Sensor=TA4 Blicksensor
@ -965,8 +977,10 @@ TA4 Move Controller=TA4 Move Controller
### node_detector.lua ###
Click on all blocks whose positions should be checked=Klicke auf alle Blöcke, deren Positionen überprüft werden sollen
Send signal if nodes have been:=Sende ein Signal falls Blöcke:
TA3 Node Detector=TA3 Block Detektor
TA4 Node Detector=TA3 Block Detektor
added=hinzugefügt wird
added or removed=hinzugefügt oder entfernt wird
removed=entfernt
@ -1023,6 +1037,12 @@ TA3 Drill Pipe Wrench=TA3 Bohrgestängezange
Plastic Granules=Plastikgranulat
### plate.lua ###
Lever=
Stone Pressure Plate=
Wooden Pressure Plate=
### player_detector.lua ###
Command to send when player is detected=Befehl zum Senden, wenn ein Spieler erkannt wird

View File

@ -143,6 +143,7 @@ Number=
### cart_detector.lua ###
### command_converter.lua ###
### detector.lua ###
### flipflop.lua ###
### light_detector.lua ###
### lua_logic.lua ###
### mesecons_converter.lua ###
@ -157,6 +158,7 @@ Insert destination node number(s)=
### command_converter.lua ###
### detector.lua ###
### doorcontroller.lua ###
### flipflop.lua ###
### mesecons_converter.lua ###
### repeater.lua ###
### sequencer2.lua ###
@ -269,7 +271,7 @@ TA4 State Collector=
### command_converter.lua ###
Receive=
Send delay \\[s\\]=
Send delay (s)=
Sent command=
TA3 Command Converter=
@ -387,13 +389,20 @@ with door sound=
### doorcontroller2.lua ###
### flycontroller.lua ###
### movecontroller.lua ###
### node_detector.lua ###
### turncontroller.lua ###
Done=
Record=
Recording...=
block positions are stored.=
### doorcontroller2.lua ###
### flycontroller.lua ###
### movecontroller.lua ###
### turncontroller.lua ###
Recording...=
### doorcontroller2.lua ###
### movecontroller.lua ###
@ -502,6 +511,10 @@ TA3 Power Station Firebox=
Firebox=
### flipflop.lua ###
TA3 Flip-Flop=
### fly_lib.lua ###
Destination position is protected=
@ -964,8 +977,10 @@ TA4 Move Controller=
### node_detector.lua ###
Click on all blocks whose positions should be checked=
Send signal if nodes have been:=
TA3 Node Detector=
TA4 Node Detector=
added=
added or removed=
removed=

View File

@ -3,34 +3,51 @@
TechAge
=======
Copyright (C) 2017-2022 Joachim Stolberg
Copyright (C) 2017-2023 Joachim Stolberg
AGPL v3
See LICENSE.txt for more information
Node Detector
TA3/TA4 Node Detector
]]--
-- for lazy programmers
local M = minetest.get_meta
local S = techage.S
local MP = minetest.get_modpath("techage")
local mark = dofile(MP .. "/basis/mark_lib.lua")
local logic = techage.logic
local CYCLE_TIME = 4
local CYCLE_TIME = 2
local MAX_BLOCKS = 4
local DESCR3 = S("TA3 Node Detector")
local DESCR4 = S("TA4 Node Detector")
local function switch_on(pos)
local function switch_on3(pos)
if logic.swap_node(pos, "techage:ta3_nodedetector_on") then
logic.send_on(pos, M(pos))
end
end
local function switch_off(pos)
local function switch_off3(pos)
if logic.swap_node(pos, "techage:ta3_nodedetector_off") then
logic.send_off(pos, M(pos))
end
end
local function switch_on4(pos)
if logic.swap_node(pos, "techage:ta4_nodedetector_on") then
logic.send_on(pos, M(pos))
end
end
local function switch_off4(pos)
if logic.swap_node(pos, "techage:ta4_nodedetector_off") then
logic.send_off(pos, M(pos))
end
end
local DropdownValues = {
[S("added")] = 1,
[S("removed")] = 2,
@ -38,12 +55,15 @@ local DropdownValues = {
}
local AirLikeBlocks = {"air"}
local kvAirLikeBlocks = {air = 1}
for i = 1,14 do
-- Add light blocks from the mod "wielded_light" to the air-like blocks
AirLikeBlocks[#AirLikeBlocks + 1] = "wielded_light:" .. i
kvAirLikeBlocks["wielded_light:" .. i] = 1
end
local function formspec(meta, nvm)
local function formspec3(meta, nvm)
local numbers = meta:get_string("numbers") or ""
local label = S("added")..","..S("removed")..","..S("added or removed")
return "size[7.5,4]"..
@ -56,7 +76,21 @@ local function formspec(meta, nvm)
"button_exit[2,3.2;3,1;accept;"..S("accept").."]"
end
local function any_node_changed(pos)
local function formspec4(meta, nvm)
local numbers = meta:get_string("numbers") or ""
local label = S("added")..","..S("removed")..","..S("added or removed")
return "size[7.5,6]"..
"box[0,-0.1;7.2,0.5;#c6e8ff]" ..
"label[0.2,-0.1;" .. minetest.colorize( "#000000", DESCR4) .. "]" ..
"button[0.1,0.6;3.6,1;record;" .. S("Record") .. "]" ..
"button[3.9,0.6;3.6,1;done;" .. S("Done") .. "]" ..
"field[0.5,2.6;7,1;numbers;"..S("Insert destination node number(s)")..";"..numbers.."]" ..
"label[0.2,3.6;"..S("Send signal if nodes have been:").."]"..
"dropdown[0.2,4.1;7.3,1;mode;"..label..";"..(nvm.mode or 3).."]"..
"button_exit[2,5.2;3,1;accept;"..S("accept").."]"
end
local function any_node_changed3(pos)
local nvm = techage.get_nvm(pos)
if not nvm.pos1 or not nvm.pos2 or not nvm.num then
local node = minetest.get_node(pos)
@ -85,7 +119,34 @@ local function any_node_changed(pos)
return false
end
local function on_receive_fields(pos, formname, fields, player)
local function any_node_changed4(pos)
local nvm = techage.get_nvm(pos)
nvm.lpos = nvm.lpos or {}
local num = 0
for _,pos1 in ipairs(nvm.lpos) do
local name = minetest.get_node(pos1).name
if name == "ignore" then return false end
num = num + (kvAirLikeBlocks[name] or 0)
end
if not nvm.num then
nvm.num = num
elseif nvm.num ~= num then
if nvm.mode == 1 and num < nvm.num then
nvm.num = num
return true
elseif nvm.mode == 2 and num > nvm.num then
nvm.num = num
return true
elseif nvm.mode == 3 then
nvm.num = num
return true
end
nvm.num = num
end
return false
end
local function on_receive_fields3(pos, formname, fields, player)
if minetest.is_protected(pos, player:get_player_name()) then
return
end
@ -96,23 +157,54 @@ local function on_receive_fields(pos, formname, fields, player)
nvm.mode = DropdownValues[fields.mode] or 3
if techage.check_numbers(fields.numbers, player:get_player_name()) then
meta:set_string("numbers", fields.numbers)
logic.infotext(M(pos), S("TA3 Node Detector"))
logic.infotext(M(pos), DESCR3)
end
end
meta:set_string("formspec", formspec(meta, nvm))
meta:set_string("formspec", formspec3(meta, nvm))
end
local function node_timer(pos)
if any_node_changed(pos)then
switch_on(pos)
local function on_receive_fields4(pos, formname, fields, player)
if minetest.is_protected(pos, player:get_player_name()) then
return
end
local name = player:get_player_name()
local nvm = techage.get_nvm(pos)
local meta = M(pos)
if fields.accept then
nvm.mode = DropdownValues[fields.mode] or 3
if techage.check_numbers(fields.numbers, name) then
meta:set_string("numbers", fields.numbers)
logic.infotext(M(pos), DESCR4)
end
mark.unmark_all(name)
mark.stop(name)
elseif fields.record then
nvm.lpos = {}
minetest.chat_send_player(name, "[techage] " .. S("Click on all blocks whose positions should be checked"))
mark.start(name, MAX_BLOCKS)
elseif fields.done then
local pos_list = mark.get_poslist(name)
minetest.chat_send_player(name, "[techage] " .. #pos_list.." "..S("block positions are stored."))
nvm.lpos = pos_list
mark.unmark_all(name)
mark.stop(name)
end
meta:set_string("formspec", formspec4(meta, nvm))
end
local function node_timer3(pos)
if any_node_changed3(pos)then
switch_on3(pos)
else
switch_off(pos)
switch_off3(pos)
end
return true
end
minetest.register_node("techage:ta3_nodedetector_off", {
description = S("TA3 Node Detector"),
description = DESCR3,
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta3.png^techage_frame_ta3_top.png^techage_appl_arrow.png^[transformR270",
@ -123,21 +215,21 @@ minetest.register_node("techage:ta3_nodedetector_off", {
after_place_node = function(pos, placer)
local meta = M(pos)
local nvm = techage.get_nvm(pos)
logic.after_place_node(pos, placer, "techage:ta3_repeater", S("TA3 Node Detector"))
logic.infotext(meta, S("TA3 Node Detector"))
logic.after_place_node(pos, placer, "techage:ta3_nodedetector_off", DESCR3)
logic.infotext(meta, DESCR3)
nvm.mode = 3 -- default mode
meta:set_string("formspec", formspec(meta, nvm))
meta:set_string("formspec", formspec3(meta, nvm))
minetest.get_node_timer(pos):start(CYCLE_TIME)
any_node_changed(pos)
any_node_changed3(pos)
end,
on_timer = node_timer,
on_receive_fields = on_receive_fields,
on_timer = node_timer3,
on_receive_fields = on_receive_fields3,
techage_set_numbers = function(pos, numbers, player_name)
local meta = M(pos)
local res = logic.set_numbers(pos, numbers, player_name, S("TA3 Node Detector"))
meta:set_string("formspec", formspec(meta, techage.get_nvm(pos)))
local res = logic.set_numbers(pos, numbers, player_name, DESCR3)
meta:set_string("formspec", formspec3(meta, techage.get_nvm(pos)))
return res
end,
@ -154,7 +246,7 @@ minetest.register_node("techage:ta3_nodedetector_off", {
})
minetest.register_node("techage:ta3_nodedetector_on", {
description = S("TA3 Node Detector"),
description = DESCR3,
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta3.png^techage_frame_ta3_top.png^techage_appl_arrow.png^[transformR270",
@ -162,12 +254,12 @@ minetest.register_node("techage:ta3_nodedetector_on", {
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_nodedetector_on.png",
},
on_timer = node_timer,
on_timer = node_timer3,
techage_set_numbers = function(pos, numbers, player_name)
local meta = M(pos)
local res = logic.set_numbers(pos, numbers, player_name, S("TA3 Node Detector"))
meta:set_string("formspec", formspec(meta, techage.get_nvm(pos)))
local res = logic.set_numbers(pos, numbers, player_name, DESCR3)
meta:set_string("formspec", formspec3(meta, techage.get_nvm(pos)))
return res
end,
@ -184,6 +276,88 @@ minetest.register_node("techage:ta3_nodedetector_on", {
sounds = default.node_sound_wood_defaults(),
})
local function node_timer4(pos)
print("node_timer4")
if any_node_changed4(pos)then
switch_on4(pos)
else
switch_off4(pos)
end
return true
end
minetest.register_node("techage:ta4_nodedetector_off", {
description = DESCR4,
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta4.png^techage_frame_ta4_top.png^techage_appl_arrow.png^[transformR270",
"techage_filling_ta4.png^techage_frame_ta4_top.png",
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_nodedetector.png",
},
after_place_node = function(pos, placer)
local meta = M(pos)
local nvm = techage.get_nvm(pos)
logic.after_place_node(pos, placer, "techage:ta4_nodedetector_off", DESCR4)
logic.infotext(meta, DESCR4)
nvm.mode = 3 -- default mode
meta:set_string("formspec", formspec4(meta, nvm))
minetest.get_node_timer(pos):start(CYCLE_TIME)
end,
on_timer = node_timer4,
on_receive_fields = on_receive_fields4,
techage_set_numbers = function(pos, numbers, player_name)
local meta = M(pos)
local res = logic.set_numbers(pos, numbers, player_name, DESCR4)
meta:set_string("formspec", formspec4(meta, techage.get_nvm(pos)))
return res
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
techage.remove_node(pos, oldnode, oldmetadata)
techage.del_mem(pos)
end,
on_rotate = screwdriver.disallow,
paramtype2 = "facedir",
is_ground_content = false,
groups = {choppy=2, cracky=2, crumbly=2},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("techage:ta4_nodedetector_on", {
description = DESCR4,
tiles = {
-- up, down, right, left, back, front
"techage_filling_ta4.png^techage_frame_ta4_top.png^techage_appl_arrow.png^[transformR270",
"techage_filling_ta4.png^techage_frame_ta4_top.png",
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_nodedetector_on.png",
},
on_timer = node_timer4,
techage_set_numbers = function(pos, numbers, player_name)
local meta = M(pos)
local res = logic.set_numbers(pos, numbers, player_name, DESCR4)
meta:set_string("formspec", formspec4(meta, techage.get_nvm(pos)))
return res
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
techage.remove_node(pos, oldnode, oldmetadata)
techage.del_mem(pos)
end,
on_rotate = screwdriver.disallow,
paramtype2 = "facedir",
is_ground_content = false,
drop = "techage:ta4_nodedetector_off",
groups = {choppy=2, cracky=2, crumbly=2, not_in_creative_inventory = 1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "techage:ta3_nodedetector_off",
recipe = {
@ -193,11 +367,21 @@ minetest.register_craft({
},
})
techage.register_node({"techage:ta3_nodedetector_off", "techage:ta3_nodedetector_on"}, {
minetest.register_craft({
output = "techage:ta4_nodedetector_off",
recipe = {
{"", "dye:blue", ""},
{"", "techage:ta3_nodedetector_off", ""},
{"", "techage:ta4_wlanchip", ""},
},
})
techage.register_node({"techage:ta3_nodedetector_off", "techage:ta3_nodedetector_on",
"techage:ta4_nodedetector_off", "techage:ta4_nodedetector_on"}, {
on_recv_message = function(pos, src, topic, payload)
if topic == "state" then
local node = techage.get_node_lvm(pos)
if node.name == "techage:ta3_nodedetector_off" then
if node.name == "techage:ta3_nodedetector_off" or node.name == "techage:ta4_nodedetector_off" then
return "off"
else
return "on"
@ -209,7 +393,7 @@ techage.register_node({"techage:ta3_nodedetector_off", "techage:ta3_nodedetector
on_beduino_request_data = function(pos, src, topic, payload)
if topic == 142 then
local node = techage.get_node_lvm(pos)
if node.name == "techage:ta3_nodedetector_off" then
if node.name == "techage:ta3_nodedetector_off" or node.name == "techage:ta4_nodedetector_off" then
return 0, {0}
else
return 0, {1}

View File

@ -740,9 +740,9 @@ The detector can also be programmed with its own number. In this case, he pushes
[ta3_cartdetector|image]
### TA3 Block Detector
### TA3 Node Detector
The block detector sends an `on` command if it detects that blocks appear or disappear in front of it, but must be configured accordingly. After switching the detector back to the standard state (gray block), an `off` command is sent. Valid blocks are all types of blocks and plants, but not animals or players. The sensor range is 3 blocks / meter in the direction of the arrow.
The node detector sends an `on` command if it detects that nodes (blocks) appear or disappear in front of it, but must be configured accordingly. After switching the detector back to the standard state (gray block), an `off` command is sent. Valid blocks are all types of blocks and plants, but not animals or players. The sensor range is 3 blocks / meter in the direction of the arrow.
[ta3_nodedetector|image]

View File

@ -534,6 +534,16 @@ Diesen Zähler kann man über das Kommando 'count' abfragen und über 'reset' zu
[ta4_detector|image]
### TA4 Block Detektor / Node Detector
Die Funktionalität ist gleich wie beim TA3 Block Detektor.
Im Unterschied zum TA3 Block Detektor können hier die Positionen, die überwacht werden sollen, individuell konfiguriert werden. Dazu muss der "Aufzeichnen" Button gedrückt werden. Dann müssen alle Blöcke angeklickt werden, von denen die Position überprüft werden soll. Danach muss der "Fertig" Button gedrückt werden.
Es können bis zu 4 Blöcke ausgewählt werden.
[ta4_nodedetector|image]
### TA4 Energiespeicher-Ladungsdetektor / Energy Storage Charge Detector
Der Ladungsdetektor misst alle 8 s den Ladezustand des Energiespeichers des Stromnetzwerkes.

View File

@ -525,6 +525,16 @@ This counter can be queried with the 'count' command and reset with 'reset'.
[ta4_detector|image]
### TA4 Node Detector
The functionality is the same as with the TA3 Node Detector.
In contrast to the TA3 node detector, the positions to be monitored can be configured individually here. To do this, the "Record" button must be pressed. Then all blocks must be clicked, the position of which is to be checked. Then the "Done" button must be pressed.
Up to 4 blocks can be selected.
[ta4_nodedetector|image]
### TA4 Energy Storage Charge Detector
The charge detector measures the state of charge of the power grid's energy storage every 8 s.

View File

@ -84,7 +84,7 @@ Der TA5 Flug Controller ist ähnlich zum TA4 Move Controller. Im Gegensatz zum T
Mit der Taste "Test" wird die Flugstrecke mit den absoluten Koordinaten zur Überprüfung im Chat ausgegeben.
Die maximale Distanz für die gesammte Flugstrecke beträgt 1000 m. Es können bis zu 32 Blöcke antrainiert werden.
Die maximale Distanz für die gesammte Flugstrecke beträgt 1500 m. Es können bis zu 32 Blöcke antrainiert werden.
Die Nutzung des TA5 Flug Controllers benötigt 40 Erfahrungspunkte.

View File

@ -84,7 +84,7 @@ The TA5 Flight Controller is similar to the TA4 Move Controller. In contrast to
With the "Test" button, the flight route with the absolute coordinates is output for checking in the chat.
The maximum distance for the entire flight distance is 1000 m. Up to 32 blocks can be trained.
The maximum distance for the entire flight distance is 1500 m. Up to 32 blocks can be trained.
The use of the TA5 Flight Controller requires 40 experience points.

View File

@ -193,6 +193,7 @@
- [TA4 Spieler Detektor / Player Detector](./manual_ta4_DE.md#ta4-spieler-detektor--player-detector)
- [TA4 Zustandssammler / State Collector](./manual_ta4_DE.md#ta4-zustandssammler--state-collector)
- [TA4 Detektor / Detector](./manual_ta4_DE.md#ta4-detektor--detector)
- [TA4 Block Detektor / Node Detector](./manual_ta4_DE.md#ta4-block-detektor--node-detector)
- [TA4 Energiespeicher-Ladungsdetektor / Energy Storage Charge Detector](./manual_ta4_DE.md#ta4-energiespeicher-ladungsdetektor--energy-storage-charge-detector)
- [TA4 Blicksensor / Gaze Sensor](./manual_ta4_DE.md#ta4-blicksensor--gaze-sensor)
- [TA4 Sequenzer](./manual_ta4_DE.md#ta4-sequenzer)

View File

@ -123,7 +123,7 @@
- [Detectors](./manual_ta3_EN.md#detectors)
- [TA3 Detector](./manual_ta3_EN.md#ta3-detector)
- [TA3 Cart Detector](./manual_ta3_EN.md#ta3-cart-detector)
- [TA3 Block Detector](./manual_ta3_EN.md#ta3-block-detector)
- [TA3 Node Detector](./manual_ta3_EN.md#ta3-node-detector)
- [TA3 Player Detector](./manual_ta3_EN.md#ta3-player-detector)
- [TA3 Light Detector](./manual_ta3_EN.md#ta3-light-detector)
- [TA3 Machines](./manual_ta3_EN.md#ta3-machines)
@ -195,6 +195,7 @@
- [TA4 Player Detector](./manual_ta4_EN.md#ta4-player-detector)
- [TA4 State Collector](./manual_ta4_EN.md#ta4-state-collector)
- [TA4 Detector](./manual_ta4_EN.md#ta4-detector)
- [TA4 Node Detector](./manual_ta4_EN.md#ta4-node-detector)
- [TA4 Energy Storage Charge Detector](./manual_ta4_EN.md#ta4-energy-storage-charge-detector)
- [TA4 Gaze Sensor](./manual_ta4_EN.md#ta4-gaze-sensor)
- [TA4 Sequencer](./manual_ta4_EN.md#ta4-sequencer)

View File

@ -22,7 +22,7 @@ local MP = minetest.get_modpath("techage")
local mark = dofile(MP .. "/basis/mark_lib.lua")
local fly = techage.flylib
local MAX_DIST = 1000
local MAX_DIST = 1500
local MAX_BLOCKS = 32
local EX_POINTS = 40