Repository navigation
Add: New capacity callbacks and misc_flags bit 5 constant - #444
Open
Brickblock1 wants to merge 1 commit into
Open
Brickblock1 wants to merge 1 commit into
Brickblock1 wants to merge 1 commit into
Conversation
Brickblock1
force-pushed
the
misc_flags-bit-5
branch
from
September 20, 2026 17:39
e7831a7 to
3a47f1c
Compare
Brickblock1
force-pushed
the
misc_flags-bit-5
branch
from
September 20, 2026 17:50
3a47f1c to
6894a25
Compare
| 'cargo_capacity' : [ {'type': 'cb', 'num': 0x15, 'flag_bit': 3}, | ||
| {'type': 'cb', 'num': 0x36, 'var10': 0x14, 'purchase': 'purchase_cargo_capacity'}], | ||
| 'purchase_cargo_capacity' : {'type': 'cb', 'num': 0x36, 'var10': 0x14, 'purchase': 2}, | ||
| {'type': 'cb', 'num': 0x36, 'var10': 0x14, 'purchase': 'purchase_cargo_capacity', 'deprecate_message': "'cargo_capacity' is deprecated, consider using 'cargo_capacity_refit' with misc flag TRAIN_FLAG_SIMPLE_REFIT_CAPACITY instead"}], # Depricated due to being complicated and inefficent |
Contributor
There was a problem hiding this comment.
Suggested change
| {'type': 'cb', 'num': 0x36, 'var10': 0x14, 'purchase': 'purchase_cargo_capacity', 'deprecate_message': "'cargo_capacity' is deprecated, consider using 'cargo_capacity_refit' with misc flag TRAIN_FLAG_SIMPLE_REFIT_CAPACITY instead"}], # Depricated due to being complicated and inefficent | |
| {'type': 'cb', 'num': 0x36, 'var10': 0x14, 'purchase': 'purchase_cargo_capacity', 'deprecate_message': "'cargo_capacity' is deprecated, consider using 'cargo_capacity_refit' with misc flag TRAIN_FLAG_SIMPLE_REFIT_CAPACITY instead"}], # Deprecated due to being complicated and inefficent |
| 'cargo_capacity' : [ {'type': 'cb', 'num': 0x15, 'flag_bit': 3}, | ||
| {'type': 'cb', 'num': 0x36, 'var10': 0x0F, 'purchase': 'purchase_cargo_capacity'}], | ||
| 'purchase_cargo_capacity' : {'type': 'cb', 'num': 0x36, 'var10': 0x0F, 'purchase': 2}, | ||
| {'type': 'cb', 'num': 0x36, 'var10': 0x0F, 'purchase': 'purchase_cargo_capacity', 'deprecate_message': "'cargo_capacity' is deprecated, consider using 'cargo_capacity_refit' with misc flag ROADVEH_FLAG_SIMPLE_REFIT_CAPACITY instead"}], # Depricated due to being complicated and inefficent |
Contributor
There was a problem hiding this comment.
Suggested change
| {'type': 'cb', 'num': 0x36, 'var10': 0x0F, 'purchase': 'purchase_cargo_capacity', 'deprecate_message': "'cargo_capacity' is deprecated, consider using 'cargo_capacity_refit' with misc flag ROADVEH_FLAG_SIMPLE_REFIT_CAPACITY instead"}], # Depricated due to being complicated and inefficent | |
| {'type': 'cb', 'num': 0x36, 'var10': 0x0F, 'purchase': 'purchase_cargo_capacity', 'deprecate_message': "'cargo_capacity' is deprecated, consider using 'cargo_capacity_refit' with misc flag ROADVEH_FLAG_SIMPLE_REFIT_CAPACITY instead"}], # Deprecated due to being complicated and inefficent |
| 'visual_effect' : {'type': 'cb', 'num': 0x10, 'flag_bit': 0}, | ||
| 'effect_spawn_model' : {'type': 'cb', 'num': 0x10, 'flag_bit': 0}, | ||
| 'cargo_capacity' : [ {'type': 'cb', 'num': 0x15, 'flag_bit': 3}, | ||
| {'type': 'cb', 'num': 0x36, 'var10': 0x0D, 'purchase': 'purchase_cargo_capacity', 'deprecate_message': "'cargo_capacity' is deprecated, consider using 'cargo_capacity_refit' with misc flag SHIP_FLAG_SIMPLE_REFIT_CAPACITY instead"}], # Depricated due to being complicated and inefficent |
Contributor
There was a problem hiding this comment.
Suggested change
| {'type': 'cb', 'num': 0x36, 'var10': 0x0D, 'purchase': 'purchase_cargo_capacity', 'deprecate_message': "'cargo_capacity' is deprecated, consider using 'cargo_capacity_refit' with misc flag SHIP_FLAG_SIMPLE_REFIT_CAPACITY instead"}], # Depricated due to being complicated and inefficent | |
| {'type': 'cb', 'num': 0x36, 'var10': 0x0D, 'purchase': 'purchase_cargo_capacity', 'deprecate_message': "'cargo_capacity' is deprecated, consider using 'cargo_capacity_refit' with misc flag SHIP_FLAG_SIMPLE_REFIT_CAPACITY instead"}], # Deprecated due to being complicated and inefficent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NML does not currently allow setting CB 36 and 15 independently which is a shame. NML also doesn't support misc_flags bit 5 cleanly with a constant.
The flag is very useful since it makes it considerably easier and safer to use the 'cargo_capacity' property and CB 36 / 'cargo_capacity_default' as they get decopled form whatever the default cargotype is. It also has the benefit of making CB 15 / 'cargo_capacity_refit' called regardless of if the vehicle is refited allowing one to implement only CB 15 instead of also implementing CB 36 even though it only gets caled in one case.