aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/passive_api.txt
diff options
context:
space:
mode:
authorSingularis <singularis@volny.cz>2022-07-05 06:48:19 +0200
committerorwell <orwell@bleipb.de>2025-05-27 20:22:01 +0200
commitec223d6f3d5d1a7e1257c468d169a0353ec0963e (patch)
tree683c7a10e32e077b37ece37004442e8c66ebb7f8 /advtrains_luaautomation/passive_api.txt
parent744aee2cdd319bc19e83cc9efb52a07ae6adbb06 (diff)
downloadadvtrains-ec223d6f3d5d1a7e1257c468d169a0353ec0963e.tar.gz
advtrains-ec223d6f3d5d1a7e1257c468d169a0353ec0963e.tar.bz2
advtrains-ec223d6f3d5d1a7e1257c468d169a0353ec0963e.zip
[advtrains]
- odebrán mód advtrains_luaautomation - lokalizace - zastaralá funkce getpos() nahrazena za get_pos()
Diffstat (limited to 'advtrains_luaautomation/passive_api.txt')
-rw-r--r--advtrains_luaautomation/passive_api.txt24
1 files changed, 0 insertions, 24 deletions
diff --git a/advtrains_luaautomation/passive_api.txt b/advtrains_luaautomation/passive_api.txt
deleted file mode 100644
index 5ae1df4..0000000
--- a/advtrains_luaautomation/passive_api.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Lua Automation - Passive Component API
-
-Passive components are nodes that do not have code running in them. However, active components can query these and request actions from them. Examples:
-Switches
-Signals
-Displays
-Mesecon Transmitter
-Those passive components can also be used inside interlocking systems.
-
-All passive components have a table called 'advtrains' in their node definition and have the group 'save_in_at_nodedb' set, so they work in unloaded chunks.
-Example for a switch:
-advtrains = {
- getstate = function(pos, node)
- return "st"
- end,
- -- OR
- getstate = "st",
-
- setstate = function(pos, node, newstate)
- if newstate=="cr" then
- advtrains.ndb.swap_node(pos, <corresponding switch alt>)
- end
- end
-} \ No newline at end of file