mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
GenericWorld: implement create_item in case a Spectator ever tries to use !getitem.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
from typing import NamedTuple, Union
|
||||
import logging
|
||||
|
||||
from BaseClasses import Item
|
||||
|
||||
from ..AutoWorld import World
|
||||
|
||||
|
||||
@@ -16,6 +18,12 @@ class GenericWorld(World):
|
||||
}
|
||||
hidden = True
|
||||
|
||||
def create_item(self, name: str) -> Item:
|
||||
if name == "Nothing":
|
||||
return Item(name, False, -1, self.player)
|
||||
raise KeyError(name)
|
||||
|
||||
|
||||
class PlandoItem(NamedTuple):
|
||||
item: str
|
||||
location: str
|
||||
|
||||
Reference in New Issue
Block a user