mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: move multiple Item properties into a single Flag (#638)
This commit is contained in:
@@ -45,7 +45,7 @@ def exclusion_rules(world, player: int, exclude_locations: typing.Set[str]):
|
||||
if loc_name not in world.worlds[player].location_name_to_id:
|
||||
raise Exception(f"Unable to exclude location {loc_name} in player {player}'s world.") from e
|
||||
else:
|
||||
add_item_rule(location, lambda i: not (i.advancement or i.never_exclude))
|
||||
add_item_rule(location, lambda i: not (i.advancement or i.useful))
|
||||
location.progress_type = LocationProgressType.EXCLUDED
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import NamedTuple, Union
|
||||
import logging
|
||||
|
||||
from BaseClasses import Item, Tutorial
|
||||
from BaseClasses import Item, Tutorial, ItemClassification
|
||||
|
||||
from ..AutoWorld import World, WebWorld
|
||||
from NetUtils import SlotType
|
||||
@@ -46,7 +46,7 @@ class GenericWorld(World):
|
||||
|
||||
def create_item(self, name: str) -> Item:
|
||||
if name == "Nothing":
|
||||
return Item(name, False, -1, self.player)
|
||||
return Item(name, ItemClassification.filler, -1, self.player)
|
||||
raise KeyError(name)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user