Fix building DM halve showing Halve again after first use (#1331)#1496
Fix building DM halve showing Halve again after first use (#1331)#1496tiweb442 wants to merge 3 commits into
Conversation
|
Tested on production at https://space.tiweb-host.com — deployed locally for validation. Cross-ref tiweb442/OGameX branches. |
Geda173
left a comment
There was a problem hiding this comment.
I went through this end to end and it holds up well. It faithfully mirrors the existing shipyard halve→complete flow: the new dm_halved/dm_completed columns, the double-halve guard, and the completeBuilding service/endpoint/route are structurally the same as halveUnit/completeUnit, right down to the Complete-button blade logic. I traced the view wiring (dm_halved → BuildingQueueViewModel → active item → $build_active->dm_halved) and the button switches correctly.
Nice touch: changing the displayed cost from time_total to time_countdown actually fixes a pre-existing mismatch. The cost is charged on remaining time, so the old display over-stated it. Now what's shown matches what's charged.
One thing before merge: this branch needs a rebase and some manual merge conflict resolution. Once that is out of the way we should be good to go.
Align HalvingIntegrationTest with one-halve-then-complete behavior so CI no longer expects a second building halve to succeed. Co-authored-by: Cursor <cursoragent@cursor.com>
456eec9 to
9cb5ed1
Compare
|
Rebased onto latest Also fixed the CI failure in |
Satisfy PHPStan level 8 nullability checks after the rebase onto main. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Follow-up: fixed PHPStan level-8 nullability in the new building DM unit tests by switching |
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
dm_halved/dm_completedto building queues (mirrors shipyard)completeBuildingendpoint and testsFixes #1331
Test plan
Made with Cursor