User Tools

Site Tools


usage:atlatc:api

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
usage:atlatc:api [2020-01-24 10:24]
orwell created
usage:atlatc:api [2020-01-24 10:31]
orwell
Line 8: Line 8:
   * ''math''   * ''math''
   * ''table''   * ''table''
-  * ''os''+  * from ''os''
 +    * ''os.clock()'' 
 +    * ''os.difftime()'' 
 +    * ''os.time()'' 
 +    * ''os.date()'' ((note that ''os.date()'' without parameters returns in table form ''("*t")''))
  
 The standard Lua functions are available in the LuaATC environment: The standard Lua functions are available in the LuaATC environment:
Line 170: Line 174:
  
 To control a train, this train must be positioned on the ATC rail. It does not matter which portion of the train is on the ATC rail, and whether the train is moving or not. ((An exception applies to events of type ''approach'', where the approaching train can be controlled. The train is no longer available on subsequent ''int'' or ''schedule'' events.)) To control a train, this train must be positioned on the ATC rail. It does not matter which portion of the train is on the ATC rail, and whether the train is moving or not. ((An exception applies to events of type ''approach'', where the approaching train can be controlled. The train is no longer available on subsequent ''int'' or ''schedule'' events.))
 +
 +=== Functions ===
  
 == atc_send(cmd) == == atc_send(cmd) ==
Line 195: Line 201:
  
 == set_line(line) == == set_line(line) ==
-Sets the line property of the train, as a string. On [[usage:trains:subway_train|subway trains]] bundled with Advtrains, the line is automatically displayed on the outside of the trains, if it is a number between 0 and 9 (where 0 is displayed as "Line 10").+Sets the line property of the train, as a string. On [[usage:trains:subway_train|subway trains]] bundled with Advtrains, the line is automatically displayed on the outside of the trains, if the first character is a number between 0 and 9 (where 0 is displayed as "Line 10").
  
 This property is also used by the interlocking system for Automatic Routesetting. This property is also used by the interlocking system for Automatic Routesetting.
usage/atlatc/api.txt · Last modified: 2023-07-05 17:48 by maverick2797