mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 16:26:30 +01:00
Cleaned up @set to list attributes on an object and also to show attribute values without parsing their markup.
This commit is contained in:
parent
9c5f662196
commit
9520e261d8
1 changed files with 5 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue