User Tools

Site Tools


usage:atlatc:examples:linuxforks_subway_code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
usage:atlatc:examples:linuxforks_subway_code [2022-06-29 08:23]
56independent Update license information from the forum post (but the rest went over my head as I have only read parts of this
usage:atlatc:examples:linuxforks_subway_code [2024-05-23 05:03] (current)
blockhead Fix indentation of subway stat counter digiline message
Line 1: Line 1:
-====== Linuxforks Subway ======+====== Linuxforks Subway Interlocking ======
 ===== Introduction ===== ===== Introduction =====
 **Note**: This is actually taken from a [[https://forum.minetest.net/viewtopic.php?f=10&t=17465&p=411692#p411692|Forum Post]] written by Blockhead. This is just a modified version of the post designed to fit with the wiki (but 56i, the creator of this wiki page did inspire this post, so part-credit goes to him). **Note**: This is actually taken from a [[https://forum.minetest.net/viewtopic.php?f=10&t=17465&p=411692#p411692|Forum Post]] written by Blockhead. This is just a modified version of the post designed to fit with the wiki (but 56i, the creator of this wiki page did inspire this post, so part-credit goes to him).
Line 44: Line 44:
  
 <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
 +--]]
 -- 'subway' environment -- -- 'subway' environment --
 --F.stn_union=function(line1, prev1, prev2, this, next, doors, dps, osig, ret_sw, ret_st, nohalt, waittime) --F.stn_union=function(line1, prev1, prev2, this, next, doors, dps, osig, ret_sw, ret_st, nohalt, waittime)
Line 394: Line 399:
             c_tbtmax = 0             c_tbtmax = 0
         end         end
-        digiline_send( +        digiline_send("stats", "Stat: " .. line .. 
-            "stats", +            " NoT:"..a_not.."("..c_not.. ")".. 
-            "Stat: " .. +            " TbT:"..math.floor(a_tbt).."("..(time-time_lt)..")".. 
-                line .. +            " Tmx:"..math.floor(a_tbtmax).."("..c_tbtmax..")".. 
-                    " NoT:" .. +            " R:"..math.floor(a_rtt).."("..(time-time_rt)..")"
-                        a_not .. +
-                            "(" .. +
-                                c_not .. +
-                                    ")" .. +
-                                        " TbT:" .. +
-                                            math.floor(a_tbt) .. +
-                                                "(" .. +
-                                                    (time - time_lt) .. +
-                                                        ")" .. +
-                                                            " Tmx:" .. +
-                                                                math.floor(a_tbtmax) .. +
-                                                                    "(" .. +
-                                                                        c_tbtmax .. +
-                                                                            ")" .. +
-                                                                                " R:" .. +
-                                                                                    math.floor(a_rtt) .. +
-                                                                                        "(" .. (time - time_rt) .. ")"+
         )         )
         time_lt = time         time_lt = time
usage/atlatc/examples/linuxforks_subway_code.1656483814.txt.gz · Last modified: 2022-06-29 08:23 by 56independent