1
0
Fork 0

organize systems and actions

This commit is contained in:
Sean Sube 2024-05-18 17:48:24 -05:00
parent 36f29dcffa
commit 13dfc3e240
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
20 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,6 @@ class FormatPerspective(Enum):
THIRD_PERSON = "third-person" THIRD_PERSON = "third-person"
# TODO: remove the attributes parameter from all of these
class SystemFormat(Protocol): class SystemFormat(Protocol):
def __call__( def __call__(
self, self,
@ -59,6 +58,7 @@ class GameSystem:
return f"GameSystem(format={format_callable(self.format)}, generate={format_callable(self.generate)}, simulate={format_callable(self.simulate)})" return f"GameSystem(format={format_callable(self.format)}, generate={format_callable(self.generate)}, simulate={format_callable(self.simulate)})"
# TODO: move to utils
def format_callable(fn: Callable | None) -> str: def format_callable(fn: Callable | None) -> str:
if fn: if fn:
return f"{fn.__module__}:{fn.__name__}" return f"{fn.__module__}:{fn.__name__}"

View File

@ -273,7 +273,7 @@ def main():
extra_actions = [] extra_actions = []
if args.optional_actions: if args.optional_actions:
logger.info("loading optional actions") logger.info("loading optional actions")
from adventure.optional_actions import init as init_optional_actions from adventure.actions.optional import init as init_optional_actions
optional_actions = init_optional_actions() optional_actions = init_optional_actions()
logger.info( logger.info(

View File

@ -8,7 +8,7 @@ from packit.results import multi_function_or_str_result
from packit.toolbox import Toolbox from packit.toolbox import Toolbox
from packit.utils import could_be_json from packit.utils import could_be_json
from adventure.actions import ( from adventure.actions.base import (
action_ask, action_ask,
action_give, action_give,
action_look, action_look,