diff --git a/code/controllers/subsystem/non_firing/SSchangelog.dm b/code/controllers/subsystem/non_firing/SSchangelog.dm index 6bcbd69026f..52b9f200428 100644 --- a/code/controllers/subsystem/non_firing/SSchangelog.dm +++ b/code/controllers/subsystem/non_firing/SSchangelog.dm @@ -211,13 +211,13 @@ SUBSYSTEM_DEF(changelog) if("open_pr") var/pr_num = params["pr_number"] if(GLOB.configuration.url.github_url) - if(tgui_alert(usr, "This will open PR #[pr_num] in your browser. Are you sure?", "Open PR", list("Yes", "No")) == "No") + if(tgui_alert(usr, "This will open PR #[pr_num] in your browser. Are you sure?", "Open PR", list("Yes", "No")) != "Yes") return // If the github URL in the config has a trailing slash, it doesnt matter here, thankfully github accepts having a double slash: https://github.com/org/repo//pull/1 var/url = "[GLOB.configuration.url.github_url]/pull/[pr_num]" usr << link(url) - return + return TRUE to_chat(usr, "The GitHub URL is not set in the server configuration. PRs cannot be opened from changelog view. Please inform the server host.") diff --git a/code/datums/outfits/outfit_debug.dm b/code/datums/outfits/outfit_debug.dm index 13246c29385..e992aed1af2 100644 --- a/code/datums/outfits/outfit_debug.dm +++ b/code/datums/outfits/outfit_debug.dm @@ -39,7 +39,7 @@ var/obj/item/card/id/I = H.wear_id if(istype(I)) apply_to_card(I, H, get_all_accesses(), "Debugger", "admin") - + H.dna.SetSEState(GLOB.breathlessblock, 1) singlemutcheck(H, GLOB.breathlessblock, MUTCHK_FORCED) H.dna.default_blocks.Add(GLOB.breathlessblock) @@ -67,10 +67,10 @@ to_chat(user, "You switch [src] to [change_voice ? "" : "not "]change your voice on syndicate communications.") /obj/item/encryptionkey/syndicate/all_channels/AltClick(mob/user) - var/new_name = tgui_input_text(user, "Enter new fake agent name...", "New name") + var/new_name = tgui_input_text(user, "Enter new fake agent name...", "New name", max_length = MAX_NAME_LEN) if(!new_name) return - fake_name = copytext(new_name, 1, MAX_NAME_LEN + 1) + fake_name = new_name /obj/item/clothing/mask/gas/welding/advanced name = "AVD-CNED welding mask" diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 35bc6217375..52aee2543b3 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -582,7 +582,7 @@ if(!owner_AI.can_place_transformer(src)) return active = TRUE - if(tgui_alert(owner, "Are you sure you want to place the machine here?", "Are you sure?", list("Yes", "No")) == "No") + if(tgui_alert(owner, "Are you sure you want to place the machine here?", "Are you sure?", list("Yes", "No")) != "Yes") active = FALSE return if(!owner_AI.can_place_transformer(src)) diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index dd67a9d0e8d..f3ede2875d1 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -283,7 +283,7 @@ return used = TRUE // Set this BEFORE the popup to prevent people using the injector more than once, polling ghosts multiple times, and receiving multiple guardians. var/choice = tgui_alert(user, "[confirmation_message]", "Confirm", list("Yes", "No")) - if(choice == "No") + if(choice != "Yes") to_chat(user, "You decide against using the [name].") used = FALSE return diff --git a/code/game/gamemodes/miniantags/guardian/host_actions.dm b/code/game/gamemodes/miniantags/guardian/host_actions.dm index 1a4c6c38dc4..8a622789e34 100644 --- a/code/game/gamemodes/miniantags/guardian/host_actions.dm +++ b/code/game/gamemodes/miniantags/guardian/host_actions.dm @@ -77,7 +77,7 @@ return var/confirm = tgui_alert(owner, "Are you sure you want replace your guardian's player?", "Confirm", list("Yes", "No")) - if(confirm == "No") + if(confirm != "Yes") return // Do this immediately, so the user can't spam a bunch of polls. diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm index 5d18b95e098..178399588d9 100644 --- a/code/game/gamemodes/nuclear/nuclear_challenge.dm +++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm @@ -27,7 +27,7 @@ if(!check_allowed(user)) return - if(are_you_sure == "No") + if(are_you_sure != "Yes") to_chat(user, "On second thought, the element of surprise isn't so bad after all.") return diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 48932e088be..a391a35c33b 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -656,13 +656,13 @@ /datum/spellbook_entry/loadout/Buy(mob/living/carbon/human/user, obj/item/spellbook/book) if(destroy_spellbook) var/response = tgui_alert(user, "The [src] loadout cannot be refunded once bought. Are you sure this is what you want?", "No refunds!", list("No", "Yes")) - if(response == "No") + if(response != "Yes") return FALSE to_chat(user, "[book] crumbles to ashes as you acquire its knowledge.") qdel(book) else if(items_path.len) var/response = tgui_alert(user, "The [src] loadout contains items that will not be refundable if bought. Are you sure this is what you want?", "No refunds!", list("No", "Yes")) - if(response == "No") + if(response != "Yes") return FALSE if(items_path.len) var/obj/item/storage/box/wizard/B = new(src) diff --git a/code/game/machinery/computer/atmos_controllers.dm b/code/game/machinery/computer/atmos_controllers.dm index d68f4dbbeb6..56926511eb1 100644 --- a/code/game/machinery/computer/atmos_controllers.dm +++ b/code/game/machinery/computer/atmos_controllers.dm @@ -174,7 +174,7 @@ GLOBAL_LIST_EMPTY(gas_sensors) // This is its own proc so it can be modified in child types /obj/machinery/computer/general_air_control/proc/configure_sensors(mob/living/user, obj/item/multitool/M) var/choice = tgui_alert(user, "Would you like to add or remove a sensor/meter", "Configuration", list("Add", "Remove", "Cancel")) - if((choice == "Cancel") || !Adjacent(user)) + if(!choice || (choice == "Cancel") || !Adjacent(user)) return switch(choice) @@ -354,7 +354,7 @@ GLOBAL_LIST_EMPTY(gas_sensors) /obj/machinery/computer/general_air_control/large_tank_control/proc/configure_inlet(mob/living/user, obj/item/multitool/M) var/choice = tgui_alert(user, "Would you like to add/replace the existing inlet or clear it?", "Configuration", list("Add/Replace", "Clear", "Cancel")) - if((choice == "Cancel") || !Adjacent(user)) + if(!choice || (choice == "Cancel") || !Adjacent(user)) return switch(choice) @@ -390,7 +390,7 @@ GLOBAL_LIST_EMPTY(gas_sensors) /obj/machinery/computer/general_air_control/large_tank_control/proc/configure_outlet(mob/living/user, obj/item/multitool/M) var/choice = tgui_alert(user, "Would you like to add/replace the existing outlet or clear it?", "Configuration", list("Add/Replace", "Clear", "Cancel")) - if((choice == "Cancel") || !Adjacent(user)) + if(!choice || (choice == "Cancel") || !Adjacent(user)) return switch(choice) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index b420eddb466..12da6be70a5 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -522,7 +522,7 @@ opposite_catastasis = "BROAD" var/choice = tgui_alert(user, "Current receiver spectrum is set to: [catastasis]", "Multitool-Circuitboard interface", list("Switch to [opposite_catastasis]", "Cancel")) - if(choice == "Cancel") + if(!choice || choice == "Cancel") return contraband_enabled = !contraband_enabled diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 02200b333cd..0282857720a 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -279,7 +279,7 @@ return used = TRUE // Set this BEFORE the popup to prevent people using the injector more than once. var/choice = tgui_alert(user, "The injector is still unused. Do you wish to use it?", "Fireproofing injector", list("Yes", "No")) - if(choice == "No") + if(choice != "Yes") to_chat(user, "You decide against using [src].") used = FALSE return diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index df9a9db6bd0..d2d3050e71f 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -38,7 +38,7 @@ for(var/obj/O in src) if(O.density) var/response = tgui_alert(usr, "This crate has been packed with bluespace compression, an item inside won't fit back inside. Are you sure you want to open it?", "Bluespace Compression Warning", list("Yes", "No")) - if(response == "No" || !Adjacent(usr)) + if(response != "Yes" || !Adjacent(usr)) return FALSE break diff --git a/code/game/objects/structures/misc_structures.dm b/code/game/objects/structures/misc_structures.dm index fd3f510c08e..3a33788ae4a 100644 --- a/code/game/objects/structures/misc_structures.dm +++ b/code/game/objects/structures/misc_structures.dm @@ -55,7 +55,7 @@ /obj/structure/respawner/attack_ghost(mob/dead/observer/user) if(check_rights(R_EVENT)) var/outfit_pick = tgui_alert(user, "Do you want to pick an outfit or respawn?", "Pick an Outfit?", list("Pick outfit", "Respawn", "Cancel")) - if(outfit_pick == "Cancel") + if(!outfit_pick || outfit_pick == "Cancel") return if(outfit_pick == "Pick outfit") var/new_outfit = user.client.robust_dress_shop() diff --git a/code/modules/awaymissions/mob_spawn.dm b/code/modules/awaymissions/mob_spawn.dm index 0216b580c32..98d0e519bfb 100644 --- a/code/modules/awaymissions/mob_spawn.dm +++ b/code/modules/awaymissions/mob_spawn.dm @@ -43,8 +43,8 @@ /obj/effect/mob_spawn/attack_ghost(mob/user) if(!valid_to_spawn(user)) return - var/ghost_role = tgui_alert(user, "Become [mob_name]? (Warning, You can no longer be cloned!)", "Respawn", list("Yes","No")) - if(ghost_role == "No") + var/ghost_role = tgui_alert(user, "Become [mob_name]? (Warning, You can no longer be cloned!)", "Respawn", list("Yes", "No")) + if(ghost_role != "Yes") return if(!species_prompt(user)) return @@ -332,7 +332,7 @@ /obj/effect/mob_spawn/human/alive/space_bar_patron/attack_hand(mob/user) var/despawn = tgui_alert(user, "Return to cryosleep? (Warning, Your mob will be deleted!)", "Leave Bar", list("Yes", "No")) - if(despawn == "No" || !loc || !Adjacent(user)) + if(despawn != "Yes" || !loc || !Adjacent(user)) return user.visible_message("[user.name] climbs back into cryosleep...") qdel(user) diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm index f42e762cf11..b0ca5f8470c 100644 --- a/code/modules/client/preference/link_processing.dm +++ b/code/modules/client/preference/link_processing.dm @@ -65,34 +65,25 @@ user << browse(null, "window=records") if(href_list["task"] == "med_record") - var/medmsg = tgui_input_text(usr, "Set your medical notes here.", "Medical Records", active_character.med_record, multiline = TRUE, encode = FALSE) - - if(medmsg != null) - medmsg = copytext(medmsg, 1, MAX_PAPER_MESSAGE_LEN) - medmsg = html_encode(medmsg) - - active_character.med_record = medmsg - active_character.SetRecords(user) + var/medmsg = tgui_input_text(usr, "Set your medical notes here.", "Medical Records", active_character.med_record, max_length = MAX_PAPER_MESSAGE_LEN, multiline = TRUE) + if(!medmsg) + return + active_character.med_record = medmsg + active_character.SetRecords(user) if(href_list["task"] == "sec_record") - var/secmsg = tgui_input_text(usr, "Set your security notes here.", "Security Records", active_character.sec_record, multiline = TRUE, encode = FALSE) - - if(secmsg != null) - secmsg = copytext(secmsg, 1, MAX_PAPER_MESSAGE_LEN) - secmsg = html_encode(secmsg) - - active_character.sec_record = secmsg - active_character.SetRecords(user) + var/secmsg = tgui_input_text(usr, "Set your security notes here.", "Security Records", active_character.sec_record, max_length = MAX_PAPER_MESSAGE_LEN, multiline = TRUE) + if(!secmsg) + return + active_character.sec_record = secmsg + active_character.SetRecords(user) if(href_list["task"] == "gen_record") - var/genmsg = tgui_input_text(usr, "Set your employment notes here.", "Employment Records", active_character.gen_record, multiline = TRUE, encode = FALSE) - - if(genmsg != null) - genmsg = copytext(genmsg, 1, MAX_PAPER_MESSAGE_LEN) - genmsg = html_encode(genmsg) - - active_character.gen_record = genmsg - active_character.SetRecords(user) + var/genmsg = tgui_input_text(usr, "Set your employment notes here.", "Employment Records", active_character.gen_record, max_length = MAX_PAPER_MESSAGE_LEN, multiline = TRUE) + if(!genmsg) + return + active_character.gen_record = genmsg + active_character.SetRecords(user) if(href_list["preference"] == "gear") if(href_list["toggle_gear"]) @@ -714,13 +705,10 @@ active_character.height = new_height if("flavor_text") - var/msg = tgui_input_text(usr, "Set the flavor text in your 'examine' verb. The flavor text should be a physical descriptor of your character at a glance. SFW Drawn Art of your character is acceptable.", "Flavor Text", active_character.flavor_text, multiline = TRUE, encode = FALSE) - - if(msg != null) - msg = copytext(msg, 1, MAX_MESSAGE_LEN) - msg = html_encode(msg) - - active_character.flavor_text = msg + var/msg = tgui_input_text(usr, "Set the flavor text in your 'examine' verb. The flavor text should be a physical descriptor of your character at a glance. SFW Drawn Art of your character is acceptable.", "Flavor Text", active_character.flavor_text, max_length = MAX_PAPER_MESSAGE_LEN, multiline = TRUE) + if(!msg) + return + active_character.flavor_text = msg if("limbs") var/valid_limbs = list("Left Leg", "Right Leg", "Left Arm", "Right Arm", "Left Foot", "Right Foot", "Left Hand", "Right Hand") diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index dd1660e4075..eb3029bd4da 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -67,7 +67,7 @@ if(length(H.cards) > 1) var/confirm = tgui_alert(user, "Are you sure you want to put your [length(H.cards)] cards back into the deck?", "Return Hand", list("Yes", "No")) - if(confirm == "No" || !Adjacent(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) + if(confirm != "Yes" || !Adjacent(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) return for(var/datum/playingcard/P in H.cards) cards += P diff --git a/code/modules/library/library_equipment.dm b/code/modules/library/library_equipment.dm index 6145f3b592c..f7b42c50187 100644 --- a/code/modules/library/library_equipment.dm +++ b/code/modules/library/library_equipment.dm @@ -415,7 +415,7 @@ else confirm = tgui_alert(user, "Are you sure you want to checkout [B] to [computer.user_data.patron_name]?", "Confirm Checkout", list("Yes", "No")) - if(confirm == "No") + if(confirm != "Yes") return if(computer.checkout(B)) playsound(src, 'sound/items/scannerbeep.ogg', 15, TRUE) diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index 49507667190..1a1bbd268bd 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -225,7 +225,7 @@ to_chat(user, "Upon using the antagHUD you forfeited the ability to join the round.") return var/be_helper = tgui_alert(user, "Become a Lightgeist? (Warning, You can no longer be cloned!)", "Respawn", list("Yes","No")) - if(be_helper == "No") + if(be_helper != "Yes") return if(!loc || QDELETED(src) || QDELETED(user)) if(user) diff --git a/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm index eaf70beda48..ac88df09e8b 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm @@ -50,7 +50,7 @@ var/obj/structure/elite_tumor/T = target if(T.mychild == src && T.activity == TUMOR_PASSIVE) var/response = tgui_alert(src, "Re-enter the tumor?", "Despawn yourself?", list("Yes", "No")) - if(response == "No" || QDELETED(src) || !Adjacent(T)) + if(response != "Yes" || QDELETED(src) || !Adjacent(T)) return T.clear_activator(src) T.mychild = null diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ghost_interaction.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ghost_interaction.dm index e6aca2681e7..37d3a4cd8b4 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ghost_interaction.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ghost_interaction.dm @@ -33,7 +33,7 @@ return if(error_on_humanize == "") var/spider_ask = tgui_alert(user, humanize_prompt, "Join as Terror Spider?", list("Yes", "No")) - if(spider_ask == "No" || !src || QDELETED(src)) + if(spider_ask != "Yes" || !src || QDELETED(src)) return else to_chat(user, "Cannot inhabit spider: [error_on_humanize]") diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index c938c3ad585..aaa3c6aeabd 100644 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -381,7 +381,7 @@ GLOBAL_LIST_EMPTY(PDAs) O.show_message(text("[bicon(src)] *[ttone]*")) /obj/item/pda/proc/set_ringtone(mob/user) - var/new_tone = tgui_input_text(user, "Please enter new ringtone", name, ttone) + var/new_tone = tgui_input_text(user, "Please enter new ringtone", name, ttone, max_length = 20, encode = FALSE) new_tone = trim(new_tone) if(!in_range(src, user) || loc != user) @@ -396,7 +396,7 @@ GLOBAL_LIST_EMPTY(PDAs) close(user) return TRUE - ttone = sanitize(copytext(new_tone, 1, 20)) + ttone = new_tone return TRUE /obj/item/pda/process() diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 55e59ef533b..b0d3fd76996 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -579,7 +579,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, if("maxresearch") if(!check_rights(R_ADMIN)) return - if(tgui_alert(usr, "Are you sure you want to maximize research levels?", "Confirmation", list("Yes", "No"))=="No") + if(tgui_alert(usr, "Are you sure you want to maximize research levels?", "Confirmation", list("Yes", "No")) != "Yes") return log_admin("[key_name(usr)] has maximized the research levels.") message_admins("[key_name_admin(usr)] has maximized the research levels.") diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index cfc85e3473f..e2f0acd7992 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -305,7 +305,7 @@ return prompted = TRUE - if(tgui_alert(user, "This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?", "Consciousness Transfer", list("Yes", "No")) == "No") + if(tgui_alert(user, "This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?", "Consciousness Transfer", list("Yes", "No")) != "Yes") prompted = FALSE return diff --git a/code/modules/ruins/ghost_bar.dm b/code/modules/ruins/ghost_bar.dm index f3d25eebeb1..bfe72c4cf3b 100644 --- a/code/modules/ruins/ghost_bar.dm +++ b/code/modules/ruins/ghost_bar.dm @@ -99,7 +99,7 @@ if(!istype(mob_to_delete) || !istype(user) || !Adjacent(user)) return if(mob_to_delete.client) - if(tgui_alert(mob_to_delete, "Would you like to return to the realm of spirits? (This will delete your current character, but you can rejoin later)", "Ghost Bar", list("Yes", "No")) == "No") + if(tgui_alert(mob_to_delete, "Would you like to return to the realm of spirits? (This will delete your current character, but you can rejoin later)", "Ghost Bar", list("Yes", "No")) != "Yes") return mob_to_delete.visible_message("[mob_to_delete.name] climbs into [src]...") playsound(src, 'sound/machines/wooden_closet_close.ogg', 50) diff --git a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm index a66ae5c674a..8f8f483db0c 100644 --- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm +++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm @@ -155,7 +155,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate) /obj/structure/necropolis_gate/legion_gate/attack_hand(mob/user) if(!open && !changing_openness) var/safety = tgui_alert(user, "You think this might be a bad idea...", "Knock on the door?", list("Proceed", "Abort")) - if(safety == "Abort" || !in_range(src, user) || !src || open || changing_openness || user.incapacitated()) + if(!safety || safety == "Abort" || !in_range(src, user) || !src || open || changing_openness || user.incapacitated()) return user.visible_message("[user] knocks on [src]...", "You tentatively knock on [src]...") playsound(user.loc, 'sound/effects/shieldbash.ogg', 100, 1) diff --git a/code/modules/tgui/modules/ghost_hud_panel.dm b/code/modules/tgui/modules/ghost_hud_panel.dm index 30402f1a552..cff69061394 100644 --- a/code/modules/tgui/modules/ghost_hud_panel.dm +++ b/code/modules/tgui/modules/ghost_hud_panel.dm @@ -67,7 +67,7 @@ GLOBAL_DATUM_INIT(ghost_hud_panel, /datum/ui_module/ghost_hud_panel, new) // Check if this is the first time they're turning on Antag HUD. if(!check_rights(R_ADMIN | R_MOD, FALSE) && !ghost.is_roundstart_observer() && GLOB.configuration.general.restrict_antag_hud_rejoin && !ghost.has_ahudded()) var/response = tgui_alert(ghost, "If you turn this on, you will not be able to take any part in the round.", "Are you sure you want to enable antag HUD?", list("Yes", "No")) - if(response == "No") + if(response != "Yes") return FALSE ghost.can_reenter_corpse = FALSE diff --git a/code/modules/tgui/tgui_input/text_input.dm b/code/modules/tgui/tgui_input/text_input.dm index 1007f3e44b1..9e00d25414a 100644 --- a/code/modules/tgui/tgui_input/text_input.dm +++ b/code/modules/tgui/tgui_input/text_input.dm @@ -123,7 +123,7 @@ data["max_length"] = max_length data["message"] = message data["multiline"] = multiline - data["placeholder"] = default // Default is a reserved keyword + data["placeholder"] = html_decode(default) // Default is a reserved keyword data["large_buttons"] = user.client?.prefs?.toggles2 & PREFTOGGLE_2_LARGE_INPUT_BUTTONS data["swapped_buttons"] = user.client?.prefs?.toggles2 & PREFTOGGLE_2_SWAP_INPUT_BUTTONS data["title"] = title diff --git a/interface/interface.dm b/interface/interface.dm index 7a8f6bf7f85..bf489ae9734 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -19,10 +19,11 @@ set desc = "Visit the forum." set hidden = 1 if(GLOB.configuration.url.forum_url) - if(tgui_alert(src, "Open the forum in your browser?", "Forum", list("Yes", "No")) == "Yes") - if(GLOB.configuration.url.forum_link_url && prefs && !prefs.fuid) - link_forum_account() - src << link(GLOB.configuration.url.forum_url) + if(tgui_alert(src, "Open the forum in your browser?", "Forum", list("Yes", "No")) != "Yes") + return + if(GLOB.configuration.url.forum_link_url && prefs && !prefs.fuid) + link_forum_account() + src << link(GLOB.configuration.url.forum_url) else to_chat(src, "The forum URL is not set in the server configuration.") @@ -31,7 +32,7 @@ set desc = "View the server rules." set hidden = 1 if(GLOB.configuration.url.rules_url) - if(tgui_alert(src, "This will open the rules in your browser. Are you sure?", "Rules", list("Yes", "No")) == "No") + if(tgui_alert(src, "This will open the rules in your browser. Are you sure?", "Rules", list("Yes", "No")) != "Yes") return src << link(GLOB.configuration.url.rules_url) else @@ -42,7 +43,7 @@ set desc = "Visit the GitHub page." set hidden = 1 if(GLOB.configuration.url.github_url) - if(tgui_alert(src, "This will open our GitHub repository in your browser. Are you sure?", "GitHub", list("Yes", "No")) == "No") + if(tgui_alert(src, "This will open our GitHub repository in your browser. Are you sure?", "GitHub", list("Yes", "No")) != "Yes") return src << link(GLOB.configuration.url.github_url) else @@ -65,7 +66,7 @@ if(!durl) to_chat(src, "The Discord URL is not set in the server configuration.") return - if(tgui_alert(src, "This will invite you to our Discord server. Are you sure?", "Discord", list("Yes", "No")) == "No") + if(tgui_alert(src, "This will invite you to our Discord server. Are you sure?", "Discord", list("Yes", "No")) != "Yes") return src << link(durl) @@ -74,7 +75,7 @@ set desc = "Donate to help with hosting costs." set hidden = 1 if(GLOB.configuration.url.donations_url) - if(tgui_alert(src, "This will open the donation page in your browser. Are you sure?", "Donate", list("Yes", "No")) == "No") + if(tgui_alert(src, "This will open the donation page in your browser. Are you sure?", "Donate", list("Yes", "No")) != "Yes") return src << link(GLOB.configuration.url.donations_url) else