Page MenuHomeWildfire Games

Fix victory conditions loading (fixes Hero Garrison in regicide crashloop).
ClosedPublic

Authored by wraitii on Oct 2 2022, 12:38 PM.

Details

Summary

There is an issue in A26 gamesetup, where selecting Regicide + Hero Garrison fails in gamesetup.
The problem is that the VictoryConditions.js gamesetting sends multiple updates to active and disabled, instead of just one single update at the end. Thus regicide is first disabled, thus HeroGarrison is deactivated, and then tries to be reactivated from the init attributes, and then disabled again later.

There are multiple fixes in theory:

  • Fixing RegicideGarrison to remember the 'indented' setting and compute enabled dynamically based on that.
  • Triggering Observable hooks later (using e.g. promises) and deduplicating events so that only the latest version gets sent (probably a good idea but needs more work).
  • FixingVictoryConditions to send 'complete' updates. This fixes potential similar bugs elsewhere, and improves performance (negligible).

This diff implements the latter.

Test Plan

Open single player, tick regicide, tick Hero Garrison, go back, re-open GameSetup, notice that it no longer fails.

Event Timeline

wraitii created this revision.Oct 2 2022, 12:38 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/7494/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/6402/display/redirect

wraitii published this revision for review.Oct 2 2022, 1:14 PM
This revision was not accepted when it landed; it landed in state Needs Review.Oct 8 2022, 2:46 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.