usage:atlatc:examples:linuxforks_subway_code
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| usage:atlatc:examples:linuxforks_subway_code [2022-06-28 21:20] – [Code] Replace code with code that was auto-indented by some third party web service 56independent | usage:atlatc:examples:linuxforks_subway_code [2024-05-23 03:03] (current) – Fix indentation of subway stat counter digiline message blockhead | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Linuxforks Subway ====== | + | ====== Linuxforks Subway |
| ===== Introduction ===== | ===== Introduction ===== | ||
| **Note**: This is actually taken from a [[https:// | **Note**: This is actually taken from a [[https:// | ||
| Line 5: | Line 5: | ||
| I've actually wanted to make a video about the subway code just because I think it's of historical interest but also as an example of how to make an interlocking system out of just LuaATC. Consider this like a partial script dump for that video. | I've actually wanted to make a video about the subway code just because I think it's of historical interest but also as an example of how to make an interlocking system out of just LuaATC. Consider this like a partial script dump for that video. | ||
| - | The subway code is something like (A? | + | The subway code is written by orwell, and uses the GPLv3 license. It's a form of interlocking that predates what we call "TSS Interlocking" |
| The current code is as follows (it's not all properly indented, much of it may have been edited in-game. It probably started back in 2017, but has barely changed since 2019 due to maturity, stability and decreasing relevance. | The current code is as follows (it's not all properly indented, much of it may have been edited in-game. It probably started back in 2017, but has barely changed since 2019 due to maturity, stability and decreasing relevance. | ||
| Line 41: | Line 41: | ||
| ===== Code ===== | ===== Code ===== | ||
| - | The current code is as follows (it's not all properly indented, much of it may have been edited in-game. It probably started back in 2017, but has barely changed since 2019 due to maturity, stability and decreasing relevance. | + | The current code is as follows (<del>it's not all properly indented, much of it may have been edited in-game</ |
| <code lua> | <code lua> | ||
| + | --[[ | ||
| + | Linuxforks Subway Code | ||
| + | Copyright (C) 2017-2021 orwell96 and other LinuxForks contributors. | ||
| + | Licensed under the terms of the GNU General Public License, Version 3 or later | ||
| + | --]] | ||
| -- ' | -- ' | ||
| --F.stn_union=function(line1, | --F.stn_union=function(line1, | ||
| Line 394: | Line 399: | ||
| c_tbtmax = 0 | c_tbtmax = 0 | ||
| end | end | ||
| - | digiline_send( | + | digiline_send(" |
| - | | + | " NoT:" |
| - | | + | " TbT:" |
| - | | + | " Tmx:" |
| - | " NoT:" .. | + | " R:" |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | " TbT:" .. | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | " Tmx:" .. | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | " R:" .. | + | |
| - | | + | |
| - | | + | |
| ) | ) | ||
| time_lt = time | time_lt = time | ||
usage/atlatc/examples/linuxforks_subway_code.1656451255.txt.gz · Last modified: by 56independent
