Skip to content

Commit

Permalink
Feature: support extra_flags for vehicles
Browse files Browse the repository at this point in the history
  • Loading branch information
andythenorth committed Dec 11, 2022
1 parent 0478063 commit 542af38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions nml/actions/action0properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ def zero_refit_mask(prop_num):
],
"curve_speed_mod": {"size": 2, "num": 0x2E, "unit_conversion": 256},
"variant_group": {"size": 2, "num": 0x2F},
"extra_flags": {"size": 4, "num": 0x30},
}
# fmt: on

Expand Down Expand Up @@ -524,6 +525,7 @@ def prop15_test(value):
zero_refit_mask(0x16),
],
"variant_group": {"size": 2, "num": 0x26},
"extra_flags": {"size": 4, "num": 0x27},
}
# fmt: on

Expand Down Expand Up @@ -592,6 +594,7 @@ def speed_fraction(value):
zero_refit_mask(0x11),
],
"variant_group": {"size": 2, "num": 0x20},
"extra_flags": {"size": 4, "num": 0x21},
}
# fmt: on

Expand Down Expand Up @@ -652,6 +655,7 @@ def aircraft_is_large(value):
],
"range": {"size": 2, "num": 0x1F},
"variant_group": {"size": 2, "num": 0x20},
"extra_flags": {"size": 4, "num": 0x21},
}
# fmt: on

Expand Down
8 changes: 7 additions & 1 deletion nml/global_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def constant_number(name, info, pos):
"SHIP_FLAG_NO_BREAKDOWN_SMOKE": 6,
"SHIP_FLAG_SPRITE_STACK": 7,

# aircrafts misc flags
# aircraft misc flags
"AIRCRAFT_FLAG_2CC" : 1,
"AIRCRAFT_FLAG_AUTOREFIT": 4,
"AIRCRAFT_FLAG_NO_BREAKDOWN_SMOKE": 6,
Expand All @@ -141,6 +141,12 @@ def constant_number(name, info, pos):
"VEHICLE_FLAG_AUTOREFIT": 4,
"VEHICLE_FLAG_NO_BREAKDOWN_SMOKE": 6,

# vehicle extra flags
"VEHICLE_FLAG_DISABLE_NEW_VEHICLE_MESSAGE" : 0,
"VEHICLE_FLAG_DISABLE_EXCLUSIVE_PREVIEW" : 1,
"VEHICLE_FLAG_SYNCHRONISE_VARIANT_EXCLUSIVE_PREVIEW" : 2,
"VEHICLE_FLAG_SYNCHRONISE_VARIANT_RELIABILITY" : 3,

# Graphic flags for waterfeatures
"WATERFEATURE_ALTERNATIVE_SPRITES" : 0,

Expand Down

0 comments on commit 542af38

Please sign in to comment.