mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
More adaptation for pydcs updates.
This is as much as we can do until pydcs actually adds the py.typed file. Once that's added there are a few ugly monkey patching corners that will just need `# type: ignore` for now, but we can't pre-add those since we have mypy warning us about superfluous ignore comments.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import random
|
||||
import time
|
||||
from typing import List
|
||||
from typing import List, Any
|
||||
|
||||
from dcs.country import Country
|
||||
from dcs.unittype import UnitType as DcsUnitType
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.dcs.unittype import UnitType
|
||||
@@ -297,7 +296,7 @@ class NameGenerator:
|
||||
|
||||
@classmethod
|
||||
def next_unit_name(
|
||||
cls, country: Country, parent_base_id: int, unit_type: UnitType[DcsUnitType]
|
||||
cls, country: Country, parent_base_id: int, unit_type: UnitType[Any]
|
||||
) -> str:
|
||||
cls.number += 1
|
||||
return "unit|{}|{}|{}|{}|".format(
|
||||
@@ -306,7 +305,7 @@ class NameGenerator:
|
||||
|
||||
@classmethod
|
||||
def next_infantry_name(
|
||||
cls, country: Country, parent_base_id: int, unit_type: UnitType[DcsUnitType]
|
||||
cls, country: Country, parent_base_id: int, unit_type: UnitType[Any]
|
||||
) -> str:
|
||||
cls.infantry_number += 1
|
||||
return "infantry|{}|{}|{}|{}|".format(
|
||||
|
||||
Reference in New Issue
Block a user