mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Stardew Valley: Remove some events for a slight performance increase (#4085)
This commit is contained in:
@@ -11,7 +11,6 @@ from ..locations import LocationTags, locations_by_tag
|
||||
from ..options import ExcludeGingerIsland, Shipsanity
|
||||
from ..options import SpecialOrderLocations
|
||||
from ..stardew_rule import StardewRule
|
||||
from ..strings.ap_names.event_names import Event
|
||||
from ..strings.building_names import Building
|
||||
|
||||
|
||||
@@ -29,7 +28,7 @@ class ShippingLogic(BaseLogic[Union[ReceivedLogicMixin, ShippingLogicMixin, Buil
|
||||
|
||||
@cache_self1
|
||||
def can_ship(self, item: str) -> StardewRule:
|
||||
return self.logic.received(Event.can_ship_items) & self.logic.has(item)
|
||||
return self.logic.shipping.can_use_shipping_bin & self.logic.has(item)
|
||||
|
||||
def can_ship_everything(self) -> StardewRule:
|
||||
shipsanity_prefix = "Shipsanity: "
|
||||
@@ -49,7 +48,7 @@ class ShippingLogic(BaseLogic[Union[ReceivedLogicMixin, ShippingLogicMixin, Buil
|
||||
|
||||
def can_ship_everything_in_slot(self, all_location_names_in_slot: List[str]) -> StardewRule:
|
||||
if self.options.shipsanity == Shipsanity.option_none:
|
||||
return self.can_ship_everything()
|
||||
return self.logic.shipping.can_ship_everything()
|
||||
|
||||
rules = [self.logic.building.has_building(Building.shipping_bin)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user