fix badly canceled tie-break series
This commit is contained in:
parent
72f80563f1
commit
b2d545e339
4 changed files with 4 additions and 4 deletions
|
|
@ -60,6 +60,7 @@ class CampaignController:
|
|||
vp_icon_map = RankingIcon.compute_icons(
|
||||
war, ContextType.CAMPAIGN, campaign_id, scores
|
||||
)
|
||||
# TODO get only objectives used in major/minor (ignore token only)
|
||||
for obj in war.get_all_objectives():
|
||||
objective_icon_maps[obj.id] = RankingIcon.compute_icons(
|
||||
war,
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ class CampaignClosureWorkflow(ClosureWorkflow):
|
|||
TieResolver.apply_bids(war, tie, bids)
|
||||
TieResolver.resolve_tie_state(war, tie, bids)
|
||||
ties = TieResolver.find_campaign_ties(war, campaign.id)
|
||||
# TODO get only objectives used in major/minor (ignore token only)
|
||||
for objective_id in war.objectives:
|
||||
ties = TieResolver.find_campaign_objective_ties(
|
||||
war,
|
||||
|
|
@ -76,6 +77,7 @@ class WarClosureWorkflow(ClosureWorkflow):
|
|||
TieResolver.apply_bids(war, tie, bids)
|
||||
TieResolver.resolve_tie_state(war, tie, bids)
|
||||
ties = TieResolver.find_war_ties(war)
|
||||
# TODO get only objectives used in major/minor (ignore token only)
|
||||
for objective_id in war.objectives:
|
||||
ties = TieResolver.find_war_objective_ties(
|
||||
war,
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ class WarController:
|
|||
vp_icon_map = RankingIcon.compute_icons(
|
||||
war, ContextType.WAR, war_id, scores
|
||||
)
|
||||
# TODO get only objectives used in major/minor (ignore token only)
|
||||
for obj in war.get_all_objectives():
|
||||
objective_icon_maps[obj.id] = RankingIcon.compute_icons(
|
||||
war,
|
||||
|
|
@ -185,7 +186,6 @@ class WarController:
|
|||
context_name=f"Objective tie: {objective.name}",
|
||||
)
|
||||
if not dialog.exec():
|
||||
# FIXME lost tokens used for narrative tie-break (ContextType.OBJECTIVE)
|
||||
TieResolver.cancel_tie_break(war, ctx)
|
||||
raise ForbiddenOperation("Tie resolution cancelled")
|
||||
bids_map[ctx.key()] = dialog.get_bids()
|
||||
|
|
|
|||
|
|
@ -276,7 +276,6 @@ class TieResolver:
|
|||
)
|
||||
)
|
||||
|
||||
# FIXME lost tokens used for narrative tie-break (ContextType.OBJECTIVE)
|
||||
@staticmethod
|
||||
def cancel_tie_break(
|
||||
war: War,
|
||||
|
|
@ -295,8 +294,6 @@ class TieResolver:
|
|||
isinstance(ev, TieResolved)
|
||||
and ev.context_type == context.context_type
|
||||
and ev.context_id == context.context_id
|
||||
and ev.score_value == context.score_value
|
||||
and ev.objective_id == context.objective_id
|
||||
)
|
||||
)
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue