Created
January 22, 2018 02:53
-
-
Save lorecrafting/c3f2bd5405b57d081bfdd9f5eaf44e8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CmdLook(COMMAND_DEFAULT_CLASS): | |
""" | |
look at location or object | |
Usage: | |
look | |
look <obj> | |
look *<account> | |
Observes your location or objects in your vicinity. | |
""" | |
key = "look" | |
aliases = ["l", "ls"] | |
locks = "cmd:all()" | |
arg_regex = r"\s|$" | |
def func(self): | |
""" | |
Handle the looking. | |
""" | |
caller = self.caller | |
if not self.args: | |
target = caller.location | |
if not target: | |
caller.msg("You have no location to look at!") | |
return | |
else: | |
target = caller.search(self.args) | |
if not target: | |
return | |
self.msg(caller.at_look(target), {type: 'look'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment