NML:Property: Difference between revisions

From GRFSpecs
Jump to navigation Jump to search
Content deleted Content added
FooBar (talk | contribs)
content of nml r1625
 
FooBar (talk | contribs)
add nav template
Line 1: Line 1:
{{NMLNavBlocksyntax}}

property {
property {
(<ID>: (<string>|(<expression> [<unit>]));)+
(<ID>: (<string>|(<expression> [<unit>]));)+

Revision as of 15:50, 21 August 2011

Block Syntax
property {
	(<ID>: (<string>|(<expression> [<unit>]));)+
}

This one looks a lot more complicated than it actually is. A property-block contains one or more assignments. Each assignment starts with the name of the property that is changed followed by a colon. After the colon follows the value and you end the line with a semicolon. The type of the value depends on the property, some properties require a string as value and some an expression. For some properties you can optionally specify a unit that is used to convert the value to the unit that is written to the output file. You can only use a unit if the expression is constant. List of valid units