mirror of
https://github.com/evennia/evennia.git
synced 2026-03-20 06:46:31 +01:00
Made so the default add_default_cmdset script also removes the added cmdset when stopped. Fixed the function of @delplayer command.
This commit is contained in:
parent
212061abb6
commit
e125763ea5
5 changed files with 86 additions and 36 deletions
|
|
@ -301,3 +301,13 @@ class AddCmdSet(Script):
|
|||
else:
|
||||
self.obj.cmdset.add(cmdset)
|
||||
|
||||
def at_stop(self):
|
||||
"""
|
||||
This removes the cmdset when the script stops
|
||||
"""
|
||||
cmdset = self.db.cmdset
|
||||
if cmdset:
|
||||
if self.db.add_default:
|
||||
self.obj.cmdset.delete_default()
|
||||
else:
|
||||
self.obj.cmdset.delete(cmdset)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue