Make the lock command force-update Exits to handle cmd-type locks without a reload; as per #1142.
This commit is contained in:
parent
b57b807da6
commit
99c4042fbc
1 changed files with 6 additions and 1 deletions
|
|
@ -1820,6 +1820,11 @@ class CmdLock(ObjManipCommand):
|
||||||
ok = obj.locks.add(lockdef)
|
ok = obj.locks.add(lockdef)
|
||||||
except LockException as e:
|
except LockException as e:
|
||||||
caller.msg(str(e))
|
caller.msg(str(e))
|
||||||
|
if "cmd" in lockdef.lower() and \
|
||||||
|
inherits_from(obj, "evennia.objects.objects.DefaultExit"):
|
||||||
|
# special fix to update Exits since "cmd"-type locks won't
|
||||||
|
# update on them unless their cmdsets are rebuilt.
|
||||||
|
obj.at_init()
|
||||||
if ok:
|
if ok:
|
||||||
caller.msg("Added lock '%s' to %s." % (lockdef, obj))
|
caller.msg("Added lock '%s' to %s." % (lockdef, obj))
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue