Normalize null ConstructionStockpile.Items before raising a paste - #36
Open
viktor-ferenczi wants to merge 1 commit into
Open
Normalize null ConstructionStockpile.Items before raising a paste#36viktor-ferenczi wants to merge 1 commit into
viktor-ferenczi wants to merge 1 commit into
Conversation
A blueprint saved with a partially built block carries a <ConstructionStockpile> with no Items children; the game's XML reader deserializes it to Items == null, and VRage's event serializer then refuses the null when TryPasteGrid_Implementation is raised in a hosted session. Vanilla game bug: reproduced on the Windows binaries under Proton with this plugin absent (pulsar-tests se1/reports/evidence/proton-attribution). Every paste route constructs MyPasteGridParameters through its single constructor, so a prefix there catches the UI clipboard, the grid storage helper, visual scripting and plugin-raised pastes without touching the reader or the wire format. Recurses into projected grids, which carry the same object builders.
Contributor
Author
|
Test on Windows. If the issue happens there, then it is a game bug and the fix does not belong here. If it works on Windows, then it may belong to |
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.
A blueprint saved with a partially built block carries a
<ConstructionStockpile>with noItemschildren; the game's XML reader deserializes it toItems == null, and VRage's event serializer then refuses the null whenTryPasteGrid_Implementationis raised in a hosted session. Vanilla game bug: reproduced on the Windows binaries under Proton with this plugin absent (pulsar-testsse1/reports/evidence/proton-attribution).Every paste route constructs
MyPasteGridParametersthrough its single constructor, so a prefix there catches the UI clipboard, the grid storage helper, visual scripting and plugin-raised pastes without touching the reader or the wire format. Recurses into projected grids, which carry the same object builders.