take and pick up now work the same

This commit is contained in:
Joe S 2021-02-26 22:53:22 -05:00
parent 5c97859f4c
commit 752977aa94
2 changed files with 6 additions and 5 deletions

View File

@ -85,11 +85,12 @@ class Handler(npyscreen.ButtonPress):
self.parent.parentApp.log.error('Could not handle {0}, {1}'.format(command, arguments))
self.parent.update_log("You must specify something to look at.")
elif command == 'PICK':
elif command in ['PICK', 'TAKE']:
try:
if arguments[0] == 'UP':
if len(
arguments) <= 2: # If there are only 2 args ex:up, item then we dont need to merge that last arg
if arguments[0] == 'UP' or command in ['TAKE']:
if command in ['TAKE']:
arguments = ['UP'] + arguments # This is a messy way to fix take logic vs pick up logic but it works.
if len(arguments) <= 2: # If there are only 2 args ex:up, item then we dont need to merge that last arg
try:
# Argument[1] is the "thing" you want to pick up, yaml is lowercase so we lowercase it.
self.parent.parentApp.log.info('Player tried to pick up {0}'.format(arguments[1]))

View File

@ -14,7 +14,7 @@ room:
look_at: "Its a door, it leads to your office. You should try to |OPEN| it."
inspect: "Its ornate but basic, this side of the door has your name on a |plaque|."
plaque:
item_name: "Plaque"
item_name: "Office Door Plaque"
look_at: "Its a small brass plate, it has your name on it."
inspect: "Its still a small brass plate, and it has your name on it. Beyond that its nothing special."
pick_up: "You tear off the *PLAQUE*, and now you're stuck with it i guess."