mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
api.md: add set Location.event in location skeleton
This commit is contained in:
@@ -202,13 +202,14 @@ from BasClasses import Location
|
|||||||
|
|
||||||
class MyGameLocation(Location):
|
class MyGameLocation(Location):
|
||||||
game: str = "My Game"
|
game: str = "My Game"
|
||||||
|
|
||||||
|
# override constructor to automatically mark event locations as such
|
||||||
|
def __init__(self, player: int, name = '', code = None, parent = None):
|
||||||
|
super(MyGameLocation, self).__init__(player, name, code, parent)
|
||||||
|
self.event = code is None
|
||||||
```
|
```
|
||||||
in your `__init__.py` or your `Locations.py`.
|
in your `__init__.py` or your `Locations.py`.
|
||||||
|
|
||||||
**FIXME**: Is setting Location.event actually required? Minecraft and OoT
|
|
||||||
do that. Factorio does not. What's the goal of doing that? When factorio places
|
|
||||||
a locked item this will do Location.event = item.advancement.
|
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
By convention options are defined in `Options.py` and will be used when parsing
|
By convention options are defined in `Options.py` and will be used when parsing
|
||||||
|
|||||||
Reference in New Issue
Block a user