Provide method for characters to be unable to engage in encounter
This commit is contained in:
parent
df7eb9f31f
commit
c013b7d800
|
@ -188,8 +188,8 @@ class CmdEngage(Command):
|
||||||
target = self.caller.search(self.args)
|
target = self.caller.search(self.args)
|
||||||
if not target:
|
if not target:
|
||||||
return
|
return
|
||||||
if not inherits_from(target, typeclasses.characters.Character):
|
if not inherits_from(target, typeclasses.characters.Character) or not target.access(self.caller, 'engage'):
|
||||||
self.caller.msg(target.db.engage_err_msg or "You can't initiate an encounter with that.")
|
self.caller.msg(target.db.engage_err_msg or f"You can't initiate an encounter with {target.name}.")
|
||||||
return
|
return
|
||||||
if target == self.caller:
|
if target == self.caller:
|
||||||
self.caller.msg("You can't initiate an encounter with yourself!")
|
self.caller.msg("You can't initiate an encounter with yourself!")
|
||||||
|
|
Loading…
Reference in New Issue