mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Remove one user of UNIT_BY_TASK.
This commit is contained in:
12
game/db.py
12
game/db.py
@@ -1331,18 +1331,6 @@ def upgrade_to_supercarrier(unit, name: str):
|
||||
return unit
|
||||
|
||||
|
||||
def unit_task(unit: UnitType) -> Optional[Task]:
|
||||
for task, units in UNIT_BY_TASK.items():
|
||||
if unit in units:
|
||||
return task
|
||||
|
||||
if unit in SAM_CONVERT:
|
||||
return unit_task(SAM_CONVERT[unit])
|
||||
|
||||
print(unit.name + " cause issue")
|
||||
return None
|
||||
|
||||
|
||||
def find_unittype(for_task: Type[MainTask], country_name: str) -> List[Type[UnitType]]:
|
||||
return [x for x in UNIT_BY_TASK[for_task] if x in FACTIONS[country_name].units]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user