WIP location (to be discarded)
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user