stash.py 743B

123456789101112131415161718192021222324252627282930313233
  1. # coding: utf-8
  2. import typing
  3. from synergine2.config import Config
  4. from opencombat.strategy.unit.model import TeamModel
  5. from opencombat.xml import XmlValidator
  6. class TeamStash(object):
  7. def __init__(
  8. self,
  9. config: Config,
  10. teams_file_path: str,
  11. ) -> None:
  12. self._config = config
  13. self._teams = None # typing.List[TeamModel]
  14. schema_file_path = self._config.get(
  15. 'global.teams_schema',
  16. 'opencombat/strategy/teams.xsd',
  17. )
  18. self._xml_validator = XmlValidator(
  19. config,
  20. schema_file_path,
  21. )
  22. def get_teams(self) -> typing.List[TeamModel]:
  23. pass
  24. def get_team(self, unit_id: str) -> TeamModel:
  25. pass