WIP location (to be discarded)

This commit is contained in:
GeoffreyCoulaud
2023-05-01 00:30:13 +02:00
parent 524a56ea9a
commit 0abb7d3df9
3 changed files with 71 additions and 40 deletions

View File

@@ -27,16 +27,20 @@ class Source(Iterable):
"""Source of games. Can be a program location on disk with a config file that points to game for example"""
win = None
name: str = "GenericSource"
variant: str = None
schema_keys: dict
# Format to construct the executable command for a game.
# Available field names depend on the implementation
name: str
variant: str
executable_format: str
def __init__(self, win) -> None:
super().__init__()
self.win = win
self.__init_schema_keys__()
def __init_schema_keys__(self):
"""Initialize schema keys needed by the source if necessary"""
raise NotImplementedError()
@property
def full_name(self):
@@ -57,4 +61,9 @@ class Source(Iterable):
def __iter__(self):
"""Get the source's iterator, to use in for loops"""
raise NotImplementedError()
def __init_locations__(self):
"""Initialize locations needed by the source.
Extended and called by **final** children."""
raise NotImplementedError()