mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
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:
@@ -1,11 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TypeVar, Generic, Dict, Collection
|
||||
import typing
|
||||
from typing import Dict, Collection
|
||||
|
||||
from ..content.game_content import StardewContent
|
||||
from ..options import StardewValleyOptions
|
||||
from ..stardew_rule import StardewRule
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from .logic import StardewLogic
|
||||
|
||||
|
||||
class LogicRegistry:
|
||||
|
||||
@@ -30,18 +34,16 @@ class BaseLogicMixin:
|
||||
pass
|
||||
|
||||
|
||||
T = TypeVar("T", bound=BaseLogicMixin)
|
||||
|
||||
|
||||
class BaseLogic(BaseLogicMixin, Generic[T]):
|
||||
class BaseLogic(BaseLogicMixin):
|
||||
player: int
|
||||
registry: LogicRegistry
|
||||
options: StardewValleyOptions
|
||||
content: StardewContent
|
||||
regions: Collection[str]
|
||||
logic: T
|
||||
logic: StardewLogic
|
||||
|
||||
def __init__(self, player: int, registry: LogicRegistry, options: StardewValleyOptions, content: StardewContent, regions: Collection[str], logic: T):
|
||||
def __init__(self, player: int, registry: LogicRegistry, options: StardewValleyOptions, content: StardewContent, regions: Collection[str],
|
||||
logic: StardewLogic):
|
||||
super().__init__(player, registry, options, content, regions, logic)
|
||||
self.player = player
|
||||
self.registry = registry
|
||||
|
Reference in New Issue
Block a user