feat(wired): array variable metadata + array inspection packets - #147
Draft
DennisObject wants to merge 3 commits into
Draft
feat(wired): array variable metadata + array inspection packets#147DennisObject wants to merge 3 commits into
DennisObject wants to merge 3 commits into
Conversation
WiredUserVariablesDataParser mapped the server's "array_unavailable" value shape to 'single', which reads downstream as a usable scalar. It now sets `unavailable` and clears hasValue so the editors can keep the definition out of every picker.
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.
Protocol support for array-typed wired variables. Needs duckietm/Polaris-Emulator#534; consumed by duckietm/Octane#353.
Incoming
WiredArrayInspectionDataEvent/WiredArrayInspectionDataParser(header 5111) — paginated array contents for Creator ToolsWiredUserVariablesDataParser— reads the optional trailing array-metadata block (value shape, format, mode, max entries, fields, permanent flag) and flags schemas the server could not parseOutgoing
WiredArrayInspectionRequestComposer(10034)WiredArrayInspectionUpdateComposer(10035)Both registered in
NitroMessages.Testing in-game
1 — metadata reaches the editors
Enter a room, open any wired variable box. The client's array pickers are populated from
WiredUserVariablesDataParser— if awf_var_roombox is set to Array with fields, those fields appear in Modify Array / Check Array. Empty pickers mean the trailing block didn't parse.2 — legacy server
Point the client at an emulator without the array branch. The variables packet has no trailing metadata block; every definition still loads with
valueShapeundefined and the boxes behave as before. Same for a truncated or malformed block — the base packet stays valid.3 — array inspection
Creator Tools → Inspection tab → select a furni or user holding an array.
WiredArrayInspectionRequestComposergoes out, the browser fills from the response. Page through a >25-entry array to exercisepage/pageCount/startIndex/endIndex. Edit a cell →WiredArrayInspectionUpdateComposergoes out and the value comes back changed.4 — unusable schema
When the server reports
array_unavailable, the parser setsunavailableand clearshasValueinstead of flattening the definition to a scalar, so the editors keep it out of every picker.5 — composer registration
getComposerId()must not return -1 for either composer. If the Creator Tools array panel is silently dead, check both_eventsand_composersinNitroMessages.