From: Christian Heller Date: Fri, 19 Feb 2016 11:25:47 +0000 (+0100) Subject: Consistent use of "pickup" instead of "pickup" as command name. X-Git-Tag: tce~200 X-Git-Url: https://plomlompom.com/repos/balance?a=commitdiff_plain;h=009f06a7a2baef5af4474b18fd75b19c05befb4f;p=plomrogue Consistent use of "pickup" instead of "pickup" as command name. --- diff --git a/client/config/commands.py b/client/config/commands.py index b791947..e76d191 100644 --- a/client/config/commands.py +++ b/client/config/commands.py @@ -13,7 +13,7 @@ commands = { "D": (command_sender("drop", "inventory_selection"),), "J": (command_look_scroller("down"),), "K": (command_look_scroller("up"),), - "P": (command_sender("pick_up"),), + "P": (command_sender("pickup"),), "Q": (command_quit,), "U": (command_sender("use", "inventory_selection"),), "W": (command_sender("wait"),), diff --git a/confserver/world b/confserver/world index 639dd71..325899d 100644 --- a/confserver/world +++ b/confserver/world @@ -11,7 +11,7 @@ TA_NAME move TA_ID 3 TA_EFFORT 15 -TA_NAME pick_up +TA_NAME pickup TA_ID 4 TA_EFFORT 5 diff --git a/server/actions.py b/server/actions.py index 1c83581..537dcb1 100644 --- a/server/actions.py +++ b/server/actions.py @@ -53,7 +53,7 @@ def actor_move(t): log("You MOVE " + dir + ".") -def actor_pick_up(t): +def actor_pickup(t): """Make t pick up (topmost?) Thing from ground into inventory. Define topmostness by how low the thing's type ID is. diff --git a/server/ai.py b/server/ai.py index ed65fbd..21241fc 100644 --- a/server/ai.py +++ b/server/ai.py @@ -285,7 +285,7 @@ def ai(t): elif standing_on_food(t): t["T_COMMAND"] = [id for id in world_db["ThingActions"] if world_db["ThingActions"][id]["TA_NAME"] - == "pick_up"][0] + == "pickup"][0] else: going_to_known_food_spot = get_dir_to_target(t, "c") if not going_to_known_food_spot: diff --git a/server/commands.py b/server/commands.py index c17635e..346661a 100644 --- a/server/commands.py +++ b/server/commands.py @@ -305,7 +305,7 @@ def command_taname(name): setting no ThingAction with name "wait" remains, call set_world_inactive(). """ if name == "wait" or name == "move" or name == "use" or name == "drop" \ - or name == "pick_up": + or name == "pickup": world_db["ThingActions"][command_taid.id]["TA_NAME"] = name if 1 == world_db["WORLD_ACTIVE"]: wait_defined = False @@ -436,7 +436,7 @@ def action_exists(action): def play_pickup(): - """Try "pick_up" as player's T_COMMAND".""" + """Try "pickup" as player's T_COMMAND".""" if action_exists("pickup"): t = world_db["Things"][0] ids = [id for id in world_db["Things"] if id @@ -446,7 +446,7 @@ def play_pickup(): if not len(ids): log("NOTHING to pick up.") else: - set_command("pick_up") + set_command("pickup") def play_drop(str_arg): diff --git a/server/config/actions.py b/server/config/actions.py index 0971c12..3e10f32 100644 --- a/server/config/actions.py +++ b/server/config/actions.py @@ -3,13 +3,13 @@ # see the file NOTICE in the root directory of the PlomRogue source package. -from server.actions import actor_wait, actor_move, actor_pick_up, actor_drop, \ +from server.actions import actor_wait, actor_move, actor_pickup, actor_drop, \ actor_use action_db = { "actor_wait": actor_wait, "actor_move": actor_move, - "actor_pick_up": actor_pick_up, + "actor_pickup": actor_pickup, "actor_drop": actor_drop, "actor_use": actor_use } diff --git a/server/config/commands.py b/server/config/commands.py index 197f7ee..84ac8e2 100644 --- a/server/config/commands.py +++ b/server/config/commands.py @@ -60,7 +60,7 @@ commands_db = { "T_POSX": (1, False, setter_tpos("X")), "wait": (0, False, play_wait), "move": (1, False, play_move), - "pick_up": (0, False, play_pickup), + "pickup": (0, False, play_pickup), "drop": (1, False, play_drop), "use": (1, False, play_use), "ai": (0, False, command_ai)