"season-selector" container

From TrainzOnline
Revision as of 20:35, 24 March 2010 by windwalkr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The "Season-selector" container is a top-level container is some assets' config.txt file which allows the simulator to display an appropriate visual for each asset instance based on certain environmental parameters. The container does not specify anything about the visuals directly, but rather provides logic which maps the varied environmental parameters down to a single "season index" which is then used in other parts of the asset's config.txt file.

The "Season-selector" container is a recursive structure- meaning that the container may contain one or more of itself as sub-containers.

Contents

Supported Tags

The "Season-selector" container supports the following tags. Each tag is show here with its default value.

output-season
season-range 0.0, 1.0
above-snow-line 0
branch-true
branch-false

output-season

Type: Integer
Desc: The season index used for this asset if the decision logic reaches this [sub-]container. If specified, this should be the only tag in this "Season-selector" [sub-]container.

season-range

Type: vector2
Desc: A conditional tag which tests whether the global time-of-year value falls within the specified range. If the first number is less than the second, the condition is evaluated by (first-value <= time-of-year <= second-value.) If the second number is less than the first, the condition is evaluated by (time-of-year <= second-value || time-of-year >= first-value.) The global time-of-year value varies from 0.0 to 1.0 throughout the year, where 0.0 is new year.

above-snow-line

Type: boolean
Desc: A conditional tag which tests whether the asset instance is above the snow-line. If set to a true value (eg. 1) then asset instances will evaluate this condition as (asset-height >= snow-line-height.) If set to a false value (eg. 0) then no test is performed.

branch-true

Type: "Season-selector" container
Desc: If all of the conditional tags in this [sub-]container evaluate to true, this child branch is evaluated to determine the output-season for a specified asset instance.

branch-false

Type: "Season-selector" container
Desc: If one or more of the conditional tags in this [sub-]container evaluate to false, this child branch is evaluated to determine the output-season for a specified asset instance.


"Season-selector" Example

Personal tools