Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
if(flashwindow)
window_flash(M.client)
var/options = ignore_category ? list(CHOICE_YES, CHOICE_NO, CHOICE_NEVER) : DEFAULT_INPUT_CHOICES
switch(browser_alert(M, Question, "Please answer in [DisplayTimeText(poll_time)]!", options))
switch(tgui_alert(M, Question, "Please answer in [DisplayTimeText(poll_time)]!", options))
if(CHOICE_YES)
to_chat(M, "<span class='notice'>Choice registered: Yes.</span>")
if(time_passed + poll_time <= world.time)
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/fullscreen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
if(isliving(usr))
var/mob/living/L = usr
if(L.stat != DEAD)
if(alert("Are you done living?", "", "Yes", "No") == "Yes")
if(tgui_alert(L, "Are you done living?", "", list("Yes", "No")) == "Yes")
L.succumb(reaper = TRUE)

/atom/movable/screen/fullscreen/crit/death
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
if(istype(ghost, /mob/dead/observer/rogue/arcaneeye))
return
if(istype(ghost, /mob/dead/observer/profane)) // Souls trapped by a dagger can return to lobby if they want
if(alert("Return to the lobby?", "", "Yes", "No") == "Yes")
if(tgui_alert(ghost, "Return to the lobby?", "", list("Yes", "No")) == "Yes")
ghost.returntolobby()
ghost.descend_to_underworld()
return
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@
if(M.get_triumphs() <= 0)
to_chat(M, "<span class='warning'>I haven't TRIUMPHED.</span>")
return
if(alert("Do you want to remember a TRIUMPH?", "", "Yes", "No") == "Yes")
if(tgui_alert(M, "Do you want to remember a TRIUMPH?", "Remember TRIUMPH", list("Yes", "No")) == "Yes")
if(M.add_stress(/datum/stress_event/triumph))
M.adjust_triumphs(-1)
M.playsound_local(M, 'sound/misc/notice (2).ogg', 100, FALSE)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/painting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ SUBSYSTEM_DEF(paintings)
if(client.ckey == author_ckey)
if(!(istext(painting_title) && istext(author) && istext(author_ckey)))
return "This painting is incorrectly formatted!"
var/replace = input(client, "Someone wants to replace [painting_title] with another one by you, do you want to replace this?") as anything in list("Yes", "No")
var/replace = tgui_alert(client, "Someone wants to replace [painting_title] with another one by you, do you want to replace this?", "Confirm", list("Yes", "No"))
if(replace != "Yes")
canvas.reject = TRUE
return "there is already a painting by this title!"
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystem/property_management.dm
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ SUBSYSTEM_DEF(housing)
to_chat(user, span_warning("No slot assigned to this property!"))
return

var/confirm = alert(user, "Save the current state to design slot [slot]?", "Save Property", "Yes", "No")
var/confirm = tgui_alert(user, "Save the current state to design slot [slot]?", "Save Property", list("Yes", "No"))
if(confirm != "Yes")
return

Expand Down Expand Up @@ -605,7 +605,7 @@ SUBSYSTEM_DEF(housing)

var/selected_slot = options[choice]

var/confirm = alert(user, "Purchase this property for [linked_property.rent_cost] credits using slot [selected_slot]?\n\nRent will be deducted each round.", "Property Purchase", "Yes", "No")
var/confirm = tgui_alert(user, "Purchase this property for [linked_property.rent_cost] credits using slot [selected_slot]?\n\nRent will be deducted each round.", "Property Purchase", list("Yes", "No"))
if(confirm != "Yes")
return

Expand Down
12 changes: 6 additions & 6 deletions code/controllers/subsystem/triumph/codes/redeem_codes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
reload_global_stored_codes()

if(!(code in GLOB.stored_codes))
browser_alert(usr, "Sorry, this code does not exist or has expired.", "Code Redemption", list("Close"))
tgui_alert(usr, "Sorry, this code does not exist or has expired.", "Code Redemption", list("Close"))
message_admins("[usr.ckey] has attempted to redeem an invalid code.")
return

Expand All @@ -26,20 +26,20 @@
// Check if user has already redeemed this code
var/list/redeemed_by = metadata["redeemed_by"]
if(user_ckey in redeemed_by)
browser_alert(usr, "You have already redeemed this code.", "Code Redemption", list("Close"))
tgui_alert(usr, "You have already redeemed this code.", "Code Redemption", list("Close"))
return

// Check expiry
if(metadata["expiry"] && world.time > metadata["expiry"])
browser_alert(usr, "Sorry, this code has expired.", "Code Redemption", list("Close"))
tgui_alert(usr, "Sorry, this code has expired.", "Code Redemption", list("Close"))
remove_code(code) // Clean up expired code
return

// Check use limit
if(metadata["max_uses"])
var/current_uses = metadata["current_uses"] || 0
if(current_uses >= metadata["max_uses"])
browser_alert(usr, "Sorry, this code has reached its maximum number of redemptions.", "Code Redemption", list("Close"))
tgui_alert(usr, "Sorry, this code has reached its maximum number of redemptions.", "Code Redemption", list("Close"))
remove_code(code) // Clean up exhausted code
return

Expand All @@ -51,7 +51,7 @@
else
// Old style code - single use only
if(code in GLOB.redeemed_codes)
browser_alert(usr, "Sorry the code you've tried to redeem has already been redeemed", "Code Redemption", list("Close"))
tgui_alert(usr, "Sorry the code you've tried to redeem has already been redeemed", "Code Redemption", list("Close"))
return

var/triumph_amount = GLOB.stored_codes[code]
Expand All @@ -61,7 +61,7 @@
adjust_triumphs(usr.ckey, triumph_amount, TRUE, "Redeemed a Giveaway Code", FALSE, TRUE)
to_chat(usr, span_boldnotice("You have successfully redeemed a giveaway code for [triumph_amount] triumph\s."))
else
browser_alert(usr, "Error: Invalid code data. Please contact an administrator.", "Code Redemption", list("Close"))
tgui_alert(usr, "Error: Invalid code data. Please contact an administrator.", "Code Redemption", list("Close"))
message_admins("ERROR: Code [code] has invalid data: [triumph_amount]")
return

Expand Down
63 changes: 0 additions & 63 deletions code/datums/browser/modal/alert.dm

This file was deleted.

2 changes: 1 addition & 1 deletion code/datums/explosion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ GLOBAL_LIST_EMPTY(explosions)
set name = "Check Bomb Impact"
set category = "Debug"

var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
var/newmode = tgui_alert(usr, "Use reactionary explosions?","Check Bomb Impact", list("Yes", "No"))
var/turf/epicenter = get_turf(mob)
if(!epicenter)
return
Expand Down
2 changes: 1 addition & 1 deletion code/datums/inspiration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ GLOBAL_LIST_INIT(inspiration_songs, list(\
if(get_spell(item , TRUE))
to_chat(src, span_warning("You already know this song!"))
return
if(alert(src, "[item.desc]", "[item.name]", "Learn", "Cancel") == "Cancel") //gives a preview of the spell's description to let people know what a spell does
if(tgui_alert(src, "[item.desc]", "[item.name]", list("Learn", "Cancel")) == "Cancel") //gives a preview of the spell's description to let people know what a spell does
return

add_spell(item, source = inspiration)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/skill_holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
if(current.stat >= UNCONSCIOUS || youngling.stat >= UNCONSCIOUS)
return

var/choice = input(youngling, "Do you wish to become [current.name]'s apprentice?") as anything in list("Yes", "No")
var/choice = tgui_alert(youngling, "Do you wish to become [current.name]'s apprentice?", "Confirm", list("Yes","No"))
if(length(apprentices) >= max_apprentices)
return
if(current.stat >= UNCONSCIOUS || youngling.stat >= UNCONSCIOUS)
Expand Down
2 changes: 1 addition & 1 deletion code/game/atom/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@

if(reagents)
var/chosen_id
switch(alert(usr, "Choose a method.", "Add Reagents", "Search", "Choose from a list", "I'm feeling lucky"))
switch(tgui_alert(usr, "Choose a method.", "Add Reagents", list("Search", "Choose from a list", "I'm feeling lucky")))
if("Search")
var/valid_id
while(!valid_id)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/books.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@
select_icon = newicon
icon_state = "paperwrite"
to_chat(user, "<span class='notice'>You have successfully authored and titled the manuscript.</span>")
var/complete = browser_alert(user, "Is the manuscript finished?", "WORDS OF NOC", DEFAULT_INPUT_CHOICES)
var/complete = tgui_alert(user, "Is the manuscript finished?", "WORDS OF NOC", DEFAULT_INPUT_CHOICES)
SEND_SIGNAL(user, COMSIG_BOOK_WRITTEN)
if(complete == CHOICE_YES && compiled_pages)
written = TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/coins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
playsound(src, 'sound/foley/coins1.ogg', 100, TRUE, -2)

/obj/item/coin/proc/rig_coin(mob/user)
var/outcome = alert(user, "What will you rig the next coin flip to?","XYLIX","Heads","Tails","Play fair")
var/outcome = tgui_alert(user, "What will you rig the next coin flip to?","XYLIX", list("Heads","Tails","Play fair"))
if(QDELETED(src) || !user.is_holding(src))
return
switch(outcome)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/devies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
resistance_flags = FIRE_PROOF

/obj/item/gem_device/attack_self(mob/living/user, list/modifiers)
var/alert = alert(user, "Do I want to use this? \n[usage_prompt]", "Enchanted Gem", "Yes", "No")
var/alert = tgui_alert(user, "Do I want to use this? \n[usage_prompt]", "Enchanted Gem", list("Yes", "No"))
if(alert != "Yes")
return
if(!on_use(user))
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/inquisition_relics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
if(!full)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
if(browser_alert(user, "EMPTY THE INDEXER?", "INDEXING...", "YES", "NO") != "NO")
if(tgui_alert(user, "EMPTY THE INDEXER?", "INDEXING...", list("YES", "NO")) != "NO")
playsound(src, 'sound/items/indexer_empty.ogg', 75, FALSE, 3)
visible_message(span_warning("[src] boils its contents away!"))
fullreset(user)
Expand Down Expand Up @@ -1214,7 +1214,7 @@
return

if(!active)
var/input = browser_alert(user, "WHAT DO YOU SEEK?", "THE PRICE IS PAID", list("BLOOD", "FIXATION"))
var/input = tgui_alert(user, "WHAT DO YOU SEEK?", "THE PRICE IS PAID", list("BLOOD", "FIXATION"))
if(!input || QDELETED(user) || QDELETED(src))
return

Expand Down Expand Up @@ -1385,7 +1385,7 @@
return

var/datum/weakref/lookat = null
if(alert(L, "KEEP LOOKING, WHAT WILL YOU FIND?", "BLACK EYED GAZE", "BLOOD", "MIRROR") != "BLOOD")
if(tgui_alert(L, "KEEP LOOKING, WHAT WILL YOU FIND?", "BLACK EYED GAZE", list("BLOOD", "MIRROR")) != "BLOOD")
lookat = source
else
lookat = source.feeder
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/servant_bell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
var/remove = browser_input_list(user, "Who will be relinquished of service?","Service Bell", all_servants)
if(remove)
if(remove == "Relinquish all")
var/choice = input(user,"Are you sure you want to clear the servant list?","Service Bell",null) as null|anything in list("Yes", "No")
var/choice = tgui_alert(user, "Are you sure you want to clear the servant list?", "Service Bell", list("Yes", "No"))
if(choice != "Yes")
return
for(var/s_name in servants)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
/obj/item/toy/cards/deck/attack_self(mob/user, list/modifiers)
if(cooldown < world.time - 50)
if(HAS_TRAIT(user, TRAIT_BLACKLEG))
var/outcome = alert(user, "How do you want to shuffle the deck?","XYLIX","False Shuffle","Force Top Card","Play fair")
var/outcome = tgui_alert(user, "How do you want to shuffle the deck?","XYLIX", list("False Shuffle","Force Top Card","Play fair"))
switch(outcome)
if("False Shuffle")
record_featured_stat(FEATURED_STATS_CRIMINALS, user)
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/weapons/shields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
add_overlay(MU)

design_chosen = TRUE
if(browser_alert(user, "Are you pleased with your heraldry?", "Heraldry", DEFAULT_INPUT_CHOICES) != CHOICE_YES)
if(tgui_alert(user, "Are you pleased with your heraldry?", "Heraldry", DEFAULT_INPUT_CHOICES) != CHOICE_YES)
cut_overlays()
design_chosen = FALSE

Expand Down Expand Up @@ -254,7 +254,7 @@
add_overlay(MU)

design_chosen = TRUE
if(browser_alert(user, "Are you pleased with your heraldry?", "Heraldry", DEFAULT_INPUT_CHOICES) != CHOICE_YES)
if(tgui_alert(user, "Are you pleased with your heraldry?", "Heraldry", DEFAULT_INPUT_CHOICES) != CHOICE_YES)
cut_overlays()
design_chosen = FALSE

Expand Down Expand Up @@ -346,7 +346,7 @@
add_overlay(MU)

design_chosen = TRUE
if(browser_alert(user, "Are you pleased with your heraldry?", "Heraldry", DEFAULT_INPUT_CHOICES) != CHOICE_YES)
if(tgui_alert(user, "Are you pleased with your heraldry?", "Heraldry", DEFAULT_INPUT_CHOICES) != CHOICE_YES)
cut_overlays()
design_chosen = FALSE

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/lighting/_base_roguelight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
else
if(!on)
return
if (alert(usr, "Feed [W] to the fire?", "VANDERLIN", "Yes", "No") != "Yes")
if(tgui_alert(usr, "Feed [W] to the fire?", "VANDERLIN", list("Yes", "No")) != "Yes")
return
if(!(W in user.held_items)|| !user.temporarilyRemoveItemFromInventory(W))
return
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/lighting/smelter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
return

if(W.firefuel)
if(alert(usr, "Fuel \the [src] with [W]?", "VANDERLIN", "Fuel", "Smelt") == "Fuel")
if(tgui_alert(usr, "Fuel \the [src] with [W]?", "Fuel", list("Fuel", "Smelt")) == "Fuel")
return ..()

if(istype(W, /obj/item/storage/crucible))
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,14 @@
usr.client.object_say(src)
if(href_list[VV_HK_MASS_DEL_TYPE])
if(check_rights(R_DEBUG|R_SERVER))
var/action_type = alert("Strict type ([type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
var/action_type = tgui_alert(usr, "Strict type ([type]) or type and all subtypes?", "Type", list("Strict type","Type and subtypes","Cancel"))
if(action_type == "Cancel" || !action_type)
return

if(alert("Are you really sure you want to delete all objects of type [type]?",,"Yes","No") != "Yes")
if(tgui_alert(usr, "Are you really sure you want to delete all objects of type [type]?", "Mass Delete", list("Yes","No")) != "Yes")
return

if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
if(tgui_alert(usr, "Second confirmation required. Delete?", "Confirm", list("Yes","No")) != "Yes")
return

var/O_type = type
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/fake_machines/mail.dm
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ GLOBAL_LIST_EMPTY(letters_sent)
to_chat(user, span_warning("The machine doesn't respond."))
return

if(alert(user, "Send Mail?",,"YES","NO") != "YES")
if(tgui_alert(user, "Send Mail?", "Confirm", list("YES","NO")) != "YES")
return

var/send_to = browser_input_text(user, "Where to? (Person or #number)", "Vanderlin", null)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/fake_machines/steward.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
if(!D || !istype(D, /datum/stock/stockpile/custom))
return

var/confirm = alert(usr, "Are you sure you want to delete the custom stock for [D.name]?", "Delete Custom Stock", "Yes", "No")
var/confirm = tgui_alert(usr, "Are you sure you want to delete the custom stock for [D.name]?", "Delete Custom Stock", list("Yes", "No"))
if(confirm != "Yes")
return

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/fluff.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@
to_chat(user, span_danger("It is not mine to have..."))
return
to_chat(user, span_danger("As you extend your hand over to the glowing ring, you feel a shiver go up your spine, as if unseen eyes turned to glare at you..."))
var/gaffed = alert(user, "Will you bear the burden? (Be the next Gaffer)", "YOUR DESTINY", "Yes", "No")
var/gaffed = tgui_alert(user, "Will you bear the burden? (Be the next Gaffer)", "YOUR DESTINY", list("Yes", "No"))

if(gaffed == "No" && ring_destroyed == TRUE)
to_chat(user, span_danger("yes...best to leave it alone."))
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/ladders.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
return

if (up && down)
var/result = alert("Go up or down [src]?", "Ladder", "Up", "Down", "Cancel")
var/result = tgui_alert(user, "Go up or down [src]?", "Ladder", list("Up", "Down", "Cancel"))
if (!in_range(src, user))
return // nice try
switch(result)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/train.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
var/title = departing_mob.gender == FEMALE ? "lady" : "lord"
say("Surely you jest, my [title], you have a kingdom to rule over!")
return //prevents noble roles from cryoing as per request of Aberra
if(alert("Are you sure you want to [departing_mob == user ? "leave for [SSmapping.config.immigrant_origin] (you" : "send this person to [SSmapping.config.immigrant_origin] (they"] will be removed from the current round, the job slot freed)?", "Departing", "Confirm", "Cancel") != "Confirm")
if(tgui_alert(user, "Are you sure you want to [departing_mob == user ? "leave for [SSmapping.config.immigrant_origin] (you" : "send this person to [SSmapping.config.immigrant_origin] (they"] will be removed from the current round, the job slot freed)?", "Departing", list("Confirm", "Cancel")) != "Confirm")
return //doublechecks that people actually want to leave the round
if(user.incapacitated(IGNORE_GRAB) || QDELETED(departing_mob) || (departing_mob != user && departing_mob.client) || get_dist(src, dropping) > 2 || get_dist(src, user) > 2)
return //Things have changed since the alert happened.
Expand Down
Loading
Loading