Time Table
Parent |
Contains the time table information of train.
Functions
addStop (index : Int, station : Trace<RailroadStation>, ruleSet : Struct<TrainDockingRuleSet>) → added : Bool
Adds a stop to the time table.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Add Stop |
| Name | Type | Description |
|---|---|---|
Index |
Int |
The zero-based index at which the stop should get added. |
Station |
Trace<RailroadStation> |
The railroad station at which the stop should happen. |
Rule Set |
Struct<TrainDockingRuleSet> |
The docking rule set that descibes when the train will depart from the station. |
| Name | Type | Description |
|---|---|---|
Added |
Bool |
True if the stop got sucessfully added to the time table. |
getCurrentStop () → index : Int
Returns the index of the stop the train drives to right now.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Current Stop |
| Name | Type | Description |
|---|---|---|
Index |
Int |
The zero-based index of the stop the train tries to drive to right now. |
getStop (index : Int) → stop : Struct<TimeTableStop>
Returns the stop at the given index.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Stop |
| Name | Type | Description |
|---|---|---|
Index |
Int |
The zero-based index of the stop you want to get. |
| Name | Type | Description |
|---|---|---|
Stop |
Struct<TimeTableStop> |
The time table stop at the given index. |
getStops () → stops : Array<Struct<TimeTableStop>>
Returns a list of all the stops this time table has
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Stops |
| Name | Type | Description |
|---|---|---|
Stops |
Array<Struct<TimeTableStop>> |
A list of time table stops this time table has. |
incrementCurrentStop ()
Sets the current stop to the next stop in the time table.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Increment Current Stop |
isValidStop (index : Int) → valid : Bool
Allows to check if the given stop index is valid.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Is Valid Stop |
| Name | Type | Description |
|---|---|---|
Index |
Int |
The zero-based stop index you want to check its validity. |
| Name | Type | Description |
|---|---|---|
Valid |
Bool |
True if the stop index is valid. |
removeStop (index : Int)
Removes the stop with the given index from the time table.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Remove Stop |
| Name | Type | Description |
|---|---|---|
Index |
Int |
The zero-based index at which the stop should get added. |
setCurrentStop (index : Int)
Sets the stop, to which the train trys to drive to right now.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Set Current Stop |
| Name | Type | Description |
|---|---|---|
Index |
Int |
The zero-based index of the stop the train should drive to right now. |
setStop (index : Int, stop : Struct<TimeTableStop>) → success : Bool
Allows to override a stop already in the time table.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Set Stop |
| Name | Type | Description |
|---|---|---|
Index |
Int |
The zero-based index of the stop you want to override. |
Stop |
Struct<TimeTableStop> |
The time table stop you want to override with. |
| Name | Type | Description |
|---|---|---|
Success |
Bool |
True if setting was successful, false if not, f.e. invalid index. |
setStops (stops : Array<Struct<TimeTableStop>>) → gotSet : Bool
Allows to empty and fill the stops of this time table with the given list of new stops.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Set Stops |
| Name | Type | Description |
|---|---|---|
Stops |
Array<Struct<TimeTableStop>> |
The new time table stops. |
| Name | Type | Description |
|---|---|---|
Got Set |
Bool |
True if the stops got sucessfully set. |