We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17deb67 commit 749aa73Copy full SHA for 749aa73
nml/actions/action3.py
@@ -74,13 +74,13 @@ def map_cid(cid):
74
75
def write(self, file):
76
size = 7 + 3 * len(self.cid_mappings)
77
- if self.feature <= 3:
78
- size += 2 # Vehicles use extended byte
+ if self.feature <= 3 or self.id >= 0xFF:
+ size += 2 # Vehicles or IDs >= 255 use extended byte
79
file.start_sprite(size)
80
file.print_bytex(3)
81
file.print_bytex(self.feature)
82
file.print_bytex(1 if not self.is_livery_override else 0x81) # a single id
83
- file.print_varx(self.id, 3 if self.feature <= 3 else 1)
+ file.print_varx(self.id, 3 if self.feature <= 3 or self.id >= 0xFF else 1)
84
file.print_byte(len(self.cid_mappings))
85
file.newline()
86
for cargo, cid, comment in self.cid_mappings:
0 commit comments