Skip to content

Fix replay export dropping equipment details and air bases - #695

Merged
myangelkamikaze merged 2 commits into
ElectronicObserverEN:mainfrom
16Wuyue:fix/replay-export-equipment-and-airbase
Aug 28, 2026
Merged

myangelkamikaze merged 2 commits into
ElectronicObserverEN:mainfrom
16Wuyue:fix/replay-export-equipment-and-airbase

Conversation

@16Wuyue

@16Wuyue 16Wuyue commented Aug 21, 2026

Copy link
Copy Markdown

Two unrelated bugs, one commit each.

Equipment improvement and proficiency were dropped. ToReplayData flattened every equipment slot down to its plain id, losing Level and AircraftLevel. The noro6 export reads the same SortieRecord.FleetData and carries both, so the data was already there.

ReplayShip now has stars and ace, index aligned with equip the way convert.js expects. The four copy-pasted fleet mappings are collapsed into ToReplayFleet / ToReplayShip so that alignment only has to hold in one place.

Air bases disappeared from most sorties. The filter compared MapAreaId against sortie.Map, but MapAreaId holds the world. On the 58-4 fixture all three air bases vanished.

Tests added in ElectronicObserverCoreTests/Replay/ReplayExportTests.cs, reusing the existing SortieDetail fixtures; the air base case fails against the old filter with Expected: 3, Actual: 0. Full suite: 475 passed, 0 failed, 24 skipped.

Replay export flattened equipment down to the plain id, dropping Level
and AircraftLevel. The noro6 export reads the same SortieRecord.FleetData
and carries both, so the data was there all along.

Add stars/ace to ReplayShip, kept index aligned with equip, and collapse
the four duplicated fleet mappings into ToReplayFleet/ToReplayShip.
MapAreaId holds the world, not the map, so the filter dropped every air
base whenever the two differed - which is most sorties. On the 58-4
fixture all three air bases disappeared from the export.
@myangelkamikaze

Copy link
Copy Markdown
Member

I was able to reproduce the issue you described and confirmed that your fix works correctly.
Thanks for the PR!

@myangelkamikaze
myangelkamikaze merged commit 5b74e9a into ElectronicObserverEN:main Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants