diff --git a/commands/everyone.py b/commands/everyone.py index a4acc3f..f2b7478 100755 --- a/commands/everyone.py +++ b/commands/everyone.py @@ -4,7 +4,7 @@ from random import random from re import split from commands.command import Command -from evennia.commands.default.general import NumberedTargetCommand +from evennia.commands.default.general import CmdGet, NumberedTargetCommand from evennia.commands.default.muxcommand import MuxCommand from evennia.contrib.rpg.rpsystem import send_emote from evennia.utils import iter_to_str, logger @@ -94,7 +94,7 @@ class CmdSay(MuxCommand): Usage: say phrase - say/to char1, [char2 ...] = phrase + say/to char1 [, char2 ...] = phrase say[/switches] phrase Where switches can be any of the following: @@ -313,19 +313,18 @@ class CmdRead(Command): self.caller.msg(book.db.inside) -class CmdTake(Command, NumberedTargetCommand): +class CmdTake(CmdGet, NumberedTargetCommand): """ - Take an object from another character or NPC. + Get something, possibly from another character or NPC. Usage: - take from + get [ from ] Note that only some things can be stolen. For instance, the brass ring from the door knocker. """ - key = "take" - aliases = ["steal"] + aliases = ["steal", "get"] rhs_split = ("=", " from ") def func(self): @@ -336,9 +335,15 @@ class CmdTake(Command, NumberedTargetCommand): operate only on self.obj. """ if not self.args: - self.caller.msg("What do you want to take?") + self.caller.msg("What do you want to get?") elif not self.rhs: - self.caller.msg(f"You want to take {self.lhs}, but from whom?") + # This is soo bad to hard-code this game logic, but enough + # people complained about not being able to 'get' the + # ring, I need to: + if self.lhs == "ring" and self.caller.location.key == "Grotto": + self.caller.msg("From whom do you want to get this ring?") + else: + super().func() # Call the 'get' function instead. else: self.caller.do_take(self.lhs, self.rhs)