mirror of
https://github.com/MikuLeaks/KianaBH3.git
synced 2025-12-16 06:44:41 +01:00
Initial commit
This commit is contained in:
15
game_server/resource/base_resource.py
Normal file
15
game_server/resource/base_resource.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from dataclasses import dataclass
|
||||
from typing import TypeVar
|
||||
|
||||
T = TypeVar("T", bound="BaseResource")
|
||||
|
||||
@dataclass
|
||||
class BaseResource(ABC):
|
||||
def on_load(self: T) -> bool:
|
||||
"""returns True by default if item loaded, otherwise will be skipped"""
|
||||
return True
|
||||
|
||||
@abstractmethod
|
||||
def get_index(self) -> str:
|
||||
pass
|
||||
Reference in New Issue
Block a user