From 9520e261d85d9b7e853b080480be9d7df283687b Mon Sep 17 00:00:00 2001 From: Griatch Date: Mon, 25 Apr 2011 20:31:50 +0000 Subject: [PATCH] Cleaned up @set to list attributes on an object and also to show attribute values without parsing their markup. --- src/commands/default/building.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands/default/building.py b/src/commands/default/building.py index f214afe4a4..755fd4fec8 100644 --- a/src/commands/default/building.py +++ b/src/commands/default/building.py @@ -1143,11 +1143,16 @@ class CmdSetAttribute(ObjManipCommand): if not value: if self.rhs == None: # no = means we inspect the attribute(s) + if not attrs: + attrs = [attr.key for attr in obj.get_all_attributes()] for attr in attrs: if obj.has_attribute(attr): string += "\nAttribute %s/%s = %s" % (obj.name, attr, obj.get_attribute(attr)) else: string += "\n%s has no attribute '%s'." % (obj.name, attr) + # we view it without parsing markup. + self.caller.msg(string.strip(), data={"raw":True}) + return else: # deleting the attribute(s) for attr in attrs: