[MIRROR] default tgui alert input handling (#8891)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
CHOMPStation2
2024-09-01 15:28:35 -07:00
committed by GitHub
parent ec8834f9e5
commit 9f42148ab1
106 changed files with 675 additions and 178 deletions
+1 -1
View File
@@ -53,7 +53,7 @@
if(!validckey)
if(!banned_mob || (banned_mob && !IsGuestKey(banned_mob.key))) //VOREStation Edit Start.
var/confirm = tgui_alert(usr, "This ckey hasn't been seen, are you sure?", "Confirm Badmin", list("Yes", "No"))
if(confirm == "No")
if(confirm != "Yes")
return //VOREStation Edit End
var/a_ckey
+4 -5
View File
@@ -600,7 +600,7 @@ var/global/floorIsLava = 0
if (!usr.client.holder)
return
var/confirm = alert(usr, "Restart the game world?", "Restart", "Yes", "Cancel") // Not tgui_alert for safety
if(confirm == "Cancel")
if(!confirm || confirm == "Cancel")
return
if(confirm == "Yes")
to_world("<span class='danger'>Restarting world!</span> <span class='notice'>Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!</span>")
@@ -995,7 +995,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set desc="Reboots the server post haste"
set name="Immediate Reboot"
if(!usr.client.holder) return
if(alert(usr, "Reboot server?","Reboot!","Yes","No") == "No") // Not tgui_alert for safety
if(alert(usr, "Reboot server?","Reboot!","Yes","No") != "Yes") // Not tgui_alert for safety
return
to_world("[span_red("<b>Rebooting world!</b>")] [span_blue("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!")]")
log_admin("[key_name(usr)] initiated an immediate reboot.")
@@ -1532,9 +1532,8 @@ var/datum/announcement/minor/admin_min_announcer = new
var/shouldStamp = 1
if(!P.sender) // admin initiated
switch(tgui_alert(usr, "Would you like the fax stamped?","Stamped?", list("Yes", "No")))
if("No")
shouldStamp = 0
if(tgui_alert(usr, "Would you like the fax stamped?","Stamped?", list("Yes", "No")) != "Yes")
shouldStamp = 0
if(shouldStamp)
P.stamps += "<hr><i>This paper has been stamped by the [P.origin] Quantum Relay.</i>"
+2 -2
View File
@@ -530,7 +530,7 @@
set desc = "Tells mob to man up and deal with it."
set popup_menu = FALSE //VOREStation Edit - Declutter.
if(tgui_alert(usr, "Are you sure you want to tell them to man up?","Confirmation",list("Deal with it","No"))=="No") return
if(tgui_alert(usr, "Are you sure you want to tell them to man up?","Confirmation",list("Deal with it","No")) != "Deal with it") return
to_chat(T, "<span class='filter_system notice'><b><font size=3>Man up and deal with it.</font></b></span>")
to_chat(T, "<span class='filter_system notice'>Move along.</span>")
@@ -543,7 +543,7 @@
set name = "Man Up Global"
set desc = "Tells everyone to man up and deal with it."
if(tgui_alert(usr, "Are you sure you want to tell the whole server up?","Confirmation",list("Deal with it","No"))=="No") return
if(tgui_alert(usr, "Are you sure you want to tell the whole server up?","Confirmation",list("Deal with it","No")) != "Deal with it") return
for (var/mob/T as mob in mob_list)
to_chat(T, "<br><center><span class='filter_system notice'><b><font size=4>Man up.<br> Deal with it.</font></b><br>Move along.</span></center><br>")
+2
View File
@@ -11,6 +11,8 @@
var/returnval = null
switch(tgui_alert(usr, "Proc owned by something?","Call Proc",list("Yes","No")))
if(null)
return
if("Yes")
targetselected = 1
var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT))
+1 -1
View File
@@ -28,7 +28,7 @@
if(!hasasked)
var/answer = tgui_alert(usr, "Capture includes non existant turf, Continue capture?","Continue capture?", list("No", "Yes"))
hasasked = 1
if(answer == "No")
if(answer != "Yes")
return
var/list/atoms = list()
@@ -13,7 +13,7 @@
if (!shuttle_tag) return
var/datum/shuttle/S = SSshuttles.shuttles[shuttle_tag]
var/list/area_choices = return_areas()
var/origin_area = tgui_input_list(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)", "Area Choice", area_choices)
if (!origin_area) return
@@ -22,6 +22,8 @@
if (!destination_area) return
var/long_jump = tgui_alert(user, "Is there a transition area for this jump?","Transition?", list("Yes","No"))
if(!long_jump)
return
if (long_jump == "Yes")
var/transition_area = tgui_input_list(user, "Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)", "Area Choice", area_choices)
if (!transition_area) return
@@ -10,7 +10,7 @@
if(!.)
return
var/confirm = tgui_alert(user, "This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", list("Ok", "Cancel"))
if (confirm == "Cancel")
if (confirm != "Ok")
return
var/shuttle_tag = tgui_input_list(user, "Which shuttle do you want to jump?", "Shuttle Choice", SSshuttles.shuttles)
+8 -2
View File
@@ -295,7 +295,7 @@
var/delmob = 0
switch(tgui_alert(usr, "Delete old mob?","Message",list("Yes","No","Cancel")))
if("Cancel") return
if("Cancel", null) return
if("Yes") delmob = 1
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]")
@@ -359,6 +359,8 @@
var/duration
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No")))
if(null)
return
if("Yes")
temp = 1
var/mins = 0
@@ -777,6 +779,8 @@
//Banning comes first
if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban.
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban", list("Yes","No","Cancel")))
if(null)
return
if("Yes")
if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
to_chat(usr, "<span class='filter_adminlog warning'> You cannot issue temporary job-bans!</span>")
@@ -913,6 +917,8 @@
if(M.client && M.client.holder) return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No","Cancel")))
if(null)
return
if("Yes")
var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440)
if(!mins)
@@ -951,7 +957,7 @@
if(!reason)
return
switch(tgui_alert(usr,"IP ban?","IP Ban",list("Yes","No","Cancel")))
if("Cancel") return
if("Cancel", null) return
if("Yes")
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
if("No")
+4 -1
View File
@@ -660,7 +660,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
feedback_add_details("admin_verb","Adminhelp") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(current_ticket)
if(tgui_alert(usr, "You already have a ticket open. Is this for the same issue?","Duplicate?",list("Yes","No")) != "No")
var/input = tgui_alert(usr, "You already have a ticket open. Is this for the same issue?","Duplicate?",list("Yes","No"))
if(!input)
return
if(input == "Yes")
if(current_ticket)
current_ticket.MessageNoRecipient(msg)
to_chat(usr, "<span class='pm adminnotice'>PM to-<b>Admins</b>: [msg]</span>")
+1 -1
View File
@@ -32,7 +32,7 @@ Reason: Replaced with "Tickets System"
to_chat(usr, "<span class='danger'>Error: You cannot request spice (muted from adminhelps).</span>")
return
if(tgui_alert(usr, "Are you sure you want to request the admins spice things up for you? You accept the consequences if you do.","Spicy!",list("Yes","No")) != "No")
if(tgui_alert(usr, "Are you sure you want to request the admins spice things up for you? You accept the consequences if you do.","Spicy!",list("Yes","No")) == "Yes")
message_admins("[ADMIN_FULLMONTY(usr)] has requested the round be spiced up a little.")
to_chat(usr, "<span class='notice'>You have requested some more spice in your round.</span>")
else
+1 -1
View File
@@ -7,7 +7,7 @@
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(tgui_alert(usr, "WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", list("No", "Yes")) == "No")
if(tgui_alert(usr, "WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", list("No", "Yes")) != "Yes")
return
to_chat(usr, "Checking for disconnected pipes...")
+3 -2
View File
@@ -292,8 +292,9 @@
master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", world)
if(BUILDMODE_ROOM)
var/area_choice = tgui_alert(usr, "Would you like to generate a new area as well?","Room Builder", list("No", "Yes"))
switch(area_choice)
switch(tgui_alert(usr, "Would you like to generate a new area as well?","Room Builder", list("No", "Yes")))
if(null)
return
if("No")
area_enabled = 0
if("Yes")
@@ -46,9 +46,8 @@
if(!istype(M, /mob/living/carbon/human))
to_chat(usr, "<span class='warning'>You can only do this to humans!</span>")
return
switch(tgui_alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No")))
if("No")
return
if(tgui_alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No")) != "Yes")
return
var/new_facial = input(usr, "Please select facial hair color.", "Character Generation") as color
if(new_facial)
M.r_facial = hex2num(copytext(new_facial, 2, 4))
+3 -2
View File
@@ -6,11 +6,12 @@
if(!check_rights(R_FUN))
return
if(tgui_alert(usr, "Are you sure you want to run [cinematic]?","Confirmation",list("Yes","No"))=="No") return
if(tgui_alert(usr, "Are you sure you want to run [cinematic]?","Confirmation",list("Yes","No")) != "Yes") return
if(!ticker) return
switch(cinematic)
if("explosion")
if(tgui_alert(usr, "The game will be over. Are you really sure?", "Confirmation", list("Continue","Cancel")) == "Cancel")
var/input = tgui_alert(usr, "The game will be over. Are you really sure?", "Confirmation", list("Continue","Cancel"))
if(!input || input == "Cancel")
return
var/parameter = tgui_input_number(src,"station_missed = ?","Enter Parameter",0,1,0)
var/override
+1 -1
View File
@@ -506,7 +506,7 @@
var/response = tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Setup Supermatter",list("Setup Completely","Setup except coolant","No"))
if(response == "No")
if(!response || response == "No")
return
var/found_the_pump = 0
+5 -5
View File
@@ -92,10 +92,10 @@
var/options = holder.entity_names + "Clear All"
var/removekey = tgui_input_list(usr, "Choose which entity to remove", "remove reference", options, null)
if(removekey == "Clear All")
var/confirm = tgui_alert(usr, "Do you really want to clear your entity list?", "confirm", list("Yes", "No"), "No")
if(confirm == "Yes")
holder.entity_names = list()
holder.entity_refs = list()
if(tgui_alert(usr, "Do you really want to clear your entity list?", "confirm", list("Yes", "No")) != "Yes")
return
holder.entity_names = list()
holder.entity_refs = list()
else if(removekey)
holder.entity_refs -= removekey
holder.entity_names -= removekey
@@ -128,7 +128,7 @@
holder.tgui_interact(usr)
else
var/mode = tgui_alert(usr, "Speak or emote?", "mode", list("Speak", "Emote", "Cancel"))
if(mode == "Cancel") return
if(!mode || mode == "Cancel") return
var/message = tgui_input_text(usr, "Input what you want [which_entity] to [mode]", "narrate",
null, multiline = TRUE, prevent_enter = TRUE)
if(message)
+5 -5
View File
@@ -44,7 +44,7 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga
return
if(choice == "Delete All")
var/confirm = tgui_alert(src, "ARE YOU SURE? THERE IS NO GOING BACK", "CONFIRM", list("Go Back", "Delete all my event triggers"), autofocus = FALSE)
if(confirm == "Go Back")
if(!confirm || confirm == "Go Back")
return
for(var/obj/effect/landmark/event_trigger/ET in personal_list)
ET.delete_me = TRUE
@@ -62,7 +62,7 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga
M.forceMove(get_turf(ET))
if(decision == "Delete")
var/confirm = tgui_alert(src, "ARE YOU SURE? THERE IS NO GOING BACK FROM DELETING [ET.name]", "CONFIRM", list("Go Back", "Delete it!"), autofocus = FALSE)
if(confirm == "Go Back")
if(!confirm || confirm == "Go Back")
return
ET.delete_me = TRUE
qdel(ET)
@@ -91,7 +91,7 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga
log_and_message_admins("[src.ckey] deleted all of [other_ckey]'s event triggers while [other_ckey] was active")
return
var/confirm = tgui_alert(src, "ARE YOU SURE? THERE IS NO GOING BACK", "CONFIRM", list("Go Back", "Delete all my event triggers"), autofocus = FALSE)
if(confirm == "Go Back")
if(!confirm || confirm == "Go Back")
return
for(var/obj/effect/landmark/event_trigger/ET in others_list)
ET.delete_me = TRUE
@@ -105,7 +105,7 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga
if(isobserver(M))
var/confirm_teleport = tgui_alert(src, "You're not a ghost! Admin-ghost?", "You're not a ghost", \
list("Cancel", "Teleport me with my character"))
if(confirm_teleport == "Cancel")
if(!confirm_teleport || confirm_teleport == "Cancel")
return
M.forceMove(get_turf(ET))
if(decision == "Delete")
@@ -121,7 +121,7 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga
log_and_message_admins("[src.ckey] tried to delete event trigger [ET.name] while [other_ckey] is active.")
return
var/confirm = tgui_alert(src, "ARE YOU SURE? THERE IS NO GOING BACK FROM DELETING [ET.name]", "CONFIRM", list("Go Back", "Delete it!"), autofocus = FALSE)
if(confirm == "Go Back")
if(!confirm || confirm == "Go Back")
return
ET.delete_me = TRUE
qdel(ET)
+1 -1
View File
@@ -8,7 +8,7 @@
var/result = tgui_alert(src, "Really strike your tile with lightning?", "Confirm Badmin" , list("No", "Yes (Cosmetic)", "Yes (Real)"))
if(result == "No")
if(!result || result == "No")
return
var/fake_lightning = result == "Yes (Cosmetic)"
@@ -27,7 +27,7 @@
preview += image('icons/misc/debug_group.dmi',S ,"red")
usr.client.images += preview
if(tgui_alert(usr,"Confirm location.", "Template Confirm",list("No","Yes")) == "Yes")
if(template.annihilate && tgui_alert(usr,"This template is set to annihilate everything in the red square. EVERYTHING IN THE RED SQUARE WILL BE DELETED, ARE YOU ABSOLUTELY SURE?", "Template Confirm", list("No","Yes")) == "No")
if(template.annihilate && tgui_alert(usr,"This template is set to annihilate everything in the red square. EVERYTHING IN THE RED SQUARE WILL BE DELETED, ARE YOU ABSOLUTELY SURE?", "Template Confirm", list("No","Yes")) != "Yes")
usr.client.images -= preview
return
@@ -57,7 +57,7 @@
orientation = dir2angle(orientation)
if((!(orientation%180) && template.width > world.maxx || template.height > world.maxy) || (orientation%180 && template.width > world.maxy || template.height > world.maxx))
if(tgui_alert(usr,"This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!",list("Cancel","Yes")) == "Cancel")
if(tgui_alert(usr,"This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!",list("Cancel","Yes")) != "Yes")
to_chat(usr,"Template placement aborted.")
return
+3 -1
View File
@@ -30,6 +30,8 @@ var/list/sounds_cache = list()
sounds_cache += S
var/res = tgui_alert(usr, "Show the title of this song ([S]) to the players?\nOptions 'Yes' and 'No' will play the sound.",, list("Yes", "No", "Cancel"))
if(!res)
return
switch(res)
if("Yes")
to_chat(world, "<span class='boldannounce'>An admin played: [S]</span>", confidential = TRUE)
@@ -83,7 +85,7 @@ var/list/sounds_cache = list()
sounds_cache += S
if(tgui_alert(usr, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request", list("Play","Cancel")) == "Cancel")
if(tgui_alert(usr, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request", list("Play","Cancel")) != "Play")
return
log_admin("[key_name(src)] played sound [S] on Z[target_z]")
+21 -14
View File
@@ -52,7 +52,8 @@
return
var/age = tgui_alert(src, "Age check", "Show accounts yonger then _____ days", list("7","30","All"))
if(!age)
return
if(age == "All")
age = 9999999
else
@@ -236,6 +237,8 @@
message_admins("[key_name_admin(src)] has added a random AI law.", 1)
var/show_log = tgui_alert(src, "Show ion message?", "Message", list("Yes", "No"))
if(!show_log)
return
if(show_log == "Yes")
command_announcement.Announce("Ion storm detected near \the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
@@ -286,7 +289,7 @@ Ccomp's first proc.
if(GLOB.respawn_timers[target] == -1) // Their respawn timer is set to -1, which is 'not allowed to respawn'
var/response = tgui_alert(src, "Are you sure you wish to allow this individual to respawn? They would normally not be able to.","Allow impossible respawn?",list("No","Yes"))
if(response == "No")
if(response != "Yes")
return
GLOB.respawn_timers -= target
@@ -401,7 +404,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/announce = tgui_alert(src,"Announce as if they had just arrived?", "Announce", list("No", "Yes", "Cancel"))
if(announce == "Cancel")
if(!announce || announce == "Cancel")
return
else if(announce == "Yes") //Too bad buttons can't just have 1/0 values and different display strings
announce = 1
@@ -409,7 +412,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
announce = 0
var/inhabit = tgui_alert(src,"Put the person into the spawned mob?", "Inhabit", list("Yes", "No", "Cancel"))
if(inhabit == "Cancel")
if(!inhabit || inhabit == "Cancel")
return
else if(inhabit == "Yes")
inhabit = 1
@@ -425,13 +428,15 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Found their record, they were spawned previously
if(record_found)
var/samejob = tgui_alert(src,"Found [picked_client.prefs.real_name] in data core. They were [record_found.fields["real_rank"]] this round. Assign same job? They will not be re-added to the manifest/records, either way.","Previously spawned",list("Yes","Assistant","No"))
if(!samejob)
return
if(samejob == "Yes")
charjob = record_found.fields["real_rank"]
else if(samejob == USELESS_JOB) //VOREStation Edit - Visitor not Assistant
charjob = USELESS_JOB //VOREStation Edit - Visitor not Assistant
else
records = tgui_alert(src,"No data core entry detected. Would you like add them to the manifest, and sec/med/HR records?","Records",list("No", "Yes", "Cancel"))
if(records == "Cancel")
if(!records || records == "Cancel")
return
if(records == "Yes")
records = 1
@@ -450,7 +455,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/equipment
if(charjob)
equipment = tgui_alert(src,"Spawn them with equipment?", "Equipment", list("Yes", "No", "Cancel"))
if(equipment == "Cancel")
if(!equipment || equipment == "Cancel")
return
else if(equipment == "Yes")
equipment = 1
@@ -478,7 +483,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if(showy == "Drop Pod")
showy = tgui_alert(src,"Destructive drop pods cause damage in a 3x3 and may break turfs. Polite drop pods lightly damage the turfs but won't break through.", "Drop Pod", list("Polite", "Destructive", "Cancel")) // reusing var
if(showy == "Cancel")
if(!showy || showy == "Cancel")
return
if("Arrivals") //Spawn them at a latejoin spawnpoint
@@ -706,7 +711,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20))
if (tgui_alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No")
if (tgui_alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) != "Yes")
return
explosion(O, devastation, heavy, light, flash)
@@ -772,6 +777,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(!confirm)
return
if(confirm == "Yes")
if (istype(mob, /mob/observer/dead)) // so they don't spam gibs everywhere
return
@@ -1000,7 +1007,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/notifyplayers = tgui_alert(src, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel"))
if(notifyplayers == "Cancel")
if(!notifyplayers || notifyplayers == "Cancel")
return
log_admin("Admin [key_name(src)] has forced the players to have random appearances.")
@@ -1045,7 +1052,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/confirm = tgui_alert(usr, "Are you sure you want to cryo [M]?","Confirmation",list("No","Yes"))
if(confirm == "No")
if(confirm != "Yes")
return
var/list/human_cryopods = list()
@@ -1121,10 +1128,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/podtype = tgui_alert(src,"Destructive drop pods cause damage in a 3x3 and may break turfs. Polite drop pods lightly damage the turfs but won't break through.", "Drop Pod", list("Polite", "Destructive", "Cancel"))
if(podtype == "Cancel")
if(!podtype || podtype == "Cancel")
return
var/autoopen = tgui_alert(src,"Should the pod open automatically?", "Drop Pod", list("Yes", "No", "Cancel"))
if(autoopen == "Cancel")
if(!autoopen || autoopen == "Cancel")
return
switch(podtype)
if("Destructive")
@@ -1149,10 +1156,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/podtype = tgui_alert(src,"Destructive drop pods cause damage in a 3x3 and may break turfs. Polite drop pods lightly damage the turfs but won't break through.", "Drop Pod", list("Polite", "Destructive", "Cancel"))
if(podtype == "Cancel")
if(!podtype || podtype == "Cancel")
return
var/autoopen = tgui_alert(src,"Should the pod open automatically?", "Drop Pod", list("Yes", "No", "Cancel"))
if(autoopen == "Cancel")
if(!autoopen || autoopen == "Cancel")
return
if(!L || QDELETED(L))
return
+2 -2
View File
@@ -29,13 +29,13 @@
var/char_name = tgui_alert(src, "Spawn mob with their character name?", "Mob name", list("Yes", "No", "Cancel"))
var/name = 0
if(char_name == "Cancel")
if(!char_name || char_name == "Cancel")
return
if(char_name == "Yes")
name = 1
var/vorgans = tgui_alert(src, "Spawn mob with their character's vore organs and prefs?", "Vore organs", list("Yes", "No", "Cancel"))
var/organs
if(vorgans == "Cancel")
if(!vorgans || vorgans == "Cancel")
return
if(vorgans == "Yes")
organs = 1
+1 -1
View File
@@ -105,7 +105,7 @@
kin_type = kin_types[kin_type]
var/myself = tgui_alert(usr, "Control the shadekin yourself or delete pred and prey after?","Control Shadekin?",list("Control","Cancel","Delete"))
if(myself == "Cancel" || !target)
if(!myself || myself == "Cancel" || !target)
return
var/turf/Tt = get_turf(target)
+1 -1
View File
@@ -45,7 +45,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
while(!choice)
choice = sanitize(tgui_input_text(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""))
if(!choice)
if(tgui_alert(usr, "Error, no mission set. Do you want to exit the setup process?","Strike Team",list("Yes","No"))=="Yes")
if(tgui_alert(usr, "Error, no mission set. Do you want to exit the setup process?","Strike Team",list("Yes","No"))!="No")
return
consider_ert_load() //VOREStation Add
@@ -116,6 +116,8 @@
var/unique
if (varsvars && varsvars.len)
unique = tgui_alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", list("Unique", "Same"))
if(!unique)
return
if(unique == "Unique")
unique = TRUE
else
@@ -143,7 +145,7 @@
if (VV_NEW_TYPE)
var/many = tgui_alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", list("One", "Many", "Cancel"))
if (many == "Cancel")
if (!many || many == "Cancel")
return
if (many == "Many")
many = TRUE
@@ -181,7 +181,7 @@ GLOBAL_PROTECT(VVpixelmovement)
var/assoc = 0
if(IS_VALID_ASSOC_KEY(L[index]))
var/prompt = tgui_alert(src, "Do you want to edit the key or its assigned value?", "Associated List", list("Key", "Assigned Value", "Cancel"))
if (prompt == "Cancel")
if (!prompt || prompt == "Cancel")
return
if (prompt == "Assigned Value")
assoc = 1
@@ -194,7 +194,7 @@ GLOBAL_PROTECT(VVpixelmovement)
else
variable = L[index]
//EXPERIMENTAL - Keep old associated value while modifying key, if any
if(IS_VALID_ASSOC_KEY(variable))
if(IS_VALID_ASSOC_KEY(variable))
var/found = L[variable]
if(!isnull(found))
old_assoc_value = found