- from server.config.world_data import directions_db
- t = world_db["Things"][0]
- if not str_arg in directions_db:
- print("Illegal move direction string.")
- return
- dir = ord(directions_db[str_arg])
- from server.utils import mv_yx_in_dir_legal
- move_result = mv_yx_in_dir_legal(chr(dir), t["T_POSY"], t["T_POSX"])
- if 1 == move_result[0]:
- pos = (move_result[1] * world_db["MAP_LENGTH"]) + move_result[2]
- if ord(".") == world_db["MAP"][pos]:
- world_db["Things"][0]["T_ARGUMENT"] = dir
- set_command("move")
+ if action_exists("move"):
+ from server.config.world_data import directions_db
+ t = world_db["Things"][0]
+ if not str_arg in directions_db:
+ print("Illegal move direction string.")