Skip to content

Commit

Permalink
tested cache_self1, does not help
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouramie committed Dec 1, 2024
1 parent 99eb040 commit caa58e7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion worlds/stardew_valley/logic/animal_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def __init__(self, *args, **kwargs):

class AnimalLogic(BaseLogic[Union[AnimalLogicMixin, HasLogicMixin, BuildingLogicMixin, 'SourceLogicMixin']]):

# TODO test speed with @cache_self1
def can_incubate(self, egg_item: str) -> StardewRule:
return self.logic.building.has_building(Building.coop) & self.logic.has(egg_item)

Expand Down
3 changes: 2 additions & 1 deletion worlds/stardew_valley/logic/festival_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ def can_succeed_grange_display(self) -> StardewRule:
if self.options.festival_locations != FestivalLocations.option_hard:
return self.logic.true_

good_animal_products = [ # Other animal products are not counted in the animal product category
# Other animal products are not counted in the animal product category
good_animal_products = [
AnimalProduct.duck_egg, AnimalProduct.duck_feather, AnimalProduct.egg, AnimalProduct.goat_milk, AnimalProduct.golden_egg, AnimalProduct.large_egg,
AnimalProduct.large_goat_milk, AnimalProduct.large_milk, AnimalProduct.milk, AnimalProduct.ostrich_egg, AnimalProduct.rabbit_foot,
AnimalProduct.void_egg, AnimalProduct.wool
Expand Down
4 changes: 2 additions & 2 deletions worlds/stardew_valley/test/assertion/rule_assert.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from unittest import TestCase

from BaseClasses import CollectionState, Location
from ...stardew_rule import StardewRule, false_, Reach
from ...stardew_rule import StardewRule, false_, MISSING_ITEM, Reach
from ...stardew_rule.rule_explain import explain


Expand Down Expand Up @@ -34,7 +34,7 @@ def assert_rules_false(self, rules: List[StardewRule], state: CollectionState):
def assert_rule_can_be_resolved(self, rule: StardewRule, complete_state: CollectionState):
expl = explain(rule, complete_state)
try:
# self.assertNotIn(MISSING_ITEM, repr(rule))
self.assertNotIn(MISSING_ITEM, repr(rule))
self.assertTrue(rule is false_ or rule(complete_state), expl)
except KeyError as e:
raise AssertionError(f"Error while checking rule {rule}: {e}"
Expand Down

0 comments on commit caa58e7

Please sign in to comment.