Skip to content

Commit 2fefac5

Browse files
committed
Add: action0 prop 20 for rail stations
Allows to use bridges over stations feature.
1 parent fe70105 commit 2fefac5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nml/actions/action0properties.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,12 @@ def station_tile_flags(value):
818818
]
819819

820820

821+
def station_minimum_bridge_height(value):
822+
if not isinstance(value, Array):
823+
raise generic.ScriptError("Flag list must be an array", value.pos)
824+
return [VariableByteListProp(0x20, [[flags.reduce_constant().value for flags in value.values]], True)]
825+
826+
821827
# fmt: off
822828
properties[0x04] = {
823829
"class": {"size": 4, "num": 0x08, "first": None, "string_literal": 4},
@@ -843,6 +849,7 @@ def station_tile_flags(value):
843849
"name": {"size": 2, "num": (256, -1, 0x1C), "string": (256, 0xC5, 0xDC), "required": True},
844850
"classname": {"size": 2, "num": (256, -1, 0x1D), "string": (256, 0xC4, 0xDC)},
845851
"tile_flags": {"custom_function": station_tile_flags}, # = prop 1E
852+
"minimum_bridge_height": {"custom_function": station_minimum_bridge_height}, # = prop 20
846853
}
847854
# fmt: on
848855

0 commit comments

Comments
 (0)