api.md: add set Location.event in location skeleton
This commit is contained in:
parent
818e99b39d
commit
2f04b93fdb
|
@ -202,13 +202,14 @@ from BasClasses import Location
|
|||
|
||||
class MyGameLocation(Location):
|
||||
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`.
|
||||
|
||||
**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
|
||||
|
||||
By convention options are defined in `Options.py` and will be used when parsing
|
||||
|
|
Loading…
Reference in New Issue