mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 04:27:16 +02:00
Added a convenience property player.character that will return the (puppeted) Object if in MULTISESSION_MODE 0 or 1, all puppeted Objects for MULTISESSION_MODE=2. Note that this is not quite the same as the old player.character - it will only return a character if that character is actually puppeted (the old scheme returned it also if the Player was offline).
This commit is contained in:
parent
be2d0086a3
commit
ea4c30a0b1
2 changed files with 14 additions and 2 deletions
|
|
@ -187,8 +187,8 @@ class MuxCommandOOC(MuxCommand):
|
|||
# caller is an Object/Character
|
||||
self.character = self.caller
|
||||
self.caller = self.caller.player
|
||||
elif hasattr(self.caller, "character"):
|
||||
elif utils.inherits_from(self.caller, "src.players.players.Player"):
|
||||
# caller was already a Player
|
||||
self.character = self.caller.get_character(sessid=self.sessid)
|
||||
self.character = self.caller.get_puppet(self.sessid)
|
||||
else:
|
||||
self.character = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue