Fixed some issues with the _superuser_character bypass as well as the is_superuser property on objects. Also fixed a bug with @examine that caused it to display object Attribute instead of Player Attributes when called from the ooc state.
This commit is contained in:
parent
7a8e53b3bd
commit
77a0b47859
3 changed files with 11 additions and 8 deletions
|
|
@ -1547,6 +1547,7 @@ class CmdExamine(ObjManipCommand):
|
|||
else:
|
||||
if self.player_mode:
|
||||
db_attr = [(attr.key, attr.value) for attr in PlayerAttribute.objects.filter(db_obj=obj)]
|
||||
print "player mode:", db_attr
|
||||
else:
|
||||
db_attr = [(attr.key, attr.value) for attr in ObjAttribute.objects.filter(db_obj=obj)]
|
||||
try:
|
||||
|
|
@ -1683,10 +1684,14 @@ class CmdExamine(ObjManipCommand):
|
|||
obj_name = objdef['name']
|
||||
obj_attrs = objdef['attrs']
|
||||
|
||||
|
||||
self.player_mode = "player" in self.switches or obj_name.startswith('*')
|
||||
self.player_mode = utils.inherits_from(caller, "src.players.player.Player") or \
|
||||
"player" in self.switches or obj_name.startswith('*')
|
||||
if self.player_mode:
|
||||
obj = caller.search_player(obj_name.lstrip('*'))
|
||||
try:
|
||||
obj = caller.search_player(obj_name.lstrip('*'))
|
||||
except AttributeError:
|
||||
# this means we are calling examine from a player object
|
||||
obj = caller.search(obj_name.lstrip('*'))
|
||||
else:
|
||||
obj = caller.search(obj_name)
|
||||
if not obj:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue