You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Make TechnologyFrontier#addAdvance idempotent (#14718)
* Fix IllegalStateException in TechnologyFrontier#removeAdvance
Make removeAdvance idempotent instead of throwing when the advance
is already absent. This can legitimately happen when multiple map
triggers attempt to remove the same tech in the same event, as seen
in the invasion_usa map (issue #14635).
* Make TechnologyFrontier#addAdvance idempotent
Follow-up to #14684. Applies the same idempotent pattern to addAdvance
that was used for removeAdvance, so that adding a TechAdvance that's
already present is a safe no-op instead of creating duplicate entries
in the techs list.
---------
Co-authored-by: frigoref <frigoref@web.de>