Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements image table grouping functionality for vehicle objects, improving the organization and categorization of vehicle sprites in the ObjectEditor. The changes include renaming and clarifying sprite-related properties and flags, implementing a comprehensive vehicle image grouping algorithm, and updating the test infrastructure to support the new data structure.
Key changes:
- Added comprehensive image table grouping for vehicle body and bogie sprites with support for different orientations and slopes
- Renamed
BogieSprite.RollStatestoNumAnimationFramesfor clarity and removed unusedNumRollSpritesproperty - Updated
BogieSpriteFlagsenum to clarify flag meanings and remove deprecated flags - Refactored
GetViewModelFromStructto acceptLocoObjectinstead ofILocoStructfor better context access
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/IdempotenceTests.cs | Updated test to work with refactored GetViewModelFromStruct signature that now accepts LocoObject |
| Gui/ViewModels/LocoTypes/Objects/Vehicle/VehicleViewModel.cs | Added empty VehicleComponentsViewModel class, moved namespace, added enum prohibit value attributes for sprites, removed unused import |
| Gui/ViewModels/LocoTypes/Objects/Building/BuildingViewModel.cs | Added blank line for formatting consistency |
| Gui/ViewModels/LocoTypes/ObjectEditorViewModel.cs | Refactored GetViewModelFromStruct to accept LocoObject, reorganized null assignments for better code flow |
| Definitions/ObjectModels/Objects/Vehicle/BogieSpriteFlags.cs | Removed deprecated flags and updated comments for clarity on remaining flags |
| Definitions/ObjectModels/Objects/Vehicle/BogieSprite.cs | Renamed RollStates to NumAnimationFrames, removed NumRollSprites, added Browsable(false) attributes, updated validation |
| Definitions/ObjectModels/Objects/Vehicle/BodySpriteFlags.cs | Updated flag comments for clarity and marked deprecated flag |
| Definitions/ObjectModels/Objects/Vehicle/BodySprite.cs | Added documentation comment explaining computed properties |
| Definitions/ObjectModels/Graphics/ImageTableGrouper.cs | Implemented comprehensive vehicle image grouping with support for body and bogie sprites across different slopes and orientations |
| Dat/Loaders/Vehicle/VehicleObjectLoader.cs | Added comment noting skipped additional image table setup |
| Dat/FileParsing/LocoBinaryWriter.cs | Updated to write NumAnimationFrames and placeholder byte instead of NumRollSprites |
| Dat/FileParsing/LocoBinaryReader.cs | Updated to read NumAnimationFrames and skip placeholder byte instead of reading NumRollSprites |
Comments suppressed due to low confidence (1)
Gui/ViewModels/LocoTypes/Objects/Vehicle/VehicleViewModel.cs:24
- An empty class
VehicleComponentsViewModelhas been added but contains no implementation. Empty classes add no value and should either be implemented or removed. If this is a placeholder for future work, it should not be committed until it has actual functionality.
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.
No description provided.