Core: Allow PlandoItems to be pickled (#5335)

* Add Options.PlandoItem

* Remove worlds.generic.PlandoItem handling

* Add plando pickling test

* Revert old PlandoItem cleanup

* Deprecate old PlandoItem

* Change to warning message

* Use deprecated decorator
This commit is contained in:
Duck
2025-10-16 19:20:34 -06:00
committed by GitHub
parent f756919dd9
commit 0718ada682
3 changed files with 27 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
from typing import NamedTuple, Union
from typing_extensions import deprecated
import logging
from BaseClasses import Item, Tutorial, ItemClassification
@@ -49,7 +50,8 @@ class GenericWorld(World):
return Item(name, ItemClassification.filler, -1, self.player)
raise InvalidItemError(name)
@deprecated("worlds.generic.PlandoItem is deprecated and will be removed in the next version. "
"Use Options.PlandoItem(s) instead.")
class PlandoItem(NamedTuple):
item: str
location: str