[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-02 00:28:35 +02:00
committed by GitHub
co-authored by Kashargul Kashargul
parent ec8834f9e5
commit 9f42148ab1
106 changed files with 675 additions and 178 deletions
+2 -2
View File
@@ -145,7 +145,7 @@ SUBSYSTEM_DEF(media_tracks)
return
var/secret = tgui_alert(C, "Optional: Mark track as secret?", "Track Secret", list("Yes", "Cancel", "No"))
if(secret == "Cancel")
if(!secret || secret == "Cancel")
return
else if(secret == "Yes")
secret = TRUE
@@ -153,7 +153,7 @@ SUBSYSTEM_DEF(media_tracks)
secret = FALSE
var/lobby = tgui_alert(C, "Optional: Mark track as lobby music?", "Track Lobby", list("Yes", "Cancel", "No"))
if(lobby == "Cancel")
if(!lobby || lobby == "Cancel")
return
else if(secret == "Yes")
secret = TRUE
+1 -1
View File
@@ -38,7 +38,7 @@
if(choice == "Yes!" && faction.add_antagonist_mind(player, 0, faction.faction_role_text, faction.faction_welcome))
to_chat(src, "<span class='notice'>\The [player.current] joins the [faction.faction_descriptor]!</span>")
return
if(choice == "No!")
if(!choice || choice == "No!")
to_chat(player, "<span class='danger'>You reject this traitorous cause!</span>")
to_chat(src, "<span class='danger'>\The [player.current] does not support the [faction.faction_descriptor]!</span>")
@@ -22,7 +22,7 @@
to_chat(src, "<span class='danger'>We have no genomes, not even our own, and cannot regenerate.</span>")
return 0
if(!C.stat && tgui_alert(src, "Are we sure we wish to regenerate? We will appear to be dead while doing so.","Revival",list("Yes","No")) == "No")
if(!C.stat && tgui_alert(src, "Are we sure we wish to regenerate? We will appear to be dead while doing so.","Revival",list("Yes","No")) != "Yes")
return
to_chat(C, "<span class='notice'>We will attempt to regenerate our form.</span>")
+1 -1
View File
@@ -334,7 +334,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
return
else
switch(tgui_alert(user, "You open the tome", "Tome", list("Read it","Scribe a rune","Cancel")))
if("Cancel")
if("Cancel", null)
return
if("Read it")
if(usr.get_active_hand() != src)
+1 -1
View File
@@ -222,7 +222,7 @@
if(!can_hack(usr, R))
return
var/choice = tgui_alert(usr, "Really hack [R.name]? This cannot be undone.", "Hack?", list("Yes", "No"))
if(choice == "No")
if(choice != "Yes")
return
log_game("[key_name(usr)] emagged [key_name(R)] using robotic console!")
message_admins("<span class='notice'>[key_name_admin(usr)] emagged [key_name_admin(R)] using robotic console!</span>")
+3 -1
View File
@@ -160,7 +160,7 @@
/obj/machinery/computer/supplycomp/tgui_static_data(mob/user)
var/list/data = ..()
var/list/pack_list = list()
for(var/pack_name in SSsupply.supply_pack)
var/datum/supply_pack/P = SSsupply.supply_pack[pack_name]
@@ -395,6 +395,8 @@
return FALSE
var/list/L = E.contents[params["index"]]
var/field = tgui_alert(usr, "Select which field to edit", "Field Choice", list("Name", "Quantity", "Value"))
if(!field)
return FALSE
var/new_val = sanitize(tgui_input_text(usr, field, "Enter the new value for this field:", L[lowertext(field)]))
if(!new_val)
@@ -57,7 +57,7 @@
if(!occupant)
return
if(!forced && avatar && avatar.stat != DEAD && tgui_alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", list("Yes", "No")) == "No")
if(!forced && avatar && avatar.stat != DEAD && tgui_alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", list("Yes", "No")) != "Yes")
return
avatar.exit_vr()
@@ -89,7 +89,7 @@
if(avatar && !occupant.stat)
to_chat(occupant,"<span class='alien'>\The [src] begins to [pick("whir","hum","pulse")] as a screen appears in front of you.</span>")
if(tgui_alert(occupant, "This pod is already linked. Are you certain you wish to engage?", "Commmit?", list("Yes", "No")) == "No")
if(tgui_alert(occupant, "This pod is already linked. Are you certain you wish to engage?", "Commmit?", list("Yes", "No")) != "Yes")
visible_message("<span class='alien'>\The [src] pulses!</span>")
to_chat(occupant,"<span class='alien'>Your mind blurs as information bombards you.</span>")
@@ -191,7 +191,7 @@
if(!occupant)
return
if(!forced && avatar && tgui_alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", list("Yes", "No")) == "No")
if(!forced && avatar && tgui_alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", list("Yes", "No")) != "Yes")
return
if(avatar)
@@ -228,7 +228,7 @@
avatar = occupant.vr_link
// If they've already enterred VR, and are reconnecting, prompt if they want a new body
if(avatar && tgui_alert(occupant, "You already have a [avatar.stat == DEAD ? "" : "deceased "]Virtual Reality avatar. Would you like to use it?", "New avatar", list("Yes", "No")) == "No")
if(avatar && tgui_alert(occupant, "You already have a [avatar.stat == DEAD ? "" : "deceased "]Virtual Reality avatar. Would you like to use it?", "New avatar", list("Yes", "No")) != "Yes")
// Delink the mob
occupant.vr_link = null
avatar = null
+2
View File
@@ -145,6 +145,8 @@
/obj/mecha/combat/phazon/janus/query_damtype()
var/new_damtype = tgui_alert(src.occupant,"Gauntlet Phase Emitter Mode","Damage Type",list("Force","Energy","Stun"))
if(!new_damtype)
return
switch(new_damtype)
if("Force")
damtype = "brute"
+2
View File
@@ -406,6 +406,8 @@
if(usr!=src.occupant)
return
var/new_damtype = tgui_alert(src.occupant,"Melee Damage Type","Damage Type",list("Brute","Fire","Toxic"))
if(!new_damtype)
return
switch(new_damtype)
if("Brute")
damtype = "brute"
+2 -2
View File
@@ -617,7 +617,7 @@
return
var/confirm = tgui_alert(creator, "Are you sure you want to change [oldA.name] into a new area named [str]?", "READ CAREFULLY", list("No", "Yes"))
if(confirm == "No")
if(confirm != "Yes")
to_chat(creator, "<span class='warning'>No changes made.</span>")
return
@@ -626,7 +626,7 @@
newA.has_gravity = oldA.has_gravity
else
var/confirm = tgui_alert(creator, "Are you sure you want to change [oldA.name] into [area_choice]?", "READ CAREFULLY", list("No", "Yes"))
if(confirm == "No")
if(confirm != "Yes")
to_chat(creator, "<span class='warning'>No changes made.</span>")
return
newA = area_choice //They selected to turn the area they're standing on into the selected area.
@@ -287,7 +287,7 @@
return //something is terribly wrong
var/confirm = tgui_alert(src, "Would you like to talk as [src.client.prefs.real_name], over a communicator? This will reset your respawn timer, if someone answers.", "Join as Voice?", list("Yes","No"))
if(confirm == "No")
if(confirm != "Yes")
return
if(CONFIG_GET(flag/antag_hud_restricted) && has_enabled_antagHUD == 1) // CHOMPEdit
+1 -1
View File
@@ -24,7 +24,7 @@
return
else
var/answer = tgui_alert(user, "Would you like to activate this personal emergency beacon?","\The [src]", list("Yes", "No"))
if(answer == "No")
if(answer != "Yes")
return
else if(do_after(user, (3 SECONDS))) //short delay, so they can still abort if they want to
user.visible_message("<span class='warning'>[user] activates \the [src]!</span>","<span class='warning'>You activate \the [src], spiking it into the ground!</span>")
+3 -3
View File
@@ -34,9 +34,6 @@
/obj/item/device/multitool/attack_self(mob/living/user)
var/choice = tgui_alert(usr, "What do you want to do with \the [src]?", "Multitool Menu", list("Switch Mode", "Clear Buffers", "Cancel"))
switch(choice)
if("Cancel")
to_chat(user,"<span class='notice'>You lower \the [src].</span>")
return
if("Clear Buffers")
to_chat(user,"<span class='notice'>You clear \the [src]'s memory.</span>")
buffer = null
@@ -48,6 +45,9 @@
accepting_refs = 1
if("Switch Mode")
mode_switch(user)
else
to_chat(user,"<span class='notice'>You lower \the [src].</span>")
return
update_icon()
+1 -1
View File
@@ -79,7 +79,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
return
var/choice = tgui_alert(user, "You sure you want to inhabit this PAI, or submit yourself to being recruited?", "Confirmation", list("Inhabit", "Recruit", "Cancel"))
if(choice == "Cancel")
if(!choice || choice == "Cancel")
return ..()
if(choice == "Recruit")
paiController.recruitWindow(user)
+2
View File
@@ -282,6 +282,8 @@
new chosen(new_mail)
var/shuttle_spawn = tgui_alert(usr, "Spawn mail at location or in the shuttle?", "Spawn mail", list("Location", "Shuttle"))
if(!shuttle_spawn)
return
if(shuttle_spawn == "Shuttle")
SSmail.admin_mail += new_mail
log_and_message_admins("spawned [chosen] inside an envelope at the shuttle")
@@ -32,11 +32,11 @@
opposite_catastasis = "BROAD"
catastasis = "STANDARD"
switch( tgui_alert(usr, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface",list("Switch to [opposite_catastasis]","Cancel")) )
switch(tgui_alert(usr, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface",list("Switch to [opposite_catastasis]","Cancel")))
if("Switch to STANDARD","Switch to BROAD")
src.contraband_enabled = !src.contraband_enabled
if("Cancel")
if("Cancel", null)
return
else
to_chat(user, "DERP! BUG! Report this (And what you were doing to cause it) to Agouri")
@@ -38,7 +38,9 @@
if(!registered_user && register_user(user))
to_chat(user, "<span class='notice'>The microscanner marks you as its owner, preventing others from accessing its internals.</span>")
if(registered_user == user)
switch(tgui_alert(usr, "Would you like edit the ID, or show it?","Show or Edit?", list("Edit","Show")))
switch(tgui_alert(usr, "Would you like to edit the ID, or show it?","Show or Edit?", list("Edit","Show")))
if(null)
return
if("Edit")
agentcard_module.tgui_interact(user)
if("Show")
+3 -1
View File
@@ -13,9 +13,11 @@
if(tgui_alert(user, "Should this portal shrink people who are over the limit, or grow people who are under the limit?", "Change portal size settings", list("Shrink","Grow")) == "Shrink")
shrinking = TRUE
our_message = "What should the size limit be? Anyone over this limit will be shrunk to this size. (1 = 100%, etc)"
else
else if (our_message == "Grow")
shrinking = FALSE
our_message = "What should the size limit be? Anyone under this limit will be grown to this size. (1 = 100%, etc)"
else
return ..()
size_limit = tgui_input_number(user, our_message, "Pick a Size", 1, round_value=FALSE)
+3 -3
View File
@@ -103,7 +103,7 @@
/obj/item/canvas/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/paint_palette))
var/choice = tgui_alert(user, "Adjusting the base color of this canvas will replace ALL pixels with the selected color. Are you sure?", "Confirm Color Fill", list("Yes", "No"))
if(choice == "No")
if(choice != "Yes")
return
var/basecolor = input(user, "Select a base color for the canvas:", "Base Color", canvas_color) as null|color
if(basecolor && Adjacent(user) && user.get_active_hand() == I)
@@ -551,7 +551,7 @@
Author's Name: [author_name]. \n \
Author's CKey: [author_ckey]"))
if(tgui_alert(usr, "Check your chat log (if filtering for notices, check where you don't) for painting details.",
"Is this the painting you want?", list("Yes", "No")) == "No")
"Is this the painting you want?", list("Yes", "No")) != "Yes")
return 0
if(!fexists("data/persistent/paintings/[persistence_id]/[painting["md5"]].png"))
to_chat(usr, span_warning("Chosen painting could not be loaded! Incident was logged, but no action taken at this time"))
@@ -590,7 +590,7 @@
if(tgui_alert(usr, "No painting list ID was given. You may obtain such by debugging SSPersistence and checking the all_paintings entry. \
If you do not wish to do that, you may request a list to be generated of painting titles. This might be resource intensive. \
Proceed? It will likely have over 500 entries", "Generate list?", list("Proceed!", "Cancel")) == "Cancel")
Proceed? It will likely have over 500 entries", "Generate list?", list("Proceed!", "Cancel")) != "Proceed!")
return
log_debug("[usr] generated list of paintings from SSPersistence")
@@ -101,7 +101,7 @@
if (not_has_ooc_text(M))
return
while(finalized == "No" && M.client)
while(finalized != "Yes" && M.client)
choice = tgui_input_list(M, "What type of predator do you want to play as?", "Maintpred Choice", possible_mobs)
if(!choice) //We probably pushed the cancel button on the mob selection. Let's just put the ghost pod back in the list.
to_chat(M, "<span class='notice'>No mob selected, cancelling.</span>")
@@ -53,7 +53,7 @@
/obj/structure/ghost_pod/manual/attack_hand(var/mob/living/user)
if(!used)
if(confirm_before_open)
if(tgui_alert(user, "Are you sure you want to touch \the [src]?", "Confirm", list("No", "Yes")) == "No")
if(tgui_alert(user, "Are you sure you want to touch \the [src]?", "Confirm", list("No", "Yes")) != "Yes")
return
trigger()
// VOREStation Addition Start
@@ -51,7 +51,7 @@
return
var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No"))
if(confirm == "No")
if(confirm != "Yes")
visible_message(\
"<span class='notice'>[user.name] decides not to try turning \the [src].</span>",\
"<span class='notice'>You decide not to try turning \the [src].</span>")
@@ -157,7 +157,7 @@
..()
var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No"))
if(confirm == "No")
if(confirm != "Yes")
visible_message(\
"<span class='notice'>[user.name] decides not to try turning \the [src].</span>",\
"<span class='notice'>You decide not to try turning \the [src].</span>")
@@ -186,7 +186,7 @@
new_bearing = round(compass_directions[choice])
confirm = tgui_alert(usr, "Are you certain you want to rotate \the [src]?", "[name]", list("Yes", "No"))
if(confirm == "No")
if(confirm != "Yes")
visible_message(\
"<span class='notice'>[user.name] decides not to try turning \the [src].</span>",\
"<span class='notice'>You decide not to try turning \the [src].</span>")
+2 -3
View File
@@ -29,9 +29,8 @@ var/silent_ert = 0
if(tgui_alert(usr, "Do you want this Response Team to be announced?","ERT",list("Yes","No")) != "Yes")
silent_ert = 1
if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red
switch(tgui_alert(usr, "The station is not in red alert. Do you still want to dispatch a response team?","ERT",list("Yes","No")))
if("No")
return
if(tgui_alert(usr, "The station is not in red alert. Do you still want to dispatch a response team?","ERT",list("Yes","No")) != "Yes")
return
if(send_emergency_team)
to_chat(usr, "<span class='danger'>Looks like somebody beat you to it!</span>")
return
+2 -3
View File
@@ -23,9 +23,8 @@ var/can_call_traders = 1
if(tgui_alert(usr, "Do you want to dispatch the Beruang trade ship?","Trade Ship",list("Yes","No")) != "Yes")
return
if(get_security_level() == "red") // Allow admins to reconsider if the alert level is Red
switch(tgui_alert(usr, "The station is in red alert. Do you still want to send traders?","Trade Ship",list("Yes","No")))
if("No")
return
if(tgui_alert(usr, "The station is in red alert. Do you still want to send traders?","Trade Ship",list("Yes","No")) != "Yes")
return
if(send_beruang)
to_chat(usr, "<span class='danger'>Looks like somebody beat you to it!</span>")
return
+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
+2
View File
@@ -615,6 +615,8 @@
if(confirm == "Yes")
to_chat(user, "<span class='warning'>You are now a prize!</span>")
//CHOMPAdd Start
if(!confirm)
return
if(confirm == "No")
to_chat(user, "<span class='warning'>The SPASM beeps in a sad manner at your impolite decline..</span>")
return
@@ -983,7 +983,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["marking_color"])
var/M = href_list["marking_color"]
if (isnull(pref.body_markings[M]["color"]))
if (tgui_alert(user, "You currently have customized marking colors. This will reset each bodypart's color. Are you sure you want to continue?","Reset Bodypart Colors",list("Yes","No")) == "No")
if (tgui_alert(user, "You currently have customized marking colors. This will reset each bodypart's color. Are you sure you want to continue?","Reset Bodypart Colors",list("Yes","No")) != "Yes")
return TOPIC_NOACTION
var/mark_color = input(user, "Choose the [M] color: ", "Character Preference", pref.body_markings[M]["color"]) as color|null
if(mark_color && CanUseTopic(user))
@@ -176,6 +176,8 @@
([WEIGHT_MIN]-[WEIGHT_MAX])", "Character Preference", null, WEIGHT_MAX, WEIGHT_MIN, round_value=FALSE)
if(new_weight)
var/unit_of_measurement = tgui_alert(user, "Is that number in pounds (lb) or kilograms (kg)?", "Confirmation", list("Pounds", "Kilograms"))
if(!unit_of_measurement)
return TOPIC_NOACTION
if(unit_of_measurement == "Pounds")
new_weight = round(text2num(new_weight),4)
if(unit_of_measurement == "Kilograms")
@@ -590,7 +590,7 @@ var/global/list/valid_bloodreagents = list("default","iron","copper","phoron","s
if(trait_choice in nicelist)
var/datum/trait/path = nicelist[trait_choice]
var/choice = tgui_alert(user, "\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name), list("Take Trait","Go Back")) //ChompEDIT - usr removal
if(choice != "Go Back")
if(choice == "Take Trait")
done = TRUE
if(!trait_choice)
@@ -209,7 +209,7 @@
engage(1)
/obj/item/rig_module/self_destruct/engage(var/skip_check)
if(!skip_check && usr && tgui_alert(usr, "Are you sure you want to push that button?", "Self-destruct", list("No", "Yes")) == "No")
if(!skip_check && usr && tgui_alert(usr, "Are you sure you want to push that button?", "Self-destruct", list("No", "Yes")) != "Yes")
return
if(holder && holder.wearer)
smoke.set_up(10, 0, holder.loc)
@@ -41,7 +41,7 @@
engage(1)
/obj/item/rig_module/self_destruct/engage(var/skip_check)
if(!skip_check && usr && tgui_alert(usr, "Are you sure you want to push that button?", "Self-destruct", list("No", "Yes")) == "No")
if(!skip_check && usr && tgui_alert(usr, "Are you sure you want to push that button?", "Self-destruct", list("No", "Yes")) != "Yes")
return
if(holder && holder.wearer)
smoke.set_up(10, 0, holder.loc)
+1 -1
View File
@@ -61,7 +61,7 @@
if(!message)
return
if (!m_type)
if(tgui_alert(src, "Is this an audible emote?", "Emote", list("Yes", "No")) == "No")
if(tgui_alert(src, "Is this an audible emote?", "Emote", list("Yes", "No")) != "Yes")
m_type = VISIBLE_MESSAGE
else
m_type = AUDIBLE_MESSAGE
@@ -180,7 +180,7 @@
if(s_icon_state_off == "Upload Own Sprite")
s_icon = input(usr, "Choose an image file to upload. Images that are not 32x32 will need to have their positions offset.","Upload Icon") as null|file
var/check_activatable = tgui_alert(src, "Allow it to be turned on?", "activatable", list("Yes", "No", "Cancel"))
if(check_activatable == "Cancel")
if(!check_activatable || check_activatable == "Cancel")
return
if(check_activatable == "No")
s_activatable = 0
@@ -188,7 +188,7 @@
s_activatable = 1
s_text_activated = tgui_input_text(src, "Activation text:", "Activation Text")
check_togglable = tgui_alert(src, "Allow it to be turned back off again?", "togglable", list("Yes", "No", "Cancel"))
if(check_togglable == "Cancel")
if(!check_togglable || check_togglable == "Cancel")
return
if(check_togglable == "No")
s_togglable = 0
@@ -200,7 +200,7 @@
s_icon2 = input(usr, "Choose an image file to upload. Images that are not 32x32 will need to have their positions offset.","Upload Icon") as null|file
s_delay = tgui_input_number(src, "Do you want it to take time to put turn on? Choose a number of deciseconds to activate, or 0 for instant.", "Delay")
var/check_effect = tgui_alert(src, "Produce an effect on activation?", "Effect?", list("No", "Spark", "Flicker Lights", "Flash", "Spawn Item", "Cancel"))
if(check_effect == "Cancel")
if(!check_effect || check_effect == "Cancel")
return
if(check_effect == "No")
s_effect = 0
@@ -214,7 +214,7 @@
s_effect = 4
s_object = get_path_from_partial_text()
var/check_sound = tgui_alert(src, "Play a sound when turning on?", "Sound", list("Yes", "No", "Cancel"))
if(check_sound == "Cancel")
if(!check_sound || check_sound == "Cancel")
return
if(check_sound == "Yes")
s_sound = tgui_input_list(src, "Choose a sound to play on activation:", "Sound", sound_options)
@@ -225,21 +225,21 @@
var/s_name = tgui_input_text(src, "Structure Name:", "Name")
var/s_desc = tgui_input_text(src, "Structure Description:", "Description")
var/check_anchored = tgui_alert(src, "Start anchored?", "anchored", list("Yes", "No", "Cancel"))
if(check_anchored == "Cancel")
if(!check_anchored || check_anchored == "Cancel")
return
if(check_anchored == "No")
s_anchored = 0
if(check_anchored == "Yes")
s_anchored = 1
var/check_density = tgui_alert(src, "Start dense?", "density", list("Yes", "No", "Cancel"))
if(check_density == "Cancel")
if(!check_density || check_density == "Cancel")
return
if(check_density == "No")
s_density = 0
if(check_density == "Yes")
s_density = 1
var/check_wrenchable = tgui_alert(src, "Allow it to be fastened and unfastened with a wrench?", "wrenchable", list("Yes", "No", "Cancel"))
if(check_wrenchable == "Cancel")
if(!check_wrenchable || check_wrenchable == "Cancel")
return
if(check_wrenchable == "No")
s_wrenchable = 0
@@ -249,7 +249,7 @@
if(s_icon_state_off == "Upload Own Sprite")
s_icon = input(usr, "Choose an image file to upload. Images that are not 32x32 will need to have their positions offset.","Upload Icon") as null|file
var/check_activatable = tgui_alert(src, "Allow it to be turned on?", "activatable", list("Yes", "No", "Cancel"))
if(check_activatable == "Cancel")
if(!check_activatable || check_activatable == "Cancel")
return
if(check_activatable == "No")
s_activatable = 0
@@ -257,7 +257,7 @@
s_activatable = 1
s_text_activated = tgui_input_text(src, "Activation text:", "Activation Text")
check_togglable = tgui_alert(src, "Allow it to be turned back off again?", "togglable", list("Yes", "No", "Cancel"))
if(check_togglable == "Cancel")
if(!check_togglable || check_togglable == "Cancel")
return
if(check_togglable == "No")
s_togglable = 0
@@ -269,7 +269,7 @@
s_icon2 = input(usr, "Choose an image file to upload. Images that are not 32x32 will need to have their positions offset.","Upload Icon") as null|file
s_delay = tgui_input_number(src, "Do you want it to take time to put turn on? Choose a number of deciseconds to activate, or 0 for instant.", "Delay")
var/check_effect = tgui_alert(src, "Produce an effect on activation?", "Effect?", list("No", "Spark", "Flicker Lights", "Flash", "Spawn Item", "Cancel"))
if(check_effect == "Cancel")
if(!check_effect || check_effect == "Cancel")
return
if(check_effect == "No")
s_effect = 0
@@ -283,7 +283,7 @@
s_effect = 4
s_object = get_path_from_partial_text()
var/check_sound = tgui_alert(src, "Play a sound when turning on?", "Sound", list("Yes", "No", "Cancel"))
if(check_sound == "Cancel")
if(!check_sound || check_sound == "Cancel")
return
if(check_sound == "Yes")
s_sound = tgui_input_list(src, "Choose a sound to play on activation:", "Sound", sound_options)
@@ -335,4 +335,4 @@
result = matches[1]
else
result = tgui_input_list(usr, "Select an atom type", "Spawn Atom", matches, strict_modern = TRUE)
return result
return result
@@ -73,7 +73,7 @@ Invoked by vv topic "fakepdapropconvo" in code\modules\admin\view_variables\topi
return
var/choice = tgui_alert(M,"Use TGUI or dialogue boxes?", "TGUI?", list("TGUI", "Dialogue", "Cancel"))
if(choice == "Cancel") return
if(!choice || choice == "Cancel") return
var/datum/data/pda/app/messenger/ourPDA = find_program(/datum/data/pda/app/messenger)
@@ -88,7 +88,10 @@ Invoked by vv topic "fakepdapropconvo" in code\modules\admin\view_variables\topi
var/message = sanitize(tgui_input_text(M, "Input fake message. Leave empty to cancel. Can create up to 30 messages in a row",null),
MAX_MESSAGE_LEN)
if(!message) return
var/receipent = ((tgui_alert(M, "Received or Sent?", "Direction", list("Received", "Sent"))=="Sent") ? 1 : 0)
var/input = tgui_alert(M, "Received or Sent?", "Direction", list("Received", "Sent"))
if(!input)
return
var/receipent = ((input=="Sent") ? 1 : 0)
ourPDA.createFakeMessage(name,identity,job,receipent, message)
if(choice == "TGUI")
+1 -1
View File
@@ -346,7 +346,7 @@
if (W.w_class >= src.w_class || is_robot_module(W) || istype(W, /obj/item/weapon/holder))
return
if(tgui_alert(user,"You can't slice \the [src] here. Would you like to hide \the [W] inside it instead?","No Cutting Surface!",list("Yes","No")) == "No")
if(tgui_alert(user,"You can't slice \the [src] here. Would you like to hide \the [W] inside it instead?","No Cutting Surface!",list("Yes","No")) != "Yes")
to_chat(user, "You cannot slice \the [src] here! You need a table or at least a tray to do it.")
balloon_alert(user, "You cannot slice \the [src] here! You need a table or at least a tray to do it.") // CHOMPEdit
return
+1 -1
View File
@@ -136,7 +136,7 @@
if(length_char(t) >= MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
var/cont = tgui_alert(usr, "Your message is too long! Would you like to continue editing it?", "Too long!", list("Yes", "No"))
if(cont == "No")
if(cont != "Yes")
break
while(length_char(t) > MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
ParseSong(t)
+2
View File
@@ -181,6 +181,8 @@ var/list/mentor_verbs_default = list(
set hidden = 1
var/mhelp = tgui_alert(usr, "Select the help you need.","Request for Help",list("Adminhelp","Mentorhelp")) == "Mentorhelp"
if(!mhelp)
return
var/msg = tgui_input_text(usr, "Input your request for help.", "Request for Help", multiline = TRUE)
if (mhelp)
+5 -2
View File
@@ -448,7 +448,7 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
spawn(1200)
add_verb(src,/client/verb/mentorhelp ) // 2 minute cd to prevent abusing this to spam admins. //CHOMPEdit
return
else if(choice == "Cancel")
else if(!choice || choice == "Cancel")
return
@@ -460,7 +460,10 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
feedback_add_details("admin_verb","Mentorhelp") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(current_mentorhelp)
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_mentorhelp)
log_admin("Mentorhelp: [key_name(src)]: [msg]")
current_mentorhelp.MessageNoRecipient(msg)
+4 -2
View File
@@ -334,7 +334,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
if(CONFIG_GET(flag/antag_hud_restricted) && !has_enabled_antagHUD && !client.holder) // CHOMPEdit
var/response = tgui_alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?",list("Yes","No"))
if(response == "No") return
if(response != "Yes") return
can_reenter_corpse = FALSE
set_respawn_timer(-1) // Foreeeever
if(!has_enabled_antagHUD && !client.holder)
@@ -1002,7 +1002,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
ghost_sprite = possible_ghost_sprites[choice]
if(finalized == "No")
if(!finalized || finalized == "No")
icon_state = previous_state
/mob/observer/dead/is_blind()
@@ -1029,6 +1029,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(usr.client.prefs?.be_special & BE_PAI)
var/choice = tgui_alert(usr, "Would you like to submit yourself to the recruitment list too?", "Confirmation", list("No", "Yes"))
if(!choice)
return
if(choice == "Yes")
paiController.recruitWindow(usr)
var/count = 0
@@ -38,7 +38,7 @@
sleep(15) //So if they are typing they get interrupted by sound and message, and don't type over the box
var/response = tgui_alert(H,"[src] ([src.key]) wants to join into your Soulcatcher.","Soulcatcher Request",list("Deny","Allow"))
if(response == "Deny")
if(!response || response == "Deny")
to_chat(src,"<span class='warning'>[H] denied your request.</span>")
return
+1 -1
View File
@@ -20,7 +20,7 @@
usr.visible_message(SPAN_NOTICE("\The [usr] holds out \the [I] to \the [target]."), SPAN_NOTICE("You hold out \the [I] to \the [target], waiting for them to accept it."))
if(tgui_alert(target,"[src] wants to give you \a [I]. Will you accept it?","Item Offer",list("Yes","No")) == "No")
if(tgui_alert(target,"[src] wants to give you \a [I]. Will you accept it?","Item Offer",list("Yes","No")) != "Yes")
target.visible_message(SPAN_NOTICE("\The [src] tried to hand \the [I] to \the [target], but \the [target] didn't want it."))
return
@@ -178,7 +178,7 @@
to_chat(src,"<span class='warning'>You can't do that when restrained.</span>")
var/r_action = tgui_alert(src, "What would you like to do with your rings? You currently have [LL.lleill_energy] energy remaining.", "Actions", list("Spawn New Ring ([energy_cost_spawn])", "Teleport to Ring ([energy_cost_tele])", "Cancel"))
if(r_action == "Cancel")
if(!r_action || r_action == "Cancel")
return
if(findtext(r_action,"Spawn New Ring"))
if(LL.lleill_energy < energy_cost_spawn)
@@ -286,7 +286,7 @@
if(get_dist(src,chosen_target) > 1)
to_chat(src, "<span class='warning'>You need to be standing next to [chosen_target].</span>")
return
if(accepted == "No")
if(!accepted || accepted == "No")
to_chat(src, "<span class='warning'>\The [chosen_target] refuses the contact.</span>")
return
if(accepted == "Yes")
@@ -156,7 +156,7 @@
if(homunculus)
var/mob/living/simple_mob/homunculus/H = homunculus
var/h_action = tgui_alert(user, "What would you like to do with your homunculus?", "Actions", list("Recall", "Speak Through", "Cancel"))
if(h_action == "Cancel")
if(!h_action || h_action == "Cancel")
return
if(h_action == "Recall")
H.visible_message("<b>\The [H]</b> returns to the face.")
@@ -244,7 +244,7 @@
else
m_action= tgui_alert(M, "Do you want to destroy the ring, the owner of it may be aware that you have done this?", "Destroy ring", list("Yes", "No"))
if(m_action == "No")
if(!m_action || m_action == "No")
return
if(m_action == "Yes")
@@ -287,4 +287,4 @@
icon_state = "pocket"
//Glamour Floor
//Glamour Wall
//Glamour Wall
@@ -0,0 +1,407 @@
#define PER_LIMB_STEEL_COST SHEET_MATERIAL_AMOUNT
////
// One-part Refactor
////
/mob/living/carbon/human/proc/nano_partswap()
set name = "Ref - Single Limb"
set desc = "Allows you to replace and reshape your limbs as you see fit."
set category = "Abilities"
set hidden = TRUE
if(stat)
to_chat(src,"<span class='warning'>You must be awake and standing to perform this action!</span>")
return
if(!isturf(loc))
to_chat(src,"<span class='warning'>You need more space to perform this action!</span>")
return
var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory()
//Missing the organ that does this
if(!istype(refactory))
to_chat(src,"<span class='warning'>You don't have a working refactory module!</span>")
return
var/choice = tgui_input_list(src,"Pick the bodypart to change:", "Refactor - One Bodypart", species.has_limbs)
if(!choice)
return
//Organ is missing, needs restoring
if(!organs_by_name[choice] || istype(organs_by_name[choice], /obj/item/organ/external/stump)) //allows limb stumps to regenerate like removed limbs.
if(refactory.get_stored_material(MAT_STEEL) < PER_LIMB_STEEL_COST)
to_chat(src,"<span class='warning'>You're missing that limb, and need to store at least [PER_LIMB_STEEL_COST] steel to regenerate it.</span>")
return
var/regen = tgui_alert(src,"That limb is missing, do you want to regenerate it in exchange for [PER_LIMB_STEEL_COST] steel?","Regenerate limb?",list("Yes","No"))
if(regen != "Yes")
return
if(!refactory.use_stored_material(MAT_STEEL,PER_LIMB_STEEL_COST))
return
if(organs_by_name[choice])
var/obj/item/organ/external/oldlimb = organs_by_name[choice]
oldlimb.removed()
qdel(oldlimb)
var/mob/living/simple_mob/protean_blob/blob = nano_intoblob()
active_regen = TRUE
if(do_after(blob,5 SECONDS))
var/list/limblist = species.has_limbs[choice]
var/limbpath = limblist["path"]
var/obj/item/organ/external/new_eo = new limbpath(src)
organs_by_name[choice] = new_eo
new_eo.robotize(synthetic ? synthetic.company : null) //Use the base we started with
new_eo.sync_colour_to_human(src)
regenerate_icons()
active_regen = FALSE
nano_outofblob(blob)
return
//Organ exists, let's reshape it
var/list/usable_manufacturers = list()
for(var/company in chargen_robolimbs)
var/datum/robolimb/M = chargen_robolimbs[company]
if(!(choice in M.parts))
continue
if(species?.base_species in M.species_cannot_use)
continue
if(M.whitelisted_to && !(ckey in M.whitelisted_to))
continue
usable_manufacturers[company] = M
if(!usable_manufacturers.len)
return
var/manu_choice = tgui_input_list(src, "Which manufacturer do you wish to mimic for this limb?", "Manufacturer for [choice]", usable_manufacturers)
if(!manu_choice)
return //Changed mind
var/obj/item/organ/external/eo = organs_by_name[choice]
if(!eo)
return //Lost it meanwhile
eo.robotize(manu_choice)
visible_message("<B>[src]</B>'s [choice] loses its shape, then reforms.")
update_icons_body()
////
// Full Refactor
////
/mob/living/carbon/human/proc/nano_regenerate() //fixed the proc, it used to leave active_regen true.
set name = "Ref - Whole Body"
set desc = "Allows you to regrow limbs and replace organs, given you have enough materials."
set category = "Abilities"
set hidden = TRUE
if(stat)
to_chat(src,"<span class='warning'>You must be awake and standing to perform this action!</span>")
return
if(!isturf(loc))
to_chat(src,"<span class='warning'>You need more space to perform this action!</span>")
return
var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory()
//Missing the organ that does this
if(!istype(refactory))
to_chat(src,"<span class='warning'>You don't have a working refactory module!</span>")
return
//Already regenerating
if(active_regen)
to_chat(src, "<span class='warning'>You are already refactoring!</span>")
return
var/swap_not_rebuild = tgui_alert(src,"Do you want to rebuild, or reshape?","Rebuild or Reshape",list("Reshape","Cancel","Rebuild"))
if(!swap_not_rebuild || swap_not_rebuild == "Cancel")
return
if(swap_not_rebuild == "Reshape")
var/list/usable_manufacturers = list()
for(var/company in chargen_robolimbs)
var/datum/robolimb/M = chargen_robolimbs[company]
if(!(BP_TORSO in M.parts))
continue
if(species?.base_species in M.species_cannot_use)
continue
if(M.whitelisted_to && !(ckey in M.whitelisted_to))
continue
usable_manufacturers[company] = M
if(!usable_manufacturers.len)
return
var/manu_choice = tgui_input_list(src, "Which manufacturer do you wish to mimic?", "Manufacturer", usable_manufacturers)
if(!manu_choice)
return //Changed mind
if(!organs_by_name[BP_TORSO])
return //Ain't got a torso!
var/obj/item/organ/external/torso = organs_by_name[BP_TORSO]
to_chat(src, "<span class='danger'>Remain still while the process takes place! It will take 5 seconds.</span>")
visible_message("<B>[src]</B>'s form collapses into an amorphous blob of black ichor...")
var/mob/living/simple_mob/protean_blob/blob = nano_intoblob()
active_regen = TRUE
if(do_after(blob,5 SECONDS))
synthetic = usable_manufacturers[manu_choice]
torso.robotize(manu_choice) //Will cascade to all other organs.
regenerate_icons()
visible_message("<B>[src]</B>'s form reshapes into a new one...")
active_regen = FALSE
nano_outofblob(blob)
return
//Not enough resources (AND spends the resources, should be the last check)
if(!refactory.use_stored_material(MAT_STEEL,refactory.max_storage))
to_chat(src, "<span class='warning'>You need to be maxed out on normal metal to do this!</span>")
return
var/delay_length = round(active_regen_delay * species.active_regen_mult)
to_chat(src, "<span class='danger'>Remain still while the process takes place! It will take [delay_length/10] seconds.</span>")
visible_message("<B>[src]</B>'s form begins to shift and ripple as if made of oil...")
active_regen = TRUE
var/mob/living/simple_mob/protean_blob/blob = nano_intoblob()
if(do_after(blob, delay_length, null, 0))
if(stat != DEAD && refactory)
var/list/holder = refactory.materials
species.create_organs(src)
var/obj/item/organ/external/torso = organs_by_name[BP_TORSO]
torso.robotize() //synthetic wasn't defined here.
LAZYCLEARLIST(blood_DNA)
LAZYCLEARLIST(feet_blood_DNA)
blood_color = null
feet_blood_color = null
regenerate_icons() //Probably worth it, yeah.
var/obj/item/organ/internal/nano/refactory/new_refactory = locate() in internal_organs
if(!new_refactory)
log_debug("[src] protean-regen'd but lacked a refactory when done.")
else
new_refactory.materials = holder
to_chat(src, "<span class='notice'>Your refactoring is complete.</span>") //Guarantees the message shows no matter how bad the timing.
to_chat(blob, "<span class='notice'>Your refactoring is complete!</span>")
else
to_chat(src, "<span class='critical'>Your refactoring has failed.</span>")
to_chat(blob, "<span class='critical'>Your refactoring has failed!</span>")
else
to_chat(src, "<span class='critical'>Your refactoring is interrupted.</span>")
to_chat(blob, "<span class='critical'>Your refactoring is interrupted!</span>")
active_regen = FALSE
nano_outofblob(blob)
////
// Storing metal
////
/mob/living/carbon/human/proc/nano_metalnom()
set name = "Ref - Store Metals"
set desc = "If you're holding a stack of material, you can consume some and store it for later."
set category = "Abilities"
set hidden = TRUE
var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory()
//Missing the organ that does this
if(!istype(refactory))
to_chat(src,"<span class='warning'>You don't have a working refactory module!</span>")
return
var/held = get_active_hand()
if(!istype(held,/obj/item/stack/material))
to_chat(src,"<span class='warning'>You aren't holding a stack of materials in your active hand...!</span>")
return
var/obj/item/stack/material/matstack = held
var/substance = matstack.material.name
var allowed = FALSE
for(var/material in PROTEAN_EDIBLE_MATERIALS)
if(material == substance) allowed = TRUE
if(!allowed)
to_chat(src,"<span class='warning'>You can't process [substance]!</span>")
return //Only a few things matter, the rest are best not cluttering the lists.
var/howmuch = tgui_input_number(src,"How much do you want to store? (0-[matstack.get_amount()])","Select amount",null,matstack.get_amount(),0)
if(!howmuch || matstack != get_active_hand() || howmuch > matstack.get_amount())
return //Quietly fail
var/actually_added = refactory.add_stored_material(substance,howmuch*matstack.perunit)
matstack.use(CEILING((actually_added/matstack.perunit), 1))
if(actually_added && actually_added < howmuch)
to_chat(src,"<span class='warning'>Your refactory module is now full, so only [actually_added] units were stored.</span>")
visible_message("<span class='notice'>[src] nibbles some of the [substance] right off the stack!</span>")
else if(actually_added)
to_chat(src,"<span class='notice'>You store [actually_added] units of [substance].</span>")
visible_message("<span class='notice'>[src] devours some of the [substance] right off the stack!</span>")
else
to_chat(src,"<span class='notice'>You're completely capped out on [substance]!</span>")
////
// Blob Form
////
/mob/living/carbon/human/proc/nano_blobform()
set name = "Toggle Blobform"
set desc = "Switch between amorphous and humanoid forms."
set category = "Abilities"
set hidden = TRUE
var/atom/movable/to_locate = temporary_form || src
if(!isturf(to_locate.loc))
to_chat(to_locate,"<span class='warning'>You need more space to perform this action!</span>")
return
//Blob form
if(temporary_form)
if(health < maxHealth*0.5)
to_chat(temporary_form,"<span class='warning'>You need to regenerate more nanites first!</span>")
else if(temporary_form.stat)
to_chat(temporary_form,"<span class='warning'>You can only do this while not stunned.</span>")
else
nano_outofblob(temporary_form)
//Human form
else if(stat)
to_chat(src,"<span class='warning'>You can only do this while not stunned.</span>")
return
else
nano_intoblob()
////
// Change fitting
////
/mob/living/carbon/human/proc/nano_change_fitting()
set name = "Change Species Fit"
set desc = "Tweak your shape to change what suits you fit into (and their sprites!)."
set category = "Abilities"
if(stat)
to_chat(src,"<span class='warning'>You must be awake and standing to perform this action!</span>")
return
var/new_species = tgui_input_list(usr, "Please select a species to emulate.", "Shapeshifter Body", GLOB.playable_species)
if(new_species)
species?.base_species = new_species // Really though you better have a species
regenerate_icons() //Expensive, but we need to recrunch all the icons we're wearing
////
// Change size
////
/mob/living/carbon/human/proc/nano_set_size()
set name = "Adjust Volume"
set category = "Abilities"
set hidden = TRUE
var/mob/living/user = temporary_form || src
var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory()
//Missing the organ that does this
if(!istype(refactory))
to_chat(user,"<span class='warning'>You don't have a working refactory module!</span>")
return
var/nagmessage = "Adjust your mass to be a size between 25 to 200% (or between 1 to 600% in dorms area). Up-sizing consumes metal, downsizing returns metal."
var/new_size = tgui_input_number(user, nagmessage, "Pick a Size", user.size_multiplier*100, 600, 1)
if(!new_size || !size_range_check(new_size))
return
var/size_factor = new_size/100
//Will be: -1.75 for 200->25, and 1.75 for 25->200
var/sizediff = size_factor - user.size_multiplier
//Negative if shrinking, positive if growing
//Will be (PLSC*2)*-1.75 to 1.75
//For 2000 PLSC that's -7000 to 7000
var/cost = (PER_LIMB_STEEL_COST*2)*sizediff
//Sizing up
if(cost > 0)
if(refactory.use_stored_material(MAT_STEEL,cost))
user.resize(size_factor, ignore_prefs = TRUE)
else
to_chat(user,"<span class='warning'>That size change would cost [cost] steel, which you don't have.</span>")
//Sizing down (or not at all)
else if(cost <= 0)
cost = abs(cost)
var/actually_added = refactory.add_stored_material(MAT_STEEL,cost)
user.resize(size_factor, ignore_prefs = TRUE)
if(actually_added != cost)
to_chat(user,"<span class='warning'>Unfortunately, [cost-actually_added] steel was lost due to lack of storage space.</span>")
user.visible_message("<span class='notice'>Black mist swirls around [user] as they change size.</span>")
/// /// /// A helper to reuse
/mob/living/proc/nano_get_refactory(obj/item/organ/internal/nano/refactory/R)
if(istype(R))
if(!(R.status & ORGAN_DEAD))
return R
return
/mob/living/simple_mob/protean_blob/nano_get_refactory()
if(refactory)
return ..(refactory)
if(humanform)
return humanform.nano_get_refactory()
/mob/living/carbon/human/nano_get_refactory()
return ..(locate(/obj/item/organ/internal/nano/refactory) in internal_organs)
/// /// /// Ability objects for stat panel
/obj/effect/protean_ability
name = "Activate"
desc = ""
icon = 'icons/mob/species/protean/protean_powers.dmi'
var/ability_name
var/to_call
/obj/effect/protean_ability/proc/atom_button_text()
return src
/obj/effect/protean_ability/Click(var/location, var/control, var/params)
var/list/clickprops = params2list(params)
var/opts = clickprops["shift"]
if(opts)
to_chat(usr,"<span class='notice'><b>[ability_name]</b> - [desc]</span>")
else
//Humanform using it
if(ishuman(usr))
do_ability(usr)
//Blobform using it
else
var/mob/living/simple_mob/protean_blob/blob = usr
do_ability(blob.humanform)
/obj/effect/protean_ability/proc/do_ability(var/mob/living/L)
if(istype(L))
call(L,to_call)()
return FALSE
/// The actual abilities
/obj/effect/protean_ability/into_blob
ability_name = "Toggle Blobform"
desc = "Discard your shape entirely, changing to a low-energy blob that can fit into small spaces. You'll consume steel to repair yourself in this form."
icon_state = "blob"
to_call = /mob/living/carbon/human/proc/nano_blobform
/obj/effect/protean_ability/change_volume
ability_name = "Change Volume"
desc = "Alter your size by consuming steel to produce additional nanites, or regain steel by reducing your size and reclaiming them."
icon_state = "volume"
to_call = /mob/living/carbon/human/proc/nano_set_size
/obj/effect/protean_ability/reform_limb
ability_name = "Ref - Single Limb"
desc = "Rebuild or replace a single limb, assuming you have 2000 steel."
icon_state = "limb"
to_call = /mob/living/carbon/human/proc/nano_partswap
/obj/effect/protean_ability/reform_body
ability_name = "Ref - Whole Body"
desc = "Rebuild your entire body into whatever design you want, assuming you have 10,000 metal."
icon_state = "body"
to_call = /mob/living/carbon/human/proc/nano_regenerate
/obj/effect/protean_ability/metal_nom
ability_name = "Ref - Store Metals"
desc = "Store the metal you're holding. Your refactory can only store steel, and all other metals will be converted into nanites ASAP for various effects."
icon_state = "metal"
to_call = /mob/living/carbon/human/proc/nano_metalnom
#undef PER_LIMB_STEEL_COST
@@ -1274,6 +1274,8 @@
return
var/choice = tgui_alert(src, "Do you wish to change the color of your appendage, use it, or change its functionality?", "Selection List", list("Use it", "Color", "Functionality"))
if(!choice)
return
if(choice == "Color") //Easy way to set color so we don't bloat up the menu with even more buttons.
var/new_color = input(usr, "Choose a color to set your appendage to!", "", appendage_color) as color|null
@@ -1282,6 +1284,8 @@
if(choice == "Functionality") //Easy way to set color so we don't bloat up the menu with even more buttons.
var/choice2 = tgui_alert(usr, "Choose if you want to be pulled to the target or pull them to you!", "Functionality Setting", list("Pull target to self", "Pull self to target"))
if(!choice2)
return
if(choice2 == "Pull target to self")
appendage_alt_setting = 0
else
@@ -1561,6 +1565,9 @@
var/choice = tgui_alert(src, "Do you wish to inject somebody, or adjust settings?", "Selection List", choices)
if(!choice)
return
if(choice == "Change reagent")
var/reagent_choice = tgui_input_list(usr, "Choose which reagent to inject!", "Select reagent", trait_injection_reagents)
if(reagent_choice)
@@ -41,7 +41,7 @@ TGUI frontend path: tgui\packages\tgui\interfaces\TraitTutorial.tsx
var/UI_choice = tgui_alert(src, "Would you like the tutorial text to be printed to chat?", "Choose preferred tutorial interface", list("TGUI","To Chat", "Cancel"))
if(UI_choice == "Cancel")
if(!UI_choice || UI_choice == "Cancel")
return
//Initializing associative lists
+1 -1
View File
@@ -122,7 +122,7 @@
else
if(stat == DEAD)
to_chat(src, span_blue("As much as you'd like, you can't die when already dead"))
else if(confirm1 == "No" || confirm2 == "No")
else if(!confirm1 || confirm1 == "No" || !confirm2 || confirm2 == "No")
to_chat(src, span_blue("You chose to live another day."))
else
to_chat(src, span_blue("You are not injured enough to succumb to death!"))
+6
View File
@@ -392,6 +392,9 @@ var/list/ai_verbs_default = list(
var/confirm = tgui_alert(usr, "Are you sure you want to call the shuttle?", "Confirm Shuttle Call", list("Yes", "No"))
if(!confirm)
return
if(check_unable(AI_CHECK_WIRELESS))
return
@@ -619,6 +622,9 @@ var/list/ai_verbs_default = list(
if("Model")
choice = tgui_alert(usr, "Would you like to select a hologram based on a (visible) crew member, switch to unique avatar, or load your character from your character slot?","Hologram Selection",list("Crew Member","Unique","My Character"))
if(!choice)
return
switch(choice)
if("Crew Member") //A seeable crew member (or a dog)
var/list/targets = trackable_mobs()
+1 -1
View File
@@ -511,7 +511,7 @@
if(radio)
radio.recalculateChannels()
return
if("Cancel")
if("Cancel", null)
return
else if (istype(W, /obj/item/weapon/card/id) && idaccessible == 0)
to_chat(user, "<span class='notice'>[src] is not accepting access modifications at this time.</span>") // CHOMPEDIT : purdev (spelling fix)
@@ -444,6 +444,8 @@
/obj/item/device/lightreplacer/dogborg/attack_self(mob/user)//Recharger refill is so last season. Now we recycle without magic!
var/choice = tgui_alert(user, "Do you wish to check the reserves or change the color?", "Selection List", list("Reserves", "Color"))
if(!choice)
return
if(choice == "Color")
var/new_color = input(usr, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) as color|null
if(new_color)
@@ -928,7 +928,7 @@
if(is_vore_predator(H) && H.devourable && src.feeding && src.devourable)
var/switchy = tgui_alert(H, "Do you wish to eat [src] or feed yourself to them?", "Feed or Eat",list("Nevermind!", "Eat","Feed"))
switch(switchy)
if("Nevermind!")
if("Nevermind!", null)
return
if("Eat")
feed_grabbed_to_self(H, src)
+1 -1
View File
@@ -390,7 +390,7 @@
// Final chance to abort "respawning"
if(mind && timeofdeath) // They had spawned before
var/choice = tgui_alert(usr, "Returning to the menu will prevent your character from being revived in-round. Are you sure?", "Confirmation", list("No, wait", "Yes, leave"))
if(choice == "No, wait")
if(!choice || choice == "No, wait")
return
else if(mind.assigned_role)
var/extra_check = tgui_alert(usr, "Do you want to Quit This Round before you return to lobby?\
@@ -60,7 +60,7 @@
var/datum/computer_file/data/F = computer.find_file_by_uid(open_file)
if(!F || !istype(F))
return
if(F.do_not_edit && (tgui_alert(usr, "WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", list("No", "Yes")) == "No"))
if(F.do_not_edit && (tgui_alert(usr, "WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", list("No", "Yes")) != "Yes"))
return
var/oldtext = html_decode(F.stored_data)
+1 -1
View File
@@ -73,7 +73,7 @@
if(target_down && target_up)
var/direction = tgui_alert(M,"Do you want to go up or down?", "Ladder", list("Up", "Down", "Cancel"))
if(direction == "Cancel")
if(!direction || direction == "Cancel")
return
if(!M.may_climb_ladders(src))
+4 -4
View File
@@ -138,13 +138,13 @@
if(!permit_human)
var/sure = tgui_alert(H,"Are you sure you want to try without tools? It's VERY LIKELY \
you will fall and get hurt. More agile species might have better luck", "Second Thoughts", list("Bring it!", "Stay grounded"))
if(sure == "Stay grounded") return
if(sure || sure == "Stay grounded") return
fall_chance = clamp(100 - H.species.agility, 40, 90) //This should be 80 for most species. Traceur would reduce to 10%, so clamping higher
//If not a human mob, must be simple or silicon. They got a var stored on their mob we can check
else if(!L.can_climb)
var/sure = tgui_alert(L,"Are you sure you want to try without tools? It's VERY LIKELY \
you will fall and get hurt. More agile species might have better luck", "Second Thoughts", list("Bring it!", "Stay grounded"))
if(sure == "Stay grounded") return
if(!sure || sure == "Stay grounded") return
if(isrobot(L))
fall_chance = 80 // Robots get no mercy
else
@@ -262,13 +262,13 @@
if(!permit_human)
var/sure = tgui_alert(H,"Are you sure you want to try without tools? It's VERY LIKELY \
you will fall and get hurt. More agile species might have better luck", "Second Thoughts", list("Bring it!", "Stay grounded"))
if(sure == "Stay grounded") return
if(!sure || sure == "Stay grounded") return
fall_chance = clamp(100 - H.species.agility, 40, 90) //This should be 80 for most species. Traceur would reduce to 10%, so clamping higher
//If not a human mob, must be simple or silicon. They got a var stored on their mob we can check
else if(!src.can_climb)
var/sure = tgui_alert(src,"Are you sure you want to try without tools? It's VERY LIKELY \
you will fall and get hurt. More agile species might have better luck", "Second Thoughts", list("Bring it!", "Stay grounded"))
if(sure == "Stay grounded") return
if(!sure || sure == "Stay grounded") return
if(isrobot(src))
fall_chance = 80 // Robots get no mercy
else
+2
View File
@@ -41,6 +41,8 @@
var/timehash = copytext(md5("[world.time]"),1,10)
var/text = null
var/logo = tgui_alert(usr, "Do you want the header of your fax to have a NanoTrasen, SolGov, or Trader logo?","Fax Logo",list("NanoTrasen","SolGov","Trader")) //VOREStation Add - Trader
if(!logo)
return
if(logo == "SolGov")
logo = "sglogo.png"
//VOREStation Edit/Add
+1 -1
View File
@@ -283,7 +283,7 @@ Extracted to its own procedure for easier logic handling with paper bundles.
var/choice = tgui_alert(usr, "[question_text] improve response time from staff when sending to discord. \
Renaming it changes its preview in staff chat.", \
"Default name detected", list("Change Title","Continue", "Cancel"))
if(choice == "Cancel")
if(!choice || choice == "Cancel")
return TRUE
else if(choice == "Change Title")
var/new_name = tgui_input_text(usr, "Enter new fax title", "This will show up in the preview for staff chat on discord when sending \
+2 -2
View File
@@ -22,7 +22,7 @@
return
var/response = tgui_alert(usr, "Are you sure?", "Engine setup", list("No", "Yes"))
if(!response || response == "No")
if(response != "Yes")
return
var/errors = 0
@@ -80,4 +80,4 @@
#undef SETUP_OK
#undef SETUP_WARNING
#undef SETUP_ERROR
#undef SETUP_DELAYED
#undef SETUP_DELAYED
+5 -2
View File
@@ -163,7 +163,10 @@
if(!spawn_path)
return
if(tgui_alert(usr, "Do you wish the mob to have a player?","Assign Player?",list("No","Yes")) == "No")
var/input = tgui_alert(usr, "Do you wish the mob to have a player?","Assign Player?",list("No","Yes"))
if(!input)
return
if(input == "No")
var/spawn_count = tgui_input_number(usr, "How many mobs do you wish the pod to contain?", "Drop Pod Selection", null, min_value=1)
if(spawn_count <= 0)
return
@@ -197,7 +200,7 @@
var/datum/antagonist/A = all_antag_types[antag_type]
A.equip(spawned_mob)
if(tgui_alert(usr, "Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.","Danger!",list("No","Yes")) == "No")
if(tgui_alert(usr, "Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.","Danger!",list("No","Yes")) != "Yes")
if(spawned_mob)
qdel(spawned_mob)
if(spawned_mobs.len)
+5 -1
View File
@@ -42,6 +42,8 @@
var/chosen_loot_type
var/list/chosen_loot_types
var/choice = tgui_alert(usr, "Do you wish to supply a custom loot list?","Supply Drop",list("No","Yes"))
if(!choice)
return
if(choice == "Yes")
chosen_loot_types = list()
@@ -83,11 +85,13 @@
chosen_loot_types |= adding_loot_type
else
choice = tgui_alert(usr, "Do you wish to specify a loot type?","Supply Drop",list("No","Yes"))
if(!choice)
return
if(choice == "Yes")
chosen_loot_type = tgui_input_list(usr, "Select a loot type.", "Loot Selection", supply_drop_random_loot_types())
choice = tgui_alert(usr, "Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.","Supply Drop",list("No","Yes"))
if(choice == "No")
if(choice != "Yes")
return
log_admin("[key_name(usr)] dropped supplies at ([usr.x],[usr.y],[usr.z])")
new /datum/random_map/droppod/supply(null, usr.x-2, usr.y-2, usr.z, supplied_drops = chosen_loot_types, supplied_drop = chosen_loot_type)
@@ -239,7 +239,7 @@
amount_per_injector = CLAMP(beaker.reagents.total_volume / amount, 0, 15)
if((size == "small injector" && amount_per_injector < 5) || size == "large injector" && amount_per_injector < 15)
proceed = tgui_alert(usr, "Heads up! Less than max volume per injector!\n Making [amount] [size](s) filled with [amount_per_injector] total reagent volume each!","Proceed?",list("No","Yes"))
if(proceed == "No" || !amount_per_injector)
if(!proceed || proceed == "No" || !amount_per_injector)
return
for(var/i, i < amount, i++)
switch(size)
+1 -1
View File
@@ -421,7 +421,7 @@
to_chat(usr, "<span class='notice'>The destructive analyzer is busy at the moment.</span>")
return
if(tgui_alert(usr, "Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", list("Yes", "No")) == "No" || !linked_destroy)
if(tgui_alert(usr, "Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", list("Yes", "No")) != "Yes" || !linked_destroy)
return
linked_destroy.busy = 1
busy_msg = "Processing and Updating Database..."
+1 -1
View File
@@ -133,7 +133,7 @@
spawn_slots --
return
if(tgui_alert(ghost, "Would you like to be resleeved?", "Resleeve", list("No","Yes")) == "No")
if(tgui_alert(ghost, "Would you like to be resleeved?", "Resleeve", list("No","Yes")) != "Yes")
return
var/mob/living/carbon/human/new_character
new_character = new(spawnloc)
+1 -1
View File
@@ -407,7 +407,7 @@
var/answer = tgui_alert(active_mr.mind_ref.current,"Someone is attempting to restore a backup of your mind. Do you want to abandon this body, and move there? You MAY suffer memory loss! (Same rules as CMD apply)","Resleeving",list("No","Yes"))
//They declined to be moved.
if(answer == "No")
if(answer != "Yes")
set_temp("Initiating resleeving... Error: Post-initialisation failed. Resleeving cycle aborted.", "danger")
tgui_modal_clear(src)
return TRUE
+2 -2
View File
@@ -375,11 +375,11 @@
return 1
var/choice = tgui_alert(usr, "The shuttle is currently docked! Please undock before continuing.","Error",list("Cancel","Force Launch"))
if(choice == "Cancel")
if(!choice || choice == "Cancel")
return 0
choice = tgui_alert(usr, "Forcing a shuttle launch while docked may result in severe injury, death and/or damage to property. Are you sure you wish to continue?", "Force Launch", list("Force Launch", "Cancel"))
if(choice == "Cancel")
if(choice || choice == "Cancel")
return 0
return 1
+1 -1
View File
@@ -194,7 +194,7 @@
if(!antigens.len)
var/a = tgui_alert(usr, "This disease has no antigens; it will be impossible to permanently immunise anyone without them.\
It is strongly recommended to set at least one antigen. Do you want to go back and edit your virus?", "Antigens", list("Yes", "No"))
if(a == "Yes") return
if(!a || a == "Yes") return
var/datum/disease2/disease/D = new
D.infectionchance = infectionchance
D.spreadtype = spreadtype
+2
View File
@@ -1319,6 +1319,8 @@
set desc = "Print out your vorebelly messages into chat for copypasting."
var/result = tgui_alert(src, "Would you rather open the export panel?", "Selected Belly Export", list("Open Panel", "Print to Chat"))
if(!result)
return
if(result == "Open Panel")
var/mob/living/user = usr
if(!user)
+1 -1
View File
@@ -3820,7 +3820,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
. = TRUE
if("b_del")
var/alert = tgui_alert(user, "Are you sure you want to delete your [lowertext(host.vore_selected.name)]?","Confirmation",list("Cancel","Delete")) //ChompEDIT - user, not usr
if(!(alert == "Delete"))
if(alert != "Delete")
return FALSE
var/failure_msg = ""
+3 -3
View File
@@ -15,7 +15,7 @@
var/rigged = 0 //So that they can be rigged by varedits to go one way or the other. positive values mean holder always wins, negative values mean target always wins.
var/list/prizes = list("shrinking","growing","drugged","invisibility","knocked over","teleport","wealth")
var/list/jokes = list(
"When is a boat just like snow? When its adrift.",
"When is a boat just like snow? When it's adrift.",
"What happens to naughty elves? Santa gives them the sack.",
"What do you call an old snowman? Water.",
"Why has Santa been banned from sooty chimneys? Carbon footprints.",
@@ -29,7 +29,7 @@
"What's red, and smells like blue paint? Red paint.",
"Where do cows go to dance? A meat ball.",
"What do you call a person who steals all your toenail clippings? A cliptoemaniac.",
"Whats brown and sticky? A stick.",
"What's brown and sticky? A stick.",
"What's the best way to kill a circus? Go for the juggler.",
"What do you call a cow with no legs? Ground Beef.",
"Why'd the scarecrow win the Nobel prize? He was outstanding in his field.")
@@ -45,7 +45,7 @@
return
to_chat(user, "<span class='notice'>You offer \the [src] to \the [target] to pull and wait to see how whether they do.</span>")
var/check_pull = tgui_alert(target, "\The [user] is offering to pull \the [src] with you, do you want to pull it?", "Pull Cracker", list("Yes", "No"))
if(check_pull == "No")
if(!check_pull || check_pull == "No")
to_chat(user, "<span class='notice'>\The [target] chose not to pull \the [src]!</span>")
return
if(!adjacent)
@@ -101,7 +101,7 @@
if("drainbattery")
if(inserted_battery)
if(inserted_battery.battery_effect && inserted_battery.stored_charge > 0)
if(tgui_alert(usr, "This action will dump all charge, safety gear is recommended before proceeding","Warning",list("Continue","Cancel")))
if(tgui_alert(usr, "This action will dump all charge, safety gear is recommended before proceeding","Warning",list("Continue","Cancel")) == "Continue")
if(!inserted_battery.battery_effect.activated)
inserted_battery.battery_effect.ToggleActivate(1)
last_process = world.time
@@ -65,6 +65,8 @@
else
if(istype(I, /obj/item/stack/nanopaste))
var/choice = tgui_alert(usr, "What do you want to do with the nanopaste?","Radiometric Scanner",list("Scan nanopaste","Fix seal integrity"))
if(!choice)
return
if(choice == "Fix seal integrity")
var/obj/item/stack/nanopaste/N = I
var/amount_used = min(N.get_amount(), 10 - scanner_seal_integrity / 10)
@@ -76,6 +78,8 @@
if(!G.is_open_container())
return
var/choice = tgui_alert(usr, "What do you want to do with the container?","Radiometric Scanner",list("Add coolant","Empty coolant","Scan container"))
if(!choice)
return
if(choice == "Add coolant")
var/amount_transferred = min(src.reagents.maximum_volume - src.reagents.total_volume, G.reagents.total_volume)
var/trans = G.reagents.trans_to_obj(src, amount_transferred)
+6 -6
View File
@@ -21,7 +21,7 @@
set desc = "Visit the forum."
set hidden = 1
if(CONFIG_GET(string/forumurl)) // CHOMPEdit
if(tgui_alert(usr, "This will open the forum in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No")
if(tgui_alert(usr, "This will open the forum in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(CONFIG_GET(string/forumurl)) // CHOMPEdit
else
@@ -34,7 +34,7 @@
set hidden = 1
if(CONFIG_GET(string/rulesurl)) // CHOMPEdit
if(tgui_alert(usr, "This will open the rules in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No")
if(tgui_alert(usr, "This will open the rules in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(CONFIG_GET(string/rulesurl)) // CHOMPEdit
else
@@ -47,7 +47,7 @@
set hidden = 1
if(CONFIG_GET(string/mapurl)) // CHOMPEdit
if(tgui_alert(usr, "This will open the map in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No")
if(tgui_alert(usr, "This will open the map in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(CONFIG_GET(string/mapurl)) // CHOMPEdit
else
@@ -60,7 +60,7 @@
set hidden = 1
if(CONFIG_GET(string/githuburl)) // CHOMPEdit
if(tgui_alert(usr, "This will open the GitHub in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No")
if(tgui_alert(usr, "This will open the GitHub in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(CONFIG_GET(string/githuburl)) // CHOMPEdit
else
@@ -73,7 +73,7 @@
set hidden = 1
if(CONFIG_GET(string/discordurl)) // CHOMPEdit
if(tgui_alert(usr, "This will open the Discord in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No")
if(tgui_alert(usr, "This will open the Discord in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(CONFIG_GET(string/discordurl)) // CHOMPEdit
else
@@ -86,7 +86,7 @@
set hidden = 1
if(CONFIG_GET(string/patreonurl)) // CHOMPEdit
if(tgui_alert(usr, "This will open the Patreon in your browser. Are you sure?","Visit Website",list("Yes","No"))=="No")
if(tgui_alert(usr, "This will open the Patreon in your browser. Are you sure?","Visit Website",list("Yes","No")) != "Yes")
return
src << link(CONFIG_GET(string/patreonurl)) // CHOMPEdit
else
@@ -196,7 +196,7 @@
if(!occupant)
return
if(!forced && avatar && tgui_alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", list("Yes", "No")) == "No")
if(!forced && avatar && tgui_alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", list("Yes", "No")) != "Yes")
return
if(avatar)
@@ -233,7 +233,7 @@
avatar = occupant.vr_link
// If they've already enterred VR, and are reconnecting, prompt if they want a new body
if(avatar && tgui_alert(occupant, "You already have a [avatar.stat == DEAD ? "" : "deceased "]Virtual Reality avatar. Would you like to use it?", "New avatar", list("Yes", "No")) == "No")
if(avatar && tgui_alert(occupant, "You already have a [avatar.stat == DEAD ? "" : "deceased "]Virtual Reality avatar. Would you like to use it?", "New avatar", list("Yes", "No")) != "Yes")
// Delink the mob
occupant.vr_link = null
avatar = null

Some files were not shown because too many files have changed in this diff Show More