Add: [NewGRF] Vehicle property to copy properties of an existing definiton. #12523
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.
Motivation / Problem
Variants require relevant engine properties to be set for each variant, resulting in larger source file and NewGRF files. Often most of the properties should be the same. This could be achieved by making the NML tooling duplicate properties, but this does not solve the 'bloat'.
Description
Add a property to copy properties of an existing engine definition. Any properties altered afterwards will not propagate to the copies. For flexibility, this does NOT also set the variant_id property, which should also be set after using the copy properties property properly.
So this simplifies creation of similar variants, but can also be used for distinct types.
Strings and Action 3-2-1 chains are not copied.
Limitations
Untested.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.