Fix fleet and battle messages when planets or moons are destroyed - #1494
Fix fleet and battle messages when planets or moons are destroyed#1494tiweb442 wants to merge 3 commits into
Conversation
Use coordinate/debris fallbacks instead of empty [planet] tags when planet IDs are missing, redirect active return missions to the parent planet before moon deletion, and snapshot attacker origin data in battle reports. Fixes lanedirt#1341 Co-authored-by: Cursor <cursoragent@cursor.com>
Related PRs from tiweb442 (same deployment / review batch)
What this fixes: Fleet messages no longer emit broken Merge order: Independent of #1491–#1493. Touches |
|
Ready for maintainer review — preview is live and mergeable with @lanedirt @jackbayliss Could you review when you have a moment? Fork PRs may also need “Approve and run workflows” so Pint / PHPStan / Docker tests run (currently only PR Preview has completed). Test on preview: https://pr-1494.preview.ogamex.dev |
Use int|null for PHPStan noShortNullableType, and assign FleetMission attributes directly in unit tests to avoid mass-assignment exceptions. Co-authored-by: Cursor <cursoragent@cursor.com>
|
CI fixes pushed:
|
Keep FleetMissionPlanetFormatter for destroyed planet/moon message tags while using main's null-safe player variables for message recipients. Co-authored-by: Cursor <cursoragent@cursor.com>
Preview deploymentPreview environment for this PR is ready for functional testing. Use one of the test accounts below to log in.
Test accounts (click to expand)
This preview will be automatically destroyed when the PR is closed. |
Summary
FleetMissionPlanetFormatterto emit[planet],[coordinates], or[debrisfield]tags so fleet messages never store broken[planet][/planet]placeholders when a body was deletedFixes #1341
Test plan
./vendor/bin/phpunit tests/Unit/FleetMissionPlanetFormatterTest.phpMade with Cursor