File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -886,9 +886,6 @@ def already_pending(self, unit_type: UpgradeId | UnitTypeId) -> float:
886886 """
887887 if isinstance (unit_type , UpgradeId ):
888888 return self .already_pending_upgrade (unit_type )
889- creation_ability = self .game_data .units [unit_type .value ].creation_ability
890- if creation_ability is None :
891- return 0
892889
893890 if unit_type in CREATION_ABILITY_FIX :
894891 # Hotfix for checking pending archons and other abilities
@@ -897,6 +894,10 @@ def already_pending(self, unit_type: UpgradeId | UnitTypeId) -> float:
897894 # Hotfix for rich geysirs
898895 return self ._abilities_count_and_build_progress [0 ][CREATION_ABILITY_FIX [unit_type ]]
899896
897+ creation_ability = self .game_data .units [unit_type .value ].creation_ability
898+ if creation_ability is None :
899+ return 0
900+
900901 creation_ability = self .game_data .units [unit_type .value ].creation_ability
901902 if creation_ability is None :
902903 logger .error (f"Unknown unit_type for already_pending: { unit_type } " )
You can’t perform that action at this time.
0 commit comments