diff --git a/cooperative_cuisine/counters.py b/cooperative_cuisine/counters.py index 04ee69c6825214f50081f9b7993d94c80cab99fa..2853e59eafc010736fa7ed2938d5a6bbe4d7cec9 100644 --- a/cooperative_cuisine/counters.py +++ b/cooperative_cuisine/counters.py @@ -181,7 +181,6 @@ class Counter: Args: item: The item for which to check, if it can be placed on the counter. - player: The player name that tries to drop something on the counter. Returns: True if the item can be placed on the counter, False if not. @@ -194,7 +193,7 @@ class Counter: Args: item: The item to be placed on the counter. - + player: The player name that tries to drop something on the counter. Returns: Item or None what should be put back on the players hand, e.g., the cooking equipment. @@ -232,8 +231,9 @@ class Counter: if not successful: self._do_single_tool_interaction(passed_time, tool, self) + @staticmethod def _do_single_tool_interaction( - self, passed_time: timedelta, tool: Item, target: Item | Counter + passed_time: timedelta, tool: Item, target: Item | Counter ) -> bool: suitable_effects = [ e for e in target.active_effects if e.name in tool.item_info.needs diff --git a/cooperative_cuisine/utils.py b/cooperative_cuisine/utils.py index 7d57d5c6156ee247749d5f4ac29edecc6749a53e..d6e0bfdb341d1686cc99a2fb94d8b04e6952745a 100644 --- a/cooperative_cuisine/utils.py +++ b/cooperative_cuisine/utils.py @@ -191,9 +191,8 @@ def setup_logging(enable_websocket_logging=False): def url_and_port_arguments( parser, server_name="game server", default_study_port=8080, default_game_port=8000 ): - # TODO follow cli args standards: https://askubuntu.com/questions/711702/when-are-command-options-prefixed-with-two-hyphens parser.add_argument( - "-study", + "-s", "--study-url", "--study-host", type=str, @@ -208,7 +207,7 @@ def url_and_port_arguments( help=f"Port number for the {server_name}", ) parser.add_argument( - "-game", + "-g", "--game-url", "--game-host", type=str,