Improve typing

This commit is contained in:
NewSoupVi
2024-06-07 22:10:36 +02:00
parent 3d7f23b26d
commit a3c9fb7b55

View File

@@ -1,7 +1,7 @@
import math
import logging
from BaseClasses import Region, Entrance, Item, Tutorial
from BaseClasses import Region, Entrance, Item, Tutorial, CollectionState
from .Items import YachtDiceItem, item_table, item_groups
from .Locations import YachtDiceLocation, all_locations, ini_locations
from .Options import YachtDiceOptions
@@ -397,14 +397,14 @@ class YachtDiceWorld(World):
item = YachtDiceItem(name, item_data.classification, item_data.code, self.player)
return item
def collect(self, state, item: Item) -> bool:
def collect(self, state: CollectionState, item: Item) -> bool:
change = super().collect(state, item)
if change and item.advancement:
state.prog_items[self.player]["state_is_fresh"] = 0
return change
def remove(self, state, item: Item) -> bool:
def remove(self, state: CollectionState, item: Item) -> bool:
change = super().remove(state, item)
if change and item.advancement:
state.prog_items[self.player]["state_is_fresh"] = 0