Add confirmation question to new accounts/delete switch
This commit is contained in:
parent
ead69148b7
commit
3bd34087ce
2 changed files with 14 additions and 6 deletions
|
|
@ -737,12 +737,11 @@ class CmdDestroy(COMMAND_DEFAULT_CLASS):
|
|||
confirm += ", ".join(["#{}".format(obj.id) for obj in objs])
|
||||
confirm += " [yes]/no?" if self.default_confirm == 'yes' else " yes/[no]"
|
||||
answer = ""
|
||||
while answer.strip().lower() not in ("y", "yes", "n", "no"):
|
||||
answer = yield(confirm)
|
||||
answer = self.default_confirm if answer == '' else answer
|
||||
answer = yield(confirm)
|
||||
answer = self.default_confirm if answer == '' else answer
|
||||
|
||||
if answer.strip().lower() in ("n", "no"):
|
||||
caller.msg("Cancelled: no object was destroyed.")
|
||||
caller.msg("Canceled: no object was destroyed.")
|
||||
delete = False
|
||||
|
||||
if delete:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue