"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"),),
TA_ID 3
TA_EFFORT 15
-TA_NAME pick_up
+TA_NAME pickup
TA_ID 4
TA_EFFORT 5
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.
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:
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
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
if not len(ids):
log("NOTHING to pick up.")
else:
- set_command("pick_up")
+ set_command("pickup")
def play_drop(str_arg):
# 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
}
"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)