confirm before killing
This commit is contained in:
12
rsrc/dialogs/kill-party-confirm.xml
Normal file
12
rsrc/dialogs/kill-party-confirm.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||||
|
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
|
||||||
|
<dialog defbtn='no'>
|
||||||
|
<pict type='dlog' num='7' top='6' left='6'/>
|
||||||
|
<text top='6' left='48' width='249' height='67'>
|
||||||
|
You are about to kill your entire party.<br/>
|
||||||
|
<br/>
|
||||||
|
Are you sure you want to do this?
|
||||||
|
</text>
|
||||||
|
<button name='no' type='regular' def-key='n' top='84' left='239'>No</button>
|
||||||
|
<button name='yes' type='regular' def-key='y' top='84' left='172'>Yes</button>
|
||||||
|
</dialog>
|
||||||
@@ -2085,6 +2085,8 @@ void debug_kill_party() {
|
|||||||
if(recording){
|
if(recording){
|
||||||
record_action("debug_kill_party", "");
|
record_action("debug_kill_party", "");
|
||||||
}
|
}
|
||||||
|
std::string confirm = cChoiceDlog("kill-party-confirm",{"yes","no"}).show();
|
||||||
|
if(confirm == "yes"){
|
||||||
for(short i = 0; i < 6; i++) {
|
for(short i = 0; i < 6; i++) {
|
||||||
if(univ.party[i].is_alive())
|
if(univ.party[i].is_alive())
|
||||||
kill_pc(univ.party[i],eMainStatus::ABSENT);
|
kill_pc(univ.party[i],eMainStatus::ABSENT);
|
||||||
@@ -2093,6 +2095,7 @@ void debug_kill_party() {
|
|||||||
add_string_to_buf("Debug: Kill the party.");
|
add_string_to_buf("Debug: Kill the party.");
|
||||||
advance_time(false, true, true);
|
advance_time(false, true, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void debug_magic_map() {
|
void debug_magic_map() {
|
||||||
if(recording){
|
if(recording){
|
||||||
|
|||||||
Reference in New Issue
Block a user