Stardew Valley: remove BaseLogic generic so importing mixins is no longer needed (#4916)

* remove BaseLogic generic so importing mixins is no longer needed

* self review
This commit is contained in:
Jérémie Bolduc
2025-04-23 11:31:08 -04:00
committed by GitHub
parent 57d3c52df9
commit bad6a4b211
50 changed files with 70 additions and 417 deletions

View File

@@ -6,11 +6,6 @@ from ..strings.building_names import Building
from ..strings.forageable_names import Forageable
from ..strings.machine_names import Machine
if typing.TYPE_CHECKING:
from .logic import StardewLogic
else:
StardewLogic = object
class AnimalLogicMixin(BaseLogicMixin):
def __init__(self, *args, **kwargs):
@@ -18,7 +13,7 @@ class AnimalLogicMixin(BaseLogicMixin):
self.animal = AnimalLogic(*args, **kwargs)
class AnimalLogic(BaseLogic[StardewLogic]):
class AnimalLogic(BaseLogic):
def can_incubate(self, egg_item: str) -> StardewRule:
return self.logic.building.has_building(Building.coop) & self.logic.has(egg_item)