Skip to content

Commit

Permalink
Docs: clean up create_item/event example (#4596)
Browse files Browse the repository at this point in the history
* eyes

* remove line wraps where unnecessary
  • Loading branch information
qwint authored Feb 12, 2025
1 parent f1769a8 commit b2162bb
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions docs/world api.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,17 +562,13 @@ from .items import is_progression # this is just a dummy

def create_item(self, item: str) -> MyGameItem:
# this is called when AP wants to create an item by name (for plando) or when you call it from your own code
classification = ItemClassification.progression if is_progression(item) else
ItemClassification.filler


return MyGameItem(item, classification, self.item_name_to_id[item],
self.player)
classification = ItemClassification.progression if is_progression(item) else ItemClassification.filler
return MyGameItem(item, classification, self.item_name_to_id[item], self.player)


def create_event(self, event: str) -> MyGameItem:
# while we are at it, we can also add a helper to create events
return MyGameItem(event, True, None, self.player)
return MyGameItem(event, ItemClassification.progression, None, self.player)
```

#### create_items
Expand Down

0 comments on commit b2162bb

Please sign in to comment.