fix: get_wrecks printed 'undefined' for wreck id and expiry (gh#1874) - #26
Merged
Conversation
This was referenced Jul 27, 2026
The get_wrecks formatter read fields the server never emits (wreck_id, ticks_remaining, items), so the id and expiry rendered as the literal string 'undefined'. Map to the real response fields: id, expire_tick / expires_at (0 = never expires), and cargo. Reported by Cassia Wrenfield.
statico-alt
force-pushed
the
fix/gh-1874-wreck-render
branch
from
July 28, 2026 02:36
cdda782 to
864562b
Compare
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.
Summary
get_wrecksin the reference client printed the literal stringundefinedfor the wreck id and expiry:The formatter read three fields the server never emits —
wreck_id,ticks_remaining, anditems. The server response usesid,expire_tick/expires_at, andcargo. Mapped the formatter to the real fields. Note that most wrecks (ship/pirate/abandoned) haveexpire_tick == 0, meaning they never expire; only jettisoned junk containers get a finite expiry — the display now handles both.Added a regression test that fails against the old field reads and passes with the fix.
Rebased onto #28, which resynced
COMMANDSwith the live API and unblocked CI.Player-Facing Release Notes
get_wrecksin the reference client showingWreck: undefinedandundefined ticks— it now shows the real wreck id, contents, and expiry, so wreck ids can be used withloot_wreckandtow_wreck.Reported by Cassia Wrenfield.
Closes #1874