GenericWorld: implement create_item in case a Spectator ever tries to use !getitem.
This commit is contained in:
parent
ec9ef21cc0
commit
77c18ac819
|
@ -1,6 +1,8 @@
|
||||||
from typing import NamedTuple, Union
|
from typing import NamedTuple, Union
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from BaseClasses import Item
|
||||||
|
|
||||||
from ..AutoWorld import World
|
from ..AutoWorld import World
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +18,12 @@ class GenericWorld(World):
|
||||||
}
|
}
|
||||||
hidden = True
|
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):
|
class PlandoItem(NamedTuple):
|
||||||
item: str
|
item: str
|
||||||
location: str
|
location: str
|
||||||
|
|
Loading…
Reference in New Issue