+ cmd_GEN_WORLD.argtypes = 'string:geometry yx_tuple:pos string'
+
+ def get_command_signature(self, command_name):
+ from functools import partial
+
+ def cmd_TASK_colon(task_name, *args):
+ self.world.get_player().set_task(task_name, args)
+ self.proceed()
+
+ method = None
+ argtypes = ''
+ task_prefix = 'TASK:'
+ if command_name[:len(task_prefix)] == task_prefix:
+ task_name = command_name[len(task_prefix):]
+ task_method_candidate = 'task_' + task_name
+ if hasattr(Thing, task_method_candidate):
+ method = partial(cmd_TASK_colon, task_name)
+ task_method = getattr(Thing, task_method_candidate)
+ if hasattr(task_method, 'argtypes'):
+ argtypes = task_method.argtypes
+ return method, argtypes
+ method_candidate = 'cmd_' + command_name
+ if hasattr(self, method_candidate):
+ method = getattr(self, method_candidate)
+ if hasattr(method, 'argtypes'):
+ argtypes = method.argtypes
+ return method, argtypes
+
+ def get_string_options(self, string_option_type):
+ if string_option_type == 'geometry':
+ return self.map_manager.get_map_geometries()
+ elif string_option_type == 'direction':
+ return self.world.map_.get_directions()
+ return None