From bcdf96f274f9d6654e5b9ed4ea04a1d59719910b Mon Sep 17 00:00:00 2001 From: Letter N <24603524+LetterN@users.noreply.github.com> Date: Thu, 28 Oct 2021 12:17:29 +0800 Subject: [PATCH] Revert "TGUI alerts, lists, inputs" --- code/__HELPERS/areas.dm | 2 +- code/__HELPERS/custom_holoforms.dm | 2 +- code/__HELPERS/files.dm | 2 +- code/__HELPERS/reagents.dm | 6 +- code/__HELPERS/text.dm | 8 +- code/__HELPERS/unsorted.dm | 8 +- code/_onclick/hud/ai.dm | 2 +- code/_onclick/hud/movable_screen_objects.dm | 4 +- code/controllers/admin.dm | 2 +- code/controllers/subsystem/mapping.dm | 6 +- code/controllers/subsystem/shuttle.dm | 2 +- code/controllers/subsystem/vote.dm | 4 +- code/datums/action.dm | 4 +- code/datums/browser.dm | 6 +- code/datums/components/material_container.dm | 2 +- .../storage/concrete/bag_of_holding.dm | 2 +- code/datums/diseases/advance/advance.dm | 2 +- code/datums/elements/flavor_text.dm | 2 +- code/datums/elements/polychromic.dm | 2 +- code/datums/explosion.dm | 10 +- code/datums/mind.dm | 15 +- code/datums/mutations/actions.dm | 2 +- code/datums/skills/_check_skills.dm | 8 +- code/game/atoms.dm | 18 +- code/game/gamemodes/dynamic/dynamic.dm | 8 +- .../gamemodes/dynamic/dynamic_simulations.dm | 6 +- code/game/gamemodes/gangs/dominator.dm | 2 +- code/game/gamemodes/gangs/gang.dm | 10 +- code/game/gamemodes/objective.dm | 19 +- code/game/machinery/PDApainter.dm | 2 +- code/game/machinery/aug_manipulator.dm | 18 +- code/game/machinery/autolathe.dm | 2 +- code/game/machinery/bloodbankgen.dm | 2 +- code/game/machinery/camera/tracking.dm | 2 +- code/game/machinery/computer/atmos_control.dm | 2 +- .../machinery/computer/camera_advanced.dm | 2 +- code/game/machinery/computer/card.dm | 2 +- .../machinery/computer/launchpad_control.dm | 2 +- code/game/machinery/computer/mechlaunchpad.dm | 2 +- code/game/machinery/computer/medical.dm | 2 +- .../machinery/computer/prisoner/management.dm | 2 +- code/game/machinery/computer/security.dm | 6 +- code/game/machinery/computer/teleporter.dm | 4 +- code/game/machinery/cryopod.dm | 6 +- code/game/machinery/doors/airlock.dm | 4 +- code/game/machinery/hologram.dm | 2 +- code/game/machinery/launch_pad.dm | 2 +- code/game/machinery/pipe/construction.dm | 2 +- code/game/machinery/syndicatebomb.dm | 4 +- .../machinery/telecomms/computers/message.dm | 2 +- .../telecomms/machine_interactions.dm | 2 +- code/game/machinery/wishgranter.dm | 2 +- code/game/mecha/equipment/tools/work_tools.dm | 2 +- code/game/mecha/mecha_topic.dm | 2 +- code/game/objects/buckling.dm | 4 +- code/game/objects/items/AI_modules.dm | 6 +- code/game/objects/items/boombox.dm | 2 +- code/game/objects/items/cards_ids.dm | 10 +- .../circuitboards/machine_circuitboards.dm | 6 +- code/game/objects/items/crab17.dm | 2 +- code/game/objects/items/credit_holochip.dm | 2 +- code/game/objects/items/debug_items.dm | 4 +- code/game/objects/items/devices/PDA/PDA.dm | 8 +- code/game/objects/items/devices/PDA/cart.dm | 4 +- code/game/objects/items/devices/aicard.dm | 2 +- .../objects/items/devices/desynchronizer.dm | 2 +- .../items/devices/electrochromatic_kit.dm | 2 +- code/game/objects/items/devices/paicard.dm | 2 +- .../objects/items/devices/pipe_painter.dm | 2 +- .../game/objects/items/devices/polycircuit.dm | 2 +- .../game/objects/items/devices/radio/radio.dm | 2 +- code/game/objects/items/devices/scanners.dm | 2 +- code/game/objects/items/dualsaber.dm | 2 +- code/game/objects/items/dyekit.dm | 2 +- code/game/objects/items/grenades/plastic.dm | 2 +- .../items/implants/implant_explosive.dm | 2 +- code/game/objects/items/melee/energy.dm | 2 +- code/game/objects/items/miscellaneous.dm | 4 +- code/game/objects/items/paint.dm | 2 +- code/game/objects/items/pinpointer.dm | 2 +- code/game/objects/items/robot/robot_items.dm | 2 +- code/game/objects/items/scrolls.dm | 2 +- code/game/objects/items/stacks/stack.dm | 2 +- code/game/objects/items/storage/dakis.dm | 2 +- code/game/objects/items/teleportation.dm | 2 +- code/game/objects/items/toys.dm | 2 +- code/game/objects/objs.dm | 6 +- code/game/objects/structures/barsigns.dm | 2 +- .../crates_lockers/closets/genpop.dm | 8 +- code/game/objects/structures/displaycase.dm | 2 +- code/game/objects/structures/dresser.dm | 8 +- .../objects/structures/ghost_role_spawners.dm | 6 +- code/game/objects/structures/mirror.dm | 18 +- code/game/objects/structures/reflector.dm | 2 +- code/game/objects/structures/signs/_signs.dm | 2 +- code/game/objects/structures/spirit_board.dm | 2 +- code/modules/admin/DB_ban/functions.dm | 8 +- code/modules/admin/admin.dm | 28 +- code/modules/admin/admin_investigate.dm | 2 +- code/modules/admin/admin_verbs.dm | 50 +-- code/modules/admin/antag_panel.dm | 4 +- code/modules/admin/callproc/callproc.dm | 10 +- code/modules/admin/check_antagonists.dm | 2 +- code/modules/admin/create_object.dm | 2 +- code/modules/admin/create_poll.dm | 28 +- code/modules/admin/fun_balloon.dm | 2 +- code/modules/admin/outfit_editor.dm | 4 +- code/modules/admin/permissionedit.dm | 12 +- code/modules/admin/sound_emitter.dm | 8 +- code/modules/admin/sql_message_system.dm | 20 +- code/modules/admin/stickyban.dm | 20 +- code/modules/admin/topic.dm | 132 ++++---- code/modules/admin/verbs/adminhelp.dm | 6 +- code/modules/admin/verbs/adminjump.dm | 6 +- code/modules/admin/verbs/adminpm.dm | 10 +- code/modules/admin/verbs/adminsay.dm | 2 +- code/modules/admin/verbs/ak47s.dm | 2 +- code/modules/admin/verbs/borgpanel.dm | 4 +- code/modules/admin/verbs/cinematic.dm | 2 +- code/modules/admin/verbs/deadsay.dm | 2 +- code/modules/admin/verbs/debug.dm | 66 ++-- code/modules/admin/verbs/diagnostics.dm | 6 +- code/modules/admin/verbs/dice.dm | 8 +- code/modules/admin/verbs/fps.dm | 4 +- code/modules/admin/verbs/getlogs.dm | 2 +- code/modules/admin/verbs/machine_upgrade.dm | 2 +- code/modules/admin/verbs/manipulate_organs.dm | 8 +- .../admin/verbs/map_template_loadverb.dm | 12 +- code/modules/admin/verbs/mapping.dm | 8 +- code/modules/admin/verbs/maprotation.dm | 4 +- code/modules/admin/verbs/onlyone.dm | 2 +- code/modules/admin/verbs/playsound.dm | 10 +- code/modules/admin/verbs/randomverbs.dm | 122 +++---- .../admin/verbs/reestablish_db_connection.dm | 4 +- code/modules/admin/verbs/secrets.dm | 42 +-- code/modules/admin/verbs/selectequipment.dm | 6 +- code/modules/admin/verbs/shuttlepanel.dm | 10 +- .../admin/view_variables/admin_delete.dm | 2 +- .../admin/view_variables/get_variables.dm | 26 +- .../view_variables/mass_edit_variables.dm | 8 +- .../admin/view_variables/modify_variables.dm | 14 +- code/modules/admin/view_variables/topic.dm | 6 +- .../admin/view_variables/topic_basic.dm | 2 +- .../admin/view_variables/topic_list.dm | 2 +- code/modules/antagonists/abductor/abductor.dm | 4 +- code/modules/antagonists/blob/blob/powers.dm | 4 +- .../bloodsucker/datum_bloodsucker.dm | 2 +- .../bloodsucker/objects/bloodsucker_coffin.dm | 2 +- .../bloodsucker/objects/bloodsucker_crypt.dm | 4 +- .../antagonists/brainwashing/brainwashing.dm | 4 +- code/modules/antagonists/brother/brother.dm | 2 +- .../changeling/powers/fakedeath.dm | 2 +- .../antagonists/changeling/powers/headcrab.dm | 2 +- .../antagonists/changeling/powers/hivemind.dm | 4 +- .../clockcult/clock_effects/clock_sigils.dm | 4 +- .../clock_effects/spatial_gateway.dm | 2 +- .../clockcult/clock_items/clockwork_slab.dm | 2 +- .../clock_items/construct_chassis.dm | 2 +- .../clockcult/clock_mobs/_eminence.dm | 8 +- .../antagonists/clockcult/clock_scripture.dm | 2 +- .../ark_of_the_clockwork_justicar.dm | 8 +- .../clock_structures/clockwork_obelisk.dm | 2 +- .../clock_structures/eminence_spire.dm | 8 +- .../clock_structures/heralds_beacon.dm | 2 +- .../ratvar_the_clockwork_justicar.dm | 2 +- code/modules/antagonists/cult/blood_magic.dm | 14 +- code/modules/antagonists/cult/cult_comms.dm | 2 +- code/modules/antagonists/cult/cult_items.dm | 2 +- code/modules/antagonists/cult/ritual.dm | 4 +- code/modules/antagonists/cult/runes.dm | 8 +- code/modules/antagonists/devil/devil.dm | 2 +- .../devil/sintouched/sintouched.dm | 2 +- .../antagonists/disease/disease_mob.dm | 2 +- .../eldritch_cult/eldritch_items.dm | 2 +- .../eldritch_cult/eldritch_knowledge.dm | 4 +- .../eldritch_cult/eldritch_magic.dm | 2 +- .../eldritch_cult/eldritch_structures.dm | 2 +- code/modules/antagonists/monkey/monkey.dm | 4 +- .../nukeop/equipment/borgchameleon.dm | 2 +- .../nukeop/equipment/nuclear_challenge.dm | 4 +- .../traitor/equipment/Malf_Modules.dm | 4 +- .../antagonists/wizard/equipment/artefact.dm | 4 +- .../antagonists/wizard/equipment/soulstone.dm | 2 +- code/modules/arousal/arousal.dm | 14 +- code/modules/arousal/genitals.dm | 6 +- code/modules/arousal/toys/dildos.dm | 8 +- code/modules/assembly/doorcontrol.dm | 2 +- code/modules/assembly/holder.dm | 2 +- .../atmospherics/gasmixtures/gas_mixture.dm | 10 +- .../atmospherics/machinery/airalarm.dm | 2 +- .../components/binary_devices/passive_gate.dm | 2 +- .../components/binary_devices/pump.dm | 2 +- .../components/binary_devices/relief_valve.dm | 4 +- .../components/binary_devices/volume_pump.dm | 2 +- .../machinery/components/components_base.dm | 2 +- .../components/trinary_devices/filter.dm | 2 +- .../components/trinary_devices/mixer.dm | 2 +- .../unary_devices/outlet_injector.dm | 2 +- .../components/unary_devices/relief_valve.dm | 4 +- .../components/unary_devices/thermomachine.dm | 2 +- .../machinery/portable/canister.dm | 6 +- .../awaymissions/bluespaceartillery.dm | 2 +- code/modules/awaymissions/capture_the_flag.dm | 2 +- code/modules/awaymissions/corpse.dm | 4 +- .../awaymissions/mission_code/wildwest.dm | 2 +- code/modules/awaymissions/signpost.dm | 2 +- code/modules/buildmode/submodes/advanced.dm | 6 +- code/modules/buildmode/submodes/area_edit.dm | 4 +- code/modules/buildmode/submodes/boom.dm | 10 +- code/modules/buildmode/submodes/fill.dm | 8 +- code/modules/buildmode/submodes/mapgen.dm | 4 +- .../buildmode/submodes/variable_edit.dm | 4 +- .../cargo/blackmarket/blackmarket_uplink.dm | 4 +- code/modules/cargo/centcom_podlauncher.dm | 28 +- code/modules/client/client_procs.dm | 2 +- code/modules/client/preferences.dm | 164 +++++----- code/modules/client/preferences_toggles.dm | 14 +- code/modules/client/verbs/ooc.dm | 4 +- code/modules/client/verbs/suicide.dm | 16 +- code/modules/clothing/chameleon.dm | 4 +- code/modules/clothing/spacesuits/hardsuit.dm | 2 +- code/modules/clothing/under/_under.dm | 2 +- code/modules/economy/paystand.dm | 8 +- code/modules/events/false_alarm.dm | 4 +- code/modules/events/immovable_rod.dm | 2 +- code/modules/events/mass_hallucination.dm | 2 +- code/modules/events/pirates.dm | 2 +- code/modules/events/spacevine.dm | 2 +- code/modules/events/wizard/madness.dm | 2 +- .../kitchen_machinery/food_cart.dm | 2 +- .../kitchen_machinery/smartfridge.dm | 2 +- code/modules/food_and_drinks/pizzabox.dm | 2 +- code/modules/holiday/halloween/jacqueen.dm | 6 +- code/modules/hydroponics/beekeeping/beebox.dm | 2 +- code/modules/hydroponics/grown/towercap.dm | 2 +- code/modules/hydroponics/hydroponics.dm | 4 +- code/modules/hydroponics/seeds.dm | 2 +- code/modules/instruments/songs/editor.dm | 22 +- .../integrated_electronics/core/assemblies.dm | 6 +- .../integrated_electronics/core/debugger.dm | 4 +- .../integrated_electronics/core/detailer.dm | 2 +- .../integrated_electronics/core/pins.dm | 4 +- .../integrated_electronics/core/printer.dm | 2 +- .../core/special_pins/dir_pin.dm | 4 +- .../core/special_pins/index_pin.dm | 2 +- .../core/special_pins/list_pin.dm | 8 +- .../core/special_pins/number_pin.dm | 2 +- .../integrated_electronics/subtypes/input.dm | 4 +- .../integrated_electronics/subtypes/memory.dm | 6 +- code/modules/language/language_menu.dm | 4 +- code/modules/library/lib_items.dm | 4 +- code/modules/library/lib_machines.dm | 24 +- code/modules/library/soapstone.dm | 2 +- code/modules/mafia/controller.dm | 4 +- code/modules/mining/abandoned_crates.dm | 2 +- code/modules/mining/aux_base_camera.dm | 2 +- .../mining/equipment/marker_beacons.dm | 4 +- code/modules/mining/fulton.dm | 2 +- .../mining/lavaland/necropolis_chests.dm | 2 +- code/modules/mining/machine_redemption.dm | 4 +- code/modules/mob/dead/dead.dm | 4 +- .../modules/mob/dead/new_player/new_player.dm | 10 +- code/modules/mob/dead/observer/observer.dm | 18 +- code/modules/mob/dead/observer/respawn.dm | 10 +- code/modules/mob/living/brain/posibrain.dm | 2 +- .../carbon/alien/humanoid/alien_powers.dm | 14 +- .../mob/living/carbon/alien/larva/powers.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 12 +- code/modules/mob/living/carbon/human/human.dm | 20 +- .../human/innate_abilities/customization.dm | 32 +- .../living/carbon/human/species_types/ipc.dm | 2 +- .../carbon/human/species_types/jellypeople.dm | 6 +- code/modules/mob/living/living.dm | 2 +- code/modules/mob/living/silicon/ai/ai.dm | 20 +- code/modules/mob/living/silicon/ai/say.dm | 4 +- .../mob/living/silicon/pai/pai_shell.dm | 6 +- .../mob/living/silicon/pai/personality.dm | 2 +- .../mob/living/silicon/pai/software.dm | 6 +- .../modules/mob/living/silicon/robot/robot.dm | 6 +- code/modules/mob/living/silicon/silicon.dm | 2 +- .../mob/living/simple_animal/bot/floorbot.dm | 4 +- .../mob/living/simple_animal/bot/mulebot.dm | 4 +- .../friendly/drone/drones_as_items.dm | 2 +- .../friendly/drone/interaction.dm | 2 +- .../simple_animal/friendly/drone/verbs.dm | 2 +- .../friendly/drone/visuals_icons.dm | 4 +- .../living/simple_animal/friendly/plushie.dm | 2 +- .../living/simple_animal/guardian/guardian.dm | 4 +- .../simple_animal/guardian/types/ranged.dm | 2 +- .../simple_animal/hostile/banana_spider.dm | 2 +- .../mob/living/simple_animal/hostile/bread.dm | 2 +- .../simple_animal/hostile/giant_spider.dm | 2 +- .../hostile/megafauna/colossus.dm | 4 +- .../hostile/mining_mobs/elites/elite.dm | 2 +- .../simple_animal/hostile/space_dragon.dm | 4 +- .../simple_animal/hostile/venus_human_trap.dm | 2 +- .../living/simple_animal/simple_animal_vr.dm | 4 +- .../mob/living/simple_animal/slime/powers.dm | 2 +- code/modules/mob/mob_transformation_simple.dm | 2 +- code/modules/mob/say.dm | 16 +- code/modules/mob/transform_procs.dm | 8 +- .../computers/item/computer.dm | 4 +- .../file_system/programs/cargoship.dm | 2 +- code/modules/newscaster/newscaster_machine.dm | 20 +- .../suit/ninja_equipment_actions/ninja_net.dm | 2 +- .../ninja_suit_initialisation.dm | 2 +- code/modules/paperwork/contract.dm | 4 +- code/modules/paperwork/pen.dm | 4 +- code/modules/photography/camera/camera.dm | 6 +- .../photography/camera/silicon_camera.dm | 2 +- code/modules/plumbing/ducts.dm | 4 +- code/modules/plumbing/plumbers/bottler.dm | 2 +- code/modules/power/apc.dm | 2 +- code/modules/power/cable.dm | 2 +- .../procedural_mapping/mapGenerator.dm | 10 +- code/modules/projectiles/pins.dm | 6 +- code/modules/reagents/chem_wiki_render.dm | 2 +- .../chemistry/machinery/chem_dispenser.dm | 4 +- .../chemistry/machinery/chem_master.dm | 7 +- .../chemistry/machinery/chem_synthesizer.dm | 2 +- code/modules/reagents/reagent_containers.dm | 2 +- .../reagents/reagent_containers/borghypo.dm | 2 +- .../reagents/reagent_containers/spray.dm | 2 +- code/modules/research/destructive_analyzer.dm | 4 +- .../xenobiology/crossbreeding/_misc.dm | 2 +- .../xenobiology/crossbreeding/charged.dm | 2 +- .../crossbreeding/selfsustaining.dm | 2 +- .../xenobiology/crossbreeding/stabilized.dm | 2 +- .../research/xenobiology/xenobiology.dm | 2 +- .../ruins/objects_and_mobs/necropolis_gate.dm | 2 +- .../ruins/spaceruin_code/hilbertshotel.dm | 4 +- code/modules/shuttle/assault_pod.dm | 2 +- code/modules/shuttle/navigation_computer.dm | 2 +- .../shuttle/spaceship_navigation_beacon.dm | 2 +- code/modules/smithing/anvil.dm | 2 +- code/modules/spells/spell.dm | 4 +- .../spells/spell_types/area_teleport.dm | 2 +- code/modules/spells/spell_types/devil.dm | 2 +- .../modules/spells/spell_types/devil_boons.dm | 2 +- code/modules/spells/spell_types/shapeshift.dm | 2 +- .../spells/spell_types/voice_of_god.dm | 2 +- code/modules/station_goals/bsa.dm | 2 +- code/modules/surgery/graft_synthtissue.dm | 2 +- code/modules/surgery/helpers.dm | 2 +- code/modules/surgery/organ_manipulation.dm | 2 +- code/modules/surgery/organs/eyes.dm | 2 +- code/modules/surgery/organs/vocal_cords.dm | 10 +- code/modules/surgery/plastic_surgery.dm | 2 +- code/modules/tcg/cards.dm | 8 +- code/modules/tgui/tgui_input_text.dm | 299 ------------------ code/modules/tgui_panel/external.dm | 2 +- code/modules/vending/_vending.dm | 2 +- code/modules/vore/eating/living.dm | 8 +- code/modules/vore/eating/vorepanel.dm | 34 +- interface/interface.dm | 8 +- .../code/modules/mentor/mentor_memo.dm | 10 +- .../code/modules/mentor/mentorpm.dm | 4 +- .../projectiles/guns/ballistic/rifles.dm | 4 +- .../projectiles/guns/energy/energy_gun.dm | 2 +- tgstation.dme | 1 - tgui/packages/tgui/interfaces/InputModal.js | 119 ------- tgui/packages/tgui/layouts/Window.js | 3 +- 362 files changed, 1149 insertions(+), 1570 deletions(-) delete mode 100644 code/modules/tgui/tgui_input_text.dm delete mode 100644 tgui/packages/tgui/interfaces/InputModal.js diff --git a/code/__HELPERS/areas.dm b/code/__HELPERS/areas.dm index 395cf66758..84740b2fc3 100644 --- a/code/__HELPERS/areas.dm +++ b/code/__HELPERS/areas.dm @@ -151,7 +151,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engineerin if(!place.requires_power || (place.area_flags & NOTELEPORT) || (place.area_flags & HIDDEN_AREA)) continue // No expanding powerless rooms etc areas[place.name] = place - var/area_choice = tgui_input_list(creator, "Choose an area to expand or make a new area.", "Area Expansion", areas) + var/area_choice = input(creator, "Choose an area to expand or make a new area.", "Area Expansion") as null|anything in areas area_choice = areas[area_choice] if(!area_choice) diff --git a/code/__HELPERS/custom_holoforms.dm b/code/__HELPERS/custom_holoforms.dm index b16c3f6c98..2733a97e14 100644 --- a/code/__HELPERS/custom_holoforms.dm +++ b/code/__HELPERS/custom_holoforms.dm @@ -60,7 +60,7 @@ S["real_name"] >> name if(name) characters[name] = i - var/chosen_name = tgui_input_list(C, "Which character do you wish to use as your appearance.", "", characters) + var/chosen_name = input(C, "Which character do you wish to use as your appearance.") as anything in characters if(chosen_name) if(C.prefs.last_custom_holoform > world.time - CUSTOM_HOLOFORM_DELAY) to_chat(C.mob, "You are attempting to set your custom holoform too fast!") diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm index eac7534827..aad5b4cab1 100644 --- a/code/__HELPERS/files.dm +++ b/code/__HELPERS/files.dm @@ -11,7 +11,7 @@ if(path != root) choices.Insert(1,"/") - var/choice = tgui_input_list(src,"Choose a file to access:","Download", choices) + var/choice = input(src,"Choose a file to access:","Download",null) as null|anything in choices switch(choice) if(null) return diff --git a/code/__HELPERS/reagents.dm b/code/__HELPERS/reagents.dm index d5080c863d..fa655efce4 100644 --- a/code/__HELPERS/reagents.dm +++ b/code/__HELPERS/reagents.dm @@ -75,11 +75,11 @@ /proc/choose_reagent_id(mob/user) var/chosen_id - switch(tgui_alert(user, "Choose a method.", "Add Reagents", list("Search", "Choose from a list", "I'm feeling lucky"))) + switch(alert(user, "Choose a method.", "Add Reagents", "Search", "Choose from a list", "I'm feeling lucky")) if("Search") var/valid_id while(!valid_id) - chosen_id = tgui_input_text(user, "Enter the ID of the reagent you want to add.", "Search reagents") + chosen_id = input(user, "Enter the ID of the reagent you want to add.", "Search reagents") as null|text if(isnull(chosen_id)) //Get me out of here! break if(!ispath(text2path(chosen_id))) @@ -91,7 +91,7 @@ if(!valid_id) to_chat(user, "A reagent with that ID doesn't exist!") if("Choose from a list") - chosen_id = tgui_input_list(user, "Choose a reagent to add.", "Choose a reagent.", subtypesof(/datum/reagent)) + chosen_id = input(user, "Choose a reagent to add.", "Choose a reagent.") as null|anything in subtypesof(/datum/reagent) if("I'm feeling lucky") chosen_id = pick(subtypesof(/datum/reagent)) return chosen_id diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 8e2cff6a49..dec44653af 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -42,7 +42,7 @@ /proc/sanitize_name(t,list/repl_chars = null) if(t == "space" || t == "floor" || t == "wall" || t == "r-wall" || t == "monkey" || t == "unknown" || t == "inactive ai") //prevents these common metagamey names - tgui_alert(usr, "Invalid name.") + alert("Invalid name.") return "" return sanitize(t) @@ -93,7 +93,7 @@ // Used to get a properly sanitized input, of max_length // no_trim is self explanatory but it prevents the input from being trimed if you intend to parse newlines or whitespace. /proc/stripped_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE) - var/name = tgui_input_text(user, message, title, default) + var/name = input(user, message, title, default) as text|null if(no_trim) return copytext(html_encode(name), 1, max_length) else @@ -101,7 +101,7 @@ // Used to get a properly sanitized multiline input, of max_length /proc/stripped_multiline_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE) - var/name = tgui_input_message(user, message, title, default) + var/name = input(user, message, title, default) as message|null if(isnull(name)) // Return null if canceled. return null if(no_trim) @@ -113,7 +113,7 @@ * stripped_multiline_input but reflects to the user instead if it's too big and returns null. */ /proc/stripped_multiline_input_or_reflect(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE) - var/name = tgui_input_message(user, message, title, default) + var/name = input(user, message, title, default) as message|null if(isnull(name)) // Return null if canceled. return null if(length(name) > max_length) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index daad573c5a..9fee97bbb1 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -249,7 +249,7 @@ Turf and target are separate in case you want to teleport some distance from a t var/list/borgs = active_free_borgs() if(borgs.len) if(user) - . = tgui_input_list(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs) + . = input(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs[1]) in borgs else . = pick(borgs) return . @@ -258,7 +258,7 @@ Turf and target are separate in case you want to teleport some distance from a t var/list/ais = active_ais() if(ais.len) if(user) - . = tgui_input_list(user,"AI signals detected:", "AI Selection", ais) + . = input(user,"AI signals detected:", "AI Selection", ais[1]) in ais else . = pick(ais) return . @@ -1075,7 +1075,7 @@ B --><-- A /proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types()) if (value == FALSE) //nothing should be calling us with a number, so this is safe - value = tgui_input_text(usr, "Enter type to find (blank for all, cancel to cancel)", "Search for type") + value = input("Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text if (isnull(value)) return value = trim(value) @@ -1089,7 +1089,7 @@ B --><-- A if(matches.len==1) chosen = matches[1] else - chosen = tgui_input_list(usr, "Select a type", "Pick Type", matches) + chosen = input("Select a type", "Pick Type", matches[1]) as null|anything in matches if(!chosen) return chosen = matches[chosen] diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm index 7a21a3f338..17b5a9ed61 100644 --- a/code/_onclick/hud/ai.dm +++ b/code/_onclick/hud/ai.dm @@ -33,7 +33,7 @@ if(..()) return var/mob/living/silicon/ai/AI = usr - var/target_name = tgui_input_list(AI, "Choose who you want to track", "Tracking", AI.trackable_mobs()) + var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs() AI.ai_camera_track(target_name) /atom/movable/screen/ai/camera_light diff --git a/code/_onclick/hud/movable_screen_objects.dm b/code/_onclick/hud/movable_screen_objects.dm index 7d75fd8b5a..eeb56d67f5 100644 --- a/code/_onclick/hud/movable_screen_objects.dm +++ b/code/_onclick/hud/movable_screen_objects.dm @@ -62,7 +62,7 @@ M.maptext = "Movable" M.maptext_width = 64 - var/screen_l = tgui_input_text(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object") + var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object") as text if(!screen_l) return @@ -81,7 +81,7 @@ S.maptext = "Snap" S.maptext_width = 64 - var/screen_l = tgui_input_text(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object") + var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object") as text if(!screen_l) return diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm index 17341a3970..5c767ecb1b 100644 --- a/code/controllers/admin.dm +++ b/code/controllers/admin.dm @@ -80,7 +80,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick) controllers["[controller] (controller.type)"] = controller //we use an associated list to ensure clients can't hold references to controllers controller_choices += "[controller] (controller.type)" - var/datum/controller/controller_string = tgui_input_list(src, "Select controller to debug", "Debug Controller", controller_choices) + var/datum/controller/controller_string = input("Select controller to debug", "Debug Controller") as null|anything in controller_choices var/datum/controller/controller = controllers[controller_string] if (!istype(controller)) diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index b231546bb7..d0a6336223 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -483,7 +483,7 @@ GLOBAL_LIST_EMPTY(the_station_areas) if(!holder ||!check_rights(R_FUN)) return - var/choice = tgui_alert(src, "What kind of level would you like to load?", "Load Away/VR", list(AWAY_MISSION_NAME, VIRT_REALITY_NAME, "Cancel")) + var/choice = alert(src, "What kind of level would you like to load?", "Load Away/VR", AWAY_MISSION_NAME, VIRT_REALITY_NAME, "Cancel") var/list/possible_options var/list/ztraits @@ -493,7 +493,7 @@ GLOBAL_LIST_EMPTY(the_station_areas) ztraits = list(ZTRAIT_AWAY = TRUE, ZTRAIT_VR = TRUE) if(AWAY_MISSION_NAME) if(!GLOB.the_gateway) - if(tgui_alert(src, "There's no home gateway on the station. You sure you want to continue ?", "Uh oh", list("Yes", "No")) != "Yes") + if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "Yes", "No") != "Yes") return possible_options = GLOB.potential_away_levels ztraits = list(ZTRAIT_AWAY = TRUE) @@ -503,7 +503,7 @@ GLOBAL_LIST_EMPTY(the_station_areas) var/away_name var/datum/space_level/away_level - var/answer = tgui_input_list(src, "What kind ? ","Away/VR", list(possible_options + "Custom")) + var/answer = input("What kind ? ","Away/VR") as null|anything in list(possible_options + "Custom") switch(answer) if(null) return diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 34e79b6549..6af79d4d14 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -943,6 +943,6 @@ SUBSYSTEM_DEF(shuttle) SSblackbox.record_feedback("text", "shuttle_manipulator", 1, "[mdp.name]") shuttle_loading = FALSE if(emergency == mdp) //you just changed the emergency shuttle, there are events in game + captains that can change your snowflake choice. - var/set_purchase = tgui_alert(usr, "Do you want to also disable shuttle purchases/random events that would change the shuttle?", "Butthurt Admin Prevention", list("Yes, disable purchases/events", "No, I want to possibly get owned")) + var/set_purchase = alert(usr, "Do you want to also disable shuttle purchases/random events that would change the shuttle?", "Butthurt Admin Prevention", "Yes, disable purchases/events", "No, I want to possibly get owned") if(set_purchase == "Yes, disable purchases/events") SSshuttle.shuttle_purchased = SHUTTLEPURCHASE_FORCED diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 0e29e80245..868351a833 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -453,7 +453,7 @@ SUBSYSTEM_DEF(vote) question = stripped_input(usr,"What is the vote for?") if(!question) return 0 - var/system_string = tgui_input_list(usr,"Which voting type?",GLOB.vote_type_names[1], GLOB.vote_type_names) + var/system_string = input(usr,"Which voting type?",GLOB.vote_type_names[1]) in GLOB.vote_type_names vote_system = GLOB.vote_type_names[system_string] for(var/i=1,i<=10,i++) var/option = capitalize(stripped_input(usr,"Please enter an option or hit cancel to finish")) @@ -469,7 +469,7 @@ SUBSYSTEM_DEF(vote) var/bitflag = GLOB.display_vote_settings[A] toggletext = "[toggles & bitflag ? "Show" : "Hide"] [A]" choices[toggletext] = bitflag - var/chosen = tgui_input_list(usr, "Toggle vote display settings. Cancel to finalize.", toggles, choices) + var/chosen = input(usr, "Toggle vote display settings. Cancel to finalize.", toggles) as null|anything in choices if(!chosen) keep_going = FALSE else diff --git a/code/datums/action.dm b/code/datums/action.dm index 8b8ea7efd5..1a8ea7a60f 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -564,7 +564,7 @@ var/list/areas = list() for (var/area/a in owner.siliconaccessareas) areas[a.name] = a - var/removeAPC = tgui_input_list(owner, "Select an APC to remove:","Remove APC Control", areas) + var/removeAPC = input("Select an APC to remove:","Remove APC Control",1) as null|anything in areas if (!removeAPC) return var/area/area = areas[removeAPC] @@ -586,7 +586,7 @@ var/list/areas = list() for (var/area/a in owner.siliconaccessareas) areas[a.name] = a - var/accessAPC = tgui_input_list(owner, "Select an APC to access:","Access APC Interface", areas) + var/accessAPC = input("Select an APC to access:","Access APC Interface",1) as null|anything in areas if (!accessAPC) return var/area/area = areas[accessAPC] diff --git a/code/datums/browser.dm b/code/datums/browser.dm index 1663f8b5c6..2057cbb21a 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -376,13 +376,13 @@ if ("string") settings["mainsettings"][setting]["value"] = stripped_input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]", settings["mainsettings"][setting]["value"]) if ("number") - settings["mainsettings"][setting]["value"] = tgui_input_num(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]") + settings["mainsettings"][setting]["value"] = input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]") as num if ("color") settings["mainsettings"][setting]["value"] = input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]", settings["mainsettings"][setting]["value"]) as color if ("boolean") - settings["mainsettings"][setting]["value"] = tgui_input_list(user, "[settings["mainsettings"][setting]["desc"]]?", "", list("Yes","No")) + settings["mainsettings"][setting]["value"] = input(user, "[settings["mainsettings"][setting]["desc"]]?") in list("Yes","No") if ("ckey") - settings["mainsettings"][setting]["value"] = tgui_input_list(user, "[settings["mainsettings"][setting]["desc"]]?", "", list("none") + GLOB.directory) + settings["mainsettings"][setting]["value"] = input(user, "[settings["mainsettings"][setting]["desc"]]?") in list("none") + GLOB.directory if (settings["mainsettings"][setting]["callback"]) var/datum/callback/callback = settings["mainsettings"][setting]["callback"] settings = callback.Invoke(settings) diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index 05f614842f..cc988544b8 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -125,7 +125,7 @@ //try to get ammount to use var/requested_amount if(precise_insertion) - requested_amount = tgui_input_num(user, "How much do you want to insert?", "Inserting [S.singular_name]s") + requested_amount = input(user, "How much do you want to insert?", "Inserting [S.singular_name]s") as num|null else requested_amount= S.amount diff --git a/code/datums/components/storage/concrete/bag_of_holding.dm b/code/datums/components/storage/concrete/bag_of_holding.dm index 010437dbb1..e19edc89d8 100644 --- a/code/datums/components/storage/concrete/bag_of_holding.dm +++ b/code/datums/components/storage/concrete/bag_of_holding.dm @@ -5,7 +5,7 @@ var/list/obj/item/storage/backpack/holding/matching = typecache_filter_list(W.GetAllContents(), typecacheof(/obj/item/storage/backpack/holding)) matching -= A if(istype(W, /obj/item/storage/backpack/holding) || matching.len) - var/safety = tgui_alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", list("Abort", "Proceed")) + var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Abort", "Proceed") if(safety != "Proceed" || QDELETED(A) || QDELETED(W) || QDELETED(user) || !user.canUseTopic(A, BE_CLOSE, iscarbon(user))) return var/turf/loccheck = get_turf(A) diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 8496d95442..7e3ac29b2d 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -450,7 +450,7 @@ symptoms += SSdisease.list_symptoms.Copy() do if(user) - var/symptom = tgui_input_list(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom", symptoms) + var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in symptoms if(isnull(symptom)) return else if(istext(symptom)) diff --git a/code/datums/elements/flavor_text.dm b/code/datums/elements/flavor_text.dm index d2e1c07eff..6217665157 100644 --- a/code/datums/elements/flavor_text.dm +++ b/code/datums/elements/flavor_text.dm @@ -112,7 +112,7 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code var/datum/element/flavor_text/F = i choices[F.flavor_name] = F - var/chosen = tgui_input_list(src, "Which flavor text would you like to modify?", "", choices) + var/chosen = input(src, "Which flavor text would you like to modify?") as null|anything in choices if(!chosen) return var/datum/element/flavor_text/F = choices[chosen] diff --git a/code/datums/elements/polychromic.dm b/code/datums/elements/polychromic.dm index 70de6ca279..5e888e0609 100644 --- a/code/datums/elements/polychromic.dm +++ b/code/datums/elements/polychromic.dm @@ -122,7 +122,7 @@ overlays += mutable_appearance(f_icon, overlays_states[i], color = M.color) /datum/element/polychromic/proc/set_color(atom/source, mob/user) - var/choice = tgui_input_list(user,"Polychromic options", "Recolor [source]", overlays_names) + var/choice = input(user,"Polychromic options", "Recolor [source]") as null|anything in overlays_names if(!choice || QDELETED(source) || !user.canUseTopic(source, BE_CLOSE, NO_DEXTERY)) return var/index = overlays_names.Find(choice) diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index 63131dc4ff..8cdfaa4308 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -385,7 +385,7 @@ GLOBAL_LIST_EMPTY(explosions) set name = "Check Bomb Impact" set category = "Debug" - var/newmode = tgui_alert(src, "Use reactionary explosions?","Check Bomb Impact", list("Yes", "No")) + var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No") var/turf/epicenter = get_turf(mob) if(!epicenter) return @@ -394,7 +394,7 @@ GLOBAL_LIST_EMPTY(explosions) var/heavy = 0 var/light = 0 var/list/choices = list("Small Bomb","Medium Bomb","Big Bomb","Custom Bomb") - var/choice = tgui_input_list(src, "Bomb Size?", "", choices) + var/choice = input("Bomb Size?") in choices switch(choice) if(null) return 0 @@ -411,9 +411,9 @@ GLOBAL_LIST_EMPTY(explosions) heavy = 5 light = 7 if("Custom Bomb") - dev = tgui_input_num(src, "Devastation range (Tiles):") - heavy = tgui_input_num(src, "Heavy impact range (Tiles):") - light = tgui_input_num(src, "Light impact range (Tiles):") + dev = input("Devastation range (Tiles):") as num + heavy = input("Heavy impact range (Tiles):") as num + light = input("Light impact range (Tiles):") as num var/max_range = max(dev, heavy, light) var/x0 = epicenter.x diff --git a/code/datums/mind.dm b/code/datums/mind.dm index d1aef6ceae..fdd576067b 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -421,7 +421,7 @@ A.admin_remove(usr) if (href_list["role_edit"]) - var/new_role = tgui_input_list(usr, "Select new role", "Assigned role", get_all_jobs()) + var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in get_all_jobs() if (!new_role) return assigned_role = new_role @@ -434,6 +434,7 @@ else if (href_list["obj_edit"] || href_list["obj_add"]) var/objective_pos //Edited objectives need to keep same order in antag objective list + var/def_value var/datum/antagonist/target_antag var/datum/objective/old_objective //The old objective we're replacing/editing var/datum/objective/new_objective //New objective we're be adding @@ -461,7 +462,7 @@ if(1) target_antag = antag_datums[1] else - var/datum/antagonist/target = tgui_input_list(usr, "Which antagonist gets the objective:", "Antagonist", list(antag_datums + "(new custom antag)")) + var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", "(new custom antag)") as null|anything in antag_datums + "(new custom antag)" if (QDELETED(target)) return else if(target == "(new custom antag)") @@ -495,7 +496,11 @@ var/datum/objective/X = T choices[initial(X.name)] = T - var/selected_type = tgui_input_list(usr, "Select objective type:", "Objective type", choices) + if(old_objective) + if(old_objective.name in choices) + def_value = old_objective.name + + var/selected_type = input("Select objective type:", "Objective type", def_value) as null|anything in choices selected_type = choices[selected_type] if (!selected_type) return @@ -533,7 +538,7 @@ choices[initial(t.employer)] = C var/datum/antagonist/traitor/T = locate(href_list["target_antag"]) in antag_datums if(T) - var/selected_type = tgui_input_list(usr, "Select traitor class:", "Traitor class", choices) + var/selected_type = input("Select traitor class:", "Traitor class", T.traitor_kind.employer) as null|anything in choices selected_type = choices[selected_type] T.set_traitor_kind(selected_type) @@ -594,7 +599,7 @@ if(check_rights(R_FUN, 0)) var/datum/component/uplink/U = find_syndicate_uplink() if(U) - var/crystals = tgui_input_num(usr, "Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals) + var/crystals = input("Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals) as null | num if(!isnull(crystals)) U.telecrystals = crystals message_admins("[key_name_admin(usr)] changed [current]'s telecrystal count to [crystals].") diff --git a/code/datums/mutations/actions.dm b/code/datums/mutations/actions.dm index d2656dee97..8f7d67abb8 100644 --- a/code/datums/mutations/actions.dm +++ b/code/datums/mutations/actions.dm @@ -242,7 +242,7 @@ if(!length(possible)) to_chat(user,"Despite your best efforts, there are no scents to be found on [sniffed]...") return - tracking_target = tgui_input_list(user, "Choose a scent to remember.", "Scent Tracking", sortNames(possible)) + tracking_target = input(user, "Choose a scent to remember.", "Scent Tracking") as null|anything in sortNames(possible) if(!tracking_target) if(!old_target) to_chat(user,"You decide against remembering any scents. Instead, you notice your own nose in your peripheral vision. This goes on to remind you of that one time you started breathing manually and couldn't stop. What an awful day that was.") diff --git a/code/datums/skills/_check_skills.dm b/code/datums/skills/_check_skills.dm index 4d03559c06..91b36a123f 100644 --- a/code/datums/skills/_check_skills.dm +++ b/code/datums/skills/_check_skills.dm @@ -21,7 +21,7 @@ ui = SStgui.try_update_ui(user, src, ui) if(!ui) ui = new(user, src, "SkillPanel", "[owner.name]'s Skills") - ui.set_autoupdate(FALSE) + ui.set_autoupdate(FALSE) ui.open() else if(need_static_data_update) update_static_data(user) @@ -57,7 +57,7 @@ if(!check_rights(R_DEBUG)) return var/skill = text2path(params["skill"]) - var/number = tgui_input_num(usr, "Please insert the amount of experience/progress you'd like to add/subtract:") + var/number = input("Please insert the amount of experience/progress you'd like to add/subtract:") as num|null if (number) owner.set_skill_value(skill, owner.get_skill_value(skill, FALSE) + number) return TRUE @@ -65,7 +65,7 @@ if(!check_rights(R_DEBUG)) return var/skill = text2path(params["skill"]) - var/number = tgui_input_num(usr, "Please insert the number you want to set the player's exp/progress to:") + var/number = input("Please insert the number you want to set the player's exp/progress to:") as num|null if (!isnull(number)) owner.set_skill_value(skill, number) return TRUE @@ -73,7 +73,7 @@ if(!check_rights(R_DEBUG)) return var/datum/skill/level/S = GLOB.skill_datums[text2path(params["skill"])] - var/number = tgui_input_num(usr, "Please insert a whole number between 0[S.associative ? " ([S.unskilled_tier])" : ""] and [S.max_levels][S.associative ? " ([S.levels[S.max_levels]])" : ""] corresponding to the level you'd like to set the player to.") + var/number = input("Please insert a whole number between 0[S.associative ? " ([S.unskilled_tier])" : ""] and [S.max_levels][S.associative ? " ([S.levels[S.max_levels]])" : ""] corresponding to the level you'd like to set the player to.") as num|null if (number >= 0 && number <= S.max_levels) owner.set_skill_value(S.type, S.get_skill_level_value(number)) return TRUE diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 5e3db3d93c..48213279f1 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -985,14 +985,14 @@ . = ..() if(href_list[VV_HK_ADD_REAGENT] && check_rights(R_VAREDIT)) if(!reagents) - var/amount = tgui_input_num(usr, "Specify the reagent size of [src]", "Set Reagent Size", 50) + var/amount = input(usr, "Specify the reagent size of [src]", "Set Reagent Size", 50) as num if(amount) create_reagents(amount) if(reagents) var/chosen_id = choose_reagent_id(usr) if(chosen_id) - var/amount = tgui_input_num(usr, "Choose the amount to add.", "Choose the amount.", reagents.maximum_volume) + var/amount = input(usr, "Choose the amount to add.", "Choose the amount.", reagents.maximum_volume) as num if(amount) reagents.add_reagent(chosen_id, amount) log_admin("[key_name(usr)] has added [amount] units of [chosen_id] to [src]") @@ -1002,25 +1002,25 @@ if(href_list[VV_HK_TRIGGER_EMP] && check_rights(R_FUN)) usr.client.cmd_admin_emp(src) if(href_list[VV_HK_MODIFY_TRANSFORM] && check_rights(R_VAREDIT)) - var/result = tgui_input_list(usr, "Choose the transformation to apply","Transform Mod", list("Scale","Translate","Rotate")) + var/result = input(usr, "Choose the transformation to apply","Transform Mod") as null|anything in list("Scale","Translate","Rotate") var/matrix/M = transform switch(result) if("Scale") - var/x = tgui_input_num(usr, "Choose x mod","Transform Mod") - var/y = tgui_input_num(usr, "Choose y mod","Transform Mod") + var/x = input(usr, "Choose x mod","Transform Mod") as null|num + var/y = input(usr, "Choose y mod","Transform Mod") as null|num if(!isnull(x) && !isnull(y)) transform = M.Scale(x,y) if("Translate") - var/x = tgui_input_num(usr, "Choose x mod","Transform Mod") - var/y = tgui_input_num(usr, "Choose y mod","Transform Mod") + var/x = input(usr, "Choose x mod","Transform Mod") as null|num + var/y = input(usr, "Choose y mod","Transform Mod") as null|num if(!isnull(x) && !isnull(y)) transform = M.Translate(x,y) if("Rotate") - var/angle = tgui_input_num(usr, "Choose angle to rotate","Transform Mod") + var/angle = input(usr, "Choose angle to rotate","Transform Mod") as null|num if(!isnull(angle)) transform = M.Turn(angle) if(href_list[VV_HK_AUTO_RENAME] && check_rights(R_VAREDIT)) - var/newname = tgui_input_text(usr, "What do you want to rename this to?", "Automatic Rename") + var/newname = input(usr, "What do you want to rename this to?", "Automatic Rename") as null|text if(newname) vv_auto_rename(newname) if(href_list[VV_HK_EDIT_FILTERS] && check_rights(R_VAREDIT)) diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm index cbd9c6c8c6..68a103af63 100644 --- a/code/game/gamemodes/dynamic/dynamic.dm +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -201,7 +201,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) else if (href_list["no_stacking"]) GLOB.dynamic_no_stacking = !GLOB.dynamic_no_stacking else if (href_list["adjustthreat"]) - var/threatadd = tgui_input_num(usr, "Specify how much threat to add (negative to subtract). This can inflate the threat level.", "Adjust Threat", 0) + var/threatadd = input("Specify how much threat to add (negative to subtract). This can inflate the threat level.", "Adjust Threat", 0) as null|num if(!threatadd) return if(threatadd > 0) @@ -221,9 +221,9 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) else if (href_list["threatlog"]) show_threatlog(usr) else if (href_list["stacking_limit"]) - GLOB.dynamic_stacking_limit = tgui_input_num(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) + GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num else if(href_list["force_latejoin_rule"]) - var/added_rule = tgui_input_list(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", sortNames(init_rulesets(/datum/dynamic_ruleset/latejoin))) + var/added_rule = input(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", null) as null|anything in sortNames(init_rulesets(/datum/dynamic_ruleset/latejoin)) if (!added_rule) return forced_latejoin_rule = added_rule @@ -234,7 +234,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) log_admin("[key_name(usr)] cleared the forced latejoin ruleset.") message_admins("[key_name(usr)] cleared the forced latejoin ruleset.") else if(href_list["force_midround_rule"]) - var/added_rule = tgui_input_list(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", sortNames(init_rulesets(/datum/dynamic_ruleset/midround))) + var/added_rule = input(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", null) as null|anything in sortNames(init_rulesets(/datum/dynamic_ruleset/midround)) if (!added_rule) return log_admin("[key_name(usr)] executed the [added_rule] ruleset.") diff --git a/code/game/gamemodes/dynamic/dynamic_simulations.dm b/code/game/gamemodes/dynamic/dynamic_simulations.dm index a7e0a4f582..63da54bece 100644 --- a/code/game/gamemodes/dynamic/dynamic_simulations.dm +++ b/code/game/gamemodes/dynamic/dynamic_simulations.dm @@ -72,9 +72,9 @@ set name = "Run Dynamic Simulations" set category = "Debug" - var/simulations = tgui_input_num(usr, "Enter number of simulations") - var/roundstart_players = tgui_input_num(usr, "Enter number of round start players") - var/forced_threat_level = tgui_input_num(usr, "Enter forced threat level, if you want one") + var/simulations = input(usr, "Enter number of simulations") as num + var/roundstart_players = input(usr, "Enter number of round start players") as num + var/forced_threat_level = input(usr, "Enter forced threat level, if you want one") as num | null SSticker.mode = new /datum/game_mode/dynamic message_admins("Running dynamic simulations...") diff --git a/code/game/gamemodes/gangs/dominator.dm b/code/game/gamemodes/gangs/dominator.dm index 8c997f8cde..a253aa906c 100644 --- a/code/game/gamemodes/gangs/dominator.dm +++ b/code/game/gamemodes/gangs/dominator.dm @@ -176,7 +176,7 @@ return var/time = round(tempgang.determine_domination_time()/60,0.1) - if(tgui_alert(user,"A takeover will require [time] minutes.\nYour gang will be unable to gain influence while it is active.\nThe entire station will likely be alerted to it once it starts.\nYou have [tempgang.dom_attempts] attempt(s) remaining. Are you ready?","Confirm",list("Ready","Later")) == "Ready") + if(alert(user,"A takeover will require [time] minutes.\nYour gang will be unable to gain influence while it is active.\nThe entire station will likely be alerted to it once it starts.\nYou have [tempgang.dom_attempts] attempt(s) remaining. Are you ready?","Confirm","Ready","Later") == "Ready") if((tempgang.domination_time != NOT_DOMINATING) || !tempgang.dom_attempts || !in_range(src, user) || !isturf(loc)) return 0 diff --git a/code/game/gamemodes/gangs/gang.dm b/code/game/gamemodes/gangs/gang.dm index af2b830788..6efdf2a4aa 100644 --- a/code/game/gamemodes/gangs/gang.dm +++ b/code/game/gamemodes/gangs/gang.dm @@ -108,11 +108,11 @@ .["Set domination time left"] = CALLBACK(src, .proc/set_dom_time_left) /datum/antagonist/gang/admin_add(datum/mind/new_owner,mob/admin) - var/new_or_existing = tgui_input_list(admin, "Which gang do you want to be assigned to the user?", "Gangs", list("New","Existing")) + var/new_or_existing = input(admin, "Which gang do you want to be assigned to the user?", "Gangs") as null|anything in list("New","Existing") if(isnull(new_or_existing)) return else if(new_or_existing == "New") - var/newgang = tgui_input_list(admin, "Select a gang, or select random to pick a random one.", "New gang", GLOB.possible_gangs + "Random") + var/newgang = input(admin, "Select a gang, or select random to pick a random one.", "New gang") as null|anything in GLOB.possible_gangs + "Random" if(isnull(newgang)) return else if(newgang == "Random") @@ -125,7 +125,7 @@ if(!GLOB.gangs.len) // no gangs exist to_chat(admin, "No gangs exist, please create a new one instead.") return - var/existinggang = tgui_input_list(admin, "Select a gang, or select random to pick a random one.", "Existing gang", GLOB.gangs + "Random") + var/existinggang = input(admin, "Select a gang, or select random to pick a random one.", "Existing gang") as null|anything in GLOB.gangs + "Random" if(isnull(existinggang)) return else if(existinggang == "Random") @@ -141,7 +141,7 @@ promote() /datum/antagonist/gang/proc/admin_adjust_influence() - var/inf = tgui_input_num(usr, "Influence for [gang.name]","Gang influence", gang.influence) + var/inf = input("Influence for [gang.name]","Gang influence", gang.influence) as null | num if(!isnull(inf)) gang.influence = inf message_admins("[key_name_admin(usr)] changed [gang.name]'s influence to [inf].") @@ -158,7 +158,7 @@ /datum/antagonist/gang/proc/set_dom_time_left(mob/admin) if(gang.domination_time == NOT_DOMINATING) return // an admin shouldn't need this - var/seconds = tgui_input_num(admin, "Set the time left for the gang to win, in seconds", "Domination time left", (gang.domination_time - world.time) * 0.1) + var/seconds = input(admin, "Set the time left for the gang to win, in seconds", "Domination time left") as null|num if(seconds && seconds > 0) gang.domination_time = world.time + seconds*10 gang.message_gangtools("Takeover shortened to [gang.domination_time_remaining()] seconds by your Syndicate benefactors.") diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 0dd0e79ef8..1c6c444fb4 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -39,11 +39,16 @@ GLOBAL_LIST_EMPTY(objectives) //Shared by few objective types /datum/objective/proc/admin_simple_target_pick(mob/admin) var/list/possible_targets = list("Free objective") + var/def_value for(var/datum/mind/possible_target in SSticker.minds) if ((possible_target != src) && ishuman(possible_target.current)) possible_targets += possible_target.current - var/mob/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_targets) + + if(target && target.current) + def_value = target.current + + var/mob/new_target = input(admin,"Select target:", "Objective target", def_value) as null|anything in possible_targets if (!new_target) return @@ -600,12 +605,12 @@ GLOBAL_LIST_EMPTY(possible_items) /datum/objective/steal/admin_edit(mob/admin) var/list/possible_items_all = GLOB.possible_items+"custom" - var/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_items_all) + var/new_target = input(admin,"Select target:", "Objective target", steal_target) as null|anything in possible_items_all if (!new_target) return if (new_target == "custom") //Can set custom items. - var/custom_path = tgui_input_text(admin,"Search for target item type:","Type") + var/custom_path = input(admin,"Search for target item type:","Type") as null|text if (!custom_path) return var/obj/item/custom_target = pick_closest_path(custom_path, make_types_fancy(subtypesof(/obj/item))) @@ -722,7 +727,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) return checking.researched_nodes.len >= target_amount /datum/objective/download/admin_edit(mob/admin) - var/count = tgui_input_num(admin,"How many nodes ?","Nodes",target_amount) + var/count = input(admin,"How many nodes ?","Nodes",target_amount) as num|null if(count) target_amount = count update_explanation_text() @@ -768,7 +773,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) return captured_amount >= target_amount /datum/objective/capture/admin_edit(mob/admin) - var/count = tgui_input_num(admin,"How many mobs to capture ?","capture",target_amount) + var/count = input(admin,"How many mobs to capture ?","capture",target_amount) as num|null if(count) target_amount = count update_explanation_text() @@ -800,7 +805,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) explanation_text = "Extract [target_amount] compatible genome\s." /datum/objective/absorb/admin_edit(mob/admin) - var/count = tgui_input_num(admin,"How many people to absorb?","absorb",target_amount) + var/count = input(admin,"How many people to absorb?","absorb",target_amount) as num|null if(count) target_amount = count update_explanation_text() @@ -890,7 +895,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) /datum/objective/destroy/admin_edit(mob/admin) var/list/possible_targets = active_ais(1) if(possible_targets.len) - var/mob/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_targets) + var/mob/new_target = input(admin,"Select target:", "Objective target") as null|anything in possible_targets target = new_target.mind else to_chat(admin, "No active AIs with minds") diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index 809eb3d9af..82209221ce 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -112,7 +112,7 @@ if(!storedpda) to_chat(user, "[src] is empty.") return - var/choice = tgui_input_list(user, "Select the new skin!", "PDA Painting", colorlist) + var/choice = input(user, "Select the new skin!", "PDA Painting") as null|anything in colorlist if(!choice || !storedpda || !in_range(src, user)) return var/list/P = colorlist[choice] diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm index 2b982f7480..e496973d75 100644 --- a/code/game/machinery/aug_manipulator.dm +++ b/code/game/machinery/aug_manipulator.dm @@ -8,14 +8,14 @@ max_integrity = 200 var/obj/item/bodypart/storedpart var/initial_icon_state - var/static/list/style_list_icons = list("standard" = 'icons/mob/augmentation/augments.dmi', - "engineer" = 'icons/mob/augmentation/augments_engineer.dmi', - "security" = 'icons/mob/augmentation/augments_security.dmi', - "mining" = 'icons/mob/augmentation/augments_mining.dmi', - "Talon" = 'icons/mob/augmentation/cosmetic_prosthetic/talon.dmi', - "Nanotrasen" = 'icons/mob/augmentation/cosmetic_prosthetic/nanotrasen.dmi', - "Hephaesthus" = 'icons/mob/augmentation/cosmetic_prosthetic/hephaestus.dmi', - "Bishop" = 'icons/mob/augmentation/cosmetic_prosthetic/bishop.dmi', + var/static/list/style_list_icons = list("standard" = 'icons/mob/augmentation/augments.dmi', + "engineer" = 'icons/mob/augmentation/augments_engineer.dmi', + "security" = 'icons/mob/augmentation/augments_security.dmi', + "mining" = 'icons/mob/augmentation/augments_mining.dmi', + "Talon" = 'icons/mob/augmentation/cosmetic_prosthetic/talon.dmi', + "Nanotrasen" = 'icons/mob/augmentation/cosmetic_prosthetic/nanotrasen.dmi', + "Hephaesthus" = 'icons/mob/augmentation/cosmetic_prosthetic/hephaestus.dmi', + "Bishop" = 'icons/mob/augmentation/cosmetic_prosthetic/bishop.dmi', "Xion" = 'icons/mob/augmentation/cosmetic_prosthetic/xion.dmi', "Grayson" = 'icons/mob/augmentation/cosmetic_prosthetic/grayson.dmi', "Cybersolutions" = 'icons/mob/augmentation/cosmetic_prosthetic/cybersolutions.dmi', @@ -116,7 +116,7 @@ add_fingerprint(user) if(storedpart) - var/augstyle = tgui_input_list(user, "Select style.", "Augment Custom Fitting", style_list_icons) + var/augstyle = input(user, "Select style.", "Augment Custom Fitting") as null|anything in style_list_icons if(!augstyle) return if(!in_range(src, user)) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index c734e2b265..0e7b4aa0fa 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -184,7 +184,7 @@ if(materials.materials[i] > 0) list_to_show += i - used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sortList(list_to_show, /proc/cmp_typepaths_asc)) + used_material = input("Choose [used_material]", "Custom Material") as null|anything in sortList(list_to_show, /proc/cmp_typepaths_asc) if(!used_material) return //Didn't pick any material, so you can't build shit either. custom_materials[used_material] += amount_needed diff --git a/code/game/machinery/bloodbankgen.dm b/code/game/machinery/bloodbankgen.dm index b089b06a88..31fac02d83 100644 --- a/code/game/machinery/bloodbankgen.dm +++ b/code/game/machinery/bloodbankgen.dm @@ -185,7 +185,7 @@ to_chat(user, "This machine already has bags attached.") if(!bag && !outbag) - var/choice = tgui_alert(user, "Choose where to place [O]", "", list("Input", "Cancel", "Output")) + var/choice = alert(user, "Choose where to place [O]", "", "Input", "Cancel", "Output") switch(choice) if("Cancel") return FALSE diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 8966fc03f1..bf1b84fe5d 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -16,7 +16,7 @@ /mob/living/silicon/ai/proc/show_camera_list() var/list/cameras = get_camera_list() - var/camera = tgui_input_list(src, "Choose which camera you want to view", "Cameras", cameras) + var/camera = input(src, "Choose which camera you want to view", "Cameras") as null|anything in cameras switchCamera(cameras[camera]) /datum/trackable diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index d35505ce7e..fa552a4e66 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -251,7 +251,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers) IO |= text[1] if(!IO.len) to_chat(user, "No machinery detected.") - var/S = tgui_input_list(user, "Select the device set: ", "Selection", sortList(IO)) + var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sortList(IO) if(src) src.input_tag = "[S]_in" src.output_tag = "[S]_out" diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 0167fd0243..9d675bc5dd 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -269,7 +269,7 @@ T["[netcam.c_tag][netcam.can_use() ? null : " (Deactivated)"]"] = netcam playsound(origin, 'sound/machines/terminal_prompt.ogg', 25, 0) - var/camera = tgui_input_list(usr, "Choose which camera you want to view", "Cameras", T) + var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in T var/obj/machinery/camera/final = T[camera] playsound(src, "terminal_type", 25, 0) if(final) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index d91c2a2dab..46d419a8fe 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -447,7 +447,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) if (authenticated == 2) var/t1 = href_list["assign_target"] if(t1 == "Custom") - var/newJob = reject_bad_text(tgui_input_text(usr, "Enter a custom job assignment.", "Assignment", inserted_modify_id ? inserted_modify_id.assignment : "Unassigned"), MAX_NAME_LEN) + var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", inserted_modify_id ? inserted_modify_id.assignment : "Unassigned"), MAX_NAME_LEN) if(newJob) t1 = newJob diff --git a/code/game/machinery/computer/launchpad_control.dm b/code/game/machinery/computer/launchpad_control.dm index 93eca02bdb..18a0aeb221 100644 --- a/code/game/machinery/computer/launchpad_control.dm +++ b/code/game/machinery/computer/launchpad_control.dm @@ -116,7 +116,7 @@ return current_pad.display_name = new_name if("remove") - if(usr && tgui_alert(usr, "Are you sure?", "Unlink Launchpad", list("I'm Sure", "Abort")) != "Abort") + if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort") launchpads -= current_pad selected_id = null . = TRUE diff --git a/code/game/machinery/computer/mechlaunchpad.dm b/code/game/machinery/computer/mechlaunchpad.dm index ecd063a85c..86c4a35799 100644 --- a/code/game/machinery/computer/mechlaunchpad.dm +++ b/code/game/machinery/computer/mechlaunchpad.dm @@ -155,7 +155,7 @@ return current_pad.display_name = new_name if("remove") - if(usr && tgui_alert(usr, "Are you sure?", "Unlink Orbital Pad", list("I'm Sure", "Abort")) != "Abort") + if(usr && alert(usr, "Are you sure?", "Unlink Orbital Pad", "I'm Sure", "Abort") != "Abort") mechpads -= current_pad LAZYREMOVE(current_pad.consoles, src) selected_id = null diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 43f8f71185..7f5fafcd80 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -289,7 +289,7 @@ active1.fields["gender"] = "Male" if("age") if(active1) - var/t1 = tgui_input_num(usr, "Please input age:", "Med. records", active1.fields["age"]) + var/t1 = input("Please input age:", "Med. records", active1.fields["age"], null) as num if(!canUseMedicalRecordsConsole(usr, t1, a1)) return active1.fields["age"] = t1 diff --git a/code/game/machinery/computer/prisoner/management.dm b/code/game/machinery/computer/prisoner/management.dm index 8b34b54b03..43aa978558 100644 --- a/code/game/machinery/computer/prisoner/management.dm +++ b/code/game/machinery/computer/prisoner/management.dm @@ -99,7 +99,7 @@ if("reset") contained_id.points = 0 if("setgoal") - var/num = round(tgui_input_num(usr, "Choose prisoner's goal:", "Input an Integer", contained_id.goal)) + var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null) if(num >= 0) num = min(num,1000) //Cap the quota to the equivilent of 10 minutes. contained_id.goal = num diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 5a851ffc66..45bb9bd327 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -577,13 +577,13 @@ What a mess.*/ active1.fields["gender"] = "Male" if("age") if(istype(active1, /datum/data/record)) - var/t1 = tgui_input_num(usr, "Please input age:", "Secure. records", active1.fields["age"]) + var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num if(!canUseSecurityRecordsConsole(usr, "age", a1)) return active1.fields["age"] = t1 if("species") if(istype(active1, /datum/data/record)) - var/t1 = stripped_input("Please input species name", "Secure. records", active1.fields["species"], null) + var/t1 = input("Select a species", "Species Selection") as null|anything in GLOB.roundstart_races if(!canUseSecurityRecordsConsole(usr, t1, a1)) return active1.fields["species"] = t1 @@ -687,7 +687,7 @@ What a mess.*/ temp += "
  • [rank]
  • " temp += "" else - tgui_alert(usr, "You do not have the required rank to do this!") + alert(usr, "You do not have the required rank to do this!") //TEMPORARY MENU FUNCTIONS else//To properly clear as per clear screen. temp=null diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm index 0dd64bf3e8..3e9531097e 100644 --- a/code/game/machinery/computer/teleporter.dm +++ b/code/game/machinery/computer/teleporter.dm @@ -139,7 +139,7 @@ if(is_eligible(M)) L[avoid_assoc_duplicate_keys(M.real_name, areaindex)] = M - var/desc = tgui_input_list(user, "Please select a location to lock in.", "Locking Computer", L) + var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in L if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //check if we are still around return target = L[desc] @@ -167,7 +167,7 @@ if(!L.len) to_chat(user, "No active connected stations located.") return - var/desc = tgui_input_list(user, "Please select a station to lock in.", "Locking Computer", L) + var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //again, check if we are still around return var/obj/machinery/teleport/station/target_station = L[desc] diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 9474320894..f2f8c20776 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -101,7 +101,7 @@ updateUsrDialog() return - var/obj/I = tgui_input_list(user, "Please choose which object to retrieve.","Object recovery", stored_packages) + var/obj/I = input(user, "Please choose which object to retrieve.","Object recovery",null) as null|anything in stored_packages playsound(src, "terminal_type", 25, 0) if(!I) return @@ -439,7 +439,7 @@ to_chat(user, "You can't put [target] into [src]. They're conscious.") return else if(target.client) - if(tgui_alert(target,"Would you like to enter cryosleep?",,list("Yes","No")) == "No") + if(alert(target,"Would you like to enter cryosleep?",,"Yes","No") == "No") return var/generic_plsnoleave_message = " Please adminhelp before leaving the round, even if there are no administrators online!" @@ -462,7 +462,7 @@ LAZYADD(caught_string, "Revolutionary") if(caught_string) - tgui_alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]") + alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]") target.client.cryo_warned = world.time return diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 39749b33fa..982e40a79b 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -102,7 +102,7 @@ rad_insulation = RAD_MEDIUM_INSULATION var/static/list/airlock_overlays = list() - + /// sigh var/unelectrify_timerid @@ -1212,7 +1212,7 @@ else optionlist = list("Standard", "Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Freezer", "Science", "Virology", "Mining", "Maintenance", "External", "External Maintenance") - var/paintjob = tgui_input_list(user, "Please select a paintjob for this airlock.", "", optionlist) + var/paintjob = input(user, "Please select a paintjob for this airlock.") in optionlist if((!in_range(src, usr) && src.loc != usr) || !W.use_paint(user)) return switch(paintjob) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 5b2551fa8b..853bd73eac 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -264,7 +264,7 @@ GLOBAL_LIST_EMPTY(network_holopads) if(A) LAZYADD(callnames[A], I) callnames -= get_area(src) - var/result = tgui_input_list(usr, "Choose an area to call", "Holocall", sortNames(callnames)) + var/result = input(usr, "Choose an area to call", "Holocall") as null|anything in sortNames(callnames) if(QDELETED(usr) || !result || outgoing_call) return if(usr.loc == loc) diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm index 49ff0e7609..87989b18ec 100644 --- a/code/game/machinery/launch_pad.dm +++ b/code/game/machinery/launch_pad.dm @@ -339,7 +339,7 @@ pad.display_name = new_name if("remove") . = TRUE - if(usr && tgui_alert(usr, "Are you sure?", "Unlink Launchpad", list("I'm Sure", "Abort")) != "Abort") + if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort") pad = null if("launch") sending = TRUE diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 4d6900983f..5b30105409 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -245,7 +245,7 @@ Buildable meters disposable = FALSE /obj/item/pipe/bluespace/attack_self(mob/user) - var/new_name = tgui_input_text(user, "Enter identifier for bluespace pipe network", "bluespace pipe", bluespace_network_name) + var/new_name = input(user, "Enter identifier for bluespace pipe network", "bluespace pipe", bluespace_network_name) as text|null if(!isnull(new_name)) bluespace_network_name = new_name diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 54663356c7..4009b1b56b 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -193,11 +193,11 @@ playsound(loc, 'sound/machines/click.ogg', 30, 1) /obj/machinery/syndicatebomb/proc/settings(mob/user) - var/new_timer = tgui_input_num(user, "Please set the timer.", "Timer", "[timer_set]") + var/new_timer = input(user, "Please set the timer.", "Timer", "[timer_set]") as num if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station timer_set = clamp(new_timer, minimum_timer, maximum_timer) loc.visible_message("[icon2html(src, viewers(src))] timer set for [timer_set] seconds.") - if(tgui_alert(user,"Would you like to start the countdown now?",,list("Yes","No")) == "Yes" && in_range(src, user) && isliving(user)) + if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, user) && isliving(user)) if(defused || active) if(defused) visible_message("[icon2html(src, viewers(src))] Device error: User intervention required.") diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm index 50792205c8..a674bb6489 100644 --- a/code/game/machinery/telecomms/computers/message.dm +++ b/code/game/machinery/telecomms/computers/message.dm @@ -316,7 +316,7 @@ // Get out list of viable PDAs var/list/obj/item/pda/sendPDAs = get_viewable_pdas() if(GLOB.PDAs && LAZYLEN(GLOB.PDAs) > 0) - customrecepient = tgui_input_list(usr, "Select a PDA from the list.", "", sortNames(sendPDAs)) + customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortNames(sendPDAs) else customrecepient = null return diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index ab7b31f530..808dc4877b 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -177,7 +177,7 @@ links.Remove(T) if("freq") if("add" in params) - var/newfreq = tgui_input_num(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src.name, null) + var/newfreq = input("Specify a new frequency to filter (GHz). Decimals assigned automatically.", src.name, null) as null|num if(!canAccess(usr) || !newfreq || isnull(newfreq)) return diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index b2293f2125..6aeef4b6ac 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -38,7 +38,7 @@ to_chat(user, "You have a very great feeling about this!") else to_chat(user, "The Wish Granter awaits your wish.") - var/wish = tgui_input_list(user, "You want...","Wish", list("Power","Wealth","The Station To Disappear","To Kill","Nothing")) + var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","The Station To Disappear","To Kill","Nothing") switch(wish) if("Power") //Gives infinite power in exchange for infinite power going off in your face! if(charges <= 0) diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 4b36b298b3..1c4586205a 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -407,7 +407,7 @@ return if(href_list["cut"]) if(cable && cable.amount) - var/m = round(tgui_input_num(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)), 1) + var/m = round(input(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1) m = min(m, cable.amount) if(m) use_cable(m) diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index 7c8324eb37..067cffd319 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -246,7 +246,7 @@ output_maintenance_dialog(id_card, usr) if(href_list["set_internal_tank_valve"] && state >=1) - var/new_pressure = tgui_input_num(usr,"Input new output pressure","Pressure setting",internal_tank_valve) + var/new_pressure = input(usr,"Input new output pressure","Pressure setting",internal_tank_valve) as num if(new_pressure) internal_tank_valve = new_pressure to_chat(usr, "The internal pressure valve has been set to [internal_tank_valve]kPa.") diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index a203bd172f..afc4312779 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -18,7 +18,7 @@ if(act_intent == INTENT_HELP || act_intent == INTENT_GRAB) return if(buckled_mobs.len > 1) - var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?","Unbuckle Who?", buckled_mobs) + var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs if(user_unbuckle_mob(unbuckled,user)) return 1 else @@ -161,6 +161,6 @@ else if(length(buckled_mobs) == 1) return user_unbuckle_mob(buckled_mobs[1], user) else - var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?","Unbuckle Who?", buckled_mobs) + var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs return user_unbuckle_mob(unbuckled, user) diff --git a/code/game/objects/items/AI_modules.dm b/code/game/objects/items/AI_modules.dm index dd123c07e8..59dd420d23 100644 --- a/code/game/objects/items/AI_modules.dm +++ b/code/game/objects/items/AI_modules.dm @@ -229,11 +229,11 @@ AI MODULES laws = list("") /obj/item/aiModule/supplied/freeform/attack_self(mob/user) - var/newpos = tgui_input_num(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) + var/newpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num|null if(newpos == null) return if(newpos < 15) - var/response = tgui_alert(user, "Error: The law priority of [newpos] is invalid, Law priorities below 14 are reserved for core laws, Would you like to change that that to 15?", "Invalid law priority", list("Change to 15", "Cancel")) + var/response = alert("Error: The law priority of [newpos] is invalid, Law priorities below 14 are reserved for core laws, Would you like to change that that to 15?", "Invalid law priority", "Change to 15", "Cancel") if (!response || response == "Cancel") return newpos = 15 @@ -264,7 +264,7 @@ AI MODULES var/lawpos = 1 /obj/item/aiModule/remove/attack_self(mob/user) - lawpos = tgui_input_num(user, "Please enter the law you want to delete.", "Law Number", lawpos) + lawpos = input("Please enter the law you want to delete.", "Law Number", lawpos) as num|null if(lawpos == null) return if(lawpos <= 0) diff --git a/code/game/objects/items/boombox.dm b/code/game/objects/items/boombox.dm index e0edeede22..49e2375c1a 100644 --- a/code/game/objects/items/boombox.dm +++ b/code/game/objects/items/boombox.dm @@ -25,7 +25,7 @@ for(var/datum/track/S in SSjukeboxes.songs) if(istype(S) && (S.song_associated_id in availabletrackids)) tracklist[S.song_name] = S - var/selected = tgui_input_list(user, "Play song", "Track:", tracklist) + var/selected = input(user, "Play song", "Track:") as null|anything in tracklist if(QDELETED(src) || !selected || !istype(tracklist[selected], /datum/track)) return var/jukeboxslottotake = SSjukeboxes.addjukebox(src, tracklist[selected]) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index ad3a6563a5..df7d6467f0 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -302,7 +302,7 @@ . = FALSE var/datum/bank_account/old_account = registered_account - var/new_bank_id = tgui_input_num(user, "Enter your account ID number.", "Account Reclamation", 111111) + var/new_bank_id = input(user, "Enter your account ID number.", "Account Reclamation", 111111) as num | null if (isnull(new_bank_id)) return @@ -344,7 +344,7 @@ registered_account.bank_card_talk("ERROR: UNABLE TO LOGIN DUE TO SCHEDULED MAINTENANCE. MAINTENANCE IS SCHEDULED TO COMPLETE IN [(registered_account.withdrawDelay - world.time)/10] SECONDS.", TRUE) return - var/amount_to_remove = tgui_input_num(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5) + var/amount_to_remove = input(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5) as num|null if(!amount_to_remove || amount_to_remove < 0) return @@ -478,9 +478,9 @@ var/popup_input if(bank_support == ID_FREE_BANK_ACCOUNT) - popup_input = tgui_alert(user, "Choose Action", "Agent ID", list("Show", "Forge/Reset", "Change Account ID")) + popup_input = alert(user, "Choose Action", "Agent ID", "Show", "Forge/Reset", "Change Account ID") else - popup_input = tgui_alert(user, "Choose Action", "Agent ID", list("Show", "Forge/Reset")) + popup_input = alert(user, "Choose Action", "Agent ID", "Show", "Forge/Reset") if(!user.canUseTopic(src, BE_CLOSE, FALSE)) return if(popup_input == "Forge/Reset" && !forged) @@ -843,7 +843,7 @@ if(user.incapacitated() || !istype(user)) to_chat(user, "You can't do that right now!") return TRUE - if(tgui_alert(user, "Are you sure you want to recolor your id?", "Confirm Repaint", list("Yes", "No")) == "Yes") + if(alert("Are you sure you want to recolor your id?", "Confirm Repaint", "Yes", "No") == "Yes") var/energy_color_input = input(usr,"","Choose Energy Color",id_color) as color|null if(!in_range(src, user) || !energy_color_input) return TRUE diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 0647ec5bc0..cb1d4aae88 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -654,7 +654,7 @@ display_vending_names_paths = list() for(var/path in vending_names_paths) display_vending_names_paths[vending_names_paths[path]] = path - var/choice = tgui_input_list(user,"Choose a new brand","Select an Item", sortList(display_vending_names_paths)) + var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sortList(display_vending_names_paths) set_type(display_vending_names_paths[choice]) else return ..() @@ -856,7 +856,7 @@ // /obj/item/circuitboard/machine/medical_kiosk/multitool_act(mob/living/user) // . = ..() -// var/new_cost = tgui_input_num(user, "Set a new cost for using this medical kiosk.","New cost", custom_cost) +// var/new_cost = input("Set a new cost for using this medical kiosk.","New cost", custom_cost) as num|null // if(!new_cost || (loc != user)) // to_chat(user, "You must hold the circuitboard to change its cost!") // return @@ -1050,7 +1050,7 @@ /obj/item/circuitboard/machine/public_nanite_chamber/multitool_act(mob/living/user) . = ..() - var/new_cloud = tgui_input_num(user, "Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id) + var/new_cloud = input("Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id) as num|null if(!new_cloud || (loc != user)) to_chat(user, "You must hold the circuitboard to change its Cloud ID!") return diff --git a/code/game/objects/items/crab17.dm b/code/game/objects/items/crab17.dm index b831a118de..8d55d3d5a2 100644 --- a/code/game/objects/items/crab17.dm +++ b/code/game/objects/items/crab17.dm @@ -14,7 +14,7 @@ if(dumped) to_chat(user, "You already activated Protocol CRAB-17.") return FALSE - if(tgui_alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", list("Yes", "No")) == "Yes") + if(alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", "Yes", "No") == "Yes") if(dumped || QDELETED(src)) //Prevents fuckers from cheesing alert return FALSE var/turf/targetturf = get_safe_random_station_turf() diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm index b9cf189051..b7f7f5f2d1 100644 --- a/code/game/objects/items/credit_holochip.dm +++ b/code/game/objects/items/credit_holochip.dm @@ -95,7 +95,7 @@ /obj/item/holochip/AltClick(mob/user) if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) return - var/split_amount = round(tgui_input_num(user,"How many credits do you want to extract from the holochip?")) + var/split_amount = round(input(user,"How many credits do you want to extract from the holochip?") as null|num) if(split_amount == null || split_amount <= 0 || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) return else diff --git a/code/game/objects/items/debug_items.dm b/code/game/objects/items/debug_items.dm index f743e2e4e8..c7aaab6a26 100644 --- a/code/game/objects/items/debug_items.dm +++ b/code/game/objects/items/debug_items.dm @@ -21,9 +21,9 @@ /obj/item/debug/human_spawner/attack_self(mob/user) ..() - var/choice = tgui_input_list(user, "Select a species", "Human Spawner", null, GLOB.species_list) + var/choice = input("Select a species", "Human Spawner", null) in GLOB.species_list selected_species = GLOB.species_list[choice] - + /* Revive this once we purge all the istype checks for tools for tool_behaviour /obj/item/debug/omnitool name = "omnitool" diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index f19cde7071..2339e88a76 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -144,7 +144,7 @@ GLOBAL_LIST_EMPTY(PDAs) dat += "\n[V]: [output]" to_chat(M, dat) - var/choice = tgui_input_list(M, "Choose the a reskin for [src]","Reskin Object", GLOB.pda_reskins) + var/choice = input(M, "Choose the a reskin for [src]","Reskin Object") as null|anything in GLOB.pda_reskins var/new_icon = GLOB.pda_reskins[choice] if(QDELETED(src) || isnull(new_icon) || new_icon == icon || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return @@ -619,7 +619,7 @@ GLOBAL_LIST_EMPTY(PDAs) playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("Drone Phone") - var/alert_s = tgui_input_list(U,"Alert severity level","Ping Drones", list("Low","Medium","High","Critical")) + var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical") var/area/A = get_area(U) if(A && alert_s && !QDELETED(U)) var/msg = "NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!" @@ -1147,7 +1147,7 @@ GLOBAL_LIST_EMPTY(PDAs) plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P - var/c = tgui_input_list(user, "Please select a PDA", "", sortList(plist)) + var/c = input(user, "Please select a PDA") as null|anything in sortList(plist) if (!c) return @@ -1155,7 +1155,7 @@ GLOBAL_LIST_EMPTY(PDAs) var/selected = plist[c] if(aicamera.stored.len) - var/add_photo = tgui_input_list(user,"Do you want to attach a photo?","Photo","No", list("Yes","No")) + var/add_photo = input(user,"Do you want to attach a photo?","Photo","No") as null|anything in list("Yes","No") if(add_photo=="Yes") var/datum/picture/Pic = aicamera.selectpicture(user) aiPDA.picture = Pic diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index 8ac68b9827..4ca0b86bc0 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -656,10 +656,10 @@ Code: if("alert") post_status("alert", href_list["alert"]) if("setmsg1") - message1 = reject_bad_text(tgui_input_text(usr, "Line 1", "Enter Message Text", message1), 40) + message1 = reject_bad_text(input("Line 1", "Enter Message Text", message1) as text|null, 40) updateSelfDialog() if("setmsg2") - message2 = reject_bad_text(tgui_input_text(usr, "Line 2", "Enter Message Text", message2), 40) + message2 = reject_bad_text(input("Line 2", "Enter Message Text", message2) as text|null, 40) updateSelfDialog() else post_status(href_list["statdisp"]) diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 1cb4d3be22..503e2a9473 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -84,7 +84,7 @@ if(flush) flush = FALSE else - var/confirm = tgui_alert(usr, "Are you sure you want to wipe this card's memory?", name, list("Yes", "No")) + var/confirm = alert("Are you sure you want to wipe this card's memory?", name, "Yes", "No") if(confirm == "Yes" && !..()) flush = TRUE if(AI && AI.loc == src) diff --git a/code/game/objects/items/devices/desynchronizer.dm b/code/game/objects/items/devices/desynchronizer.dm index 2e8b11a64e..2cb4922f36 100644 --- a/code/game/objects/items/devices/desynchronizer.dm +++ b/code/game/objects/items/devices/desynchronizer.dm @@ -36,7 +36,7 @@ . = ..() if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) return - var/new_duration = tgui_input_num(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) + var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num if(new_duration) new_duration = new_duration SECONDS new_duration = clamp(new_duration, 50, max_duration) diff --git a/code/game/objects/items/devices/electrochromatic_kit.dm b/code/game/objects/items/devices/electrochromatic_kit.dm index 244ca03275..d582eab00e 100644 --- a/code/game/objects/items/devices/electrochromatic_kit.dm +++ b/code/game/objects/items/devices/electrochromatic_kit.dm @@ -8,7 +8,7 @@ . = ..() if(.) return - var/new_id = tgui_input_text(user, "Set this kit's electrochromatic ID", "Set ID", id) + var/new_id = input(user, "Set this kit's electrochromatic ID", "Set ID", id) as text|null if(isnull(new_id)) return id = new_id diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 3a15e87bdd..d54911528d 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -87,7 +87,7 @@ pai.master_dna = M.dna.unique_enzymes to_chat(pai, "You have been bound to a new master.") if(href_list["wipe"]) - var/confirm = tgui_input_list(usr, "Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe", list("Yes", "No")) + var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No") if(confirm == "Yes") if(pai) to_chat(pai, "You feel yourself slipping away from reality.") diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm index 573e2f0194..a6323cfd7f 100644 --- a/code/game/objects/items/devices/pipe_painter.dm +++ b/code/game/objects/items/devices/pipe_painter.dm @@ -23,7 +23,7 @@ user.visible_message("[user] paints \the [P] [paint_color].","You paint \the [P] [paint_color].") /obj/item/pipe_painter/attack_self(mob/user) - paint_color = tgui_input_list(user, "Which colour do you want to use?","Pipe painter", GLOB.pipe_paint_colors) + paint_color = input("Which colour do you want to use?","Pipe painter") in GLOB.pipe_paint_colors /obj/item/pipe_painter/examine(mob/user) . = ..() diff --git a/code/game/objects/items/devices/polycircuit.dm b/code/game/objects/items/devices/polycircuit.dm index 3a35f7c9f8..17e364c4f3 100644 --- a/code/game/objects/items/devices/polycircuit.dm +++ b/code/game/objects/items/devices/polycircuit.dm @@ -18,7 +18,7 @@ else if(zero_amount()) return - chosen_circuit = tgui_input_list(user, "What type of circuit would you like to remove?", "Choose a Circuit Type", list("airlock","firelock","fire alarm","air alarm","APC")) + chosen_circuit = input("What type of circuit would you like to remove?", "Choose a Circuit Type", chosen_circuit) as null|anything in list("airlock","firelock","fire alarm","air alarm","APC") if(zero_amount() || !chosen_circuit || !in_range(src,user)) return switch(chosen_circuit) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index c86b9b3951..e81110425c 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -150,7 +150,7 @@ if(tune == "input") var/min = format_frequency(freerange ? MIN_FREE_FREQ : MIN_FREQ) var/max = format_frequency(freerange ? MAX_FREE_FREQ : MAX_FREQ) - tune = tgui_input_num(usr, "Tune frequency ([min]-[max]):", name, format_frequency(frequency)) + tune = input("Tune frequency ([min]-[max]):", name, format_frequency(frequency)) as null|num if(!isnull(tune) && !..()) if (tune < MIN_FREE_FREQ && tune <= MAX_FREE_FREQ / 10) // allow typing 144.7 to get 1447 diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 0cb31291ed..0bf7b13646 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -946,7 +946,7 @@ GENETICS SCANNER for(var/A in buffer) options += get_display_name(A) - var/answer = tgui_input_list(user, "Analyze Potential", "Sequence Analyzer", sortList(options)) + var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options) if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) var/sequence for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list diff --git a/code/game/objects/items/dualsaber.dm b/code/game/objects/items/dualsaber.dm index 0e21a2520a..9a6a87bb51 100644 --- a/code/game/objects/items/dualsaber.dm +++ b/code/game/objects/items/dualsaber.dm @@ -319,7 +319,7 @@ if(user.incapacitated() || !istype(user)) to_chat(user, "You can't do that right now!") return - if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes") + if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes") var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null if(!energy_color_input || !user.canUseTopic(src, BE_CLOSE, FALSE) || hacked) return diff --git a/code/game/objects/items/dyekit.dm b/code/game/objects/items/dyekit.dm index eea4bf65e8..43a05c7939 100644 --- a/code/game/objects/items/dyekit.dm +++ b/code/game/objects/items/dyekit.dm @@ -23,7 +23,7 @@ return var/mob/living/carbon/human/human_target = target - var/new_grad_style = tgui_input_list(usr, "Choose a color pattern:", "Character Preference", GLOB.hair_gradients_list) + var/new_grad_style = input(usr, "Choose a color pattern:", "Character Preference") as null|anything in GLOB.hair_gradients_list if(!new_grad_style) return diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index a30b1c40cf..23fe128fa8 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -95,7 +95,7 @@ if(nadeassembly) nadeassembly.attack_self(user) return - var/newtime = tgui_input_num(usr, "Please set the timer.", "Timer", 10) + var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num if(user.get_active_held_item() == src) newtime = clamp(newtime, 10, 60000) det_time = newtime diff --git a/code/game/objects/items/implants/implant_explosive.dm b/code/game/objects/items/implants/implant_explosive.dm index 1479763efa..370924063d 100644 --- a/code/game/objects/items/implants/implant_explosive.dm +++ b/code/game/objects/items/implants/implant_explosive.dm @@ -33,7 +33,7 @@ return FALSE if(cause == "action_button" && !popup) popup = TRUE - var/response = tgui_alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", list("Yes", "No")) + var/response = alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", "Yes", "No") popup = FALSE if(response == "No") return FALSE diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 9f5abfcca3..275536d370 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -415,7 +415,7 @@ to_chat(user, "You can't do that right now!") return TRUE - if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes") + if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes") var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null if(energy_color_input) light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) diff --git a/code/game/objects/items/miscellaneous.dm b/code/game/objects/items/miscellaneous.dm index 151f5f1c7d..80466832a6 100644 --- a/code/game/objects/items/miscellaneous.dm +++ b/code/game/objects/items/miscellaneous.dm @@ -26,7 +26,7 @@ stored_options = generate_display_names() if(!stored_options.len) return - var/choice = tgui_input_list(M,"Which item would you like to order?","Select an Item", stored_options) + var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in stored_options if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return @@ -182,7 +182,7 @@ return carrier /obj/item/choice_beacon/pet/spawn_option(atom/choice,mob/living/M) - pet_name = tgui_input_text(M, "What would you like to name the pet? (leave blank for default name)", "Pet Name") + pet_name = input(M, "What would you like to name the pet? (leave blank for default name)", "Pet Name") ..() //choice boxes (they just open in your hand instead of making a pod) diff --git a/code/game/objects/items/paint.dm b/code/game/objects/items/paint.dm index 5483d3dc38..cd65149f5d 100644 --- a/code/game/objects/items/paint.dm +++ b/code/game/objects/items/paint.dm @@ -56,7 +56,7 @@ icon_state = "paint_neutral" /obj/item/paint/anycolor/attack_self(mob/user) - var/t1 = tgui_input_list(user, "Please select a color:", "Locking Computer", list( "red", "pink", "blue", "cyan", "green", "lime", "yellow", "orange", "violet", "purple", "black", "gray", "white")) + var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "pink", "blue", "cyan", "green", "lime", "yellow", "orange", "violet", "purple", "black", "gray", "white") if ((user.get_active_held_item() != src || user.stat || user.restrained())) return switch(t1) diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm index d3dcbafb70..22ffc33516 100644 --- a/code/game/objects/items/pinpointer.dm +++ b/code/game/objects/items/pinpointer.dm @@ -154,7 +154,7 @@ user.visible_message("[user]'s pinpointer fails to detect a signal.", "Your pinpointer fails to detect a signal.") return - var/A = tgui_input_list(user, "Person to track", "Pinpoint", names) + var/A = input(user, "Person to track", "Pinpoint") in names if(!A || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated()) return diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index fa72789221..cbfdc85f6d 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -997,7 +997,7 @@ to_chat(user, "[target] is firmly secured!") /obj/item/cyborg_clamp/attack_self(mob/user) - var/obj/chosen_cargo = tgui_input_list(user, "Drop what?", cargo) + var/obj/chosen_cargo = input(user, "Drop what?") as null|anything in cargo if(!chosen_cargo) return chosen_cargo.forceMove(get_turf(chosen_cargo)) diff --git a/code/game/objects/items/scrolls.dm b/code/game/objects/items/scrolls.dm index 095b435c6a..d58f670dc4 100644 --- a/code/game/objects/items/scrolls.dm +++ b/code/game/objects/items/scrolls.dm @@ -48,7 +48,7 @@ var/A - A = tgui_input_list(user, "Area to jump to", "BOOYEA", GLOB.teleportlocs) + A = input(user, "Area to jump to", "BOOYEA", A) as null|anything in GLOB.teleportlocs if(!src || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !A || !uses) return var/area/thearea = GLOB.teleportlocs[A] diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 12822aefd0..266d8b7b86 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -465,7 +465,7 @@ return //get amount from user var/max = get_amount() - var/stackmaterial = round(tgui_input_num(user,"How many sheets do you wish to take out of this stack? (Maximum [max])")) + var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as null|num) max = get_amount() stackmaterial = min(max, stackmaterial) if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, TRUE, FALSE)) //, !iscyborg(user) diff --git a/code/game/objects/items/storage/dakis.dm b/code/game/objects/items/storage/dakis.dm index b9b175bb04..29f12df4c4 100644 --- a/code/game/objects/items/storage/dakis.dm +++ b/code/game/objects/items/storage/dakis.dm @@ -24,7 +24,7 @@ var/custom_name if(icon_state == "daki_base") - body_choice = tgui_input_list(user, "Pick a body.", "", dakimakura_options) + body_choice = input("Pick a body.") in dakimakura_options icon_state = "daki_[body_choice]" custom_name = stripped_input(user, "What's her name?") if(length(custom_name) > MAX_NAME_LEN) diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm index a8e94ba001..bc6a40f8c0 100644 --- a/code/game/objects/items/teleportation.dm +++ b/code/game/objects/items/teleportation.dm @@ -164,7 +164,7 @@ turfs += T if(turfs.len) L["None (Dangerous)"] = pick(turfs) - var/t1 = tgui_input_list(user, "Please select a teleporter to lock in on.", "Hand Teleporter", L) + var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L if (!t1 || user.get_active_held_item() != src || user.incapacitated()) return if(active_portal_pairs.len >= max_portal_pairs) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index c2693510cd..547217366b 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -340,7 +340,7 @@ to_chat(user, "You can't do that right now!") return TRUE - if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes") + if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes") var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null if(energy_color_input) light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index e802e084f8..58c571d9e6 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -282,14 +282,14 @@ message_admins("[key_name_admin(usr)] modified the armor on [src] ([type]) to melee: [armor.melee], bullet: [armor.bullet], laser: [armor.laser], energy: [armor.energy], bomb: [armor.bomb], bio: [armor.bio], rad: [armor.rad], fire: [armor.fire], acid: [armor.acid]") if(href_list[VV_HK_MASS_DEL_TYPE]) if(check_rights(R_DEBUG|R_SERVER)) - var/action_type = tgui_alert(usr, "Strict type ([type]) or type and all subtypes?",,list("Strict type","Type and subtypes","Cancel")) + var/action_type = alert("Strict type ([type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel") if(action_type == "Cancel" || !action_type) return - if(tgui_alert(usr, "Are you really sure you want to delete all objects of type [type]?",,list("Yes","No")) != "Yes") + if(alert("Are you really sure you want to delete all objects of type [type]?",,"Yes","No") != "Yes") return - if(tgui_alert(usr, "Second confirmation required. Delete?",,list("Yes","No")) != "Yes") + if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes") return var/O_type = type diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 1f0121db76..a96d39316e 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -120,7 +120,7 @@ /obj/structure/sign/barsign/proc/pick_sign(mob/user) - var/picked_name = tgui_input_list(user, "Available Signage", "Bar Sign", barsigns) + var/picked_name = input(user, "Available Signage", "Bar Sign", name) as null|anything in barsigns if(!picked_name) return set_sign(picked_name) diff --git a/code/game/objects/structures/crates_lockers/closets/genpop.dm b/code/game/objects/structures/crates_lockers/closets/genpop.dm index 99665400e0..7be12a4819 100644 --- a/code/game/objects/structures/crates_lockers/closets/genpop.dm +++ b/code/game/objects/structures/crates_lockers/closets/genpop.dm @@ -40,13 +40,13 @@ return TRUE /obj/structure/closet/secure_closet/genpop/proc/handle_edit_sentence(mob/user) - var/prisoner_name = tgui_input_text(user, "Please input the name of the prisoner.", "Prisoner Name", registered_id.registered_name) + var/prisoner_name = input(user, "Please input the name of the prisoner.", "Prisoner Name", registered_id.registered_name) as text|null if(prisoner_name == null | !user.Adjacent(src)) return FALSE - var/sentence_length = tgui_input_num(user, "Please input the length of their sentence in minutes (0 for perma).", "Sentence Length", registered_id.sentence) + var/sentence_length = input(user, "Please input the length of their sentence in minutes (0 for perma).", "Sentence Length", registered_id.sentence) as num|null if(sentence_length == null | !user.Adjacent(src)) return FALSE - var/crimes = tgui_input_text(user, "Please input their crimes.", "Crimes", registered_id.crime) + var/crimes = input(user, "Please input their crimes.", "Crimes", registered_id.crime) as text|null if(crimes == null | !user.Adjacent(src)) return FALSE @@ -71,7 +71,7 @@ if(!broken && locked && registered_id != null) var/name = registered_id.registered_name - var/result = tgui_alert(user, "This locker currently contains [name]'s personal belongings ","Locker In Use",list("Reset","Amend ID", "Open")) + var/result = alert(user, "This locker currently contains [name]'s personal belongings ","Locker In Use","Reset","Amend ID", "Open") if(!user.Adjacent(src)) return if(result == "Reset") diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 321bb35cf8..c32bf81ecf 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -470,7 +470,7 @@ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE) return - var/new_price_input = tgui_input_num(usr,"Set the sale price for this vend-a-tray.","new price",sale_price) + var/new_price_input = input(usr,"Set the sale price for this vend-a-tray.","new price",0) as num|null if(isnull(new_price_input) || (payments_acc != potential_acc.registered_account)) to_chat(usr, "[src] rejects your new price.") return diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index 48a6c2f530..9790a0e661 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -37,7 +37,7 @@ if(!(GLOB.socks_list[H.socks]?.has_color)) undergarment_choices -= "Socks Color" - var/choice = tgui_input_list(H, "Underwear, Undershirt, or Socks?", "Changing", undergarment_choices) + var/choice = input(H, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in undergarment_choices if(!H.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return var/dye_undie = FALSE @@ -45,21 +45,21 @@ var/dye_socks = FALSE switch(choice) if("Underwear") - var/new_undies = tgui_input_list(H, "Select your underwear", "Changing", GLOB.underwear_list) + var/new_undies = input(H, "Select your underwear", "Changing") as null|anything in GLOB.underwear_list if(new_undies) H.underwear = new_undies H.saved_underwear = new_undies var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[new_undies] dye_undie = B?.has_color if("Undershirt") - var/new_undershirt = tgui_input_list(H, "Select your undershirt", "Changing", GLOB.undershirt_list) + var/new_undershirt = input(H, "Select your undershirt", "Changing") as null|anything in GLOB.undershirt_list if(new_undershirt) H.undershirt = new_undershirt H.saved_undershirt = new_undershirt var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[new_undershirt] dye_shirt = T?.has_color if("Socks") - var/new_socks = tgui_input_list(H, "Select your socks", "Changing", GLOB.socks_list) + var/new_socks = input(H, "Select your socks", "Changing") as null|anything in GLOB.socks_list if(new_socks) H.socks = new_socks H.saved_socks = new_socks diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index e3825b1ee6..be92782c74 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -184,7 +184,7 @@ /obj/effect/mob_spawn/human/golem/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(isgolem(user) && can_transfer) - var/transfer_choice = tgui_alert(user, "Transfer your soul to [src]? (Warning, your old body will die!)",,list("Yes","No")) + var/transfer_choice = alert("Transfer your soul to [src]? (Warning, your old body will die!)",,"Yes","No") if(transfer_choice != "Yes" || QDELETED(src) || uses <= 0 || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERY, NO_TK)) return log_game("[key_name(user)] golem-swapped into [src]") @@ -742,7 +742,7 @@ /datum/action/disguise/Trigger() var/mob/living/carbon/human/H = owner if(!currently_disguised) - var/user_object_type = tgui_input_list(H, "Disguising as OBJECT or MOB?", "", list("OBJECT", "MOB")) + var/user_object_type = input(H, "Disguising as OBJECT or MOB?") as null|anything in list("OBJECT", "MOB") if(user_object_type) var/search_term = stripped_input(H, "Enter the search term") if(search_term) @@ -758,7 +758,7 @@ if(!length(filtered_results)) to_chat(H, "Nothing matched your search query!") else - var/disguise_selection = tgui_input_list(H, "Select item to disguise as", "", filtered_results) + var/disguise_selection = input("Select item to disguise as") as null|anything in filtered_results if(disguise_selection) var/atom/disguise_item = disguise_selection var/image/I = image(icon = initial(disguise_item.icon), icon_state = initial(disguise_item.icon_state), loc = H) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index d518401ccb..a70d9d4678 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -26,7 +26,7 @@ //handle facial hair (if necessary) if(H.gender != FEMALE) - var/new_style = tgui_input_list(user, "Select a facial hair style", "Grooming", GLOB.facial_hair_styles_list) + var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return //no tele-grooming if(new_style) @@ -35,7 +35,7 @@ H.facial_hair_style = "Shaved" //handle normal hair - var/new_style = tgui_input_list(user, "Select a hair style", "Grooming", GLOB.hair_styles_list) + var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in GLOB.hair_styles_list if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return //no tele-grooming if(new_style) @@ -141,7 +141,7 @@ var/mob/living/carbon/human/H = user - var/choice = tgui_input_list(user, "Something to change?", "Magical Grooming", list("name", "race", "gender", "hair", "eyes")) + var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "race", "gender", "hair", "eyes") if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return @@ -163,7 +163,7 @@ if("race") var/newrace - var/racechoice = tgui_input_list(H, "What are we again?", "Race change", choosable_races) + var/racechoice = input(H, "What are we again?", "Race change") as null|anything in choosable_races newrace = GLOB.species_list[racechoice] if(!newrace) @@ -176,7 +176,7 @@ var/list/choices = GLOB.skin_tones if(CONFIG_GET(flag/allow_custom_skintones)) choices += "custom" - var/new_s_tone = tgui_input_list(H, "Choose your skin tone:", "Race change", choices) + var/new_s_tone = input(H, "Choose your skin tone:", "Race change") as null|anything in choices if(new_s_tone) if(new_s_tone == "custom") var/default = H.dna.skin_tone_override || null @@ -214,14 +214,14 @@ if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(H.gender == "male") - if(tgui_alert(H, "Become a Witch?", "Confirmation", list("Yes", "No")) == "Yes") + if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes") H.gender = "female" to_chat(H, "Man, you feel like a woman!") else return else - if(tgui_alert(H, "Become a Warlock?", "Confirmation", list("Yes", "No")) == "Yes") + if(alert(H, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes") H.gender = "male" to_chat(H, "Whoa man, you feel like a man!") else @@ -231,7 +231,7 @@ H.update_mutations_overlay() //(hulk male/female) if("hair") - var/hairchoice = tgui_alert(H, "Hair style or hair color?", "Change Hair", list("Style", "Color")) + var/hairchoice = alert(H, "Hair style or hair color?", "Change Hair", "Style", "Color") if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(hairchoice == "Style") //So you just want to use a mirror then? @@ -249,7 +249,7 @@ H.update_hair() if(BODY_ZONE_PRECISE_EYES) - var/eye_type = tgui_input_list(H, "Choose the eye you want to color", "Eye Color", list("Both Eyes", "Left Eye", "Right Eye")) + var/eye_type = input(H, "Choose the eye you want to color", "Eye Color") as null|anything in list("Both Eyes", "Left Eye", "Right Eye") if(eye_type) var/input_color = H.left_eye_color if(eye_type == "Right Eye") diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm index 47f9bd3e5d..8174f6a82e 100644 --- a/code/game/objects/structures/reflector.dm +++ b/code/game/objects/structures/reflector.dm @@ -159,7 +159,7 @@ if (!can_rotate || admin) to_chat(user, "The rotation is locked!") return FALSE - var/new_angle = tgui_input_num(user, "Input a new angle for primary reflection face.", "Reflector Angle", rotation_angle) + var/new_angle = input(user, "Input a new angle for primary reflection face.", "Reflector Angle", rotation_angle) as null|num if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user))) return if(!isnull(new_angle)) diff --git a/code/game/objects/structures/signs/_signs.dm b/code/game/objects/structures/signs/_signs.dm index b4ee0a3e55..8b82cdba5e 100644 --- a/code/game/objects/structures/signs/_signs.dm +++ b/code/game/objects/structures/signs/_signs.dm @@ -45,7 +45,7 @@ var/list/sign_types = list("Secure Area", "Biohazard", "High Voltage", "Radiation", "Hard Vacuum Ahead", "Disposal: Leads To Space", "Danger: Fire", "No Smoking", "Medbay", "Science", "Chemistry", \ "Hydroponics", "Xenobiology") var/obj/structure/sign/sign_type - switch(tgui_input_list(user, "Select a sign type.", "Sign Customization", sign_types)) + switch(input(user, "Select a sign type.", "Sign Customization") as null|anything in sign_types) if("Blank") sign_type = /obj/structure/sign/basic if("Secure Area") diff --git a/code/game/objects/structures/spirit_board.dm b/code/game/objects/structures/spirit_board.dm index 7781414583..1b3093e4e7 100644 --- a/code/game/objects/structures/spirit_board.dm +++ b/code/game/objects/structures/spirit_board.dm @@ -31,7 +31,7 @@ virgin = 0 notify_ghosts("Someone has begun playing with a [src.name] in [get_area(src)]!", source = src) - planchette = tgui_input_list(M, "Choose the letter.", "Seance!", list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")) + planchette = input("Choose the letter.", "Seance!") as null|anything in list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z") if(!planchette || !Adjacent(M) || next_use > world.time) return M.log_message("picked a letter on [src], which was \"[planchette]\".") diff --git a/code/modules/admin/DB_ban/functions.dm b/code/modules/admin/DB_ban/functions.dm index 82fc35466e..b8d2452874 100644 --- a/code/modules/admin/DB_ban/functions.dm +++ b/code/modules/admin/DB_ban/functions.dm @@ -92,7 +92,7 @@ qdel(query_add_ban_get_ckey) if(!seen_before) if(!had_banned_mob || (had_banned_mob && !banned_mob_guest_key)) - if(tgui_alert(usr, "[bankey] has not been seen before, are you sure you want to create a ban for them?", "Unknown ckey", list("Yes", "No", "Cancel")) != "Yes") + if(alert(usr, "[bankey] has not been seen before, are you sure you want to create a ban for them?", "Unknown ckey", "Yes", "No", "Cancel") != "Yes") return var/a_key @@ -289,7 +289,7 @@ switch(param) if("reason") if(!value) - value = tgui_input_text(usr, "Insert the new reason for [p_key]'s ban", "New Reason", "[reason]", null) + value = input("Insert the new reason for [p_key]'s ban", "New Reason", "[reason]", null) as null|text if(!value) to_chat(usr, "Cancelled") return @@ -302,7 +302,7 @@ message_admins("[key_name_admin(usr)] has edited a ban for [p_key]'s reason from [reason] to [value]") if("duration") if(!value) - value = tgui_input_num(usr, "Insert the new duration (in minutes) for [p_key]'s ban", "New Duration", "[duration]", null) + value = input("Insert the new duration (in minutes) for [p_key]'s ban", "New Duration", "[duration]", null) as null|num if(!isnum(value) || !value) to_chat(usr, "Cancelled") return @@ -314,7 +314,7 @@ qdel(query_edit_ban_duration) message_admins("[key_name_admin(usr)] has edited a ban for [p_key]'s duration from [duration] to [value]") if("unban") - if(tgui_alert(usr, "Unban [p_key]?", "Unban?", list("Yes", "No")) == "Yes") + if(alert("Unban [p_key]?", "Unban?", "Yes", "No") == "Yes") DB_ban_unban_by_id(banid) return else diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 2cd7e88565..d56e78c9fb 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -470,25 +470,25 @@ options += "Server Restart (Kill and restart DD)"; if(SSticker.admin_delay_notice) - if(tgui_alert(usr, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", list("Yes", "No")) != "Yes") + if(alert(usr, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", "Yes", "No") != "Yes") return FALSE - var/result = tgui_input_list(usr, "Select reboot method", "World Reboot", options) + var/result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options if(result) SSblackbox.record_feedback("tally", "admin_verb", 1, "Reboot World") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! var/init_by = "Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]." switch(result) if("Regular Restart") if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses))) - if(tgui_alert(usr, "Are you sure you want to restart the server?","This server is live",list("Restart","Cancel")) != "Restart") + if(alert("Are you sure you want to restart the server?","This server is live","Restart","Cancel") != "Restart") return FALSE SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10) if("Regular Restart (with delay)") - var/delay = tgui_input_num(usr, "What delay should the restart have (in seconds)?", "Restart Delay", 5) + var/delay = input("What delay should the restart have (in seconds)?", "Restart Delay", 5) as num|null if(!delay) return FALSE if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses))) - if(tgui_alert(usr, "Are you sure you want to restart the server?","This server is live",list("Restart","Cancel")) != "Restart") + if(alert("Are you sure you want to restart the server?","This server is live","Restart","Cancel") != "Restart") return FALSE SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay * 10) if("Hard Restart (No Delay, No Feeback Reason)") @@ -508,7 +508,7 @@ if (!usr.client.holder) return - var/confirm = tgui_alert(usr, "End the round and restart the game world?", "End Round", list("Yes", "Cancel")) + var/confirm = alert("End the round and restart the game world?", "End Round", "Yes", "Cancel") if(confirm == "Cancel") return if(confirm == "Yes") @@ -523,7 +523,7 @@ if(!check_rights(0)) return - var/message = tgui_input_message(usr, "Global message to send:", "Admin Announce", null, null) + var/message = input("Global message to send:", "Admin Announce", null, null) as message if(message) if(!check_rights(R_SERVER,0)) message = adminscrub(message,500) @@ -538,7 +538,7 @@ if(!check_rights(0)) return - var/new_admin_notice = tgui_input_message(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",GLOB.admin_notice) + var/new_admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",GLOB.admin_notice) as message|null if(new_admin_notice == null) return if(new_admin_notice == GLOB.admin_notice) @@ -599,7 +599,7 @@ if(!SSticker.start_immediately) var/localhost_addresses = list("127.0.0.1", "::1") if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses))) - if(tgui_alert(usr, "Are you sure you want to start the round?","Start Now",list("Start Now","Cancel")) != "Start Now") + if(alert("Are you sure you want to start the round?","Start Now","Start Now","Cancel") != "Start Now") return FALSE SSticker.start_immediately = TRUE log_admin("[usr.key] has started the game.") @@ -684,9 +684,9 @@ set desc="Delay the game start" set name="Delay Pre-Game" - var/newtime = tgui_input_num(usr, "Set a new time in seconds. Set -1 for indefinite delay.","Set Delay",round(SSticker.GetTimeLeft()/10)) + var/newtime = input("Set a new time in seconds. Set -1 for indefinite delay.","Set Delay",round(SSticker.GetTimeLeft()/10)) as num|null if(SSticker.current_state > GAME_STATE_PREGAME) - return tgui_alert(usr, "Too late... The game has already started!") + return alert("Too late... The game has already started!") if(newtime) newtime = newtime*10 SSticker.SetTimeLeft(newtime) @@ -708,7 +708,7 @@ message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]") log_admin("[key_name(usr)] has unprisoned [key_name(M)]") else - tgui_alert(usr, "[M.name] is not prisoned.") + alert("[M.name] is not prisoned.") SSblackbox.record_feedback("tally", "admin_verb", 1, "Unprison") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! ////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS @@ -873,7 +873,7 @@ var/count = 0 if(!SSjob.initialized) - tgui_alert(usr, "You cannot manage jobs before the job subsystem is initialized!") + alert(usr, "You cannot manage jobs before the job subsystem is initialized!") return dat += "" @@ -972,7 +972,7 @@ question = "This mob already has a user ([tomob.key]) in control of it! " question += "Are you sure you want to place [frommob.name]([frommob.key]) in control of [tomob.name]?" - var/ask = tgui_alert(usr, question, "Place ghost in control of mob?", list("Yes", "No")) + var/ask = alert(question, "Place ghost in control of mob?", "Yes", "No") if (ask != "Yes") return TRUE diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index 23cf7eae87..52be445120 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -24,7 +24,7 @@ var/list/combined = sortList(logs_present) + sortList(logs_missing) - var/selected = tgui_input_list(src, "Investigate what?", "Investigate", combined) + var/selected = input("Investigate what?", "Investigate") as null|anything in combined if(!(selected in combined) || selected == "---") return diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 2c85e0ca42..8d3e1c79ec 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -518,7 +518,7 @@ GLOBAL_PROTECT(admin_verbs_hideable) set desc = "Cause an explosion of varying strength at your location." var/list/choices = list("Small Bomb (1, 2, 3, 3)", "Medium Bomb (2, 3, 4, 4)", "Big Bomb (3, 5, 7, 5)", "Maxcap", "Custom Bomb") - var/choice = tgui_input_list(src, "What size explosion would you like to produce? NOTE: You can do all this rapidly and in an IC manner (using cruise missiles!) with the Config/Launch Supplypod verb. WARNING: These ignore the maxcap", choices) + var/choice = input("What size explosion would you like to produce? NOTE: You can do all this rapidly and in an IC manner (using cruise missiles!) with the Config/Launch Supplypod verb. WARNING: These ignore the maxcap") as null|anything in choices var/turf/epicenter = mob.loc switch(choice) @@ -533,20 +533,20 @@ GLOBAL_PROTECT(admin_verbs_hideable) if("Maxcap") explosion(epicenter, GLOB.MAX_EX_DEVESTATION_RANGE, GLOB.MAX_EX_HEAVY_RANGE, GLOB.MAX_EX_LIGHT_RANGE, GLOB.MAX_EX_FLASH_RANGE) if("Custom Bomb") - var/devastation_range = tgui_input_num(src, "Devastation range (in tiles):") + var/devastation_range = input("Devastation range (in tiles):") as null|num if(devastation_range == null) return - var/heavy_impact_range = tgui_input_num(src, "Heavy impact range (in tiles):") + var/heavy_impact_range = input("Heavy impact range (in tiles):") as null|num if(heavy_impact_range == null) return - var/light_impact_range = tgui_input_num(src, "Light impact range (in tiles):") + var/light_impact_range = input("Light impact range (in tiles):") as null|num if(light_impact_range == null) return - var/flash_range = tgui_input_num(src, "Flash range (in tiles):") + var/flash_range = input("Flash range (in tiles):") as null|num if(flash_range == null) return if(devastation_range > GLOB.MAX_EX_DEVESTATION_RANGE || heavy_impact_range > GLOB.MAX_EX_HEAVY_RANGE || light_impact_range > GLOB.MAX_EX_LIGHT_RANGE || flash_range > GLOB.MAX_EX_FLASH_RANGE) - if(tgui_alert(src, "Bomb is bigger than the maxcap. Continue?",,list("Yes","No")) != "Yes") + if(alert("Bomb is bigger than the maxcap. Continue?",,"Yes","No") != "Yes") return epicenter = mob.loc //We need to reupdate as they may have moved again explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, TRUE, TRUE) @@ -559,34 +559,34 @@ GLOBAL_PROTECT(admin_verbs_hideable) set name = "Drop Wave Explosion" set desc = "Cause an explosive shockwave at your location." - var/power = tgui_input_num(src, "Wave initial power", "Power", 50) + var/power = input(src, "Wave initial power", "Power", 50) as num|null if(isnull(power)) return - var/falloff = tgui_input_num(src, "Wave innate falloff factor", "Falloff", EXPLOSION_DEFAULT_FALLOFF_MULTIPLY) + var/falloff = input(src, "Wave innate falloff factor", "Falloff", EXPLOSION_DEFAULT_FALLOFF_MULTIPLY) as num|null if(isnull(falloff)) return falloff = max(0, falloff) if(falloff > 1) to_chat(src, "Aborting: Falloff cannot be higher tahn 1.") return - var/constant = tgui_input_num(src, "Wave innate falloff constant", "Constant", EXPLOSION_DEFAULT_FALLOFF_SUBTRACT) + var/constant = input(src, "Wave innate falloff constant", "Constant", EXPLOSION_DEFAULT_FALLOFF_SUBTRACT) as num|null if(isnull(constant)) return if(constant < 0) to_chat(src, "Aborting: Falloff constant cannot be less than 0.") return - var/fire = tgui_input_num(src, "Probability per tile of fire?", "Fire Probability", 0) + var/fire = input(src, "Probability per tile of fire?", "Fire Probability", 0) as num|null if(isnull(fire)) return - var/speed = tgui_input_num(src, "Speed in ticks to wait between cycles? 0 for fast as possible", "Wait", 0) + var/speed = input(src, "Speed in ticks to wait between cycles? 0 for fast as possible", "Wait", 0) as num|null if(isnull(speed)) return - var/block_resistance = tgui_input_num(src, "DANGEROUS: Block resistance? USE 1 IF YOU DO NOT KNOW WHAT YOU ARE DOING.", "Block Negation", 1) + var/block_resistance = input(src, "DANGEROUS: Block resistance? USE 1 IF YOU DO NOT KNOW WHAT YOU ARE DOING.", "Block Negation", 1) as num|null if(isnull(block_resistance)) return block_resistance = max(0, block_resistance) if(power > 500) - var/sure = tgui_alert(src, "Explosion power is extremely high. Are you absolutely sure?", "Uhh...", list("No", "Yes")) + var/sure = alert(src, "Explosion power is extremely high. Are you absolutely sure?", "Uhh...", "No", "Yes") if(sure != "Yes") return // point of no return @@ -604,7 +604,7 @@ GLOBAL_PROTECT(admin_verbs_hideable) set name = "Drop DynEx Bomb" set desc = "Cause an explosion of varying strength at your location." - var/ex_power = tgui_input_num(src, "Explosive Power:") + var/ex_power = input("Explosive Power:") as null|num var/turf/epicenter = mob.loc if(ex_power && epicenter) dyn_explosion(epicenter, ex_power) @@ -617,7 +617,7 @@ GLOBAL_PROTECT(admin_verbs_hideable) set name = "Get DynEx Range" set desc = "Get the estimated range of a bomb, using explosive power." - var/ex_power = tgui_input_num(src, "Explosive Power:") + var/ex_power = input("Explosive Power:") as null|num if (isnull(ex_power)) return var/range = round((2 * ex_power)**GLOB.DYN_EX_SCALE) @@ -628,7 +628,7 @@ GLOBAL_PROTECT(admin_verbs_hideable) set name = "Get DynEx Power" set desc = "Get the estimated required power of a bomb, to reach a specific range." - var/ex_range = tgui_input_num(src, "Light Explosion Range:") + var/ex_range = input("Light Explosion Range:") as null|num if (isnull(ex_range)) return var/power = (0.5 * ex_range)**(1/GLOB.DYN_EX_SCALE) @@ -639,7 +639,7 @@ GLOBAL_PROTECT(admin_verbs_hideable) set name = "Set DynEx Scale" set desc = "Set the scale multiplier of dynex explosions. The default is 0.5." - var/ex_scale = tgui_input_num(src, "New DynEx Scale:") + var/ex_scale = input("New DynEx Scale:") as null|num if(!ex_scale) return GLOB.DYN_EX_SCALE = ex_scale @@ -684,10 +684,10 @@ GLOBAL_PROTECT(admin_verbs_hideable) // if(!SStrading_card_game.loaded) // message_admins("The card subsystem is not currently loaded") // return -// var/pack = tgui_input_list(src, "Which pack should we test?", "You fucked it didn't you", sortList(SStrading_card_game.card_packs)) -// var/batchCount = tgui_input_num(src, "How many times should we open it?", "Don't worry, I understand") -// var/batchSize = tgui_input_num(src, "How many cards per batch?", "I hope you remember to check the validation") -// var/guar = tgui_input_num(src, "Should we use the pack's guaranteed rarity? If so, how many?", "We've all been there. Man you should have seen the old system") +// var/pack = input("Which pack should we test?", "You fucked it didn't you") as null|anything in sortList(SStrading_card_game.card_packs) +// var/batchCount = input("How many times should we open it?", "Don't worry, I understand") as null|num +// var/batchSize = input("How many cards per batch?", "I hope you remember to check the validation") as null|num +// var/guar = input("Should we use the pack's guaranteed rarity? If so, how many?", "We've all been there. Man you should have seen the old system") as null|num // checkCardDistribution(pack, batchSize, batchCount, guar) // /client/proc/print_cards() @@ -704,7 +704,7 @@ GLOBAL_PROTECT(admin_verbs_hideable) var/type_length = length_char("/obj/effect/proc_holder/spell") + 2 for(var/A in GLOB.spells) spell_list[copytext_char("[A]", type_length)] = A - var/obj/effect/proc_holder/spell/S = tgui_input_list(src, "Choose the spell to give to that guy", "ABRAKADABRA", sortList(spell_list)) + var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in sortList(spell_list) if(!S) return @@ -725,7 +725,7 @@ GLOBAL_PROTECT(admin_verbs_hideable) set desc = "Remove a spell from the selected mob." if(T?.mind) - var/obj/effect/proc_holder/spell/S = tgui_input_list(src, "Choose the spell to remove", "NO ABRAKADABRA", sortList(T.mind.spell_list)) + var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in sortList(T.mind.spell_list) if(S) T.mind.RemoveSpell(S) log_admin("[key_name(usr)] removed the spell [S] from [key_name(T)].") @@ -739,7 +739,7 @@ GLOBAL_PROTECT(admin_verbs_hideable) if(!istype(T)) to_chat(src, "You can only give a disease to a mob of type /mob/living.", confidential = TRUE) return - var/datum/disease/D = tgui_input_list(src, "Choose the disease to give to that guy", "ACHOO", sortList(SSdisease.diseases, /proc/cmp_typepaths_asc)) + var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in sortList(SSdisease.diseases, /proc/cmp_typepaths_asc) if(!D) return T.ForceContractDisease(new D, FALSE, TRUE) @@ -751,7 +751,7 @@ GLOBAL_PROTECT(admin_verbs_hideable) set category = "Admin.Events" set name = "OSay" set desc = "Makes an object say something." - var/message = tgui_input_text(usr, "What do you want the message to be?", "Make Sound") + var/message = input(usr, "What do you want the message to be?", "Make Sound") as text | null if(!message) return O.say(message) diff --git a/code/modules/admin/antag_panel.dm b/code/modules/admin/antag_panel.dm index 80ec32d997..180735d746 100644 --- a/code/modules/admin/antag_panel.dm +++ b/code/modules/admin/antag_panel.dm @@ -91,10 +91,10 @@ GLOBAL_VAR(antag_prototypes) /datum/mind/proc/traitor_panel() if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "Not before round-start!", "Alert") + alert("Not before round-start!", "Alert") return if(QDELETED(src)) - tgui_alert(usr, "This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory") + alert("This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory") return var/out = "[name][(current && (current.real_name!=name))?" (as [current.real_name])":""]
    " diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm index 83d51e3049..21bf732493 100644 --- a/code/modules/admin/callproc/callproc.dm +++ b/code/modules/admin/callproc/callproc.dm @@ -12,7 +12,7 @@ var/targetselected = FALSE var/returnval - switch(tgui_alert(usr, "Proc owned by something?",,list("Yes","No"))) + switch(alert("Proc owned by something?",,"Yes","No")) if("Yes") targetselected = TRUE var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT, VV_MARKED_DATUM, VV_TEXT_LOCATE, VV_PROCCALL_RETVAL)) @@ -26,7 +26,7 @@ target = null targetselected = FALSE - var/procpath = tgui_input_text(src, "Proc path, eg: /proc/fake_blood","Path:", null) + var/procpath = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null if(!procpath) return @@ -136,7 +136,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) if(!check_rights(R_DEBUG)) return - var/procname = tgui_input_text(src, "Proc name, eg: fake_blood","Proc:", null) + var/procname = input("Proc name, eg: fake_blood","Proc:", null) as text|null if(!procname) return if(!hascall(A,procname)) @@ -161,14 +161,14 @@ GLOBAL_PROTECT(LastAdminCalledProc) to_chat(usr, ., confidential = TRUE) /client/proc/get_callproc_args() - var/argnum = tgui_input_num(src, "Number of arguments","Number:",0) + var/argnum = input("Number of arguments","Number:",0) as num|null if(isnull(argnum)) return . = list() var/list/named_args = list() while(argnum--) - var/named_arg = tgui_input_text(src, "Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") + var/named_arg = input("Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") as text|null var/value = vv_get_value(restricted_classes = list(VV_RESTORE_DEFAULT)) if (!value["class"]) return diff --git a/code/modules/admin/check_antagonists.dm b/code/modules/admin/check_antagonists.dm index 8ae036703a..532a11a532 100644 --- a/code/modules/admin/check_antagonists.dm +++ b/code/modules/admin/check_antagonists.dm @@ -134,7 +134,7 @@ /datum/admins/proc/check_antagonists() if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "The game hasn't started yet!") + alert("The game hasn't started yet!") return var/list/dat = list("Round Status

    Round Status

    ") if(SSticker.mode.replacementmode) diff --git a/code/modules/admin/create_object.dm b/code/modules/admin/create_object.dm index 18d9cb658f..a0d7e41485 100644 --- a/code/modules/admin/create_object.dm +++ b/code/modules/admin/create_object.dm @@ -19,7 +19,7 @@ /obj/item, /obj/item/clothing, /obj/item/stack, /obj/item, /obj/item/reagent_containers, /obj/item/gun) - var/path = tgui_input_list(user, "Select the path of the object you wish to create.", "Path", create_object_forms) + var/path = input("Select the path of the object you wish to create.", "Path", /obj) in create_object_forms var/html_form = create_object_forms[path] if (!html_form) diff --git a/code/modules/admin/create_poll.dm b/code/modules/admin/create_poll.dm index b43d084005..e5391f0f43 100644 --- a/code/modules/admin/create_poll.dm +++ b/code/modules/admin/create_poll.dm @@ -6,7 +6,7 @@ if(!SSdbcore.Connect()) to_chat(src, "Failed to establish database connection.") return - var/polltype = tgui_input_list(src, "Choose poll type.","Poll Type", list("Single Option","Text Reply","Rating","Multiple Choice", "Instant Runoff Voting")) + var/polltype = input("Choose poll type.","Poll Type") as null|anything in list("Single Option","Text Reply","Rating","Multiple Choice", "Instant Runoff Voting") var/choice_amount = 0 switch(polltype) if("Single Option") @@ -17,7 +17,7 @@ polltype = POLLTYPE_RATING if("Multiple Choice") polltype = POLLTYPE_MULTI - choice_amount = tgui_input_num(src, "How many choices should be allowed?","Select choice amount") + choice_amount = input("How many choices should be allowed?","Select choice amount") as num|null switch(choice_amount) if(0) to_chat(src, "Multiple choice poll must have at least one choice allowed.") @@ -31,7 +31,7 @@ else return 0 var/starttime = SQLtime() - var/endtime = tgui_input_text(src, "Set end time for poll as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than starting time for obvious reasons.", "Set end time", SQLtime()) + var/endtime = input("Set end time for poll as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than starting time for obvious reasons.", "Set end time", SQLtime()) as text if(!endtime) return var/datum/db_query/query_validate_time = SSdbcore.NewQuery({" @@ -49,7 +49,7 @@ endtime = query_validate_time.item[1] qdel(query_validate_time) var/adminonly - switch(tgui_alert(usr, "Admin only poll?",,list("Yes","No","Cancel"))) + switch(alert("Admin only poll?",,"Yes","No","Cancel")) if("Yes") adminonly = 1 if("No") @@ -57,26 +57,26 @@ else return var/dontshow - switch(tgui_alert(usr, "Hide poll results from tracking until completed?",,list("Yes","No","Cancel"))) + switch(alert("Hide poll results from tracking until completed?",,"Yes","No","Cancel")) if("Yes") dontshow = 1 if("No") dontshow = 0 else return - var/question = tgui_input_message(src, "Write your question","Question") + var/question = input("Write your question","Question") as message|null if(!question) return var/list/sql_option_list = list() if(polltype != POLLTYPE_TEXT) var/add_option = 1 while(add_option) - var/option = tgui_input_message(src, "Write your option","Option") + var/option = input("Write your option","Option") as message|null if(!option) return var/default_percentage_calc = 0 if(polltype != POLLTYPE_IRV) - switch(tgui_alert(usr, "Should this option be included by default when poll result percentages are generated?",,list("Yes","No","Cancel"))) + switch(alert("Should this option be included by default when poll result percentages are generated?",,"Yes","No","Cancel")) if("Yes") default_percentage_calc = 1 if("No") @@ -89,29 +89,29 @@ var/descmid = "" var/descmax = "" if(polltype == POLLTYPE_RATING) - minval = tgui_input_num(src, "Set minimum rating value.","Minimum rating") + minval = input("Set minimum rating value.","Minimum rating") as num|null if(minval == null) return - maxval = tgui_input_num(src, "Set maximum rating value.","Maximum rating") + maxval = input("Set maximum rating value.","Maximum rating") as num|null if(minval >= maxval) to_chat(src, "Maximum rating value can't be less than or equal to minimum rating value") continue if(maxval == null) return - descmin = tgui_input_message(src, "Optional: Set description for minimum rating","Minimum rating description") + descmin = input("Optional: Set description for minimum rating","Minimum rating description") as message|null if(descmin == null) return - descmid = tgui_input_message(src, "Optional: Set description for median rating","Median rating description") + descmid = input("Optional: Set description for median rating","Median rating description") as message|null if(descmid == null) return - descmax = tgui_input_message(src, "Optional: Set description for maximum rating","Maximum rating description") + descmax = input("Optional: Set description for maximum rating","Maximum rating description") as message|null if(descmax == null) return sql_option_list += list(list( "text" = option, "minval" = minval, "maxval" = maxval, "descmin" = descmin, "descmid" = descmid, "descmax" = descmax, "default_percentage_calc" = default_percentage_calc)) - switch(tgui_alert(usr, " ",,list("Add option","Finish", "Cancel"))) + switch(alert(" ",,"Add option","Finish", "Cancel")) if("Add option") add_option = 1 if("Finish") diff --git a/code/modules/admin/fun_balloon.dm b/code/modules/admin/fun_balloon.dm index f11b193680..417663fcb7 100644 --- a/code/modules/admin/fun_balloon.dm +++ b/code/modules/admin/fun_balloon.dm @@ -35,7 +35,7 @@ /obj/effect/fun_balloon/attack_ghost(mob/user) if(!user.client || !user.client.holder || popped) return - var/confirmation = tgui_alert(user, "Pop [src]?","Fun Balloon",list("Yes","No")) + var/confirmation = alert("Pop [src]?","Fun Balloon","Yes","No") if(confirmation == "Yes" && !popped) popped = TRUE effect() diff --git a/code/modules/admin/outfit_editor.dm b/code/modules/admin/outfit_editor.dm index e50f1bec4c..9a99d8b20e 100644 --- a/code/modules/admin/outfit_editor.dm +++ b/code/modules/admin/outfit_editor.dm @@ -117,11 +117,11 @@ if(!choice) return if(!ispath(choice)) - tgui_alert(owner, "Invalid item", OUTFIT_EDITOR_NAME, "oh no") + alert(owner, "Invalid item", OUTFIT_EDITOR_NAME, "oh no") return if(initial(choice.icon_state) == null) //hacky check copied from experimentor code var/msg = "Warning: This item's icon_state is null, indicating it is very probably not actually a usable item." - if(tgui_alert(owner, msg, OUTFIT_EDITOR_NAME, list("Use it anyway", "Cancel")) != "Use it anyway") + if(alert(owner, msg, OUTFIT_EDITOR_NAME, "Use it anyway", "Cancel") != "Use it anyway") return if(drip.vars.Find(slot)) diff --git a/code/modules/admin/permissionedit.dm b/code/modules/admin/permissionedit.dm index 4676d50df4..9f5dc00a48 100644 --- a/code/modules/admin/permissionedit.dm +++ b/code/modules/admin/permissionedit.dm @@ -165,7 +165,7 @@ to_chat(usr, "Unable to connect to database, changes are temporary only.", confidential = TRUE) use_db = FALSE else - use_db = tgui_alert(usr, "Permanent changes are saved to the database for future rounds, temporary changes will affect only the current round", "Permanent or Temporary?", list("Permanent", "Temporary", "Cancel")) + use_db = alert("Permanent changes are saved to the database for future rounds, temporary changes will affect only the current round", "Permanent or Temporary?", "Permanent", "Temporary", "Cancel") if(use_db == "Cancel") return if(use_db == "Permanent") @@ -208,7 +208,7 @@ if(admin_ckey) . = admin_ckey else - admin_key = tgui_input_text(usr, "New admin's key","Admin key") + admin_key = input("New admin's key","Admin key") as text|null . = ckey(admin_key) if(!.) return FALSE @@ -247,7 +247,7 @@ qdel(query_add_admin_log) /datum/admins/proc/remove_admin(admin_ckey, admin_key, use_db, datum/admins/D) - if(tgui_alert(usr, "Are you sure you want to remove [admin_ckey]?","Confirm Removal",list("Do it","Cancel")) == "Do it") + if(alert("Are you sure you want to remove [admin_ckey]?","Confirm Removal","Do it","Cancel") == "Do it") GLOB.admin_datums -= admin_ckey GLOB.deadmins -= admin_ckey if(D) @@ -305,9 +305,9 @@ for(R in GLOB.admin_ranks) if((R.rights & usr.client.holder.rank.can_edit_rights) == R.rights) rank_names[R.name] = R - var/new_rank = tgui_input_list(usr, "Please select a rank", "New rank", rank_names) + var/new_rank = input("Please select a rank", "New rank") as null|anything in rank_names if(new_rank == "*New Rank*") - new_rank = tgui_input_text(usr, "Please input a new rank", "New custom rank") + new_rank = input("Please input a new rank", "New custom rank") as text|null if(!new_rank) return R = rank_names[new_rank] @@ -492,7 +492,7 @@ to_chat(usr, "Error: Rank deletion attempted while rank still used; Tell a coder, this shouldn't happen.", confidential = TRUE) return qdel(query_admins_with_rank) - if(tgui_alert(usr, "Are you sure you want to remove [admin_rank]?","Confirm Removal",list("Do it","Cancel")) == "Do it") + if(alert("Are you sure you want to remove [admin_rank]?","Confirm Removal","Do it","Cancel") == "Do it") var/m1 = "[key_name_admin(usr)] removed rank [admin_rank] permanently" var/m2 = "[key_name(usr)] removed rank [admin_rank] permanently" var/datum/db_query/query_add_rank = SSdbcore.NewQuery( diff --git a/code/modules/admin/sound_emitter.dm b/code/modules/admin/sound_emitter.dm index b8ea8d0c0e..ad9c995aa1 100644 --- a/code/modules/admin/sound_emitter.dm +++ b/code/modules/admin/sound_emitter.dm @@ -90,7 +90,7 @@ sound_file = new_file to_chat(user, "New sound file set to [sound_file].", confidential = TRUE) if(href_list["edit_volume"]) - var/new_volume = tgui_input_num(user, "Choose a volume.", "Sound Emitter", sound_volume) + var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num if(isnull(new_volume)) return new_volume = clamp(new_volume, 0, 100) @@ -99,7 +99,7 @@ if(href_list["edit_mode"]) var/new_mode var/mode_list = list("Local (normal sound)" = SOUND_EMITTER_LOCAL, "Direct (not affected by environment/location)" = SOUND_EMITTER_DIRECT) - new_mode = tgui_input_list(user, "Choose a new mode.", "Sound Emitter", mode_list) + new_mode = input(user, "Choose a new mode.", "Sound Emitter") as null|anything in mode_list if(!new_mode) return motus_operandi = mode_list[new_mode] @@ -107,13 +107,13 @@ if(href_list["edit_range"]) var/new_range var/range_list = list("Radius (all mobs within a radius)" = SOUND_EMITTER_RADIUS, "Z-Level (all mobs on the same z)" = SOUND_EMITTER_ZLEVEL, "Global (all players)" = SOUND_EMITTER_GLOBAL) - new_range = tgui_input_list(user, "Choose a new range.", "Sound Emitter", range_list) + new_range = input(user, "Choose a new range.", "Sound Emitter") as null|anything in range_list if(!new_range) return emitter_range = range_list[new_range] to_chat(user, "Range set to [emitter_range].", confidential = TRUE) if(href_list["edit_radius"]) - var/new_radius = tgui_input_num(user, "Choose a radius.", "Sound Emitter", sound_volume) + var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num if(isnull(new_radius)) return new_radius = clamp(new_radius, 0, 127) diff --git a/code/modules/admin/sql_message_system.dm b/code/modules/admin/sql_message_system.dm index a02df755c9..3ba309bc24 100644 --- a/code/modules/admin/sql_message_system.dm +++ b/code/modules/admin/sql_message_system.dm @@ -6,7 +6,7 @@ return var/target_ckey = ckey(target_key) if(!target_key && (type == "note" || type == "message" || type == "watchlist entry")) - var/new_key = tgui_input_text(usr,"Who would you like to create a [type] for?","Enter a key or ckey",null) + var/new_key = input(usr,"Who would you like to create a [type] for?","Enter a key or ckey",null) as null|text if(!new_key) return var/new_ckey = ckey(new_key) @@ -18,7 +18,7 @@ qdel(query_find_ckey) return if(!query_find_ckey.NextRow()) - if(tgui_alert(usr, "[new_key]/([new_ckey]) has not been seen before, are you sure you want to create a [type] for them?", "Unknown ckey", list("Yes", "No", "Cancel")) != "Yes") + if(alert(usr, "[new_key]/([new_ckey]) has not been seen before, are you sure you want to create a [type] for them?", "Unknown ckey", "Yes", "No", "Cancel") != "Yes") qdel(query_find_ckey) return qdel(query_find_ckey) @@ -35,7 +35,7 @@ if(!target_ckey) target_ckey = admin_ckey if(!text) - text = tgui_input_message(usr,"Write your [type]","Create [type]") + text = input(usr,"Write your [type]","Create [type]") as null|message if(!text) return if(!timestamp) @@ -45,7 +45,7 @@ if (ssqlname) server = ssqlname if(isnull(secret)) - switch(tgui_alert(usr, "Hide note from being viewed by players?", "Secret note?",list("Yes","No","Cancel"))) + switch(alert("Hide note from being viewed by players?", "Secret note?","Yes","No","Cancel")) if("Yes") secret = 1 if("No") @@ -53,8 +53,8 @@ else return if(isnull(expiry)) - if(tgui_alert(usr, "Set an expiry time? Expired messages are hidden like deleted ones.", "Expiry time?", list("Yes", "No", "Cancel")) == "Yes") - var/expire_time = tgui_input_text(usr, "Set expiry time for [type] as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than current time for obvious reasons.", "Set expiry time", SQLtime()) + if(alert(usr, "Set an expiry time? Expired messages are hidden like deleted ones.", "Expiry time?", "Yes", "No", "Cancel") == "Yes") + var/expire_time = input("Set expiry time for [type] as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than current time for obvious reasons.", "Set expiry time", SQLtime()) as null|text if(!expire_time) return var/datum/db_query/query_validate_expire_time = SSdbcore.NewQuery( @@ -73,7 +73,7 @@ expiry = query_validate_expire_time.item[1] qdel(query_validate_expire_time) if(type == "note" && isnull(note_severity)) - note_severity = tgui_input_list(usr, "Set the severity of the note.", "Severity", list("High", "Medium", "Minor", "None")) + note_severity = input("Set the severity of the note.", "Severity", null, null) as null|anything in list("High", "Medium", "Minor", "None") if(!note_severity) return var/datum/db_query/query_create_message = SSdbcore.NewQuery({" @@ -180,7 +180,7 @@ var/target_key = query_find_edit_message.item[2] var/admin_key = query_find_edit_message.item[3] var/old_text = query_find_edit_message.item[4] - var/new_text = tgui_input_message(usr, "Input new [type]", "New [type]", "[old_text]") + var/new_text = input("Input new [type]", "New [type]", "[old_text]") as null|message if(!new_text) qdel(query_find_edit_message) return @@ -231,7 +231,7 @@ var/admin_key = query_find_edit_expiry_message.item[3] var/old_expiry = query_find_edit_expiry_message.item[4] var/new_expiry - var/expire_time = tgui_input_text(usr, "Set expiry time for [type] as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than current time for obvious reasons. Enter -1 to remove expiry time.", "Set expiry time", old_expiry) + var/expire_time = input("Set expiry time for [type] as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than current time for obvious reasons. Enter -1 to remove expiry time.", "Set expiry time", old_expiry) as null|text if(!expire_time) qdel(query_find_edit_expiry_message) return @@ -303,7 +303,7 @@ old_severity = "NA" var/editor_key = usr.key var/editor_ckey = usr.ckey - var/new_severity = tgui_input_list(usr, "Set the severity of the note.", "Severity", list("high", "medium", "minor", "none")) //lowercase for edit log consistency + var/new_severity = input("Set the severity of the note.", "Severity", null, null) as null|anything in list("high", "medium", "minor", "none") //lowercase for edit log consistency if(!new_severity) qdel(query_find_edit_note_severity) return diff --git a/code/modules/admin/stickyban.dm b/code/modules/admin/stickyban.dm index 4906f9a97a..57487f3144 100644 --- a/code/modules/admin/stickyban.dm +++ b/code/modules/admin/stickyban.dm @@ -14,7 +14,7 @@ if (data["ckey"]) ckey = ckey(data["ckey"]) else - ckey = tgui_input_text(usr,"Ckey","Ckey","") + ckey = input(usr,"Ckey","Ckey","") as text|null if (!ckey) return ckey = ckey(ckey) @@ -27,7 +27,7 @@ if (data["reason"]) ban["message"] = data["reason"] else - var/reason = tgui_input_text(usr,"Reason","Reason","Ban Evasion") + var/reason = input(usr,"Reason","Reason","Ban Evasion") as text|null if (!reason) return ban["message"] = "[reason]" @@ -61,7 +61,7 @@ if (!ban) to_chat(usr, "Error: No sticky ban for [ckey] found!", confidential = TRUE) return - if (tgui_alert(usr, "Are you sure you want to remove the sticky ban on [ckey]?","Are you sure",list("Yes","No")) == "No") + if (alert("Are you sure you want to remove the sticky ban on [ckey]?","Are you sure","Yes","No") == "No") return if (!get_stickyban_from_ckey(ckey)) to_chat(usr, "Error: The ban disappeared.", confidential = TRUE) @@ -98,7 +98,7 @@ to_chat(usr, "Error: [alt] is not linked to [ckey]'s sticky ban!", confidential = TRUE) return - if (tgui_alert(usr, "Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them, Use \[E] to exempt them","Are you sure",list("Yes","No")) == "No") + if (alert("Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them, Use \[E] to exempt them","Are you sure","Yes","No") == "No") return //we have to do this again incase something changes @@ -138,7 +138,7 @@ to_chat(usr, "Error: No sticky ban for [ckey] found!", confidential = TRUE) return var/oldreason = ban["message"] - var/reason = tgui_input_text(usr,"Reason","Reason","[ban["message"]]") + var/reason = input(usr,"Reason","Reason","[ban["message"]]") as text|null if (!reason || reason == oldreason) return //we have to do this again incase something changed while we waited for input @@ -180,7 +180,7 @@ to_chat(usr, "Error: [alt] is not linked to [ckey]'s sticky ban!", confidential = TRUE) return - if (tgui_alert(usr, "Are you sure you want to exempt [alt] from [ckey]'s sticky ban?","Are you sure",list("Yes","No")) == "No") + if (alert("Are you sure you want to exempt [alt] from [ckey]'s sticky ban?","Are you sure","Yes","No") == "No") return //we have to do this again incase something changes @@ -230,7 +230,7 @@ to_chat(usr, "Error: [alt] is not exempt from [ckey]'s sticky ban!", confidential = TRUE) return - if (tgui_alert(usr, "Are you sure you want to unexempt [alt] from [ckey]'s sticky ban?","Are you sure",list("Yes","No")) == "No") + if (alert("Are you sure you want to unexempt [alt] from [ckey]'s sticky ban?","Are you sure","Yes","No") == "No") return //we have to do this again incase something changes @@ -272,7 +272,7 @@ var/ckey = data["ckey"] - if (tgui_alert(usr, "Are you sure you want to put [ckey]'s stickyban on timeout until next round (or removed)?","Are you sure",list("Yes","No")) == "No") + if (alert("Are you sure you want to put [ckey]'s stickyban on timeout until next round (or removed)?","Are you sure","Yes","No") == "No") return var/ban = get_stickyban_from_ckey(ckey) if (!ban) @@ -298,7 +298,7 @@ return var/ckey = data["ckey"] - if (tgui_alert(usr, "Are you sure you want to lift the timeout on [ckey]'s stickyban?","Are you sure",list("Yes","No")) == "No") + if (alert("Are you sure you want to lift the timeout on [ckey]'s stickyban?","Are you sure","Yes","No") == "No") return var/ban = get_stickyban_from_ckey(ckey) @@ -323,7 +323,7 @@ if (!data["ckey"]) return var/ckey = data["ckey"] - if (tgui_alert(usr, "Are you sure you want to revert the sticky ban on [ckey] to its state at round start (or last edit)?","Are you sure",list("Yes","No")) == "No") + if (alert("Are you sure you want to revert the sticky ban on [ckey] to its state at round start (or last edit)?","Are you sure","Yes","No") == "No") return var/ban = get_stickyban_from_ckey(ckey) if (!ban) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 6dc345d7e8..a8a7e51611 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -130,7 +130,7 @@ message_admins("[key_name_admin(usr)] tried to create a death squad. Unfortunately, there were not enough candidates available.") log_admin("[key_name(usr)] failed to create a death squad.") if("blob") - var/strength = tgui_input_num(usr, "Set Blob Resource Gain Rate","Set Resource Rate",1) + var/strength = input("Set Blob Resource Gain Rate","Set Resource Rate",1) as num|null if(!strength) return message_admins("[key_name(usr)] spawned a blob with base resource gain [strength].") @@ -176,7 +176,7 @@ var/datum/round_event/event = E.runEvent() if(event.announceWhen>0) event.processing = FALSE - var/prompt = tgui_alert(usr, "Would you like to alert the crew?", "Alert", list("Yes", "No", "Cancel")) + var/prompt = alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No", "Cancel") switch(prompt) if("Cancel") event.kill() @@ -331,7 +331,7 @@ if(!check_rights(R_SERVER)) return - var/timer = tgui_input_num(usr, "Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", SSshuttle.emergency.timeLeft()) + var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", SSshuttle.emergency.timeLeft() ) as num|null if(!timer) return SSshuttle.emergency.setTimer(timer*10) @@ -374,7 +374,7 @@ if(!check_rights(R_ADMIN)) return - var/timer = tgui_input_num(usr, "Enter new maximum time",, CONFIG_GET(number/midround_antag_time_check)) + var/timer = input("Enter new maximum time",, CONFIG_GET(number/midround_antag_time_check)) as num|null if(!timer) return CONFIG_SET(number/midround_antag_time_check, timer) @@ -385,7 +385,7 @@ if(!check_rights(R_ADMIN)) return - var/ratio = tgui_input_num(usr, "Enter new life ratio",, CONFIG_GET(number/midround_antag_life_check) * 100) + var/ratio = input("Enter new life ratio",, CONFIG_GET(number/midround_antag_life_check) * 100) as num if(!ratio) return CONFIG_SET(number/midround_antag_life_check, ratio / 100) @@ -409,7 +409,7 @@ if(!check_rights(R_SERVER)) return if(!SSticker.delay_end) - SSticker.admin_delay_notice = tgui_input_text(usr, "Enter a reason for delaying the round end", "Round Delay Reason") + SSticker.admin_delay_notice = input(usr, "Enter a reason for delaying the round end", "Round Delay Reason") as null|text if(isnull(SSticker.admin_delay_notice)) return else @@ -428,8 +428,8 @@ return message_admins("[key_name_admin(usr)] is considering ending the round.") - if(tgui_alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", list("Yes", "No")) == "Yes") - if(tgui_alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", list("Yes", "No")) == "Yes") + if(alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", "Yes", "No") == "Yes") + if(alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", "Yes", "No") == "Yes") message_admins("[key_name_admin(usr)] has ended the round.") SSticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished return @@ -448,7 +448,7 @@ return var/delmob = 0 - switch(tgui_alert(usr, "Delete old mob?","Message",list("Yes","No","Cancel"))) + switch(alert("Delete old mob?","Message","Yes","No","Cancel")) if("Cancel") return if("Yes") @@ -518,11 +518,11 @@ var/banfolder = href_list["unbanf"] GLOB.Banlist.cd = "/base/[banfolder]" var/key = GLOB.Banlist["key"] - if(tgui_alert(usr, "Are you sure you want to unban [key]?", "Confirmation", list("Yes", "No")) == "Yes") + if(alert(usr, "Are you sure you want to unban [key]?", "Confirmation", "Yes", "No") == "Yes") if(RemoveBan(banfolder)) unbanpanel() else - tgui_alert(usr, "This ban has already been lifted / does not exist.", "Error", list("Ok")) + alert(usr, "This ban has already been lifted / does not exist.", "Error", "Ok") unbanpanel() else if(href_list["unbane"]) @@ -544,25 +544,25 @@ var/duration - switch(tgui_alert(usr, "Temporary Ban for [banned_key]?",,list("Yes","No"))) + switch(alert("Temporary Ban for [banned_key]?",,"Yes","No")) if("Yes") temp = 1 var/mins = 0 if(minutes > GLOB.CMinutes) mins = minutes - GLOB.CMinutes - mins = tgui_input_num(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) + mins = input(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) as num|null if(mins <= 0) to_chat(usr, "[mins] is not a valid duration.") return minutes = GLOB.CMinutes + mins duration = GetExp(minutes) - reason = tgui_input_message(usr,"Please State Reason For Banning [banned_key].","Reason",reason2) + reason = input(usr,"Please State Reason For Banning [banned_key].","Reason",reason2) as message|null if(!reason) return if("No") temp = 0 duration = "Perma" - reason = tgui_input_message(usr,"Please State Reason For Banning [banned_key].","Reason",reason2) + reason = input(usr,"Please State Reason For Banning [banned_key].","Reason",reason2) as message|null if(!reason) return @@ -592,7 +592,7 @@ if(jobban_isbanned(M, "appearance")) - switch(tgui_alert(usr, "Remove appearance ban?","Please Confirm",list("Yes","No"))) + switch(alert("Remove appearance ban?","Please Confirm","Yes","No")) if("Yes") ban_unban_log_save("[key_name(usr)] removed [key_name(M)]'s appearance ban.") log_admin_private("[key_name(usr)] removed [key_name(M)]'s appearance ban.") @@ -602,12 +602,12 @@ message_admins("[key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban.") to_chat(M, "[usr.client.key] has removed your appearance ban.") - else switch(tgui_alert(usr, "Appearance ban [M.key]?",,list("Yes","No", "Cancel"))) + else switch(alert("Appearance ban [M.key]?",,"Yes","No", "Cancel")) if("Yes") - var/reason = tgui_input_message(usr,"Please State Reason.","Reason") + var/reason = input(usr,"Please State Reason.","Reason") as message|null if(!reason) return - var/severity = tgui_input_list(usr, "Set the severity of the note/ban.", "Severity", list("High", "Medium", "Minor", "None")) + var/severity = input("Set the severity of the note/ban.", "Severity", null, null) as null|anything in list("High", "Medium", "Minor", "None") if(!severity) return if(!DB_ban_record(BANTYPE_JOB_PERMA, M, -1, reason, "appearance")) @@ -1025,16 +1025,16 @@ //Banning comes first if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban. var/severity = null - switch(tgui_alert(usr, "Temporary Ban for [M.key]?",,list("Yes","No", "Cancel"))) + switch(alert("Temporary Ban for [M.key]?",,"Yes","No", "Cancel")) if("Yes") - var/mins = tgui_input_num(usr,"How long (in minutes)?","Ban time",1440) + var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null if(mins <= 0) to_chat(usr, "[mins] is not a valid duration.") return - var/reason = tgui_input_message(usr,"Please State Reason For Banning [M.key].","Reason") + var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null if(!reason) return - severity = tgui_input_list(usr, "Set the severity of the note/ban.", "Severity", list("High", "Medium", "Minor", "None")) + severity = input("Set the severity of the note/ban.", "Severity", null, null) as null|anything in list("High", "Medium", "Minor", "None") if(!severity) return var/msg @@ -1058,8 +1058,8 @@ href_list["jobban2"] = 1 // lets it fall through and refresh return 1 if("No") - var/reason = tgui_input_message(usr,"Please State Reason For Banning [M.key].","Reason") - severity = tgui_input_list(usr, "Set the severity of the note/ban.", "Severity", list("High", "Medium", "Minor", "None")) + var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null + severity = input("Set the severity of the note/ban.", "Severity", null, null) as null|anything in list("High", "Medium", "Minor", "None") if(!severity) return if(reason) @@ -1094,7 +1094,7 @@ var/reason = jobban_isbanned(M, job) if(!reason) continue //skip if it isn't jobbanned anyway - switch(tgui_alert(usr, "Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm",list("Yes","No"))) + switch(alert("Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm","Yes","No")) if("Yes") ban_unban_log_save("[key_name(usr)] unjobbanned [key_name(M)] from [job]") log_admin_private("[key_name(usr)] unbanned [key_name(M)] from [job]") @@ -1122,7 +1122,7 @@ if(!check_if_greater_rights_than(M.client)) to_chat(usr, "Error: They have more rights than you do.") return - if(tgui_alert(usr, "Kick [key_name(M)]?", "Confirm", list("Yes", "No")) != "Yes") + if(alert(usr, "Kick [key_name(M)]?", "Confirm", "Yes", "No") != "Yes") return if(!M) to_chat(usr, "Error: [M] no longer exists!") @@ -1176,7 +1176,7 @@ else if(href_list["deletemessage"]) if(!check_rights(R_ADMIN)) return - var/safety = tgui_alert(usr, "Delete message/note?",,list("Yes","No")); + var/safety = alert("Delete message/note?",,"Yes","No"); if (safety == "Yes") var/message_id = href_list["deletemessage"] delete_message(message_id) @@ -1184,7 +1184,7 @@ else if(href_list["deletemessageempty"]) if(!check_rights(R_ADMIN)) return - var/safety = tgui_alert(usr, "Delete message/note?",,list("Yes","No")); + var/safety = alert("Delete message/note?",,"Yes","No"); if (safety == "Yes") var/message_id = href_list["deletemessageempty"] delete_message(message_id, browse = TRUE) @@ -1301,13 +1301,13 @@ 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 for [M.key]?",,list("Yes","No", "Cancel"))) + switch(alert("Temporary Ban for [M.key]?",,"Yes","No", "Cancel")) if("Yes") - var/mins = tgui_input_num(usr,"How long (in minutes)?","Ban time",1440) + var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null if(mins <= 0) to_chat(usr, "[mins] is not a valid duration.") return - var/reason = tgui_input_message(usr,"Please State Reason For Banning [M.key].","Reason") + var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null if(!reason) return if(!DB_ban_record(BANTYPE_TEMP, M, mins, reason)) @@ -1330,10 +1330,10 @@ AH.Resolve() qdel(M.client) if("No") - var/reason = tgui_input_message(usr,"Please State Reason For Banning [M.key].","Reason") + var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null if(!reason) return - switch(tgui_alert(usr,"IP ban?",,list("Yes","No","Cancel"))) + switch(alert(usr,"IP ban?",,"Yes","No","Cancel")) if("Cancel") return if("Yes") @@ -1381,7 +1381,7 @@ for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart)) var/datum/dynamic_ruleset/roundstart/newrule = new rule() roundstart_rules[newrule.name] = newrule - var/added_rule = tgui_input_list(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", sortList(roundstart_rules)) + var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sortList(roundstart_rules) if (added_rule) GLOB.dynamic_forced_roundstart_ruleset += roundstart_rules[added_rule] log_admin("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.") @@ -1434,7 +1434,7 @@ if(!check_rights(R_ADMIN)) return - GLOB.dynamic_stacking_limit = tgui_input_num(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) + GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num log_admin("[key_name(usr)] set 'stacking_limit' to [GLOB.dynamic_stacking_limit].") message_admins("[key_name(usr)] set 'stacking_limit' to [GLOB.dynamic_stacking_limit].") dynamic_mode_options(usr) @@ -1446,7 +1446,7 @@ if(SSticker?.mode) return tgui_alert(usr, "The game has already started.") - var/new_value = tgui_input_num(usr, "Enter the forced threat level for dynamic mode.", "Forced threat level") + var/new_value = input(usr, "Enter the forced threat level for dynamic mode.", "Forced threat level") as num if (new_value > 100) return tgui_alert(usr, "The value must be be under 100.") GLOB.dynamic_forced_threat_level = new_value @@ -1460,7 +1460,7 @@ return if (SSticker.HasRoundStarted()) - return tgui_alert(usr, "The game has already started.", null, null, null, null) + return alert(usr, "The game has already started.", null, null, null, null) GLOB.master_mode = href_list["c_mode2"] log_admin("[key_name(usr)] set the mode as [GLOB.master_mode].") message_admins("[key_name_admin(usr)] set the mode as [GLOB.master_mode].") @@ -1474,9 +1474,9 @@ return if(SSticker.HasRoundStarted()) - return tgui_alert(usr, "The game has already started.", null, null, null, null) + return alert(usr, "The game has already started.", null, null, null, null) if(GLOB.master_mode != "secret") - return tgui_alert(usr, "The game mode has to be secret!", null, null, null, null) + return alert(usr, "The game mode has to be secret!", null, null, null, null) GLOB.secret_force_mode = href_list["f_secret2"] log_admin("[key_name(usr)] set the forced secret mode as [GLOB.secret_force_mode].") message_admins("[key_name_admin(usr)] set the forced secret mode as [GLOB.secret_force_mode].") @@ -1531,7 +1531,7 @@ if(!ismob(M)) to_chat(usr, "this can only be used on instances of type /mob.") - var/speech = tgui_input_text(usr, "What will [key_name(M)] say?", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins. + var/speech = input("What will [key_name(M)] say?", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins. if(!speech) return M.say(speech, forced = "admin speech") @@ -1560,7 +1560,7 @@ to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.") return - if(tgui_alert(usr, "Send [key_name(M)] to Prison?", "Message", list("Yes", "No")) != "Yes") + if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes") return M.forceMove(pick(GLOB.prisonwarp)) @@ -1583,7 +1583,7 @@ to_chat(usr, "[M] doesn't seem to have an active client.") return - if(tgui_alert(usr, "Send [key_name(M)] back to Lobby?", "Message", list("Yes", "No")) != "Yes") + if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes") return log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby, removing their respawn restrictions if they existed.") @@ -1600,7 +1600,7 @@ if(!check_rights(R_FUN)) return - if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes") + if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return var/mob/M = locate(href_list["tdome1"]) @@ -1627,7 +1627,7 @@ if(!check_rights(R_FUN)) return - if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes") + if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return var/mob/M = locate(href_list["tdome2"]) @@ -1654,7 +1654,7 @@ if(!check_rights(R_FUN)) return - if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes") + if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return var/mob/M = locate(href_list["tdomeadmin"]) @@ -1678,7 +1678,7 @@ if(!check_rights(R_FUN)) return - if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes") + if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return var/mob/M = locate(href_list["tdomeobserve"]) @@ -1917,7 +1917,7 @@ for(var/datum/job/job in SSjob.occupations) if(job.title == Add) var/newtime = null - newtime = tgui_input_num(usr, "How many jebs do you want?", "Add wanted posters", "[newtime]") + newtime = input(usr, "How many jebs do you want?", "Add wanted posters", "[newtime]") as num|null if(!newtime) to_chat(src.owner, "Setting to amount of positions filled for the job") job.total_positions = job.current_positions @@ -2049,7 +2049,7 @@ if(!check_rights(R_ADMIN)) return - if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes") + if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return var/mob/M = locate(href_list["getmob"]) usr.client.Getmob(M) @@ -2101,7 +2101,7 @@ return if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "The game hasn't started yet!") + alert("The game hasn't started yet!") return var/mob/M = locate(href_list["traitor"]) @@ -2182,10 +2182,10 @@ paths += path if(!paths) - tgui_alert(usr, "The path list you sent is empty.") + alert("The path list you sent is empty.") return if(length(paths) > 5) - tgui_alert(usr, "Select fewer object types, (max 5).") + alert("Select fewer object types, (max 5).") return var/list/offset = splittext(href_list["offset"],",") @@ -2310,7 +2310,7 @@ if(src.admincaster_feed_channel.channel_name == "" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]" || check ) src.admincaster_screen=7 else - var/choice = tgui_alert(usr, "Please confirm Feed channel creation.","Network Channel Handler",list("Confirm","Cancel")) + var/choice = alert("Please confirm Feed channel creation.","Network Channel Handler","Confirm","Cancel") if(choice=="Confirm") GLOB.news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1) SSblackbox.record_feedback("tally", "newscaster_channels", 1, src.admincaster_feed_channel.channel_name) @@ -2324,7 +2324,7 @@ var/list/available_channels = list() for(var/datum/news/feed_channel/F in GLOB.news_network.network_channels) available_channels += F.channel_name - src.admincaster_feed_channel.channel_name = adminscrub(tgui_input_list(usr, "Choose receiving Feed Channel.", "Network Channel Handler", available_channels)) + src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel.", "Network Channel Handler") in available_channels ) src.access_news_network() else if(href_list["ac_set_new_message"]) @@ -2405,7 +2405,7 @@ if(src.admincaster_wanted_message.criminal == "" || src.admincaster_wanted_message.body == "") src.admincaster_screen = 16 else - var/choice = tgui_alert(usr, "Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler",list("Confirm","Cancel")) + var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel") if(choice=="Confirm") if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below GLOB.news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature, null, 1, 1) @@ -2419,7 +2419,7 @@ else if(href_list["ac_cancel_wanted"]) if(!check_rights(R_ADMIN)) return - var/choice = tgui_alert(usr, "Please confirm Wanted Issue removal.","Network Security Handler",list("Confirm","Cancel")) + var/choice = alert("Please confirm Wanted Issue removal.","Network Security Handler","Confirm","Cancel") if(choice=="Confirm") GLOB.news_network.deleteWanted() src.admincaster_screen=17 @@ -2504,7 +2504,7 @@ else if(href_list["ac_set_signature"]) if(!check_rights(R_ADMIN)) return - src.admin_signature = adminscrub(tgui_input_text(usr, "Provide your desired signature.", "Network Identity Handler", "")) + src.admin_signature = adminscrub(input(usr, "Provide your desired signature.", "Network Identity Handler", "")) src.access_news_network() else if(href_list["ac_del_comment"]) @@ -2533,7 +2533,7 @@ return if(SSticker.IsRoundInProgress()) var/afkonly = text2num(href_list["afkonly"]) - if(tgui_alert(usr, "Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message",list("Yes","Cancel")) != "Yes") + if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes") to_chat(usr, "Kick clients from lobby aborted") return var/list/listkicked = kick_clients_in_lobby("You were kicked from the lobby by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"].", afkonly) @@ -2586,16 +2586,16 @@ if(!check_rights(R_ADMIN)) return var/list/type_choices = typesof(/datum/station_goal) - var/picked = tgui_input_list(usr, "Choose goal type", type_choices) + var/picked = input("Choose goal type") in type_choices|null if(!picked) return var/datum/station_goal/G = new picked() if(picked == /datum/station_goal) - var/newname = tgui_input_text(usr, "Enter goal name:") + var/newname = input("Enter goal name:") as text|null if(!newname) return G.name = newname - var/description = tgui_input_message(usr, "Enter CentCom message contents:") + var/description = input("Enter CentCom message contents:") as message|null if(!description) return G.report_message = description @@ -2711,8 +2711,8 @@ var/answer = href_list["slowquery"] if(answer == "yes") log_query_debug("[usr.key] | Reported a server hang") - if(tgui_alert(usr, "Had you just press any admin buttons?", "Query server hang report", list("Yes", "No")) == "Yes") - var/response = tgui_input_text(usr,"What were you just doing?","Query server hang report") + if(alert(usr, "Had you just press any admin buttons?", "Query server hang report", "Yes", "No") == "Yes") + var/response = input(usr,"What were you just doing?","Query server hang report") as null|text if(response) log_query_debug("[usr.key] | [response]") else if(answer == "no") @@ -2723,7 +2723,7 @@ return if(SSticker.HasRoundStarted()) - return tgui_alert(usr, "The game has already started.", null, null, null, null) + return alert(usr, "The game has already started.", null, null, null, null) var/dat = {"What mode do you wish to play?
    "} for(var/mode in config.modes) dat += {"[config.mode_names[mode]]
    "} @@ -2737,9 +2737,9 @@ return if(SSticker.HasRoundStarted()) - return tgui_alert(usr, "The game has already started.", null, null, null, null) + return alert(usr, "The game has already started.", null, null, null, null) if(GLOB.master_mode != "secret") - return tgui_alert(usr, "The game mode has to be secret!", null, null, null, null) + return alert(usr, "The game mode has to be secret!", null, null, null, null) var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
    "} for(var/mode in config.modes) dat += {"[config.mode_names[mode]]
    "} diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 6baea9463f..f721bcc5fc 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -444,7 +444,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) usr << browse(dat.Join(), "window=ahelp[id];size=620x480") /datum/admin_help/proc/Retitle() - var/new_title = tgui_input_text(usr, "Enter a title for the ticket", "Rename Ticket", name) + var/new_title = input(usr, "Enter a title for the ticket", "Rename Ticket", name) as text|null if(new_title) name = new_title //not saying the original name cause it could be a long ass message @@ -508,7 +508,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) // Used for methods where input via arg doesn't work /client/proc/get_adminhelp() - var/msg = tgui_input_text(src, "Please describe your problem concisely and an admin will help as soon as they're able.", "Adminhelp contents") + var/msg = input(src, "Please describe your problem concisely and an admin will help as soon as they're able.", "Adminhelp contents") as text adminhelp(msg) /client/verb/adminhelp(msg as text) @@ -533,7 +533,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) SSblackbox.record_feedback("tally", "admin_verb", 1, "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?",,list("Yes","No")) != "No") + if(alert(usr, "You already have a ticket open. Is this for the same issue?",,"Yes","No") != "No") if(current_ticket) current_ticket.MessageNoRecipient(msg) current_ticket.TimeoutVerb() diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index 72680eaadc..2f89dc82eb 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -84,7 +84,7 @@ var/list/keys = list() for(var/mob/M in GLOB.player_list) keys += M.client - var/client/selection = tgui_input_list(src, "Please, select a player!", "Admin Jumping", sortKey(keys)) + var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys) if(!selection) to_chat(src, "No keys found.", confidential = TRUE) return @@ -124,7 +124,7 @@ var/list/keys = list() for(var/mob/M in GLOB.player_list) keys += M.client - var/client/selection = tgui_input_list(src, "Please, select a player!", "Admin Jumping", sortKey(keys)) + var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys) if(!selection) return var/mob/M = selection.mob @@ -146,7 +146,7 @@ if(!src.holder) to_chat(src, "Only administrators may use this command.", confidential = TRUE) return - var/area/A = tgui_input_list(usr, "Pick an area.", "Pick an area", GLOB.sortedAreas) + var/area/A = input(usr, "Pick an area.", "Pick an area") in GLOB.sortedAreas|null if(A && istype(A)) var/list/turfs = get_area_turfs(A) if(length(turfs) && M.forceMove(pick(turfs))) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index d3c8a770df..3a708ef182 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -30,7 +30,7 @@ targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T else targets["(No Mob) - [T]"] = T - var/target = tgui_input_list(src,"To whom shall we send a message?","Admin PM", sortList(targets)) + var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sortList(targets) cmd_admin_pm(targets[target],null) SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -54,7 +54,7 @@ if(AH) message_admins("[key_name_admin(src)] has started replying to [key_name_admin(C, 0, 0)]'s admin help.") - var/msg = tgui_input_message(src,"Message:", "Private message to [C.holder?.fakekey ? "an Administrator" : key_name(C, 0, 0)].") + var/msg = input(src,"Message:", "Private message to [C.holder?.fakekey ? "an Administrator" : key_name(C, 0, 0)].") as message|null if (!msg) message_admins("[key_name_admin(src)] has cancelled their reply to [key_name_admin(C, 0, 0)]'s admin help.") return @@ -105,7 +105,7 @@ if(!ircreplyamount) //to prevent people from spamming irc/discord return if(!msg) - msg = tgui_input_message(src,"Message:", "Private message to Administrator") + msg = input(src,"Message:", "Private message to Administrator") as message|null if(!msg) return @@ -116,7 +116,7 @@ else //get message text, limit it's length.and clean/escape html if(!msg) - msg = tgui_input_message(src,"Message:", "Private message to [recipient.holder?.fakekey ? "an Administrator" : key_name(recipient, 0, 0)].") + msg = input(src,"Message:", "Private message to [recipient.holder?.fakekey ? "an Administrator" : key_name(recipient, 0, 0)].") as message|null msg = trim(msg) if(!msg) return @@ -238,7 +238,7 @@ /client/proc/popup_admin_pm(client/recipient, msg) var/sender = src var/sendername = key - var/reply = tgui_input_message(recipient, msg,"Admin PM from-[sendername]", "") //show message and await a reply + var/reply = input(recipient, msg,"Admin PM from-[sendername]", "") as message|null //show message and await a reply if(recipient && reply) if(sender) recipient.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 5afbda4e19..fdd1e8dcad 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -31,5 +31,5 @@ SSblackbox.record_feedback("tally", "admin_verb", 1, "Asay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/get_admin_say() - var/msg = tgui_input_text(src, null, "asay \"text\"") + var/msg = input(src, null, "asay \"text\"") as text cmd_admin_say(msg) diff --git a/code/modules/admin/verbs/ak47s.dm b/code/modules/admin/verbs/ak47s.dm index b2081b84d2..561037060f 100644 --- a/code/modules/admin/verbs/ak47s.dm +++ b/code/modules/admin/verbs/ak47s.dm @@ -1,7 +1,7 @@ GLOBAL_VAR_INIT(terrorism, FALSE) /client/proc/ak47s() // For when you just can't summon guns worthy of a firefight if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "The game hasn't started yet!") + alert("The game hasn't started yet!") return GLOB.terrorism = TRUE diff --git a/code/modules/admin/verbs/borgpanel.dm b/code/modules/admin/verbs/borgpanel.dm index ff6b3938cf..4b60ecc0ff 100644 --- a/code/modules/admin/verbs/borgpanel.dm +++ b/code/modules/admin/verbs/borgpanel.dm @@ -7,7 +7,7 @@ return if (!istype(borgo, /mob/living/silicon/robot)) - borgo = tgui_input_list(usr, "Select a borg", "Select a borg", sortNames(GLOB.silicon_mobs)) + borgo = input("Select a borg", "Select a borg", null, null) as null|anything in sortNames(GLOB.silicon_mobs) if (!istype(borgo, /mob/living/silicon/robot)) to_chat(usr, "Borg is required for borgpanel", confidential = TRUE) @@ -83,7 +83,7 @@ return switch (action) if ("set_charge") - var/newcharge = tgui_input_num(usr, "New charge (0-[borg.cell.maxcharge]):", borg.name, borg.cell.charge) + var/newcharge = input("New charge (0-[borg.cell.maxcharge]):", borg.name, borg.cell.charge) as num|null if (newcharge) borg.cell.charge = clamp(newcharge, 0, borg.cell.maxcharge) message_admins("[key_name_admin(user)] set the charge of [ADMIN_LOOKUPFLW(borg)] to [borg.cell.charge].") diff --git a/code/modules/admin/verbs/cinematic.dm b/code/modules/admin/verbs/cinematic.dm index 85a4a5773d..b23cd0af0b 100644 --- a/code/modules/admin/verbs/cinematic.dm +++ b/code/modules/admin/verbs/cinematic.dm @@ -6,6 +6,6 @@ if(!SSticker) return - var/datum/cinematic/choice = tgui_input_list(src,"Cinematic","Choose", subtypesof(/datum/cinematic)) + var/datum/cinematic/choice = input(src,"Cinematic","Choose",null) as anything in subtypesof(/datum/cinematic) if(choice) Cinematic(initial(choice.id),world,null) diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 42c588056b..1cddbe9509 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -32,7 +32,7 @@ SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/get_dead_say() - var/msg = tgui_input_text(src, null, "dsay \"text\"") + var/msg = input(src, null, "dsay \"text\"") as text|null if (isnull(msg)) return diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index c4e882cef2..138913b3a4 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -31,7 +31,7 @@ set name = "Make Robot" if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "Wait until the game starts") + alert("Wait until the game starts") return if(ishuman(M)) log_admin("[key_name(src)] has robotized [M.key].") @@ -40,21 +40,21 @@ H.Robotize() else - tgui_alert(usr, "Invalid mob") + alert("Invalid mob") /client/proc/cmd_admin_blobize(mob/M in GLOB.mob_list) set category = "Admin.Fun" set name = "Make Blob" if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "Wait until the game starts") + alert("Wait until the game starts") return if(ishuman(M)) log_admin("[key_name(src)] has blobized [M.key].") var/mob/living/carbon/human/H = M H.become_overmind() else - tgui_alert(usr, "Invalid mob") + alert("Invalid mob") /client/proc/cmd_admin_animalize(mob/M in GLOB.mob_list) @@ -62,15 +62,15 @@ set name = "Make Simple Animal" if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "Wait until the game starts") + alert("Wait until the game starts") return if(!M) - tgui_alert(usr, "That mob doesn't seem to exist, close the panel and try again.") + alert("That mob doesn't seem to exist, close the panel and try again.") return if(isnewplayer(M)) - tgui_alert(usr, "The mob must not be a new_player.") + alert("The mob must not be a new_player.") return log_admin("[key_name(src)] has animalized [M.key].") @@ -87,16 +87,16 @@ for(var/mob/C in GLOB.mob_list) if(C.key) available.Add(C) - var/mob/choice = tgui_input_list(src, "Choose a player to play the pAI", "Spawn pAI", available) + var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available if(!choice) return 0 if(!isobserver(choice)) - var/confirm = tgui_input_list(src, "[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("Yes", "No")) + var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No") if(confirm != "Yes") return 0 var/obj/item/paicard/card = new(T) var/mob/living/silicon/pai/pai = new(card) - pai.name = tgui_input_text(choice, "Enter your pAI name:", "pAI Name", "Personal AI") + pai.name = input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text pai.real_name = pai.name choice.transfer_ckey(pai) card.setPersonality(pai) @@ -110,7 +110,7 @@ set name = "Make Alien" if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "Wait until the game starts") + alert("Wait until the game starts") return if(ishuman(M)) INVOKE_ASYNC(M, /mob/living/carbon/human/proc/Alienize) @@ -118,14 +118,14 @@ log_admin("[key_name(usr)] made [key_name(M)] into an alien at [AREACOORD(M)].") message_admins("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into an alien.") else - tgui_alert(usr, "Invalid mob") + alert("Invalid mob") /client/proc/cmd_admin_slimeize(mob/M in GLOB.mob_list) set category = "Admin.Fun" set name = "Make slime" if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "Wait until the game starts") + alert("Wait until the game starts") return if(ishuman(M)) INVOKE_ASYNC(M, /mob/living/carbon/human/proc/slimeize) @@ -133,7 +133,7 @@ log_admin("[key_name(usr)] made [key_name(M)] into a slime at [AREACOORD(M)].") message_admins("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into a slime.") else - tgui_alert(usr, "Invalid mob") + alert("Invalid mob") //TODO: merge the vievars version into this or something maybe mayhaps /client/proc/cmd_debug_del_all(object as text) @@ -146,7 +146,7 @@ if(matches.len==0) return - var/hsbitem = tgui_input_list(usr, "Choose an object to delete.", "Delete:", matches) + var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in matches if(hsbitem) hsbitem = matches[hsbitem] var/counter = 0 @@ -173,7 +173,7 @@ set name = "Grant Full Access" if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "Wait until the game starts") + alert("Wait until the game starts") return if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -205,7 +205,7 @@ H.equip_to_slot(id,SLOT_WEAR_ID) else - tgui_alert(usr, "Invalid mob") + alert("Invalid mob") SSblackbox.record_feedback("tally", "admin_verb", 1, "Grant Full Access") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(src)] has granted [M.key] full access.") message_admins("[key_name_admin(usr)] has granted [M.key] full access.") @@ -216,7 +216,7 @@ set desc = "Direct intervention" if(M.ckey) - if(tgui_alert(src, "This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes") + if(alert("This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes") return else var/mob/dead/observer/ghost = new/mob/dead/observer(get_turf(M), M) @@ -236,12 +236,12 @@ if(!M) return if(M.ckey) - if(tgui_alert(usr, "This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes") + if(alert("This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes") return - var/client/newkey = tgui_input_list(src, "Pick the player to put in control.", "New player", sortList(GLOB.clients)) + var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sortList(GLOB.clients) var/mob/oldmob = newkey.mob var/delmob = FALSE - if((isobserver(oldmob) || tgui_alert(usr, "Do you want to delete [newkey]'s old mob?","Delete?",list("Yes","No")) != "No")) + if((isobserver(oldmob) || alert("Do you want to delete [newkey]'s old mob?","Delete?","Yes","No") != "No")) delmob = TRUE if(!M || QDELETED(M)) to_chat(usr, "The target mob no longer exists, aborting.") @@ -494,7 +494,7 @@ var/datum/outfit/O = path //not much to initalize here but whatever outfits[initial(O.name)] = path - var/dresscode = tgui_input_list(src, "Select outfit", "Robust quick dress shop", baseoutfits + sortList(outfits)) + var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sortList(outfits) if (isnull(dresscode)) return @@ -508,7 +508,7 @@ var/datum/outfit/O = path job_outfits[initial(O.name)] = path - dresscode = tgui_input_list(src, "Select job equipment", "Robust quick dress shop", sortList(job_outfits)) + dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sortList(job_outfits) dresscode = job_outfits[dresscode] if(isnull(dresscode)) return @@ -520,7 +520,7 @@ var/datum/outfit/O = path plasmaman_outfits[initial(O.name)] = path - dresscode = tgui_input_list(src, "Select plasmeme equipment", "Robust quick dress shop", sortList(plasmaman_outfits)) + dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sortList(plasmaman_outfits) dresscode = plasmaman_outfits[dresscode] if(isnull(dresscode)) return @@ -529,7 +529,7 @@ var/list/custom_names = list() for(var/datum/outfit/D in GLOB.custom_outfits) custom_names[D.name] = D - var/selected_name = tgui_input_list(src, "Select outfit", "Robust quick dress shop", sortList(custom_names)) + var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sortList(custom_names) dresscode = custom_names[selected_name] if(isnull(dresscode)) return @@ -542,7 +542,7 @@ set name = "Start Singularity" set desc = "Sets up the singularity and all machines to get power flowing through the station" - if(tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!",,list("Yes","No")) != "Yes") + if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes") return for(var/obj/machinery/power/emitter/E in GLOB.machines) @@ -598,7 +598,7 @@ set name = "Debug Mob Lists" set desc = "For when you just gotta know" - switch(tgui_input_list(src, "Which list?", "", list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))) + switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients")) if("Players") to_chat(usr, jointext(GLOB.player_list,",")) if("Admins") @@ -687,7 +687,7 @@ names[name] = ruin_landmark - var/ruinname = tgui_input_list(src, "Select ruin", "Jump to Ruin", names) + var/ruinname = input("Select ruin", "Jump to Ruin") as null|anything in names var/obj/effect/landmark/ruin/landmark = names[ruinname] @@ -725,13 +725,13 @@ for(var/name in SSmapping.ice_ruins_underground_templates) names[name] = list(SSmapping.ice_ruins_underground_templates[name], ZTRAIT_ICE_RUINS_UNDERGROUND, list(/area/icemoon/underground/unexplored)) - var/ruinname = tgui_input_list(src, "Select ruin", "Spawn Ruin", names) + var/ruinname = input("Select ruin", "Spawn Ruin") as null|anything in names var/data = names[ruinname] if (!data) return var/datum/map_template/ruin/template = data[1] if (exists[template]) - var/response = tgui_alert(usr, "There is already a [template] in existence.", "Spawn Ruin", list("Jump", "Place Another", "Cancel")) + var/response = alert("There is already a [template] in existence.", "Spawn Ruin", "Jump", "Place Another", "Cancel") if (response == "Jump") usr.forceMove(get_turf(exists[template])) return @@ -755,7 +755,7 @@ set desc = "Deallocates all reserved space, restoring it to round start conditions." if(!holder) return - var/answer = tgui_alert(usr, "WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!", "Really wipe dynamic turfs?", list("YES", "NO")) + var/answer = alert("WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!", "Really wipe dynamic turfs?", "YES", "NO") if(answer != "YES") return message_admins("[key_name_admin(src)] cleared dynamic transit space.") @@ -833,7 +833,7 @@ "Total Time" = /proc/cmp_profile_time_dsc, "Call Count" = /proc/cmp_profile_count_dsc ) - var/sort = tgui_input_list(src, "Sort type?", "Sort Type", sortlist) + var/sort = input(src, "Sort type?", "Sort Type", "Avg time") as null|anything in sortlist if (!sort) return sort = sortlist[sort] @@ -845,5 +845,5 @@ set desc = "Force config reload to world default" if(!check_rights(R_DEBUG)) return - if(tgui_alert(usr, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modificatoins?", "Really reset?", list("No", "Yes")) == "Yes") + if(alert(usr, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modificatoins?", "Really reset?", "No", "Yes") == "Yes") config.admin_reload() diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index ff476ee716..8defd78a06 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -56,7 +56,7 @@ if(!src.holder) return - var/confirm = tgui_alert(src, "Are you sure you want to reload all admins?", "Confirm", list("Yes", "No")) + var/confirm = alert(src, "Are you sure you want to reload all admins?", "Confirm", "Yes", "No") if(confirm !="Yes") return @@ -68,7 +68,7 @@ set name = "Toggle CDN" set category = "Server" var/static/admin_disabled_cdn_transport = null - if (tgui_alert(usr, "Are you sure you want to toggle the CDN asset transport?", "Confirm", list("Yes", "No")) != "Yes") + if (alert(usr, "Are you sure you want to toggle the CDN asset transport?", "Confirm", "Yes", "No") != "Yes") return var/current_transport = CONFIG_GET(string/asset_transport) if (!current_transport || current_transport == "simple") @@ -80,7 +80,7 @@ log_admin("[key_name(usr)] re-enabled the CDN asset transport") else to_chat(usr, "The CDN is not enabled!") - if (tgui_alert(usr, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", list("Try disabling filename mutations", "Nevermind")) == "Try disabling filename mutations") + if (alert(usr, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", "Try disabling filename mutations", "Nevermind") == "Try disabling filename mutations") SSassets.transport.dont_mutate_filenames = !SSassets.transport.dont_mutate_filenames message_admins("[key_name_admin(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms") log_admin("[key_name(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms") diff --git a/code/modules/admin/verbs/dice.dm b/code/modules/admin/verbs/dice.dm index 25f067c392..f033351f96 100644 --- a/code/modules/admin/verbs/dice.dm +++ b/code/modules/admin/verbs/dice.dm @@ -4,8 +4,8 @@ if(!check_rights(R_FUN)) return - var/sum = tgui_input_num(src, "How many times should we throw?") - var/side = tgui_input_num(src, "Select the number of sides.") + var/sum = input("How many times should we throw?") as num + var/side = input("Select the number of sides.") as num if(!side) side = 6 if(!sum) @@ -13,12 +13,12 @@ var/dice = num2text(sum) + "d" + num2text(side) - if(tgui_alert(src, "Do you want to inform the world about your game?",,list("Yes", "No")) == "Yes") + if(alert("Do you want to inform the world about your game?",,"Yes", "No") == "Yes") to_chat(world, "

    The dice have been rolled by Gods!

    ") var/result = roll(dice) - if(tgui_alert(src, "Do you want to inform the world about the result?",,list("Yes", "No")) == "Yes") + if(alert("Do you want to inform the world about the result?",,"Yes", "No") == "Yes") to_chat(world, "

    Gods rolled [dice], result is [result]

    ") message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]") diff --git a/code/modules/admin/verbs/fps.dm b/code/modules/admin/verbs/fps.dm index 4364840220..2b65d2a44c 100644 --- a/code/modules/admin/verbs/fps.dm +++ b/code/modules/admin/verbs/fps.dm @@ -8,13 +8,13 @@ return var/cfg_fps = CONFIG_GET(number/fps) - var/new_fps = round(tgui_input_num(src, "Sets game frames-per-second. Can potentially break the game (default: [cfg_fps])","FPS", world.fps)) + var/new_fps = round(input("Sets game frames-per-second. Can potentially break the game (default: [cfg_fps])","FPS", world.fps) as num|null) if(new_fps <= 0) to_chat(src, "Error: set_server_fps(): Invalid world.fps value. No changes made.") return if(new_fps > cfg_fps * 1.5) - if(tgui_alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!",list("Confirm","ABORT-ABORT-ABORT")) != "Confirm") + if(alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm") return var/msg = "[key_name(src)] has modified world.fps to [new_fps]" diff --git a/code/modules/admin/verbs/getlogs.dm b/code/modules/admin/verbs/getlogs.dm index 46f9092bdb..446dbcc69a 100644 --- a/code/modules/admin/verbs/getlogs.dm +++ b/code/modules/admin/verbs/getlogs.dm @@ -24,7 +24,7 @@ return message_admins("[key_name_admin(src)] accessed file: [path]") - switch(tgui_alert(src, "View (in game), Open (in your system's text editor), or Download?", path, list("View", "Open", "Download"))) + switch(alert("View (in game), Open (in your system's text editor), or Download?", path, "View", "Open", "Download")) if ("View") src << browse("
    [html_encode(file2text(file(path)))]
    ", list2params(list("window" = "viewfile.[path]"))) if ("Open") diff --git a/code/modules/admin/verbs/machine_upgrade.dm b/code/modules/admin/verbs/machine_upgrade.dm index f5652da846..58deff2a24 100644 --- a/code/modules/admin/verbs/machine_upgrade.dm +++ b/code/modules/admin/verbs/machine_upgrade.dm @@ -4,7 +4,7 @@ if (!istype(M)) return - var/new_rating = tgui_input_num(usr, "Enter new rating:","Num") + var/new_rating = input("Enter new rating:","Num") as num if(new_rating && M.component_parts) for(var/obj/item/stock_parts/P in M.component_parts) P.rating = new_rating diff --git a/code/modules/admin/verbs/manipulate_organs.dm b/code/modules/admin/verbs/manipulate_organs.dm index 6461778eed..b2648735ec 100644 --- a/code/modules/admin/verbs/manipulate_organs.dm +++ b/code/modules/admin/verbs/manipulate_organs.dm @@ -1,7 +1,7 @@ /client/proc/manipulate_organs(mob/living/carbon/C in world) set name = "Manipulate Organs" set category = "Debug" - var/operation = tgui_input_list(src, "Select organ operation.", "Organ Manipulation", list("add organ", "add implant", "drop organ/implant", "remove organ/implant", "cancel")) + var/operation = input("Select organ operation.", "Organ Manipulation", "cancel") as null|anything in list("add organ", "add implant", "drop organ/implant", "remove organ/implant", "cancel") if (!operation) return @@ -12,7 +12,7 @@ var/dat = replacetext("[path]", "/obj/item/organ/", ":") organs[dat] = path - var/obj/item/organ/organ = tgui_input_list(src, "Select organ type:", "Organ Manipulation", organs) + var/obj/item/organ/organ = input("Select organ type:", "Organ Manipulation", null) as null|anything in organs if(!organ) return organ = organs[organ] @@ -26,7 +26,7 @@ var/dat = replacetext("[path]", "/obj/item/implant/", ":") organs[dat] = path - var/obj/item/implant/organ = tgui_input_list(src, "Select implant type:", "Organ Manipulation", organs) + var/obj/item/implant/organ = input("Select implant type:", "Organ Manipulation", null) as null|anything in organs if(!organ) return organ = organs[organ] @@ -44,7 +44,7 @@ var/obj/item/implant/I = X organs["[I.name] ([I.type])"] = I - var/obj/item/organ = tgui_input_list(src, "Select organ/implant:", "Organ Manipulation", organs) + var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) as null|anything in organs if(!organ) return organ = organs[organ] diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm index 620667046e..e89c3ad5a6 100644 --- a/code/modules/admin/verbs/map_template_loadverb.dm +++ b/code/modules/admin/verbs/map_template_loadverb.dm @@ -4,7 +4,7 @@ var/datum/map_template/template - var/map = tgui_input_list(src, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template", SSmapping.map_templates) + var/map = input(src, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in SSmapping.map_templates if(!map) return template = SSmapping.map_templates[map] @@ -19,10 +19,10 @@ item.plane = ABOVE_LIGHTING_PLANE preview += item var/list/orientations = list("South" = SOUTH, "North" = NORTH, "East" = EAST, "West" = WEST) - var/choice = tgui_input_list(src, "Which orientation? Maps are normally facing SOUTH.", "Template Orientation", orientations) + var/choice = input(src, "Which orientation? Maps are normally facing SOUTH.", "Template Orientation", "South") as null|anything in orientations var/orientation = orientations[choice] images += preview - if(tgui_alert(src, "Confirm location.","Template Confirm",list("Yes","No")) == "Yes") + if(alert(src,"Confirm location.","Template Confirm","Yes","No") == "Yes") if(template.load(T, centered = TRUE, orientation = orientation)) message_admins("[key_name_admin(src)] has placed a map template ([template.name]) at [ADMIN_COORDJMP(T)]") else @@ -40,7 +40,7 @@ to_chat(src, "Filename must end in '.dmm': [map]") return var/datum/map_template/M - switch(tgui_alert(src, "What kind of map is this?", "Map type", list("Normal", "Shuttle", "Cancel"))) + switch(alert(src, "What kind of map is this?", "Map type", "Normal", "Shuttle", "Cancel")) if("Normal") M = new /datum/map_template(map, "[map]", TRUE) if("Shuttle") @@ -58,11 +58,11 @@ report_link = " - validation report" to_chat(src, "Map template '[map]' failed validation.") if(report.loadable) - var/response = tgui_alert(src, "The map failed validation, would you like to load it anyways?", "Map Errors", list("Cancel", "Upload Anyways")) + var/response = alert(src, "The map failed validation, would you like to load it anyways?", "Map Errors", "Cancel", "Upload Anyways") if(response != "Upload Anyways") return else - tgui_alert(src, "The map failed validation and cannot be loaded.", "Map Errors", list("Oh Darn")) + alert(src, "The map failed validation and cannot be loaded.", "Map Errors", "Oh Darn") return SSmapping.map_templates[M.name] = M diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 8b01981ace..0dfee4c38c 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -110,7 +110,7 @@ GLOBAL_LIST_EMPTY(dirty_vars) set name = "Camera Report" if(!Master) - tgui_alert(usr, "Master_controller not found.","Sec Camera Report") + alert(usr,"Master_controller not found.","Sec Camera Report") return 0 var/list/obj/machinery/camera/CL = list() @@ -219,7 +219,7 @@ GLOBAL_LIST_EMPTY(dirty_vars) /client/proc/count_objects_on_z_level() set category = "Mapping" set name = "Count Objects On Level" - var/level = tgui_input_text(src, "Which z-level?","Level?") + var/level = input("Which z-level?","Level?") as text if(!level) return var/num_level = text2num(level) @@ -228,7 +228,7 @@ GLOBAL_LIST_EMPTY(dirty_vars) if(!isnum(num_level)) return - var/type_text = tgui_input_text(src, "Which type path?","Path?") + var/type_text = input("Which type path?","Path?") as text if(!type_text) return var/type_path = text2path(type_text) @@ -259,7 +259,7 @@ GLOBAL_LIST_EMPTY(dirty_vars) set category = "Mapping" set name = "Count Objects All" - var/type_text = tgui_input_text(src, "Which type path?","") + var/type_text = input("Which type path?","") as text if(!type_text) return var/type_path = text2path(type_text) diff --git a/code/modules/admin/verbs/maprotation.dm b/code/modules/admin/verbs/maprotation.dm index 08b4dfff5b..af8bd6e9fb 100644 --- a/code/modules/admin/verbs/maprotation.dm +++ b/code/modules/admin/verbs/maprotation.dm @@ -1,7 +1,7 @@ /client/proc/forcerandomrotate() set category = "Server" set name = "Trigger Random Map Rotation" - var/rotate = tgui_alert(usr, "Force a random map rotation to trigger?", "Rotate map?", list("Yes", "Cancel")) + var/rotate = alert("Force a random map rotation to trigger?", "Rotate map?", "Yes", "Cancel") if (rotate != "Yes") return message_admins("[key_name_admin(usr)] is forcing a random map rotation.") @@ -33,7 +33,7 @@ mapname += "\]" maprotatechoices[mapname] = VM - var/chosenmap = tgui_input_list(src, "Choose a map to change to", "Change Map", maprotatechoices) + var/chosenmap = input("Choose a map to change to", "Change Map") as null|anything in maprotatechoices if (!chosenmap) return SSticker.maprotatechecked = 1 diff --git a/code/modules/admin/verbs/onlyone.dm b/code/modules/admin/verbs/onlyone.dm index a2b8ce3418..3860706538 100644 --- a/code/modules/admin/verbs/onlyone.dm +++ b/code/modules/admin/verbs/onlyone.dm @@ -1,7 +1,7 @@ GLOBAL_VAR_INIT(highlander, FALSE) /client/proc/only_one() //Gives everyone kilts, berets, claymores, and pinpointers, with the objective to hijack the emergency shuttle. if(!SSticker.HasRoundStarted()) - tgui_alert(usr, "The game hasn't started yet!") + alert("The game hasn't started yet!") return GLOB.highlander = TRUE diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 87eb782aee..c9a5cafd9b 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -5,7 +5,7 @@ return var/freq = 1 - var/vol = tgui_input_num(usr, "What volume would you like the sound to play at?",, 100) + var/vol = input(usr, "What volume would you like the sound to play at?",, 100) as null|num if(!vol) return vol = clamp(vol, 1, 100) @@ -20,7 +20,7 @@ admin_sound.status = SOUND_STREAM admin_sound.volume = vol - var/res = tgui_alert(usr, "Show the title of this song to the players?",, list("Yes","No", "Cancel")) + var/res = alert(usr, "Show the title of this song to the players?",, "Yes","No", "Cancel") switch(res) if("Yes") to_chat(world, "An admin played: [S]", confidential = TRUE) @@ -61,7 +61,7 @@ to_chat(src, "Youtube-dl was not configured, action unavailable") //Check config.txt for the INVOKE_YOUTUBEDL value return - var/web_sound_input = tgui_input_text(src, "Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound via youtube-dl") + var/web_sound_input = input("Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound via youtube-dl") as text|null if(istext(web_sound_input)) var/web_sound_url = "" var/stop_web_sounds = FALSE @@ -98,7 +98,7 @@ music_extra_data["link"] = data["webpage_url"] music_extra_data["title"] = data["title"] - var/res = tgui_alert(usr, "Show the title of and link to this song to the players?\n[title]",, list("No", "Yes", "Cancel")) + var/res = alert(usr, "Show the title of and link to this song to the players?\n[title]",, "No", "Yes", "Cancel") switch(res) if("Yes") to_chat(world, "An admin played: [webpage_url]") @@ -139,7 +139,7 @@ if(!check_rights(R_SOUNDS)) return - var/web_sound_input = tgui_input_text(src, "Enter content stream URL (must be a direct link)", "Play Internet Sound via direct URL") + var/web_sound_input = input("Enter content stream URL (must be a direct link)", "Play Internet Sound via direct URL") as text|null if(istext(web_sound_input)) if(!length(web_sound_input)) log_admin("[key_name(src)] stopped web sound") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 02d2591d85..72ec804d28 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -4,7 +4,7 @@ if(!check_rights(R_ADMIN)) return - var/confirm = tgui_alert(src, "Make [M] drop everything?", "Message", list("Yes", "No")) + var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No") if(confirm != "Yes") return @@ -29,7 +29,7 @@ return message_admins("[key_name_admin(src)] has started answering [ADMIN_LOOKUPFLW(M)]'s prayer.") - var/msg = tgui_input_text(src, "Message:", text("Subtle PM to [M.key]")) + var/msg = input("Message:", text("Subtle PM to [M.key]")) as text|null if (!msg) message_admins("[key_name_admin(src)] decided not to answer [ADMIN_LOOKUPFLW(M)]'s prayer") @@ -65,12 +65,12 @@ return if (!sender) - sender = tgui_input_list(src, "Who is the message from?", "Sender", list(RADIO_CHANNEL_CENTCOM,RADIO_CHANNEL_SYNDICATE)) + sender = input("Who is the message from?", "Sender") as null|anything in list(RADIO_CHANNEL_CENTCOM,RADIO_CHANNEL_SYNDICATE) if(!sender) return message_admins("[key_name_admin(src)] has started answering [key_name_admin(H)]'s [sender] request.") - var/input = tgui_input_text(src, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from [sender]", "") + var/input = input("Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from [sender]", "") as text|null if(!input) message_admins("[key_name_admin(src)] decided not to answer [key_name_admin(H)]'s [sender] request.") return @@ -100,7 +100,7 @@ if(operation == "set") prompt = "Please enter the new reputation value:" - msg = tgui_input_num(src, "Message:", prompt) + msg = input("Message:", prompt) as num|null if (!msg) return @@ -134,7 +134,7 @@ if(!check_rights(R_ADMIN)) return - var/msg = tgui_input_text(src, "Message:", text("Enter the text you wish to appear to everyone:")) + var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text|null if (!msg) return @@ -151,12 +151,12 @@ return if(!M) - M = tgui_input_list(src, "Direct narrate to whom?", "Active Players", GLOB.player_list) + M = input("Direct narrate to whom?", "Active Players") as null|anything in GLOB.player_list if(!M) return - var/msg = tgui_input_text(src, "Message:", text("Enter the text you wish to appear to your target:")) + var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text|null if( !msg ) return @@ -176,10 +176,10 @@ return if(!A) return - var/range = tgui_input_num(src, "Range:", "Narrate to mobs within how many tiles:", 7) + var/range = input("Range:", "Narrate to mobs within how many tiles:", 7) as num|null if(!range) return - var/msg = tgui_input_text(src, "Message:", text("Enter the text you wish to appear to everyone within view:")) + var/msg = input("Message:", text("Enter the text you wish to appear to everyone within view:")) as text|null if (!msg) return for(var/mob/M in view(range,A)) @@ -296,13 +296,13 @@ continue //we have a live body we are tied to candidates += M.ckey if(candidates.len) - ckey = tgui_input_list(usr, "Pick the player you want to respawn as a xeno.", "Suitable Candidates", candidates) + ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates else to_chat(usr, "Error: create_xeno(): no suitable candidates.") if(!istext(ckey)) return 0 - var/alien_caste = tgui_input_list(usr, "Please choose which caste to spawn.","Pick a caste", list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")) + var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva") var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null var/mob/living/carbon/alien/new_xeno switch(alien_caste) @@ -341,7 +341,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/input = ckey(tgui_input_text(src, "Please specify which key will be respawned.", "Key", "")) + var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", "")) if(!input) return @@ -358,7 +358,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something //Check if they were an alien if(G_found.mind.assigned_role == ROLE_ALIEN) - if(tgui_alert(usr, "This character appears to have been an alien. Would you like to respawn them as such?",,list("Yes","No"))=="Yes") + if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes") var/turf/T if(GLOB.xeno_spawn.len) T = pick(GLOB.xeno_spawn) @@ -393,7 +393,7 @@ Traitors and the like can also be revived with the previous role mostly intact. //check if they were a monkey else if(findtext(G_found.real_name,"monkey")) - if(tgui_alert(usr, "This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No"))=="Yes") + if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes") var/mob/living/carbon/monkey/new_monkey = new SSjob.SendToLateJoin(new_monkey) G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use @@ -487,10 +487,10 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!issilicon(new_character))//If they are not a cyborg/AI. if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway. //Power to the user! - if(tgui_alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,list("No","Yes"))=="Yes") + if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes") GLOB.data_core.manifest_inject(new_character) - if(tgui_alert(new_character,"Would you like an active AI to announce this character?",,list("No","Yes"))=="Yes") + if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes") AnnounceArrival(new_character, new_character.mind.assigned_role) var/msg = "[admin] has respawned [player_key] as [new_character.real_name]." @@ -509,14 +509,14 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/input = tgui_input_text(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") + var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null if(!input) return log_admin("Admin [key_name(usr)] has added a new AI law - [input]") message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]") - var/show_log = tgui_alert(src, "Show ion message?", "Message", list("Yes", "No")) + var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No") var/announce_ion_laws = (show_log == "Yes" ? 1 : -1) var/datum/round_event/ion_storm/add_law_only/ion = new() @@ -535,7 +535,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!mob) return if(!istype(M)) - tgui_alert(src, "Cannot revive a ghost") + alert("Cannot revive a ghost") return M.revive(full_heal = 1, admin_revive = 1) @@ -552,11 +552,11 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/input = tgui_input_message(usr, "Enter a Command Report. Ensure it makes sense IC.", "What?", "") + var/input = input(usr, "Enter a Command Report. Ensure it makes sense IC.", "What?", "") as message|null if(!input) return - var/confirm = tgui_alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", list("Yes", "No", "Cancel")) + var/confirm = alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", "Yes", "No", "Cancel") var/announce_command_report = TRUE switch(confirm) if("Yes") @@ -578,13 +578,13 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/input = tgui_input_message(src, "Enter a priority announcement. Ensure it makes sense IC.", "What?", "") + var/input = input(usr, "Enter a priority announcement. Ensure it makes sense IC.", "What?", "") as message|null if(!input) return - var/title = tgui_input_text(src, "What should the title be?", "What?","") + var/title = input(src, "What should the title be?", "What?","") as text|null - var/special_name = tgui_input_text(src, "Who is making the announcement?", "Who?", "") + var/special_name = input(src, "Who is making the announcement?", "Who?", "") as text|null priority_announce(input, title, sender_override = special_name) log_admin("[key_name(src)] has sent a priority announcement: [input]") @@ -598,7 +598,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/input = tgui_input_text(usr, "Please input a new name for Central Command.", "What?", "") + var/input = input(usr, "Please input a new name for Central Command.", "What?", "") as text|null if(!input) return change_command_name(input) @@ -630,25 +630,25 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/devastation = tgui_input_num(src, "Range of total devastation. -1 to none", text("Input")) + var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null if(devastation == null) return - var/heavy = tgui_input_num(src, "Range of heavy impact. -1 to none", text("Input")) + var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null if(heavy == null) return - var/light = tgui_input_num(src, "Range of light impact. -1 to none", text("Input")) + var/light = input("Range of light impact. -1 to none", text("Input")) as num|null if(light == null) return - var/flash = tgui_input_num(src, "Range of flash. -1 to none", text("Input")) + var/flash = input("Range of flash. -1 to none", text("Input")) as num|null if(flash == null) return - var/flames = tgui_input_num(src, "Range of flames. -1 to none", text("Input")) + var/flames = input("Range of flames. -1 to none", text("Input")) as num|null if(flames == null) return if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1)) if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20)) - if (tgui_alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No") + if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No") return explosion(O, devastation, heavy, light, flash, null, null,flames) @@ -666,7 +666,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/range = tgui_input_num(src, "Range.", text("Input")) + var/range = input("Range.", text("Input")) as num|null if(!range) return log_admin("[key_name(usr)] created an EM Pulse - log below") //because we'll just log the empulse itself @@ -682,7 +682,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/confirm = tgui_alert(src, "Drop a brain?", "Confirm", list("Yes", "No","Cancel")) + var/confirm = alert(src, "Drop a brain?", "Confirm", "Yes", "No","Cancel") if(confirm == "Cancel") return //Due to the delay here its easy for something to have happened to the mob @@ -705,7 +705,7 @@ Traitors and the like can also be revived with the previous role mostly intact. set name = "Gibself" set category = "Admin.Fun" - var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) + var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") if(confirm == "Yes") log_admin("[key_name(usr)] used gibself.") message_admins("[key_name_admin(usr)] used gibself.") @@ -727,7 +727,7 @@ Traitors and the like can also be revived with the previous role mostly intact. set desc = "switches between 1x and custom views" if(view_size.getView() == view_size.default) - view_size.setTo(tgui_input_list(src, "Select view range:", "FUCK YE", list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128) - 7)) + view_size.setTo(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128) - 7) else view_size.resetToDefault(getScreenSize(prefs.widescreenpref)) @@ -746,7 +746,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) + var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") if(confirm != "Yes") return @@ -761,7 +761,7 @@ Traitors and the like can also be revived with the previous role mostly intact. set name = "Cancel Shuttle" if(!check_rights(0)) return - if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes") + if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return if(EMERGENCY_AT_LEAST_DOCKED) @@ -783,7 +783,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(SSshuttle.emergency.mode == SHUTTLE_DISABLED) to_chat(usr, "Error, shuttle is already disabled.") return - if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes") + if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return message_admins("[key_name_admin(usr)] disabled the shuttle.") SSshuttle.lastMode = SSshuttle.emergency.mode @@ -803,7 +803,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(SSshuttle.emergency.mode != SHUTTLE_DISABLED) to_chat(usr, "Error, shuttle not disabled.") return - if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes") + if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return message_admins("[key_name_admin(usr)] enabled the emergency shuttle.") SSshuttle.adminEmergencyNoRecall = FALSE @@ -833,7 +833,7 @@ Traitors and the like can also be revived with the previous role mostly intact. return - var/notifyplayers = tgui_alert(src, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel")) + var/notifyplayers = alert(src, "Do you want to notify the players?", "Options", "Yes", "No", "Cancel") if(notifyplayers == "Cancel") return @@ -872,7 +872,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/level = tgui_input_list(src, "Select security level to change to","Set Security Level", list("green","blue","amber","red","delta")) + var/level = input("Select security level to change to","Set Security Level") as null|anything in list("green","blue","amber","red","delta") if(level) set_security_level(level) @@ -888,7 +888,7 @@ Traitors and the like can also be revived with the previous role mostly intact. return if(!N.timing) - var/newtime = tgui_input_num(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") + var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") as num|null if(!newtime) return N.timer_set = newtime @@ -1117,11 +1117,11 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!holder) return - var/weather_type = tgui_input_list(src, "Choose a weather", "Weather", subtypesof(/datum/weather)) + var/weather_type = input("Choose a weather", "Weather") as null|anything in subtypesof(/datum/weather) if(!weather_type) return - var/z_level = tgui_input_num(src, "Z-Level to target? Leave blank to target current Z-Level.", "Z-Level") + var/z_level = input("Z-Level to target? Leave blank to target current Z-Level.", "Z-Level") as num|null if(!isnum(z_level)) if(!src.mob) return @@ -1142,7 +1142,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/confirm = tgui_alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", list("Yes", "No")) + var/confirm = alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", "Yes", "No") if(confirm != "Yes") return @@ -1160,7 +1160,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/confirm = tgui_alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", list("Yes", "No")) + var/confirm = alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", "Yes", "No") if(confirm != "Yes") return @@ -1179,7 +1179,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/confirm = tgui_alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", list("Yes", "No")) + var/confirm = alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", "Yes", "No") if(confirm != "Yes") return @@ -1213,7 +1213,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - var/input = tgui_input_message(usr, "Please specify your tip that you want to send to the players.", "Tip", "") + var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null if(!input) return @@ -1338,7 +1338,7 @@ Traitors and the like can also be revived with the previous role mostly intact. ADMIN_PUNISHMENT_SCARIFY, ADMIN_PUNISHMENT_CLUWNE) - var/punishment = tgui_input_list(usr, "Choose a punishment", "DIVINE SMITING", punishment_list) + var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list if(QDELETED(target) || !punishment) return @@ -1365,7 +1365,7 @@ Traitors and the like can also be revived with the previous role mostly intact. var/turf/endT = spaceDebrisFinishLoc(startside, T.z) new /obj/effect/immovablerod(startT, endT,target) if(ADMIN_PUNISHMENT_SUPPLYPOD_QUICK) - var/target_path = tgui_input_text(usr,"Enter typepath of an atom you'd like to send with the pod (type \"empty\" to send an empty pod):" ,"Typepath","/obj/item/reagent_containers/food/snacks/grown/harebell") + var/target_path = input(usr,"Enter typepath of an atom you'd like to send with the pod (type \"empty\" to send an empty pod):" ,"Typepath","/obj/item/reagent_containers/food/snacks/grown/harebell") as null|text var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas var/obj/structure/closet/supplypod/centcompod/pod = new(pick(get_area_turfs(pod_storage_area))) //Lets not runtime pod.damage = 40 @@ -1378,7 +1378,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!ispath(delivery)) delivery = pick_closest_path(target_path) if(!delivery) - tgui_alert(src, "ERROR: Incorrect / improper path given.") + alert("ERROR: Incorrect / improper path given.") new delivery(pod) new /obj/effect/pod_landingzone(get_turf(target), pod) if(ADMIN_PUNISHMENT_SUPPLYPOD) @@ -1404,13 +1404,13 @@ Traitors and the like can also be revived with the previous role mostly intact. if(ADMIN_PUNISHMENT_CUSTOM_PIE) var/obj/item/reagent_containers/food/snacks/pie/cream/nostun/A = new() if(!A.reagents) - var/amount = tgui_input_num(usr, "Specify the reagent size of [A]", "Set Reagent Size", 50) + var/amount = input(usr, "Specify the reagent size of [A]", "Set Reagent Size", 50) as num|null if(amount) A.create_reagents(amount) if(A.reagents) var/chosen_id = choose_reagent_id(usr) if(chosen_id) - var/amount = tgui_input_num(usr, "Choose the amount to add.", "Choose the amount.", A.reagents.maximum_volume) + var/amount = input(usr, "Choose the amount to add.", "Choose the amount.", A.reagents.maximum_volume) as num|null if(amount) A.reagents.add_reagent(chosen_id, amount) A.splat(target) @@ -1449,7 +1449,7 @@ Traitors and the like can also be revived with the previous role mostly intact. return var/list/how_fucked_is_this_dude = list("A little", "A lot", "So fucking much", "FUCK THIS DUDE") - var/hatred = tgui_input_list(usr, "How much do you hate this guy?", "", how_fucked_is_this_dude) + var/hatred = input("How much do you hate this guy?") in how_fucked_is_this_dude var/repetitions var/shots_per_limb_per_rep = 2 var/damage @@ -1545,7 +1545,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return var/message = pick(GLOB.admiral_messages) - message = tgui_input_text(src, "Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message) + message = input("Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message) as text|null if(!message) return @@ -1659,7 +1659,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!D) return - var/add_or_remove = tgui_input_list(usr, "Remove/Add?", "Trait Remove/Add", list("Add","Remove")) + var/add_or_remove = input("Remove/Add?", "Trait Remove/Add") as null|anything in list("Add","Remove") if(!add_or_remove) return var/list/availible_traits = list() @@ -1676,7 +1676,7 @@ Traitors and the like can also be revived with the previous role mostly intact. var/name = GLOB.trait_name_map[trait] || trait availible_traits[name] = trait - var/chosen_trait = tgui_input_list(src, "Select trait to modify", "Trait", sortList(availible_traits)) + var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in sortList(availible_traits) if(!chosen_trait) return chosen_trait = availible_traits[chosen_trait] @@ -1686,14 +1686,14 @@ Traitors and the like can also be revived with the previous role mostly intact. if("Add") //Not doing source choosing here intentionally to make this bit faster to use, you can always vv it. ADD_TRAIT(D,chosen_trait,source) if("Remove") - var/specific = tgui_input_list(src, "All or specific source ?", "Trait Remove/Add", list("All","Specific")) + var/specific = input("All or specific source ?", "Trait Remove/Add") as null|anything in list("All","Specific") if(!specific) return switch(specific) if("All") source = null if("Specific") - source = tgui_input_list(src, "Source to be removed","Trait Remove/Add", sortList(D.status_traits[chosen_trait])) + source = input("Source to be removed","Trait Remove/Add") as null|anything in sortList(D.status_traits[chosen_trait]) if(!source) return REMOVE_TRAIT(D,chosen_trait,source) @@ -1708,7 +1708,7 @@ Traitors and the like can also be revived with the previous role mostly intact. return var/turf/T = get_turf(usr) - target = tgui_input_list(src, "Any specific target in mind? Please note only live, non cluwned, human targets are valid.", "Target", GLOB.player_list) + target = input("Any specific target in mind? Please note only live, non cluwned, human targets are valid.", "Target", target) as null|anything in GLOB.player_list if(target && ishuman(target)) var/mob/living/carbon/human/H = target var/mob/living/simple_animal/hostile/floor_cluwne/FC = new /mob/living/simple_animal/hostile/floor_cluwne(T) diff --git a/code/modules/admin/verbs/reestablish_db_connection.dm b/code/modules/admin/verbs/reestablish_db_connection.dm index 503379c551..2090902ebc 100644 --- a/code/modules/admin/verbs/reestablish_db_connection.dm +++ b/code/modules/admin/verbs/reestablish_db_connection.dm @@ -7,10 +7,10 @@ if (SSdbcore.IsConnected()) if (!check_rights(R_DEBUG,0)) - tgui_alert(src, "The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!") + alert("The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!") return - var/reconnect = tgui_alert(src, "The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", list("Force Reconnect", "Cancel")) + var/reconnect = alert("The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", "Force Reconnect", "Cancel") if (reconnect != "Force Reconnect") return diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index de5d641bde..80344d076c 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -104,7 +104,7 @@ message_admins("[key_name_admin(holder)] has removed the cap on security officers.") //Buttons for helpful stuff. This is where people land in the tgui if("clear_virus") - var/choice = tgui_input_list(holder, "Are you sure you want to cure all disease?", "", list("Yes", "Cancel")) + var/choice = input("Are you sure you want to cure all disease?") in list("Yes", "Cancel") if(choice == "Yes") message_admins("[key_name_admin(holder)] has cured all diseases.") for(var/thing in SSdisease.active_diseases) @@ -130,11 +130,11 @@ holder.holder.output_ai_laws()//huh, inconvenient var naming, huh? if("showgm") if(!SSticker.HasRoundStarted()) - tgui_alert(holder, "The game hasn't started yet!") + alert("The game hasn't started yet!") else if (SSticker.mode) - tgui_alert(holder, "The game mode is [SSticker.mode.name]") + alert("The game mode is [SSticker.mode.name]") else - tgui_alert(holder, "For some reason there's a SSticker, but not a game mode") + alert("For some reason there's a SSticker, but not a game mode") if("manifest") var/dat = "Showing Crew Manifest.
    " dat += "
    " @@ -163,7 +163,7 @@ if("ctfbutton") toggle_all_ctf(holder) if("tdomereset") - var/delete_mobs = tgui_alert(holder, "Clear all mobs?","Confirm",list("Yes","No","Cancel")) + var/delete_mobs = alert("Clear all mobs?","Confirm","Yes","No","Cancel") if(delete_mobs == "Cancel") return @@ -181,7 +181,7 @@ var/area/template = GLOB.areas_by_type[/area/tdome/arena_source] template.copy_contents_to(thunderdome) if("set_name") - var/new_name = tgui_input_text(holder, "Please input a new name for the station.", "What?", "") + var/new_name = input(holder, "Please input a new name for the station.", "What?", "") as text|null if(!new_name) return set_station_name(new_name) @@ -195,7 +195,7 @@ message_admins("[key_name_admin(holder)] reset the station name.") priority_announce("[command_name()] has renamed the station to \"[new_name]\".") if("night_shift_set") - var/val = tgui_alert(holder, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", list("On", "Off", "Automatic")) + var/val = alert(holder, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", "On", "Off", "Automatic") switch(val) if("Automatic") if(CONFIG_GET(flag/enable_night_shifts)) @@ -239,14 +239,14 @@ if(!is_funmin) return SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Virus Outbreak")) - switch(tgui_alert(holder, "Do you want this to be a random disease or do you have something in mind?",,list("Make Your Own","Random","Choose"))) + switch(alert("Do you want this to be a random disease or do you have something in mind?",,"Make Your Own","Random","Choose")) if("Make Your Own") AdminCreateVirus(holder) if("Random") var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control E = DC.runEvent() if("Choose") - var/virus = tgui_input_list(holder, "Choose the virus to spread", "BIOHAZARD", sortList(typesof(/datum/disease), /proc/cmp_typepaths_asc)) + var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sortList(typesof(/datum/disease), /proc/cmp_typepaths_asc) var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control var/datum/round_event/disease_outbreak/DO = DC.runEvent() DO.virus_type = virus @@ -254,7 +254,7 @@ if("allspecies") if(!is_funmin) return - var/result = tgui_input_list(holder, "Please choose a new species","Species", GLOB.species_list) + var/result = input(holder, "Please choose a new species","Species") as null|anything in GLOB.species_list if(result) SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Mass Species Change", "[result]")) log_admin("[key_name(holder)] turned all humans into [result]", 1) @@ -297,7 +297,7 @@ if("onlyone") if(!is_funmin) return - var/response = tgui_alert(holder, "Delay by 40 seconds?", "There can, in fact, only be one", list("Instant!", "40 seconds (crush the hope of a normal shift)")) + var/response = alert("Delay by 40 seconds?", "There can, in fact, only be one", "Instant!", "40 seconds (crush the hope of a normal shift)") if(response == "Instant!") holder.only_one() else @@ -308,7 +308,7 @@ return SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Guns")) var/survivor_probability = 0 - switch(tgui_alert(holder, "Do you want this to create survivors antagonists?",,list("No Antags","Some Antags","All Antags!"))) + switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!")) if("Some Antags") survivor_probability = 25 if("All Antags!") @@ -320,7 +320,7 @@ return SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Magic")) var/survivor_probability = 0 - switch(tgui_alert(holder, "Do you want this to create magician antagonists?",,list("No Antags","Some Antags","All Antags!"))) + switch(alert("Do you want this to create magician antagonists?",,"No Antags","Some Antags","All Antags!")) if("Some Antags") survivor_probability = 25 if("All Antags!") @@ -331,12 +331,12 @@ if(!is_funmin) return if(!SSevents.wizardmode) - if(tgui_alert(holder, "Do you want to toggle summon events on?",,list("Yes","No")) == "Yes") + if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes") summonevents() SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Activate")) else - switch(tgui_alert(holder, "What would you like to do?","Intensify Summon Events",list("Turn Off Summon Events","Nothing"))) + switch(alert("What would you like to do?",,"Intensify Summon Events","Turn Off Summon Events","Nothing")) if("Intensify Summon Events") summonevents() SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Intensify")) @@ -452,7 +452,7 @@ return SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Bomb Cap")) - var/newBombCap = tgui_input_num(holder,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE) + var/newBombCap = input(holder,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE) as num|null if (!CONFIG_SET(number/bombcap, newBombCap)) return @@ -471,7 +471,7 @@ if(!is_funmin) return if(!SSticker.HasRoundStarted()) - tgui_alert(holder, "The game hasn't started yet!") + alert("The game hasn't started yet!") return var/objective = stripped_input(holder, "Enter an objective") if(!objective) @@ -497,7 +497,7 @@ if(!is_funmin) return if(!SSticker.HasRoundStarted()) - tgui_alert(holder, "The game hasn't started yet!") + alert("The game hasn't started yet!") return message_admins("[key_name_admin(holder)] activated AK-47s for Everyone!") holder.ak47s() @@ -516,11 +516,11 @@ if("anime") if(!is_funmin) return - var/animetype = tgui_alert(holder, "Would you like to have the clothes be changed?",,list("Yes","No","Cancel")) + var/animetype = alert("Would you like to have the clothes be changed?",,"Yes","No","Cancel") var/droptype if(animetype =="Yes") - droptype = tgui_alert(holder, "Make the uniforms Nodrop?",,list("Yes","No","Cancel")) + droptype = alert("Make the uniforms Nodrop?",,"Yes","No","Cancel") if(animetype == "Cancel" || droptype == "Cancel") return @@ -584,7 +584,7 @@ if(E) E.processing = FALSE if(E.announceWhen>0) - switch(tgui_alert(holder, "Would you like to alert the crew?", "Alert", list("Yes", "No", "Cancel"))) + switch(alert(holder, "Would you like to alert the crew?", "Alert", "Yes", "No", "Cancel")) if("Cancel") E.kill() return diff --git a/code/modules/admin/verbs/selectequipment.dm b/code/modules/admin/verbs/selectequipment.dm index 12b2c42d9f..eb75df9ac1 100644 --- a/code/modules/admin/verbs/selectequipment.dm +++ b/code/modules/admin/verbs/selectequipment.dm @@ -37,7 +37,7 @@ user = CLIENT_FROM_VAR(_user) if(!ishuman(target) && !isobserver(target)) - tgui_alert(usr, "Invalid mob") + alert("Invalid mob") return target_mob = target @@ -197,7 +197,7 @@ /client/proc/admin_apply_outfit(mob/target, dresscode) if(!ishuman(target) && !isobserver(target)) - tgui_alert(usr, "Invalid mob") + alert("Invalid mob") return if(!dresscode) @@ -210,7 +210,7 @@ else human_target = target if(human_target.l_store || human_target.r_store || human_target.s_store) //saves a lot of time for admins and coders alike - if(tgui_alert(src, "Drop Items in Pockets? No will delete them.", "Robust quick dress shop", list("Yes", "No")) == "No") + if(alert("Drop Items in Pockets? No will delete them.", "Robust quick dress shop", "Yes", "No") == "No") delete_pocket = TRUE SSblackbox.record_feedback("tally", "admin_verb", 1, "Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/shuttlepanel.dm b/code/modules/admin/verbs/shuttlepanel.dm index e69c9aa050..7552936136 100644 --- a/code/modules/admin/verbs/shuttlepanel.dm +++ b/code/modules/admin/verbs/shuttlepanel.dm @@ -24,7 +24,7 @@ options += "Delete Shuttle" options += "Into The Sunset (delete & greentext 'escape')" - var/selection = tgui_input_list(user, "Select where to fly [name || id]:", "Fly Shuttle", options) + var/selection = input(user, "Select where to fly [name || id]:", "Fly Shuttle") as null|anything in options if(!selection) return @@ -35,12 +35,12 @@ setTimer(ignitionTime) if("Delete Shuttle") - if(tgui_alert(user, "Really delete [name || id]?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!") + if(alert(user, "Really delete [name || id]?", "Delete Shuttle", "Cancel", "Really!") != "Really!") return jumpToNullSpace() if("Into The Sunset (delete & greentext 'escape')") - if(tgui_alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!") + if(alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", "Cancel", "Really!") != "Really!") return intoTheSunset() @@ -52,7 +52,7 @@ return // use the existing verbs for this /obj/docking_port/mobile/arrivals/admin_fly_shuttle(mob/user) - switch(tgui_alert(user, "Would you like to fly the arrivals shuttle once or change its destination?", "Fly Shuttle", list("Fly", "Retarget", "Cancel"))) + switch(alert(user, "Would you like to fly the arrivals shuttle once or change its destination?", "Fly Shuttle", "Fly", "Retarget", "Cancel")) if("Cancel") return if("Fly") @@ -67,7 +67,7 @@ if (canDock(S) == SHUTTLE_CAN_DOCK) options[S.name || S.id] = S - var/selection = tgui_input_list(user, "Select the new arrivals destination:", "Fly Shuttle", options) + var/selection = input(user, "Select the new arrivals destination:", "Fly Shuttle") as null|anything in options if(!selection) return target_dock = options[selection] diff --git a/code/modules/admin/view_variables/admin_delete.dm b/code/modules/admin/view_variables/admin_delete.dm index 592b2680be..947ad5db2c 100644 --- a/code/modules/admin/view_variables/admin_delete.dm +++ b/code/modules/admin/view_variables/admin_delete.dm @@ -10,7 +10,7 @@ else jmp_coords = coords = "in nullspace" - if (tgui_alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", list("Yes", "No")) == "Yes") + if (alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", "Yes", "No") == "Yes") log_admin("[key_name(usr)] deleted [D] [coords]") message_admins("[key_name_admin(usr)] deleted [D] [jmp_coords]") SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/view_variables/get_variables.dm b/code/modules/admin/view_variables/get_variables.dm index ee53a06ce1..3f90002edc 100644 --- a/code/modules/admin/view_variables/get_variables.dm +++ b/code/modules/admin/view_variables/get_variables.dm @@ -83,25 +83,25 @@ if(extra_classes) classes += extra_classes - .["class"] = tgui_input_list(src, "What kind of data?", "Variable Type", classes) + .["class"] = input(src, "What kind of data?", "Variable Type", default_class) as null|anything in classes if(holder && holder.marked_datum && .["class"] == markstring) .["class"] = VV_MARKED_DATUM switch(.["class"]) if(VV_TEXT) - .["value"] = tgui_input_text(src, "Enter new text:", "Text", current_value) + .["value"] = input("Enter new text:", "Text", current_value) as null|text if(.["value"] == null) .["class"] = null return if(VV_MESSAGE) - .["value"] = tgui_input_message(src, "Enter new text:", "Text", current_value) + .["value"] = input("Enter new text:", "Text", current_value) as null|message if(.["value"] == null) .["class"] = null return if(VV_NUM) - .["value"] = tgui_input_num(src, "Enter new number:", "Num", current_value) + .["value"] = input("Enter new number:", "Num", current_value) as null|num if(.["value"] == null) .["class"] = null return @@ -128,7 +128,7 @@ var/type = current_value var/error = "" do - type = tgui_input_text(src, "Enter type:[error]", "Type", type) + type = input("Enter type:[error]", "Type", type) as null|text if(!type) break type = text2path(type) @@ -146,7 +146,7 @@ .["class"] = null return var/list/things = vv_reference_list(type, subtypes) - var/value = tgui_input_list(src, "Select reference:", "Reference", things) + var/value = input("Select reference:", "Reference", current_value) as null|anything in things if(!value) .["class"] = null return @@ -159,7 +159,7 @@ .["class"] = null return var/list/things = vv_reference_list(type, subtypes) - var/value = tgui_input_list(src, "Select reference:", "Reference", things) + var/value = input("Select reference:", "Reference", current_value) as null|anything in things if(!value) .["class"] = null return @@ -172,14 +172,14 @@ .["class"] = null return var/list/things = vv_reference_list(type, subtypes) - var/value = tgui_input_list(src, "Select reference:", "Reference", things) + var/value = input("Select reference:", "Reference", current_value) as null|anything in things if(!value) .["class"] = null return .["value"] = things[value] if(VV_CLIENT) - .["value"] = tgui_input_list(src, "Select reference:", "Reference", GLOB.clients) + .["value"] = input("Select reference:", "Reference", current_value) as null|anything in GLOB.clients if(.["value"] == null) .["class"] = null return @@ -234,7 +234,7 @@ var/type = current_value var/error = "" do - type = tgui_input_text(src, "Enter type:[error]", "Type", type) + type = input("Enter type:[error]", "Type", type) as null|text if(!type) break type = text2path(type) @@ -256,15 +256,15 @@ if(VV_TEXT_LOCATE) var/datum/D do - var/ref = tgui_input_text(src, "Enter reference:", "Reference") + var/ref = input("Enter reference:", "Reference") as null|text if(!ref) break D = locate(ref) if(!D) - tgui_alert(usr, "Invalid ref!") + alert("Invalid ref!") continue if(!D.can_vv_mark()) - tgui_alert(usr, "Datum can not be marked!") + alert("Datum can not be marked!") continue while(!D) .["type"] = D.type diff --git a/code/modules/admin/view_variables/mass_edit_variables.dm b/code/modules/admin/view_variables/mass_edit_variables.dm index b2171e5df1..5b120b6cef 100644 --- a/code/modules/admin/view_variables/mass_edit_variables.dm +++ b/code/modules/admin/view_variables/mass_edit_variables.dm @@ -31,7 +31,7 @@ names = sortList(names) - variable = tgui_input_list(src, "Which var?", "Var", names) + variable = input("Which var?", "Var") as null|anything in names else variable = var_name @@ -52,7 +52,7 @@ if(variable in GLOB.VVpixelmovement) if(!check_rights(R_DEBUG)) return - var/prompt = tgui_alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", list("ABORT ", "Continue", " ABORT")) + var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT") if (prompt != "Continue") return @@ -118,7 +118,7 @@ var/pre_processing = new_value var/unique if (varsvars?.len) - unique = tgui_alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", list("Unique", "Same")) + unique = alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", "Unique", "Same") if(unique == "Unique") unique = TRUE else @@ -145,7 +145,7 @@ CHECK_TICK 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")) + var/many = alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", "One", "Many", "Cancel") if (many == "Cancel") return if (many == "Many") diff --git a/code/modules/admin/view_variables/modify_variables.dm b/code/modules/admin/view_variables/modify_variables.dm index 3287c04cb8..b9de3e09bc 100644 --- a/code/modules/admin/view_variables/modify_variables.dm +++ b/code/modules/admin/view_variables/modify_variables.dm @@ -9,7 +9,7 @@ GLOBAL_PROTECT(VVpixelmovement) /client/proc/vv_parse_text(O, new_var) if(O && findtext(new_var,"\[")) - var/process_vars = tgui_alert(usr, "\[] detected in string, process as variables?","Process Variables?",list("Yes","No")) + var/process_vars = alert(usr,"\[] detected in string, process as variables?","Process Variables?","Yes","No") if(process_vars == "Yes") . = string2listofvars(new_var, O) @@ -24,7 +24,7 @@ GLOBAL_PROTECT(VVpixelmovement) if (!subtypes || !subtypes.len) return FALSE if (subtypes?.len) - switch(tgui_alert(src, "Strict object type detection?", "Type detection", list("Strictly this type","This type and subtypes", "Cancel"))) + switch(alert("Strict object type detection?", "Type detection", "Strictly this type","This type and subtypes", "Cancel")) if("Strictly this type") return FALSE if("This type and subtypes") @@ -97,7 +97,7 @@ GLOBAL_PROTECT(VVpixelmovement) L += var_value - switch(tgui_alert(src, "Would you like to associate a value with the list entry?",,list("Yes","No"))) + switch(alert("Would you like to associate a value with the list entry?",,"Yes","No")) if("Yes") L[var_value] = mod_list_add_ass(O) //hehe if (O) @@ -116,7 +116,7 @@ GLOBAL_PROTECT(VVpixelmovement) return if(L.len > 1000) - var/confirm = tgui_alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", list("Continue", "Abort")) + var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort") if(confirm != "Continue") return @@ -131,7 +131,7 @@ GLOBAL_PROTECT(VVpixelmovement) value = "null" names["#[i] [key] = [value]"] = i if (!index) - var/variable = tgui_input_list(src, "Which var?","Var",names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)") + var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)" if(variable == null) return @@ -178,7 +178,7 @@ GLOBAL_PROTECT(VVpixelmovement) if (index == null) return var/assoc = 0 - var/prompt = tgui_alert(src, "Do you want to edit the key or its assigned value?", "Associated List", list("Key", "Assigned Value", "Cancel")) + var/prompt = alert(src, "Do you want to edit the key or its assigned value?", "Associated List", "Key", "Assigned Value", "Cancel") if (prompt == "Cancel") return if (prompt == "Assigned Value") @@ -308,7 +308,7 @@ GLOBAL_PROTECT(VVpixelmovement) names = sortList(names) - variable = tgui_input_list(src, "Which var?","Var",names) + variable = input("Which var?","Var") as null|anything in names if(!variable) return diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index e4f289ec21..c32b7a9ad7 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -32,7 +32,7 @@ // If the new name is something that would be restricted by IC chat filters, // give the admin a warning but allow them to do it anyway if they want. - // if(CHAT_FILTER_CHECK(new_name) && tgui_alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", list("Confirm", "Cancel")) == "Cancel") + // if(CHAT_FILTER_CHECK(new_name) && alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", "Confirm", "Cancel") == "Cancel") // return if( !new_name || !M ) @@ -69,7 +69,7 @@ to_chat(usr, "This can only be done to instances of type /mob/living/carbon/monkey", confidential = TRUE) return - if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform") + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return if(!Mo) to_chat(usr, "Mob doesn't exist anymore", confidential = TRUE) @@ -86,7 +86,7 @@ var/Text = href_list["adjustDamage"] - var/amount = tgui_input_num(usr, "Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) + var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num|null if (isnull(amount)) return diff --git a/code/modules/admin/view_variables/topic_basic.dm b/code/modules/admin/view_variables/topic_basic.dm index f8c1b6174e..043c50173d 100644 --- a/code/modules/admin/view_variables/topic_basic.dm +++ b/code/modules/admin/view_variables/topic_basic.dm @@ -68,7 +68,7 @@ names += componentsubtypes names += "---Elements---" names += sortList(subtypesof(/datum/element), /proc/cmp_typepaths_asc) - var/result = tgui_input_list(usr, "Choose a component/element to add","better know what ur fuckin doin pal",names) + var/result = input(usr, "Choose a component/element to add","better know what ur fuckin doin pal") as null|anything in names if(!usr || !result || result == "---Components---" || result == "---Elements---") return if(QDELETED(src)) diff --git a/code/modules/admin/view_variables/topic_list.dm b/code/modules/admin/view_variables/topic_list.dm index 9351f58152..349d9da698 100644 --- a/code/modules/admin/view_variables/topic_list.dm +++ b/code/modules/admin/view_variables/topic_list.dm @@ -9,7 +9,7 @@ mod_list(target, null, "list", "contents", target_index, autodetect_class = FALSE) if(href_list[VV_HK_LIST_REMOVE]) var/variable = target[target_index] - var/prompt = tgui_alert(src, "Do you want to remove item number [target_index] from list?", "Confirm", list("Yes", "No")) + var/prompt = alert("Do you want to remove item number [target_index] from list?", "Confirm", "Yes", "No") if (prompt != "Yes") return target.Cut(target_index, target_index+1) diff --git a/code/modules/antagonists/abductor/abductor.dm b/code/modules/antagonists/abductor/abductor.dm index 4285e383c3..7eb7ec2af2 100644 --- a/code/modules/antagonists/abductor/abductor.dm +++ b/code/modules/antagonists/abductor/abductor.dm @@ -99,7 +99,7 @@ var/list/current_teams = list() for(var/datum/team/abductor_team/T in get_all_teams(/datum/team/abductor_team)) current_teams[T.name] = T - var/choice = tgui_input_list(admin,"Add to which team ?", "", current_teams + "new team") + var/choice = input(admin,"Add to which team ?") as null|anything in (current_teams + "new team") if (choice == "new team") team = new else if(choice in current_teams) @@ -119,7 +119,7 @@ to_chat(admin, "This only works on humans!") return var/mob/living/carbon/human/H = owner.current - var/gear = tgui_alert(admin, "Agent or Scientist Gear","Gear",list("Agent","Scientist")) + var/gear = alert(admin,"Agent or Scientist Gear","Gear","Agent","Scientist") if(gear) if(gear=="Agent") H.equipOutfit(/datum/outfit/abductor/agent) diff --git a/code/modules/antagonists/blob/blob/powers.dm b/code/modules/antagonists/blob/blob/powers.dm index f26a0e0002..9256d0d16b 100644 --- a/code/modules/antagonists/blob/blob/powers.dm +++ b/code/modules/antagonists/blob/blob/powers.dm @@ -72,7 +72,7 @@ for(var/i in 1 to GLOB.blob_nodes.len) var/obj/structure/blob/node/B = GLOB.blob_nodes[i] nodes["Blob Node #[i] ([get_area_name(B)])"] = B - var/node_name = tgui_input_list(src, "Choose a node to jump to.", "Node Jump", nodes) + var/node_name = input(src, "Choose a node to jump to.", "Node Jump") in nodes var/obj/structure/blob/node/chosen_node = nodes[node_name] if(chosen_node) forceMove(chosen_node.loc) @@ -352,7 +352,7 @@ var/datum/blobstrain/bs = pick((GLOB.valid_blobstrains)) choices[initial(bs.name)] = bs - var/choice = tgui_input_list(usr, "Please choose a new strain","Strain", choices) + var/choice = input(usr, "Please choose a new strain","Strain") as anything in choices if (choice && choices[choice] && !QDELETED(src)) var/datum/blobstrain/bs = choices[choice] set_strain(bs) diff --git a/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm b/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm index 27f33ce546..07c92bfd97 100644 --- a/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm +++ b/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm @@ -289,7 +289,7 @@ options["\[ Not Now \]"] = null // Abort? if(options.len > 1) - var/choice = tgui_input_list(owner.current, "You have the opportunity to grow more ancient at the cost of [level_bloodcost] units of blood. Select a power to advance your Rank.", "Your Blood Thickens...", options) + var/choice = input(owner.current, "You have the opportunity to grow more ancient at the cost of [level_bloodcost] units of blood. Select a power to advance your Rank.", "Your Blood Thickens...") in options // Cheat-Safety: Can't keep opening/closing coffin to spam levels if(bloodsucker_level_unspent <= 0) // Already spent all your points, and tried opening/closing your coffin, pal. return diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm index d93ae9ed2b..881da8f282 100644 --- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm +++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm @@ -143,7 +143,7 @@ A = get_area(src) // Claim? if(!bloodsuckerdatum.coffin && !resident && (is_station_level(Turf.z) || !A.map_name == "Space")) - switch(tgui_alert(user, "Do you wish to claim this as your coffin? [get_area(src)] will be your lair.","Claim Lair",list("Yes", "No"))) + switch(alert(user,"Do you wish to claim this as your coffin? [get_area(src)] will be your lair.","Claim Lair","Yes", "No")) if("Yes") ClaimCoffin(user) if (user.AmStaked()) // Stake? No Heal! diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm index c0c500e619..e8fb82a5d1 100644 --- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm @@ -232,7 +232,7 @@ if(B.lair != get_area(src)) to_chat(user, "You may only activate this structure in your lair: [B.lair].") return - switch(tgui_alert(user, "Do you wish to afix this structure here? Be aware you wont be able to unsecure it anymore", "Secure [src]", list("Yes", "No"))) + switch(alert(user,"Do you wish to afix this structure here? Be aware you wont be able to unsecure it anymore", "Secure [src]", "Yes", "No")) if("Yes") owner = user density = FALSE @@ -398,7 +398,7 @@ alert_text += "\n\nYou will no longer be loyal to the station!" if(SSticker.mode.AmValidAntag(target.mind)) */ alert_text += "\n\nYou will not lose your current objectives, but they come second to the will of your new master!" - switch(tgui_alert(target, alert_text,"THE HORRIBLE PAIN! WHEN WILL IT END?!",list("Yes, Master!", "NEVER!"))) + switch(alert(target, alert_text,"THE HORRIBLE PAIN! WHEN WILL IT END?!","Yes, Master!", "NEVER!")) if("Yes, Master!") disloyalty_accept(target) else diff --git a/code/modules/antagonists/brainwashing/brainwashing.dm b/code/modules/antagonists/brainwashing/brainwashing.dm index 0bcdd980bf..491ee9d2e5 100644 --- a/code/modules/antagonists/brainwashing/brainwashing.dm +++ b/code/modules/antagonists/brainwashing/brainwashing.dm @@ -54,9 +54,9 @@ var/objective = stripped_input(admin, "Add an objective, or leave empty to finish.", "Brainwashing", null, MAX_MESSAGE_LEN) if(objective) objectives += objective - while(tgui_alert(admin, "Add another objective?","More Brainwashing",list("Yes","No")) == "Yes") + while(alert(admin,"Add another objective?","More Brainwashing","Yes","No") == "Yes") - if(tgui_alert(admin, "Confirm Brainwashing?","Are you sure?",list("Yes","No")) == "No") + if(alert(admin,"Confirm Brainwashing?","Are you sure?","Yes","No") == "No") return if(!LAZYLEN(objectives)) diff --git a/code/modules/antagonists/brother/brother.dm b/code/modules/antagonists/brother/brother.dm index 8a5f23ae58..30e6a80e85 100644 --- a/code/modules/antagonists/brother/brother.dm +++ b/code/modules/antagonists/brother/brother.dm @@ -63,7 +63,7 @@ continue candidates[L.mind.name] = L.mind - var/choice = tgui_input_list(admin,"Choose the blood brother.", "Brother", candidates) + var/choice = input(admin,"Choose the blood brother.", "Brother") as null|anything in candidates if(!choice) return var/datum/mind/bro = candidates[choice] diff --git a/code/modules/antagonists/changeling/powers/fakedeath.dm b/code/modules/antagonists/changeling/powers/fakedeath.dm index 0bbbeefbd3..08dc85efbf 100644 --- a/code/modules/antagonists/changeling/powers/fakedeath.dm +++ b/code/modules/antagonists/changeling/powers/fakedeath.dm @@ -36,7 +36,7 @@ to_chat(user, "We are already reviving.") return if(!user.stat) //Confirmation for living changelings if they want to fake their death - switch(tgui_alert(user, "Are we sure we wish to fake our own death?",,list("Yes", "No"))) + switch(alert("Are we sure we wish to fake our own death?",,"Yes", "No")) if("No") return return ..() diff --git a/code/modules/antagonists/changeling/powers/headcrab.dm b/code/modules/antagonists/changeling/powers/headcrab.dm index c88790b800..867f160081 100644 --- a/code/modules/antagonists/changeling/powers/headcrab.dm +++ b/code/modules/antagonists/changeling/powers/headcrab.dm @@ -12,7 +12,7 @@ /obj/effect/proc_holder/changeling/headcrab/sting_action(mob/user) set waitfor = FALSE - if(tgui_alert(user, "Are we sure we wish to kill ourself and create a headslug?",,list("Yes", "No")) == "No") + if(alert("Are we sure we wish to kill ourself and create a headslug?",,"Yes", "No") == "No") return var/datum/mind/M = user.mind var/list/organs = user.getorganszone(BODY_ZONE_HEAD, 1) diff --git a/code/modules/antagonists/changeling/powers/hivemind.dm b/code/modules/antagonists/changeling/powers/hivemind.dm index a342ae7b32..f7718d7708 100644 --- a/code/modules/antagonists/changeling/powers/hivemind.dm +++ b/code/modules/antagonists/changeling/powers/hivemind.dm @@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank) to_chat(user, "The airwaves already have all of our DNA.") return - var/chosen_name = tgui_input_list(user, "Select a DNA to channel: ", "Channel DNA", names) + var/chosen_name = input("Select a DNA to channel: ", "Channel DNA", null) as null|anything in names if(!chosen_name) return @@ -107,7 +107,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank) to_chat(user, "There's no new DNA to absorb from the air.") return - var/S = tgui_input_list(user, "Select a DNA absorb from the air: ", "Absorb DNA", names) + var/S = input("Select a DNA absorb from the air: ", "Absorb DNA", null) as null|anything in names if(!S) return var/datum/changelingprofile/chosen_prof = names[S] diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index a4cbdaa08f..1e8c7242ad 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -459,13 +459,13 @@ for(var/datum/clockwork_rite/R in GLOB.all_clockwork_rites) if(is_servant_of_ratvar(user, require_full_power = TRUE) || !R.requires_full_power) possible_rites[R] = R - var/input_key = tgui_input_list(user, "Choose a rite", "Choosing a rite", possible_rites) + var/input_key = input(user, "Choose a rite", "Choosing a rite") as null|anything in possible_rites if(!input_key) return var/datum/clockwork_rite/CR = possible_rites[input_key] if(!CR) return - var/choice = tgui_alert(user, "What to do with this rite?", "What to do?", list("Cast", "Show Info", "Cancel")) + var/choice = alert(user, "What to do with this rite?", "What to do?", "Cast", "Show Info", "Cancel") switch(choice) if("Cast") CR.try_cast(src, user) diff --git a/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm b/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm index e4fe9e8c9d..ab8c7abd0a 100644 --- a/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm +++ b/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm @@ -187,7 +187,7 @@ if(!possible_targets.len) to_chat(invoker, "There are no other eligible targets for a Spatial Gateway!") return FALSE - var/input_target_key = tgui_input_list(invoker, "Choose a target to form a rift to.", "Spatial Gateway", possible_targets) + var/input_target_key = input(invoker, "Choose a target to form a rift to.", "Spatial Gateway") as null|anything in possible_targets var/atom/movable/target = possible_targets[input_target_key] if(!src || !input_target_key || !invoker || !invoker.canUseTopic(src, !issilicon(invoker)) || !is_servant_of_ratvar(invoker) || (isitem(src) && invoker.get_active_held_item() != src) || !invoker.can_speak_vocal()) return FALSE //if any of the involved things no longer exist, the invoker is stunned, too far away to use the object, or does not serve ratvar, or if the object is an item and not in the mob's active hand, fail diff --git a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm index 77b81ee536..8060b7b0cd 100644 --- a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm +++ b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm @@ -371,7 +371,7 @@ update_quickbind() else // todo: async this due to ((input)) but its fine for now - var/target_index = tgui_input_num(usr, "Position of [initial(path.name)], 1 to [maximum_quickbound]?", "Input") + var/target_index = input("Position of [initial(path.name)], 1 to [maximum_quickbound]?", "Input") as num|null if(isnum(target_index) && target_index > 0 && target_index <= maximum_quickbound && !..()) var/datum/clockwork_scripture/S if(LAZYLEN(quickbound) >= target_index) diff --git a/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm b/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm index eba7c4be72..daee9f5c2c 100644 --- a/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm +++ b/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm @@ -48,7 +48,7 @@ to_chat(user, "You were too late! Better luck next time.") return user.forceMove(get_turf(src)) //If we attack through the alert, jump to the chassis so we know what we're getting into - if(tgui_alert(user, "Become a [construct_name]? You can no longer be cloned!", construct_name, list("Yes", "Cancel")) == "Cancel") + if(alert(user, "Become a [construct_name]? You can no longer be cloned!", construct_name, "Yes", "Cancel") == "Cancel") return if(QDELETED(src)) to_chat(user, "You were too late! Better luck next time.") diff --git a/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm b/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm index faea34b53e..e7aeb7e796 100644 --- a/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm +++ b/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm @@ -131,7 +131,7 @@ if(!G.recalls_remaining) to_chat(src, "The Ark can no longer recall!") return - if(tgui_alert(src, "Initiate mass recall?", "Mass Recall", list("Yes", "No")) != "Yes" || QDELETED(src) || QDELETED(G) || !G.obj_integrity) + if(alert(src, "Initiate mass recall?", "Mass Recall", "Yes", "No") != "Yes" || QDELETED(src) || QDELETED(G) || !G.obj_integrity) return G.initiate_mass_recall() //wHOOPS LOOKS LIKE A HULK GOT THROUGH @@ -156,7 +156,7 @@ commands += "Power This Structure" if(P.obj_integrity < P.max_integrity) commands += "Repair This Structure" - var/roma_invicta = tgui_input_list(src, "Choose a command to issue to your cult!", "Issue Commands", commands) + var/roma_invicta = input(src, "Choose a command to issue to your cult!", "Issue Commands") as null|anything in commands if(!roma_invicta) return var/command_text = "" @@ -290,7 +290,7 @@ to_chat(owner, "There are no Obelisks to warp to!") return - var/target_key = tgui_input_list(owner, "Choose an Obelisk to warp to.", "Obelisk Warp", possible_targets) + var/target_key = input(owner, "Choose an Obelisk to warp to.", "Obelisk Warp") as null|anything in possible_targets var/obj/structure/destructible/clockwork/powered/clockwork_obelisk/target = possible_targets[target_key] if(!target_key || !owner) @@ -334,6 +334,6 @@ /datum/action/innate/eminence/mass_recall/Activate() var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar if(G && !G.recalling && G.recalls_remaining) - if(tgui_alert(owner, "Initiate mass recall?", "Mass Recall", list("Yes", "No")) != "Yes" || QDELETED(owner) || QDELETED(G) || !G.obj_integrity) + if(alert(owner, "Initiate mass recall?", "Mass Recall", "Yes", "No") != "Yes" || QDELETED(owner) || QDELETED(G) || !G.obj_integrity) return G.initiate_mass_recall() diff --git a/code/modules/antagonists/clockcult/clock_scripture.dm b/code/modules/antagonists/clockcult/clock_scripture.dm index 17d03c020f..6922c7cd81 100644 --- a/code/modules/antagonists/clockcult/clock_scripture.dm +++ b/code/modules/antagonists/clockcult/clock_scripture.dm @@ -276,7 +276,7 @@ Judgement 80k power or nine converts return var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar if(G && !G.active && combat_construct && is_reebe(invoker.z) && !confirmed) //Putting marauders on the base during the prep phase is a bad idea mmkay - if(tgui_alert(invoker, "This is a combat construct, and you cannot easily get it to the station. Are you sure you want to make one here?", "Construct Alert", list("Yes", "Cancel")) == "Cancel") + if(alert(invoker, "This is a combat construct, and you cannot easily get it to the station. Are you sure you want to make one here?", "Construct Alert", "Yes", "Cancel") == "Cancel") return if(!is_servant_of_ratvar(invoker) || !invoker.canUseTopic(slab)) return diff --git a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm index 9d0adfdba8..6204871a77 100644 --- a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm +++ b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm @@ -42,7 +42,7 @@ /obj/structure/destructible/clockwork/massive/celestial_gateway/on_attack_hand(mob/user, act_intent, unarmed_attack_flags) if(!active && is_servant_of_ratvar(user) && user.canUseTopic(src, !issilicon(user), NO_DEXTERY)) - if(tgui_alert(user, "Are you sure you want to activate the ark? Once enabled, there will be no turning back.", "Enabling the ark", list("Activate!", "Cancel")) == "Activate!") + if(alert(user, "Are you sure you want to activate the ark? Once enabled, there will be no turning back.", "Enabling the ark", "Activate!", "Cancel") == "Activate!") if(active) return log_game("[key_name(user)] has activated an Ark of the Clockwork Justicar at [COORD(src)].") @@ -356,9 +356,9 @@ if(GLOB.servants_active) to_chat(user, "The Ark is already counting down.") return ..() - if(tgui_alert(user, "Activate the Ark's countdown?", name, list("Yes", "No")) == "Yes") - if(tgui_alert(user, "REALLY activate the Ark's countdown?", name, list("Yes", "No")) == "Yes") - if(tgui_alert(user, "You're REALLY SURE? This cannot be undone.", name, list("Yes - Activate the Ark", "No")) == "Yes - Activate the Ark") + if(alert(user, "Activate the Ark's countdown?", name, "Yes", "No") == "Yes") + if(alert(user, "REALLY activate the Ark's countdown?", name, "Yes", "No") == "Yes") + if(alert(user, "You're REALLY SURE? This cannot be undone.", name, "Yes - Activate the Ark", "No") == "Yes - Activate the Ark") message_admins("Admin [key_name_admin(user)] started the Ark's countdown!") log_admin("Admin [key_name(user)] started the Ark's countdown on a non-clockcult mode!") to_chat(user, "The gamemode is now being treated as clockwork cult, and the Ark is counting down from 5 \ diff --git a/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm b/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm index cef6e70ec3..2b4b797b4d 100644 --- a/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm +++ b/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm @@ -53,7 +53,7 @@ if(!is_servant_of_ratvar(user) || !can_access_clockwork_power(src, hierophant_cost) || !anchored) to_chat(user, "You place your hand on [src], but it doesn't react.") return - var/choice = tgui_alert(user, "You place your hand on [src]...",,list("Hierophant Broadcast","Spatial Gateway","Cancel")) //Will create a stable gateway instead if between two obelisks one of which is onstation and the other on reebe + var/choice = alert(user,"You place your hand on [src]...",,"Hierophant Broadcast","Spatial Gateway","Cancel") //Will create a stable gateway instead if between two obelisks one of which is onstation and the other on reebe switch(choice) if("Hierophant Broadcast") if(active) diff --git a/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm b/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm index de7dfabbd0..5302153b9c 100644 --- a/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm +++ b/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm @@ -56,7 +56,7 @@ if(!GLOB.servants_active) to_chat(user, "The Ark must be active first!") return - if(tgui_alert(user, "Become the Eminence using admin?", "Become Eminence", list("Yes", "No")) != "Yes") + if(alert(user, "Become the Eminence using admin?", "Become Eminence", "Yes", "No") != "Yes") return message_admins("Admin [key_name_admin(user)] directly became the Eminence of the cult!") log_admin("Admin [key_name(user)] made themselves the Eminence.") @@ -67,7 +67,7 @@ M.playsound_local(M, 'sound/machines/clockcult/eminence_selected.ogg', 50, FALSE) /obj/structure/destructible/clockwork/eminence_spire/proc/nomination(mob/living/nominee) //A user is nominating themselves or ghosts to become Eminence - var/nomination_choice = tgui_alert(nominee, "Who would you like to nominate?", "Eminence Nomination", list("Nominate Yourself", "Nominate Ghosts", "Cancel")) + var/nomination_choice = alert(nominee, "Who would you like to nominate?", "Eminence Nomination", "Nominate Yourself", "Nominate Ghosts", "Cancel") if(!is_servant_of_ratvar(nominee) || !nominee.canUseTopic(src) || eminence_nominee) return switch(nomination_choice) @@ -84,7 +84,7 @@ selection_timer = addtimer(CALLBACK(src, .proc/kingmaker), 300, TIMER_STOPPABLE) /obj/structure/destructible/clockwork/eminence_spire/proc/objection(mob/living/wright) - if(tgui_alert(wright, "Object to the selection of [eminence_nominee] as Eminence?", "Objection!", list("Object", "Cancel")) == "Cancel" || !is_servant_of_ratvar(wright) || !wright.canUseTopic(src) || !eminence_nominee) + if(alert(wright, "Object to the selection of [eminence_nominee] as Eminence?", "Objection!", "Object", "Cancel") == "Cancel" || !is_servant_of_ratvar(wright) || !wright.canUseTopic(src) || !eminence_nominee) return hierophant_message("[wright] objects to the nomination of [eminence_nominee]! The eminence spire has been reset.") for(var/mob/M in servants_and_ghosts()) @@ -93,7 +93,7 @@ deltimer(selection_timer) /obj/structure/destructible/clockwork/eminence_spire/proc/cancelation(mob/living/cold_feet) - if(tgui_alert(cold_feet, "Cancel your nomination?", "Cancel Nomination", list("Withdraw Nomination", "Cancel")) == "Cancel" || !is_servant_of_ratvar(cold_feet) || !cold_feet.canUseTopic(src) || !eminence_nominee) + if(alert(cold_feet, "Cancel your nomination?", "Cancel Nomination", "Withdraw Nomination", "Cancel") == "Cancel" || !is_servant_of_ratvar(cold_feet) || !cold_feet.canUseTopic(src) || !eminence_nominee) return hierophant_message("[eminence_nominee] has withdrawn their nomination! The eminence spire has been reset.") for(var/mob/M in servants_and_ghosts()) diff --git a/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm b/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm index 76220702c0..f8a3afbf91 100644 --- a/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm +++ b/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm @@ -71,7 +71,7 @@ to_chat(user, "You can no longer vote with [src].") return var/voting = !(user.key in voters) - if(tgui_alert(user, "[voting ? "Cast a" : "Undo your"] vote to activate the beacon?", "Herald's Beacon", list("Change Vote", "Cancel")) == "Cancel") + if(alert(user, "[voting ? "Cast a" : "Undo your"] vote to activate the beacon?", "Herald's Beacon", "Change Vote", "Cancel") == "Cancel") return if(!user.canUseTopic(src) || !is_servant_of_ratvar(user) || !available) return diff --git a/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm index b08b90bbfa..51f8dc7101 100644 --- a/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm +++ b/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm @@ -42,7 +42,7 @@ //ATTACK GHOST IGNORING PARENT RETURN VALUE /obj/structure/destructible/clockwork/massive/ratvar/attack_ghost(mob/dead/observer/O) - var/alertresult = tgui_alert(O, "Embrace the Justiciar's light? You can no longer be cloned!",,list("Yes", "No")) + var/alertresult = alert(O, "Embrace the Justiciar's light? You can no longer be cloned!",,"Yes", "No") if(alertresult == "No" || QDELETED(O) || !istype(O) || !O.key) return FALSE var/mob/living/simple_animal/drone/cogscarab/ratvar/R = new/mob/living/simple_animal/drone/cogscarab/ratvar(get_turf(src)) diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index a8fe894eda..9bd1030685 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -49,7 +49,7 @@ to_chat(owner, "Your body has reached its limit, you cannot store more than [MAX_BLOODCHARGE] spells at once. Pick a spell to nullify.") else to_chat(owner, "Your body has reached its limit, you cannot have more than [RUNELESS_MAX_BLOODCHARGE] spells at once without an empowering rune! Pick a spell to nullify.") - var/nullify_spell = tgui_input_list(owner, "Choose a spell to remove.", "Current Spells", spells) + var/nullify_spell = input(owner, "Choose a spell to remove.", "Current Spells") as null|anything in spells if(nullify_spell) qdel(nullify_spell) return @@ -61,9 +61,9 @@ var/cult_name = initial(J.name) possible_spells[cult_name] = J possible_spells += "(REMOVE SPELL)" - entered_spell_name = tgui_input_list(owner, "Pick a blood spell to prepare...", "Spell Choices", possible_spells) + entered_spell_name = input(owner, "Pick a blood spell to prepare...", "Spell Choices") as null|anything in possible_spells if(entered_spell_name == "(REMOVE SPELL)") - var/nullify_spell = tgui_input_list(owner, "Choose a spell to remove.", "Current Spells", spells) + var/nullify_spell = input(owner, "Choose a spell to remove.", "Current Spells") as null|anything in spells if(nullify_spell) qdel(nullify_spell) return @@ -192,7 +192,7 @@ magic_path = "/obj/item/melee/blood_magic/armor" /datum/action/innate/cult/blood_spell/equipment/Activate() - var/choice = tgui_alert(owner, "Choose your equipment type",,"Combat Equipment",list("Ritual Dagger","Cancel")) + var/choice = alert(owner,"Choose your equipment type",,"Combat Equipment","Ritual Dagger","Cancel") if(choice == "Ritual Dagger") var/turf/T = get_turf(owner) owner.visible_message("[owner]'s hand glows red for a moment.", \ @@ -497,7 +497,7 @@ log_game("Teleport spell failed - user in away mission") return - var/input_rune_key = tgui_input_list(user, "Choose a rune to teleport to.", "Rune to Teleport to", potential_runes) //we know what key they picked + var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to? if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !actual_selected_rune || !proximity) return @@ -610,7 +610,7 @@ candidate.color = "black" if(do_after(user, 90, target = candidate)) candidate.emp_act(80) - var/construct_class = tgui_alert(user, "Please choose which type of construct you wish to create.",,list("Juggernaut","Wraith","Artificer")) + var/construct_class = alert(user, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer") user.visible_message("The dark cloud receedes from what was formerly [candidate], revealing a\n [construct_class]!") switch(construct_class) if("Juggernaut") @@ -787,7 +787,7 @@ /obj/item/melee/blood_magic/manipulator/attack_self(mob/living/user) if(iscultist(user)) var/list/options = list("Blood Spear (150)", "Blood Bolt Barrage (300)", "Blood Beam (500)") - var/choice = tgui_input_list(user, "Choose a greater blood rite...", "Greater Blood Rites", options) + var/choice = input(user, "Choose a greater blood rite...", "Greater Blood Rites") as null|anything in options if(!choice) to_chat(user, "You decide against conducting a greater blood rite.") return diff --git a/code/modules/antagonists/cult/cult_comms.dm b/code/modules/antagonists/cult/cult_comms.dm index dcc6379c1f..bbdf41ff48 100644 --- a/code/modules/antagonists/cult/cult_comms.dm +++ b/code/modules/antagonists/cult/cult_comms.dm @@ -79,7 +79,7 @@ return ..() /datum/action/innate/cult/mastervote/Activate() - var/choice = tgui_alert(owner, "The mantle of leadership is heavy. Success in this role requires an expert level of communication and experience. Are you sure?",, list("Yes", "No")) + var/choice = alert(owner, "The mantle of leadership is heavy. Success in this role requires an expert level of communication and experience. Are you sure?",, "Yes", "No") if(choice == "Yes" && IsAvailable()) var/datum/antagonist/cult/C = owner.mind.has_antag_datum(/datum/antagonist/cult,TRUE) if(!C.cult_team) diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index e55d6bcb02..35151953a0 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -665,7 +665,7 @@ for(var/datum/mind/M in SSticker.mode.cult) if(M.current && M.current.stat != DEAD) cultists |= M.current - var/mob/living/cultist_to_receive = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", cultists - user) + var/mob/living/cultist_to_receive = input(user, "Who do you wish to call to [src]?", "Followers of the Geometer") as null|anything in (cultists - user) if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated()) return if(!cultist_to_receive) diff --git a/code/modules/antagonists/cult/ritual.dm b/code/modules/antagonists/cult/ritual.dm index 0a93dc3675..98889169c6 100644 --- a/code/modules/antagonists/cult/ritual.dm +++ b/code/modules/antagonists/cult/ritual.dm @@ -53,7 +53,7 @@ This file contains the cult dagger and rune list code if(!check_rune_turf(Turf, user)) return - entered_rune_name = tgui_input_list(user, "Choose a rite to scribe.", "Sigils of Power", GLOB.rune_types) + entered_rune_name = input(user, "Choose a rite to scribe.", "Sigils of Power") as null|anything in GLOB.rune_types if(!src || QDELETED(src) || !Adjacent(user) || user.incapacitated() || !check_rune_turf(Turf, user)) return rune_to_scribe = GLOB.rune_types[entered_rune_name] @@ -101,7 +101,7 @@ This file contains the cult dagger and rune list code if(!(A in summon_objective.summon_spots)) to_chat(user, "The Geometer can only be summoned where the veil is weak - in [english_list(summon_objective.summon_spots)]!") return - var/confirm_final = tgui_alert(user, "This is the FINAL step to summon Nar'Sie; it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", list("My life for Nar'Sie!", "No")) + var/confirm_final = alert(user, "This is the FINAL step to summon Nar'Sie; it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for Nar'Sie!", "No") if(confirm_final == "No") to_chat(user, "You decide to prepare further before scribing the rune.") return diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 46ffba70b4..7981a10701 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -385,7 +385,7 @@ structure_check() searches for nearby cultist structures required for the invoca fail_invoke() return - var/input_rune_key = tgui_input_list(user, "Choose a rune to teleport to.", "Rune to Teleport to", potential_runes) //we know what key they picked + var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to? if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated() || !actual_selected_rune) fail_invoke() @@ -562,7 +562,7 @@ structure_check() searches for nearby cultist structures required for the invoca fail_invoke() return if(potential_revive_mobs.len > 1) - mob_to_revive = tgui_input_list(user, "Choose a cultist to revive.", "Cultist to Revive", potential_revive_mobs) + mob_to_revive = input(user, "Choose a cultist to revive.", "Cultist to Revive") as null|anything in potential_revive_mobs else mob_to_revive = potential_revive_mobs[1] if(QDELETED(src) || !validness_checks(mob_to_revive, user)) @@ -719,7 +719,7 @@ structure_check() searches for nearby cultist structures required for the invoca for(var/datum/mind/M in SSticker.mode.cult) if(!(M.current in invokers) && M.current && M.current.stat != DEAD) cultists |= M.current - var/mob/living/cultist_to_summon = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", cultists) + var/mob/living/cultist_to_summon = input(user, "Who do you wish to call to [src]?", "Followers of the Geometer") as null|anything in cultists if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated()) return if(!cultist_to_summon) @@ -853,7 +853,7 @@ structure_check() searches for nearby cultist structures required for the invoca . = ..() var/mob/living/user = invokers[1] var/turf/T = get_turf(src) - var/choice = tgui_alert(user, "You tear open a connection to the spirit realm...",,list("Summon a Cult Ghost","Ascend as a Dark Spirit","Cancel")) + var/choice = alert(user,"You tear open a connection to the spirit realm...",,"Summon a Cult Ghost","Ascend as a Dark Spirit","Cancel") if(choice == "Summon a Cult Ghost") var/area/A = get_area(T) if(A.map_name == "Space" || is_mining_level(T.z)) diff --git a/code/modules/antagonists/devil/devil.dm b/code/modules/antagonists/devil/devil.dm index 9db621db40..65ce89d33f 100644 --- a/code/modules/antagonists/devil/devil.dm +++ b/code/modules/antagonists/devil/devil.dm @@ -131,7 +131,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", log_admin("[key_name_admin(admin)] set [owner.current] devil ascendable to [ascendable])") /datum/antagonist/devil/admin_add(datum/mind/new_owner,mob/admin) - switch(tgui_alert(admin, "Should the devil be able to ascend",,list("Yes","No","Cancel"))) + switch(alert(admin,"Should the devil be able to ascend",,"Yes","No","Cancel")) if("Yes") ascendable = TRUE if("No") diff --git a/code/modules/antagonists/devil/sintouched/sintouched.dm b/code/modules/antagonists/devil/sintouched/sintouched.dm index 67fed36bb3..c9bf474567 100644 --- a/code/modules/antagonists/devil/sintouched/sintouched.dm +++ b/code/modules/antagonists/devil/sintouched/sintouched.dm @@ -56,7 +56,7 @@ /datum/antagonist/sintouched/admin_add(datum/mind/new_owner,mob/admin) var/choices = sins + "Random" - var/chosen_sin = tgui_input_list(admin,"What kind ?","Sin kind", choices) + var/chosen_sin = input(admin,"What kind ?","Sin kind") as null|anything in choices if(!chosen_sin) return if(chosen_sin in sins) diff --git a/code/modules/antagonists/disease/disease_mob.dm b/code/modules/antagonists/disease/disease_mob.dm index 654986d355..f6c8c3dbe1 100644 --- a/code/modules/antagonists/disease/disease_mob.dm +++ b/code/modules/antagonists/disease/disease_mob.dm @@ -296,7 +296,7 @@ the new instance inside the host to be updated to the template's stats. /mob/camera/disease/proc/confirm_initial_infection(mob/living/carbon/human/H) set waitfor = FALSE - if(tgui_alert(src, "Select [H.name] as your initial host?", "Select Host", list("Yes", "No")) != "Yes") + if(alert(src, "Select [H.name] as your initial host?", "Select Host", "Yes", "No") != "Yes") return if(!freemove) return diff --git a/code/modules/antagonists/eldritch_cult/eldritch_items.dm b/code/modules/antagonists/eldritch_cult/eldritch_items.dm index 0f297ccb28..28228aedd6 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_items.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_items.dm @@ -350,7 +350,7 @@ drawing = TRUE - var/type = pick_list[tgui_input_list(user,"Choose the rune","Rune", pick_list)] + var/type = pick_list[input(user,"Choose the rune","Rune") as null|anything in pick_list ] if(!type) drawing = FALSE return diff --git a/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm b/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm index 71a2d0580e..33a17c3278 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm @@ -170,7 +170,7 @@ to_chat(user, "These items don't possess the required fingerprints or DNA.") return FALSE - var/chosen_mob = tgui_input_list(user, "Select the person you wish to curse","Your target", sortList(compiled_list, /proc/cmp_mob_realname_dsc)) + var/chosen_mob = input("Select the person you wish to curse","Your target") as null|anything in sortList(compiled_list, /proc/cmp_mob_realname_dsc) if(!chosen_mob) return FALSE curse(compiled_list[chosen_mob]) @@ -296,7 +296,7 @@ if(!targeted) break targets["[targeted.current.real_name] the [targeted.assigned_role]"] = targeted.current - LH.target = targets[tgui_input_list(user,"Choose your next target","Target", targets)] + LH.target = targets[input(user,"Choose your next target","Target") in targets] if(!LH.target && targets.len) LH.target = pick(targets) //Tsk tsk, you can and will get another target if you want it or not. diff --git a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm index 1d4bcd3910..158acc0071 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm @@ -621,7 +621,7 @@ if(!originator?.linked_mobs[living_owner]) CRASH("Uh oh the mansus link got somehow activated without it being linked to a raw prophet or the mob not being in a list of mobs that should be able to do it.") - var/message = sanitize(tgui_input_text(usr, "Message:", "Telepathy from the Manse")) + var/message = sanitize(input("Message:", "Telepathy from the Manse") as text|null) if(QDELETED(living_owner)) return diff --git a/code/modules/antagonists/eldritch_cult/eldritch_structures.dm b/code/modules/antagonists/eldritch_cult/eldritch_structures.dm index b920a1040a..01fd945cba 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_structures.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_structures.dm @@ -80,7 +80,7 @@ for(var/X in subtypesof(/obj/item/eldritch_potion)) var/obj/item/eldritch_potion/potion = X lst[initial(potion.name)] = potion - var/type = lst[tgui_input_list(user,"Choose your brew","Brew", lst)] + var/type = lst[input(user,"Choose your brew","Brew") in lst] playsound(src, 'sound/misc/desceration-02.ogg', 75, TRUE) new type(drop_location()) current_mass = 0 diff --git a/code/modules/antagonists/monkey/monkey.dm b/code/modules/antagonists/monkey/monkey.dm index 6c03e3c686..971532958f 100644 --- a/code/modules/antagonists/monkey/monkey.dm +++ b/code/modules/antagonists/monkey/monkey.dm @@ -69,7 +69,7 @@ /datum/antagonist/monkey/admin_remove(mob/admin) var/mob/living/carbon/monkey/M = owner.current if(istype(M)) - switch(tgui_alert(admin, "Humanize?", "Humanize", list("Yes", "No"))) + switch(alert(admin, "Humanize?", "Humanize", "Yes", "No")) if("Yes") if(admin == M) admin = M.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_DEFAULTMSG) @@ -89,7 +89,7 @@ /datum/antagonist/monkey/leader/admin_add(datum/mind/new_owner,mob/admin) var/mob/living/carbon/human/H = new_owner.current if(istype(H)) - switch(tgui_alert(admin, "Monkeyize?", "Monkeyize", list("Yes", "No"))) + switch(alert(admin, "Monkeyize?", "Monkeyize", "Yes", "No")) if("Yes") if(admin == H) admin = H.monkeyize() diff --git a/code/modules/antagonists/nukeop/equipment/borgchameleon.dm b/code/modules/antagonists/nukeop/equipment/borgchameleon.dm index c01460b386..b3c31152a5 100644 --- a/code/modules/antagonists/nukeop/equipment/borgchameleon.dm +++ b/code/modules/antagonists/nukeop/equipment/borgchameleon.dm @@ -66,7 +66,7 @@ if(animation_playing) to_chat(user, "\the [src] is recharging.") return - var/borg_icon = tgui_input_list(user, "Select an icon!", "Robot Icon", engymodels) + var/borg_icon = input(user, "Select an icon!", "Robot Icon", null) as null|anything in engymodels if(!borg_icon) return FALSE switch(borg_icon) diff --git a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm index 8f2e942bad..78e4d38b3c 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm @@ -26,7 +26,7 @@ GLOBAL_VAR_INIT(war_declared, FALSE) return declaring_war = TRUE - var/are_you_sure = tgui_alert(user, "Consult your team carefully before you declare war on [station_name()]]. Are you sure you want to alert the enemy crew? You have [DisplayTimeText(world.time-SSticker.round_start_time - CHALLENGE_TIME_LIMIT)] to decide", "Declare war?", list("Yes", "No")) + var/are_you_sure = alert(user, "Consult your team carefully before you declare war on [station_name()]]. Are you sure you want to alert the enemy crew? You have [DisplayTimeText(world.time-SSticker.round_start_time - CHALLENGE_TIME_LIMIT)] to decide", "Declare war?", "Yes", "No") declaring_war = FALSE if(!check_allowed(user)) @@ -39,7 +39,7 @@ GLOBAL_VAR_INIT(war_declared, FALSE) var/war_declaration = "[user.real_name] has declared [user.p_their()] intent to utterly destroy [station_name()] with a nuclear device, and dares the crew to try and stop [user.p_them()]." declaring_war = TRUE - var/custom_threat = tgui_alert(user, "Do you want to customize your declaration?", "Customize?", list("Yes", "No")) + var/custom_threat = alert(user, "Do you want to customize your declaration?", "Customize?", "Yes", "No") declaring_war = FALSE if(!check_allowed(user)) diff --git a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm index f734e3289c..fcc8bcade8 100644 --- a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm +++ b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm @@ -255,7 +255,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( if(!istype(T) || !is_station_level(T.z)) to_chat(owner, "You cannot activate the doomsday device while off-station!") return - if(tgui_alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", list("confirm = TRUE;", "confirm = FALSE;")) != "confirm = TRUE;") + if(alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", "confirm = TRUE;", "confirm = FALSE;") != "confirm = TRUE;") return if (active) return //prevent the AI from activating an already active doomsday @@ -695,7 +695,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( 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(alert(owner, "Are you sure you want to place the machine here?", "Are you sure?", "Yes", "No") == "No") active = FALSE return if(!owner_AI.can_place_transformer(src)) diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index 9bd4a922bc..44f267358a 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -285,7 +285,7 @@ /obj/item/voodoo/attack_self(mob/user) if(!target && length(possible)) - target = tgui_input_list(user, "Select your victim!", "Voodoo", possible) + target = input(user, "Select your victim!", "Voodoo") as null|anything in possible return if(user.zone_selected == BODY_ZONE_CHEST) @@ -300,7 +300,7 @@ if(target && cooldown < world.time) switch(user.zone_selected) if(BODY_ZONE_PRECISE_MOUTH) - var/wgw = sanitize(tgui_input_text(user, "What would you like the victim to say", "Voodoo", null)) + var/wgw = sanitize(input(user, "What would you like the victim to say", "Voodoo", null) as text) target.say(wgw, forced = "voodoo doll") log_game("[key_name(user)] made [key_name(target)] say [wgw] with a voodoo doll.") if(BODY_ZONE_PRECISE_EYES) diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm index 5a876ea9db..fe9770e64a 100644 --- a/code/modules/antagonists/wizard/equipment/soulstone.dm +++ b/code/modules/antagonists/wizard/equipment/soulstone.dm @@ -222,7 +222,7 @@ var/obj/structure/constructshell/T = target var/mob/living/simple_animal/hostile/construct/shade/A = locate() in src if(A) - var/construct_class = tgui_alert(user, "Please choose which type of construct you wish to create.",,list("Juggernaut","Wraith","Artificer")) + var/construct_class = alert(user, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer") if(!T || !T.loc) return switch(construct_class) diff --git a/code/modules/arousal/arousal.dm b/code/modules/arousal/arousal.dm index 7f80cae837..36da6c73ba 100644 --- a/code/modules/arousal/arousal.dm +++ b/code/modules/arousal/arousal.dm @@ -16,7 +16,7 @@ set name = "Toggle undergarments" set category = "IC" - var/confirm = tgui_input_list(src, "Select what part of your form to alter", "Undergarment Toggling", list("Top", "Bottom", "Socks", "All")) + var/confirm = input(src, "Select what part of your form to alter", "Undergarment Toggling") as null|anything in list("Top", "Bottom", "Socks", "All") if(!confirm) return if(confirm == "Top") @@ -127,7 +127,7 @@ if(CHECK_BITFIELD(G.genital_flags, CAN_CLIMAX_WITH) && G.is_exposed(worn_stuff)) //filter out what you can't masturbate with LAZYADD(genitals_list, G) if(LAZYLEN(genitals_list)) - var/obj/item/organ/genital/ret_organ = tgui_input_list(src, "with what?", "Climax", genitals_list) + var/obj/item/organ/genital/ret_organ = input(src, "with what?", "Climax", null) as null|obj in genitals_list return ret_organ else if(!silent) to_chat(src, "You cannot climax without available genitals.") @@ -151,10 +151,10 @@ if(!silent) to_chat(src, "You cannot do this alone.") return //No one left. - var/mob/living/target = tgui_input_list(src, "With whom?", "Sexual partner", partners) //pick one, default to null + var/mob/living/target = input(src, "With whom?", "Sexual partner", null) as null|anything in partners //pick one, default to null if(target && in_range(src, target)) to_chat(src,"Waiting for consent...") - var/consenting = tgui_input_list(target, "Do you want [src] to climax with you?","Climax mechanics", list("Yes","No")) + var/consenting = input(target, "Do you want [src] to climax with you?","Climax mechanics","No") in list("Yes","No") if(consenting == "Yes") return target else @@ -172,7 +172,7 @@ containers_list += C if(containers_list.len) - var/obj/item/reagent_containers/SC = tgui_input_list(src, "Into or onto what?(Cancel for nowhere)", "", containers_list) + var/obj/item/reagent_containers/SC = input(src, "Into or onto what?(Cancel for nowhere)", null) as null|obj in containers_list if(SC && CanReach(SC)) return SC else if(!silent) @@ -226,7 +226,7 @@ return //Ok, now we check what they want to do. - var/choice = tgui_input_list(src, "Select sexual activity", "Sexual activity:", list("Climax alone","Climax with partner", "Fill container")) + var/choice = input(src, "Select sexual activity", "Sexual activity:") as null|anything in list("Climax alone","Climax with partner", "Fill container") if(!choice) return @@ -243,7 +243,7 @@ if(picked_organ) var/mob/living/partner = pick_partner() //Get someone if(partner) - var/spillage = tgui_input_list(src, "Would your fluids spill outside?", "Choose overflowing option", list("Yes", "No")) + var/spillage = input(src, "Would your fluids spill outside?", "Choose overflowing option", "Yes") as null|anything in list("Yes", "No") if(spillage && in_range(src, partner)) mob_climax_partner(picked_organ, partner, spillage == "Yes" ? TRUE : FALSE) if("Fill container") diff --git a/code/modules/arousal/genitals.dm b/code/modules/arousal/genitals.dm index 99b43488f1..313f108b0f 100644 --- a/code/modules/arousal/genitals.dm +++ b/code/modules/arousal/genitals.dm @@ -118,9 +118,9 @@ return //Full list of exposable genitals created var/obj/item/organ/genital/picked_organ - picked_organ = tgui_input_list(src, "Choose which genitalia to expose/hide", "Expose/Hide genitals", genital_list) + picked_organ = input(src, "Choose which genitalia to expose/hide", "Expose/Hide genitals") as null|anything in genital_list if(picked_organ && (picked_organ in internal_organs)) - var/picked_visibility = tgui_input_list(src, "Choose visibility setting", "Expose/Hide genitals", GLOB.genitals_visibility_toggles) + var/picked_visibility = input(src, "Choose visibility setting", "Expose/Hide genitals") as null|anything in GLOB.genitals_visibility_toggles if(picked_visibility && picked_organ && (picked_organ in internal_organs)) picked_organ.toggle_visibility(picked_visibility) return @@ -136,7 +136,7 @@ if(!genital_list.len) //There's nothing that can show arousal return var/obj/item/organ/genital/picked_organ - picked_organ = tgui_input_list(src, "Choose which genitalia to toggle arousal on", "Set genital arousal", genital_list) + picked_organ = input(src, "Choose which genitalia to toggle arousal on", "Set genital arousal", null) in genital_list if(picked_organ) var/original_state = picked_organ.aroused_state picked_organ.set_aroused_state(!picked_organ.aroused_state) diff --git a/code/modules/arousal/toys/dildos.dm b/code/modules/arousal/toys/dildos.dm index a4d014c1c0..4de6877915 100644 --- a/code/modules/arousal/toys/dildos.dm +++ b/code/modules/arousal/toys/dildos.dm @@ -46,25 +46,25 @@ if(!can_customize) return FALSE if(src && !user.incapacitated() && in_range(user,src)) - var/color_choice = tgui_input_list(user,"Choose a color for your dildo.","Dildo Color", GLOB.dildo_colors) + var/color_choice = input(user,"Choose a color for your dildo.","Dildo Color") as null|anything in GLOB.dildo_colors if(src && color_choice && !user.incapacitated() && in_range(user,src)) sanitize_inlist(color_choice, GLOB.dildo_colors, "Red") color = GLOB.dildo_colors[color_choice] update_appearance() if(src && !user.incapacitated() && in_range(user,src)) - var/shape_choice = tgui_input_list(user,"Choose a shape for your dildo.","Dildo Shape", GLOB.dildo_shapes) + var/shape_choice = input(user,"Choose a shape for your dildo.","Dildo Shape") as null|anything in GLOB.dildo_shapes if(src && shape_choice && !user.incapacitated() && in_range(user,src)) sanitize_inlist(shape_choice, GLOB.dildo_colors, "Knotted") dildo_shape = GLOB.dildo_shapes[shape_choice] update_appearance() if(src && !user.incapacitated() && in_range(user,src)) - var/size_choice = tgui_input_list(user,"Choose the size for your dildo.","Dildo Size", GLOB.dildo_sizes) + var/size_choice = input(user,"Choose the size for your dildo.","Dildo Size") as null|anything in GLOB.dildo_sizes if(src && size_choice && !user.incapacitated() && in_range(user,src)) sanitize_inlist(size_choice, GLOB.dildo_colors, "Medium") dildo_size = GLOB.dildo_sizes[size_choice] update_appearance() if(src && !user.incapacitated() && in_range(user,src)) - var/transparency_choice = tgui_input_num(user,"Choose the transparency of your dildo. Lower is more transparent!(192-255)","Dildo Transparency", alpha) + var/transparency_choice = input(user,"Choose the transparency of your dildo. Lower is more transparent!(192-255)","Dildo Transparency") as null|num if(src && transparency_choice && !user.incapacitated() && in_range(user,src)) sanitize_integer(transparency_choice, 192, 255, 192) alpha = transparency_choice diff --git a/code/modules/assembly/doorcontrol.dm b/code/modules/assembly/doorcontrol.dm index c2994e7998..32e262ce65 100644 --- a/code/modules/assembly/doorcontrol.dm +++ b/code/modules/assembly/doorcontrol.dm @@ -29,7 +29,7 @@ if(!can_change_id) return var/new_id - new_id = tgui_input_text(user, "Set ID", "Set ID", show_id? id : null) + new_id = input(user, "Set ID", "Set ID", show_id? id : null) as text|null if(!isnull(new_id)) //0/"" is considered !, so check null instead of just !. id = new_id diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 9decf4ab88..84e70bbbb3 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -116,7 +116,7 @@ to_chat(user, "Assembly part missing!") return if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code - switch(tgui_alert(user, "Which side would you like to use?",,list("Left","Right"))) + switch(alert("Which side would you like to use?",,"Left","Right")) if("Left") a_left.attack_self(user) if("Right") diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 5cc6fa33d6..b670baaae7 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -63,7 +63,7 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE) if(!.) return if(href_list[VV_HK_PARSE_GASSTRING]) - var/gasstring = tgui_input_text(usr, "Input Gas String (WARNING: Advanced. Don't use this unless you know how these work.)", "Gas String Parse") + var/gasstring = input(usr, "Input Gas String (WARNING: Advanced. Don't use this unless you know how these work.", "Gas String Parse") as text|null if(!istext(gasstring)) return log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Set to gas string [gasstring].") @@ -77,10 +77,10 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE) var/list/gases = get_gases() for(var/gas in gases) gases[gas] = get_moles(gas) - var/gasid = tgui_input_list(usr, "What kind of gas?", "Set Gas", GLOB.gas_data.ids) + var/gasid = input(usr, "What kind of gas?", "Set Gas") as null|anything in GLOB.gas_data.ids if(!gasid) return - var/amount = tgui_input_num(usr, "Input amount", "Set Gas", gases[gasid] || 0) + var/amount = input(usr, "Input amount", "Set Gas", gases[gasid] || 0) as num|null if(!isnum(amount)) return amount = max(0, amount) @@ -88,7 +88,7 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE) message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Set gas [gasid] to [amount] moles.") set_moles(gasid, amount) if(href_list[VV_HK_SET_TEMPERATURE]) - var/temp = tgui_input_num(usr, "Set the temperature of this mixture to?", "Set Temperature", return_temperature()) + var/temp = input(usr, "Set the temperature of this mixture to?", "Set Temperature", return_temperature()) as num|null if(!isnum(temp)) return temp = max(2.7, temp) @@ -96,7 +96,7 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE) message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Changed temperature to [temp].") set_temperature(temp) if(href_list[VV_HK_SET_VOLUME]) - var/volume = tgui_input_num(usr, "Set the volume of this mixture to?", "Set Volume", return_volume()) + var/volume = input(usr, "Set the volume of this mixture to?", "Set Volume", return_volume()) as num|null if(!isnum(volume)) return volume = max(0, volume) diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 03158b22d1..2313d9c71d 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -428,7 +428,7 @@ var/datum/tlv/tlv = TLV[env] if(isnull(tlv)) return - var/value = tgui_input_num(usr, "New [name] for [env]:", name, tlv.vars[name]) + var/value = input("New [name] for [env]:", name, tlv.vars[name]) as num|null if(!isnull(value) && !..()) if(value < 0) tlv.vars[name] = -1 diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm index d7bfb46af5..56a7d78288 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm @@ -107,7 +107,7 @@ Passive gate is similar to the regular pump except: pressure = MAX_OUTPUT_PRESSURE . = TRUE else if(pressure == "input") - pressure = tgui_input_num(usr, "New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure) + pressure = input("New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure) as num|null if(!isnull(pressure) || !..()) . = TRUE else if(text2num(pressure) != null) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 133c280728..dc5a6eccd4 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -135,7 +135,7 @@ pressure = MAX_OUTPUT_PRESSURE . = TRUE else if(pressure == "input") - pressure = tgui_input_num(usr, "New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure) + pressure = input("New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure) as num|null if(!isnull(pressure) && !..()) . = TRUE else if(text2num(pressure) != null) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm index 6ff796f4c1..d0b663e4ad 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm @@ -83,7 +83,7 @@ pressure = 50*ONE_ATMOSPHERE . = TRUE else if(pressure == "input") // The manual expirience. - pressure = tgui_input_num(usr, "New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure) + pressure = input("New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure) as num|null if(!isnull(pressure) && !..()) . = TRUE else if(text2num(pressure) != null) @@ -98,7 +98,7 @@ pressure = open_pressure . = TRUE else if(pressure == "input") - pressure = tgui_input_num(usr, "New output pressure (0-[open_pressure] kPa):", name, close_pressure) + pressure = input("New output pressure (0-[open_pressure] kPa):", name, close_pressure) as num|null if(!isnull(pressure) && !..()) . = TRUE else if(text2num(pressure) != null) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 258ee21d9b..46d584339b 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -125,7 +125,7 @@ rate = MAX_TRANSFER_RATE . = TRUE else if(rate == "input") - rate = tgui_input_num(usr, "New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, transfer_rate) + rate = input("New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, transfer_rate) as num|null if(!isnull(rate) && !..()) . = TRUE else if(text2num(rate) != null) diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index 7ade864a92..f8866877fe 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -126,7 +126,7 @@ air_update_turf(1) /obj/machinery/atmospherics/components/proc/safe_input(var/title, var/text, var/default_set) - var/new_value = tgui_input_num(usr,text,title,default_set) + var/new_value = input(usr,text,title,default_set) as num if(usr.canUseTopic(src)) return new_value return default_set diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index dbad55e9ef..4182f5ceca 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -143,7 +143,7 @@ rate = MAX_TRANSFER_RATE . = TRUE else if(rate == "input") - rate = tgui_input_num(usr, "New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, transfer_rate) + rate = input("New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, transfer_rate) as num|null if(!isnull(rate) && !..()) . = TRUE else if(text2num(rate) != null) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 1257cb9bb2..3296981e5e 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -151,7 +151,7 @@ pressure = MAX_OUTPUT_PRESSURE . = TRUE else if(pressure == "input") - pressure = tgui_input_num(usr, "New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure) + pressure = input("New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure) as num|null if(!isnull(pressure) && !..()) . = TRUE else if(text2num(pressure) != null) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm index 0a64d458d2..b2fa26edba 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm @@ -166,7 +166,7 @@ rate = MAX_TRANSFER_RATE . = TRUE else if(rate == "input") - rate = tgui_input_num(usr, "New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, volume_rate) + rate = input("New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, volume_rate) as num|null if(!isnull(rate) && !..()) . = TRUE else if(text2num(rate) != null) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm index ecc9bc624f..ee4223b157 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm @@ -82,7 +82,7 @@ pressure = 50*ONE_ATMOSPHERE . = TRUE else if(pressure == "input") - pressure = tgui_input_num(usr, "New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure) + pressure = input("New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure) as num|null if(!isnull(pressure) && !..()) . = TRUE else if(text2num(pressure) != null) @@ -97,7 +97,7 @@ pressure = open_pressure . = TRUE else if(pressure == "input") - pressure = tgui_input_num(usr, "New output pressure (0-[open_pressure] kPa):", name, close_pressure) + pressure = input("New output pressure (0-[open_pressure] kPa):", name, close_pressure) as num|null if(!isnull(pressure) && !..()) . = TRUE else if(text2num(pressure) != null) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index c8ed757b29..8456c0b346 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -158,7 +158,7 @@ var/target = params["target"] var/adjust = text2num(params["adjust"]) if(target == "input") - target = tgui_input_num(usr, "Set new target ([min_temperature]-[max_temperature] K):", name, target_temperature) + target = input("Set new target ([min_temperature]-[max_temperature] K):", name, target_temperature) as num|null if(!isnull(target)) . = TRUE else if(adjust) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index e99ac55357..868c5dafa3 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -388,7 +388,7 @@ return switch(action) if("relabel") - var/label = tgui_input_list(usr, "New canister label:", name, sortList(label2types)) + var/label = input("New canister label:", name) as null|anything in sortList(label2types) if(label && !..()) var/newtype = label2types[label] if(newtype) @@ -416,7 +416,7 @@ pressure = can_max_release_pressure . = TRUE else if(pressure == "input") - pressure = tgui_input_num(usr, "New release pressure ([can_min_release_pressure]-[can_max_release_pressure] kPa):", name, release_pressure) + pressure = input("New release pressure ([can_min_release_pressure]-[can_max_release_pressure] kPa):", name, release_pressure) as num|null if(!isnull(pressure) && !..()) . = TRUE else if(text2num(pressure) != null) @@ -461,7 +461,7 @@ if("increase") timer_set = min(maximum_timer_set, timer_set + 10) if("input") - var/user_input = tgui_input_num(usr, "Set time to valve toggle.", name, timer_set) + var/user_input = input(usr, "Set time to valve toggle.", name) as null|num if(!user_input) return var/N = text2num(user_input) diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index 0dafac89d1..ee4090b680 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -38,7 +38,7 @@ if(..()) return var/A - A = tgui_input_list(usr, "Area to bombard", "Open Fire", GLOB.teleportlocs) + A = input("Area to bombard", "Open Fire", A) in GLOB.teleportlocs var/area/thearea = GLOB.teleportlocs[A] if(usr.stat || usr.restrained()) return diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm index d76c85848c..d32905e007 100644 --- a/code/modules/awaymissions/capture_the_flag.dm +++ b/code/modules/awaymissions/capture_the_flag.dm @@ -210,7 +210,7 @@ /obj/machinery/capture_the_flag/attack_ghost(mob/user) if(ctf_enabled == FALSE) if(user.client && user.client.holder) - var/response = tgui_alert(user, "Enable CTF?", "CTF", list("Yes", "No")) + var/response = alert("Enable CTF?", "CTF", "Yes", "No") if(response == "Yes") toggle_all_ctf(user) return diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 27138a9d40..cd5c2f76f3 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -49,7 +49,7 @@ var/mob/dead/observer/O = user if(!O.can_reenter_round() && !skip_reentry_check) return FALSE - var/ghost_role = tgui_alert(user, latejoinercalling ? "Latejoin as [mob_name]? (This is a ghost role, and as such, it's very likely to be off-station.)" : "Become [mob_name]? (Warning, You can no longer be cloned!)",,list("Yes","No")) + var/ghost_role = alert(latejoinercalling ? "Latejoin as [mob_name]? (This is a ghost role, and as such, it's very likely to be off-station.)" : "Become [mob_name]? (Warning, You can no longer be cloned!)",,"Yes","No") if(ghost_role == "No" || !loc) return if(QDELETED(src) || QDELETED(user)) @@ -595,7 +595,7 @@ job_description = "Space Bar Patron" /obj/effect/mob_spawn/human/alive/space_bar_patron/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - var/despawn = tgui_alert(user, "Return to cryosleep? (Warning, Your mob will be deleted!)",,list("Yes","No")) + var/despawn = alert("Return to cryosleep? (Warning, Your mob will be deleted!)",,"Yes","No") if(despawn == "No" || !loc || !Adjacent(user)) return user.visible_message("[user.name] climbs back into cryosleep...") diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm index a027995acc..bc7e2cbd08 100644 --- a/code/modules/awaymissions/mission_code/wildwest.dm +++ b/code/modules/awaymissions/mission_code/wildwest.dm @@ -88,7 +88,7 @@ else chargesa-- insistinga = 0 - var/wish = tgui_input_list(usr, "You want...","Wish", list("Power","Wealth","Immortality","To Kill","Peace")) + var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","Immortality","To Kill","Peace") switch(wish) if("Power") to_chat(user, "Your wish is granted, but at a terrible cost...") diff --git a/code/modules/awaymissions/signpost.dm b/code/modules/awaymissions/signpost.dm index 76f4e004bd..4d85d947c2 100644 --- a/code/modules/awaymissions/signpost.dm +++ b/code/modules/awaymissions/signpost.dm @@ -16,7 +16,7 @@ . = ..() if(.) return - if(tgui_alert(user, question,name,list("Yes","No")) == "Yes" && Adjacent(user)) + if(alert(question,name,"Yes","No") == "Yes" && Adjacent(user)) var/turf/T = find_safe_turf(zlevels=zlevels) if(T) diff --git a/code/modules/buildmode/submodes/advanced.dm b/code/modules/buildmode/submodes/advanced.dm index 69cb6ec588..418f504777 100644 --- a/code/modules/buildmode/submodes/advanced.dm +++ b/code/modules/buildmode/submodes/advanced.dm @@ -17,16 +17,16 @@ to_chat(c, "***********************************************************") /datum/buildmode_mode/advanced/change_settings(client/c) - var/target_path = tgui_input_text(c, "Enter typepath:", "Typepath", "/obj/structure/closet") + var/target_path = input(c, "Enter typepath:", "Typepath", "/obj/structure/closet") objholder = text2path(target_path) if(!ispath(objholder)) objholder = pick_closest_path(target_path) if(!objholder) - tgui_alert(c, "No path was selected") + alert("No path was selected") return else if(ispath(objholder, /area)) objholder = null - tgui_alert(c, "That path is not allowed.") + alert("That path is not allowed.") return /datum/buildmode_mode/advanced/handle_click(client/c, params, obj/object) diff --git a/code/modules/buildmode/submodes/area_edit.dm b/code/modules/buildmode/submodes/area_edit.dm index e5ee2babf3..19f536e073 100644 --- a/code/modules/buildmode/submodes/area_edit.dm +++ b/code/modules/buildmode/submodes/area_edit.dm @@ -28,10 +28,10 @@ to_chat(c, "***********************************************************") /datum/buildmode_mode/area_edit/change_settings(client/c) - var/target_path = tgui_input_text(c, "Enter typepath:", "Typepath", "/area") + var/target_path = input(c, "Enter typepath:", "Typepath", "/area") var/areatype = text2path(target_path) if(ispath(areatype,/area)) - var/areaname = tgui_input_text(c, "Enter area name:", "Area name", "Area") + var/areaname = input(c, "Enter area name:", "Area name", "Area") if(!areaname || !length(areaname)) return storedarea = new areatype diff --git a/code/modules/buildmode/submodes/boom.dm b/code/modules/buildmode/submodes/boom.dm index fc18154206..8340a21b0f 100644 --- a/code/modules/buildmode/submodes/boom.dm +++ b/code/modules/buildmode/submodes/boom.dm @@ -14,19 +14,19 @@ to_chat(c, "***********************************************************") /datum/buildmode_mode/boom/change_settings(client/c) - devastation = tgui_input_num(c, "Range of total devastation. -1 to none", text("Input")) + devastation = input(c, "Range of total devastation. -1 to none", text("Input")) as num|null if(devastation == null) devastation = -1 - heavy = tgui_input_num(c, "Range of heavy impact. -1 to none", text("Input")) + heavy = input(c, "Range of heavy impact. -1 to none", text("Input")) as num|null if(heavy == null) heavy = -1 - light = tgui_input_num(c, "Range of light impact. -1 to none", text("Input")) + light = input(c, "Range of light impact. -1 to none", text("Input")) as num|null if(light == null) light = -1 - flash = tgui_input_num(c, "Range of flash. -1 to none", text("Input")) + flash = input(c, "Range of flash. -1 to none", text("Input")) as num|null if(flash == null) flash = -1 - flames = tgui_input_num(c, "Range of flames. -1 to none", text("Input")) + flames = input(c, "Range of flames. -1 to none", text("Input")) as num|null if(flames == null) flames = -1 diff --git a/code/modules/buildmode/submodes/fill.dm b/code/modules/buildmode/submodes/fill.dm index a37937b5f4..b7d87edef2 100644 --- a/code/modules/buildmode/submodes/fill.dm +++ b/code/modules/buildmode/submodes/fill.dm @@ -1,6 +1,6 @@ /datum/buildmode_mode/fill key = "fill" - + use_corner_selection = TRUE var/objholder = null @@ -12,16 +12,16 @@ to_chat(c, "***********************************************************") /datum/buildmode_mode/fill/change_settings(client/c) - var/target_path = tgui_input_text(c, "Enter typepath:" ,"Typepath","/obj/structure/closet") + var/target_path = input(c, "Enter typepath:" ,"Typepath","/obj/structure/closet") objholder = text2path(target_path) if(!ispath(objholder)) objholder = pick_closest_path(target_path) if(!objholder) - tgui_alert(c, "No path has been selected.") + alert("No path has been selected.") return else if(ispath(objholder, /area)) objholder = null - tgui_alert(c, "Area paths are not supported for this mode, use the area edit mode instead.") + alert("Area paths are not supported for this mode, use the area edit mode instead.") return deselect_region() diff --git a/code/modules/buildmode/submodes/mapgen.dm b/code/modules/buildmode/submodes/mapgen.dm index 34bd0ddf6c..7ed99afd50 100644 --- a/code/modules/buildmode/submodes/mapgen.dm +++ b/code/modules/buildmode/submodes/mapgen.dm @@ -16,7 +16,7 @@ for(var/path in gen_paths) var/datum/mapGenerator/MP = path options[initial(MP.buildmode_name)] = path - var/type = tgui_input_list(c,"Select Generator Type","Type", options) + var/type = input(c,"Select Generator Type","Type") as null|anything in options if(!type) return @@ -42,7 +42,7 @@ return G.defineRegion(cornerA, cornerB, 1) highlight_region(G.map) - var/confirm = tgui_alert(c, "Are you sure you want run the map generator?", "Run generator", list("Yes", "No")) + var/confirm = alert("Are you sure you want run the map generator?", "Run generator", "Yes", "No") if(confirm == "Yes") G.generate() log_admin("Build Mode: [key_name(c)] ran the map generator '[G.buildmode_name]' in the region from [AREACOORD(cornerA)] to [AREACOORD(cornerB)]") diff --git a/code/modules/buildmode/submodes/variable_edit.dm b/code/modules/buildmode/submodes/variable_edit.dm index 9b09e41c68..ac4c1ef66a 100644 --- a/code/modules/buildmode/submodes/variable_edit.dm +++ b/code/modules/buildmode/submodes/variable_edit.dm @@ -22,8 +22,8 @@ valueholder = null /datum/buildmode_mode/varedit/change_settings(client/c) - varholder = tgui_input_text(c, "Enter variable name:" ,"Name", "name") - + varholder = input(c, "Enter variable name:" ,"Name", "name") + if(!vv_varname_lockcheck(varholder)) return diff --git a/code/modules/cargo/blackmarket/blackmarket_uplink.dm b/code/modules/cargo/blackmarket/blackmarket_uplink.dm index 830b4a6b6a..7d5b333f13 100644 --- a/code/modules/cargo/blackmarket/blackmarket_uplink.dm +++ b/code/modules/cargo/blackmarket/blackmarket_uplink.dm @@ -1,6 +1,6 @@ /obj/item/blackmarket_uplink name = "Black Market Uplink" - desc = "A mishmash of a subspace amplifier, a radio, and an analyzer. Somehow able to access the black market, with a variable inventory in limited stock at inflated prices. No refunds, customer responsible for pick-ups." + desc = "A mishmash of a subspace amplifier, a radio, and an analyzer. Somehow able to access the black market, with a variable inventory in limited stock at inflated prices. No refunds, customer responsible for pick-ups." icon = 'icons/obj/blackmarket.dmi' icon_state = "uplink" // UI variables. @@ -35,7 +35,7 @@ /obj/item/blackmarket_uplink/AltClick(mob/user) if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return - var/amount_to_remove = FLOOR(tgui_input_num(user, "How much do you want to withdraw? Current Amount: [money]", "Withdraw Funds", 5), 1) + var/amount_to_remove = FLOOR(input(user, "How much do you want to withdraw? Current Amount: [money]", "Withdraw Funds", 5) as num|null, 1) if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(!amount_to_remove || amount_to_remove < 0) diff --git a/code/modules/cargo/centcom_podlauncher.dm b/code/modules/cargo/centcom_podlauncher.dm index f5490d5e85..e4060de1a2 100644 --- a/code/modules/cargo/centcom_podlauncher.dm +++ b/code/modules/cargo/centcom_podlauncher.dm @@ -284,11 +284,11 @@ var/list/expNames = list("Devastation", "Heavy Damage", "Light Damage", "Flame") //Explosions have a range of different types of damage var/list/boomInput = list() for (var/i=1 to expNames.len) //Gather input from the user for the value of each type of damage - boomInput.Add(tgui_input_num(usr, "Enter the [expNames[i]] range of the explosion. WARNING: This ignores the bomb cap!", "[expNames[i]] Range", 0)) + boomInput.Add(input("Enter the [expNames[i]] range of the explosion. WARNING: This ignores the bomb cap!", "[expNames[i]] Range", 0) as null|num) if (isnull(boomInput[i])) return if (!isnum(boomInput[i])) //If the user doesn't input a number, set that specific explosion value to zero - tgui_alert(usr, "That wasn't a number! Value set to default (zero) instead.") + alert(usr, "That wasn't a number! Value set to default (zero) instead.") boomInput = 0 explosionChoice = 1 temp_pod.explosionSize = boomInput @@ -306,11 +306,11 @@ damageChoice = 0 temp_pod.damage = 0 return - var/damageInput = tgui_input_num(usr, "Enter the amount of brute damage dealt by getting hit","How much damage to deal", 0) + var/damageInput = input("Enter the amount of brute damage dealt by getting hit","How much damage to deal", 0) as null|num if (isnull(damageInput)) return if (!isnum(damageInput)) //Sanitize the input for damage to deal.s - tgui_alert(usr, "That wasn't a number! Value set to default (zero) instead.") + alert(usr, "That wasn't a number! Value set to default (zero) instead.") damageInput = 0 damageChoice = 1 temp_pod.damage = damageInput @@ -330,10 +330,10 @@ temp_pod.adminNamed = FALSE temp_pod.setStyle(temp_pod.style) //This resets the name of the pod based on it's current style (see supplypod/setStyle() proc) return - var/nameInput= tgui_input_text(usr, "Custom name", "Enter a custom name", GLOB.podstyles[temp_pod.style][POD_NAME]) + var/nameInput= input("Custom name", "Enter a custom name", GLOB.podstyles[temp_pod.style][POD_NAME]) as null|text //Gather input for name and desc if (isnull(nameInput)) return - var/descInput = tgui_input_text(usr, "Custom description", "Enter a custom desc", GLOB.podstyles[temp_pod.style][POD_DESC]) //The GLOB.podstyles is used to get the name, desc, or icon state based on the pod's style + var/descInput = input("Custom description", "Enter a custom desc", GLOB.podstyles[temp_pod.style][POD_DESC]) as null|text //The GLOB.podstyles is used to get the name, desc, or icon state based on the pod's style if (isnull(descInput)) return temp_pod.name = nameInput @@ -344,14 +344,14 @@ if (temp_pod.effectShrapnel == TRUE) //If already doing custom damage, set back to default (no shrapnel) temp_pod.effectShrapnel = FALSE return - var/shrapnelInput = tgui_input_list(usr, "Please enter the type of pellet cloud you'd like to create on landing (Can be any projectile!)", "Projectile Typepath", sortList(subtypesof(/obj/item/projectile), /proc/cmp_typepaths_asc)) + var/shrapnelInput = input("Please enter the type of pellet cloud you'd like to create on landing (Can be any projectile!)", "Projectile Typepath", 0) in sortList(subtypesof(/obj/item/projectile), /proc/cmp_typepaths_asc) if (isnull(shrapnelInput)) return - var/shrapnelMagnitude = tgui_input_num(usr, "Enter the magnitude of the pellet cloud. This is usually a value around 1-5. Please note that Ryll-Ryll has asked me to tell you that if you go too crazy with the projectiles you might crash the server. So uh, be gentle!", "Shrapnel Magnitude", 0) + var/shrapnelMagnitude = input("Enter the magnitude of the pellet cloud. This is usually a value around 1-5. Please note that Ryll-Ryll has asked me to tell you that if you go too crazy with the projectiles you might crash the server. So uh, be gentle!", "Shrapnel Magnitude", 0) as null|num if (isnull(shrapnelMagnitude)) return if (!isnum(shrapnelMagnitude)) - tgui_alert(usr, "That wasn't a number! Value set to 3 instead.") + alert(usr, "That wasn't a number! Value set to 3 instead.") shrapnelMagnitude = 3 temp_pod.shrapnel_type = shrapnelInput temp_pod.shrapnel_magnitude = shrapnelMagnitude @@ -403,7 +403,7 @@ specificTarget = null return var/list/mobs = getpois()//code stolen from observer.dm - var/inputTarget = tgui_input_list(usr, "Select a mob! (Smiting does this automatically)", "Target", mobs) + var/inputTarget = input("Select a mob! (Smiting does this automatically)", "Target", null, null) as null|anything in mobs if (isnull(inputTarget)) return var/mob/target = mobs[inputTarget] @@ -448,11 +448,11 @@ if (found.file == tempSound.file) soundLen = found.len if (!soundLen) - soundLen = tgui_input_num(holder, "Couldn't auto-determine sound file length. What is the exact length of the sound file, in seconds. This number will be used to line the sound up so that it finishes right as the pod lands!", "Pick a Sound File", 0.3) + soundLen = input(holder, "Couldn't auto-determine sound file length. What is the exact length of the sound file, in seconds. This number will be used to line the sound up so that it finishes right as the pod lands!", "Pick a Sound File", 0.3) as null|num if (isnull(soundLen)) return if (!isnum(soundLen)) - tgui_alert(usr, "That wasn't a number! Value set to default ([initial(temp_pod.fallingSoundLength)*0.1]) instead.") + alert(usr, "That wasn't a number! Value set to default ([initial(temp_pod.fallingSoundLength)*0.1]) instead.") temp_pod.fallingSound = soundInput temp_pod.fallingSoundLength = 10 * soundLen . = TRUE @@ -487,7 +487,7 @@ if (temp_pod.soundVolume != initial(temp_pod.soundVolume)) temp_pod.soundVolume = initial(temp_pod.soundVolume) return - var/soundInput = tgui_input_num(holder, "Please pick a volume. Default is between 1 and 100 with 50 being average, but pick whatever. I'm a notification, not a cop. If you still cant hear your sound, consider turning on the Quiet effect. It will silence all pod sounds except for the custom admin ones set by the previous three buttons.", "Pick Admin Sound Volume") + var/soundInput = input(holder, "Please pick a volume. Default is between 1 and 100 with 50 being average, but pick whatever. I'm a notification, not a cop. If you still cant hear your sound, consider turning on the Quiet effect. It will silence all pod sounds except for the custom admin ones set by the previous three buttons.", "Pick Admin Sound Volume") as null|num if (isnull(soundInput)) return temp_pod.soundVolume = soundInput @@ -521,7 +521,7 @@ updateSelector() . = TRUE if("clearBay") //Delete all mobs and objs in the selected bay - if(tgui_alert(usr, "This will delete all objs and mobs in [bay]. Are you sure?", "Confirmation", list("Delete that shit", "No")) == "Delete that shit") + if(alert(usr, "This will delete all objs and mobs in [bay]. Are you sure?", "Confirmation", "Delete that shit", "No") == "Delete that shit") clearBay() refreshBay() . = TRUE diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index b9589d02bc..04b643e532 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -359,7 +359,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( if(alert_mob_dupe_login) spawn() - tgui_alert(mob, "You have logged in already with another key this round, please log out of this one NOW or risk being banned!") + alert(mob, "You have logged in already with another key this round, please log out of this one NOW or risk being banned!") connection_time = world.time connection_realtime = world.realtime diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 90fd95bdf0..cb262e57f3 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1612,17 +1612,17 @@ GLOBAL_LIST_EMPTY(preferences_datums) switch(href_list["preference"]) if("ghostform") if(unlock_content) - var/new_form = tgui_input_list(user, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND", GLOB.ghost_forms) + var/new_form = input(user, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_forms if(new_form) ghost_form = new_form if("ghostorbit") if(unlock_content) - var/new_orbit = tgui_input_list(user, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND", GLOB.ghost_orbits) + var/new_orbit = input(user, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND", null) as null|anything in GLOB.ghost_orbits if(new_orbit) ghost_orbit = new_orbit if("ghostaccs") - var/new_ghost_accs = tgui_alert(user, "Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,list(GHOST_ACCS_FULL_NAME, GHOST_ACCS_DIR_NAME, GHOST_ACCS_NONE_NAME)) + var/new_ghost_accs = alert("Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,GHOST_ACCS_FULL_NAME, GHOST_ACCS_DIR_NAME, GHOST_ACCS_NONE_NAME) switch(new_ghost_accs) if(GHOST_ACCS_FULL_NAME) ghost_accs = GHOST_ACCS_FULL @@ -1632,7 +1632,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) ghost_accs = GHOST_ACCS_NONE if("ghostothers") - var/new_ghost_others = tgui_alert(user, "Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,list(GHOST_OTHERS_THEIR_SETTING_NAME, GHOST_OTHERS_DEFAULT_SPRITE_NAME, GHOST_OTHERS_SIMPLE_NAME)) + var/new_ghost_others = alert("Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,GHOST_OTHERS_THEIR_SETTING_NAME, GHOST_OTHERS_DEFAULT_SPRITE_NAME, GHOST_OTHERS_SIMPLE_NAME) switch(new_ghost_others) if(GHOST_OTHERS_THEIR_SETTING_NAME) ghost_others = GHOST_OTHERS_THEIR_SETTING @@ -1642,7 +1642,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) ghost_others = GHOST_OTHERS_SIMPLE if("name") - var/new_name = tgui_input_text(user, "Choose your character's name:", "Character Preference", real_name) + var/new_name = input(user, "Choose your character's name:", "Character Preference") as text|null if(new_name) new_name = reject_bad_name(new_name) if(new_name) @@ -1651,7 +1651,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") if("age") - var/new_age = tgui_input_num(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference", age) + var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null if(new_age) age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN) @@ -1692,7 +1692,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("hair_style") var/new_hair_style - new_hair_style = tgui_input_list(user, "Choose your character's hair style:", "Character Preference", GLOB.hair_styles_list) + new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_list if(new_hair_style) hair_style = new_hair_style @@ -1709,7 +1709,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("facial_hair_style") var/new_facial_hair_style - new_facial_hair_style = tgui_input_list(user, "Choose your character's facial-hair style:", "Character Preference", GLOB.facial_hair_styles_list) + new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_list if(new_facial_hair_style) facial_hair_style = new_facial_hair_style @@ -1726,7 +1726,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("grad_style") var/new_grad_style - new_grad_style = tgui_input_list(user, "Choose your character's hair gradient style:", "Character Preference", GLOB.hair_gradients_list) + new_grad_style = input(user, "Choose your character's hair gradient style:", "Character Preference") as null|anything in GLOB.hair_gradients_list if(new_grad_style) grad_style = new_grad_style @@ -1740,12 +1740,12 @@ GLOBAL_LIST_EMPTY(preferences_datums) bgstate = next_list_item(bgstate, bgstate_options) if("modify_limbs") - var/limb_type = tgui_input_list(user, "Choose the limb to modify:", "Character Preference", LOADOUT_ALLOWED_LIMB_TARGETS) + var/limb_type = input(user, "Choose the limb to modify:", "Character Preference") as null|anything in LOADOUT_ALLOWED_LIMB_TARGETS if(limb_type) - var/modification_type = tgui_input_list(user, "Choose the modification to the limb:", "Character Preference", LOADOUT_LIMBS) + var/modification_type = input(user, "Choose the modification to the limb:", "Character Preference") as null|anything in LOADOUT_LIMBS if(modification_type) if(modification_type == LOADOUT_LIMB_PROSTHETIC) - var/prosthetic_type = tgui_input_list(user, "Choose the type of prosthetic", "Character Preference", list("prosthetic") + GLOB.prosthetic_limb_types) + var/prosthetic_type = input(user, "Choose the type of prosthetic", "Character Preference") as null|anything in (list("prosthetic") + GLOB.prosthetic_limb_types) if(prosthetic_type) var/number_of_prosthetics = 0 for(var/modified_limb in modified_limbs) @@ -1763,7 +1763,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) modified_limbs[limb_type] = list(modification_type) if("underwear") - var/new_underwear = tgui_input_list(user, "Choose your character's underwear:", "Character Preference", GLOB.underwear_list) + var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_list if(new_underwear) underwear = new_underwear @@ -1773,7 +1773,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) undie_color = sanitize_hexcolor(n_undie_color, 6) if("undershirt") - var/new_undershirt = tgui_input_list(user, "Choose your character's undershirt:", "Character Preference", GLOB.undershirt_list) + var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_list if(new_undershirt) undershirt = new_undershirt @@ -1783,7 +1783,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) shirt_color = sanitize_hexcolor(n_shirt_color, 6) if("socks") - var/new_socks = tgui_input_list(user, "Choose your character's socks:", "Character Preference", GLOB.socks_list) + var/new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in GLOB.socks_list if(new_socks) socks = new_socks @@ -1809,7 +1809,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) right_eye_color = sanitize_hexcolor(new_eyes, 6) if("eye_type") - var/new_eye_type = tgui_input_list(user, "Choose your character's eye type.", "Character Preference", GLOB.eye_types) + var/new_eye_type = input(user, "Choose your character's eye type.", "Character Preference") as null|anything in GLOB.eye_types if(new_eye_type) eye_type = new_eye_type @@ -1818,7 +1818,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) right_eye_color = left_eye_color if("species") - var/result = tgui_input_list(user, "Select a species", "Species Selection", GLOB.roundstart_race_names) + var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_race_names if(result) var/newtype = GLOB.species_list[GLOB.roundstart_race_names[result]] pref_species = new newtype() @@ -1848,7 +1848,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) eye_type = pref_species.eye_type if("custom_species") - var/new_species = reject_bad_name(tgui_input_text(user, "Choose your species subtype, if unique. This will show up on examinations and health scans. Do not abuse this:", "Character Preference", custom_species)) + var/new_species = reject_bad_name(input(user, "Choose your species subtype, if unique. This will show up on examinations and health scans. Do not abuse this:", "Character Preference", custom_species) as null|text) if(new_species) custom_species = new_species else @@ -1892,7 +1892,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("ipc_screen") var/new_ipc_screen - new_ipc_screen = tgui_input_list(user, "Choose your character's screen:", "Character Preference", GLOB.ipc_screens_list) + new_ipc_screen = input(user, "Choose your character's screen:", "Character Preference") as null|anything in GLOB.ipc_screens_list if(new_ipc_screen) features["ipc_screen"] = new_ipc_screen @@ -1908,31 +1908,31 @@ GLOBAL_LIST_EMPTY(preferences_datums) if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey))) snowflake_antenna_list[S.name] = path var/new_ipc_antenna - new_ipc_antenna = tgui_input_list(user, "Choose your character's antenna:", "Character Preference", snowflake_antenna_list) + new_ipc_antenna = input(user, "Choose your character's antenna:", "Character Preference") as null|anything in snowflake_antenna_list if(new_ipc_antenna) features["ipc_antenna"] = new_ipc_antenna if("arachnid_legs") var/new_arachnid_legs - new_arachnid_legs = tgui_input_list(user, "Choose your character's variant of arachnid legs:", "Character Preference", GLOB.arachnid_legs_list) + new_arachnid_legs = input(user, "Choose your character's variant of arachnid legs:", "Character Preference") as null|anything in GLOB.arachnid_legs_list if(new_arachnid_legs) features["arachnid_legs"] = new_arachnid_legs if("arachnid_spinneret") var/new_arachnid_spinneret - new_arachnid_spinneret = tgui_input_list(user, "Choose your character's spinneret markings:", "Character Preference", GLOB.arachnid_spinneret_list) + new_arachnid_spinneret = input(user, "Choose your character's spinneret markings:", "Character Preference") as null|anything in GLOB.arachnid_spinneret_list if(new_arachnid_spinneret) features["arachnid_spinneret"] = new_arachnid_spinneret if("arachnid_mandibles") var/new_arachnid_mandibles - new_arachnid_mandibles = tgui_input_list(user, "Choose your character's variant of mandibles:", "Character Preference", GLOB.arachnid_mandibles_list) + new_arachnid_mandibles = input(user, "Choose your character's variant of mandibles:", "Character Preference") as null|anything in GLOB.arachnid_mandibles_list if (new_arachnid_mandibles) features["arachnid_mandibles"] = new_arachnid_mandibles if("tail_lizard") var/new_tail - new_tail = tgui_input_list(user, "Choose your character's tail:", "Character Preference", GLOB.tails_list_lizard) + new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.tails_list_lizard if(new_tail) features["tail_lizard"] = new_tail if(new_tail != "None") @@ -1951,7 +1951,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey))) snowflake_tails_list[S.name] = path var/new_tail - new_tail = tgui_input_list(user, "Choose your character's tail:", "Character Preference", snowflake_tails_list) + new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in snowflake_tails_list if(new_tail) features["tail_human"] = new_tail if(new_tail != "None") @@ -1970,7 +1970,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey))) snowflake_tails_list[S.name] = path var/new_tail - new_tail = tgui_input_list(user, "Choose your character's tail:", "Character Preference", snowflake_tails_list) + new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in snowflake_tails_list if(new_tail) features["mam_tail"] = new_tail if(new_tail != "None") @@ -1980,7 +1980,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("meat_type") var/new_meat - new_meat = tgui_input_list(user, "Choose your character's meat type:", "Character Preference", GLOB.meat_types) + new_meat = input(user, "Choose your character's meat type:", "Character Preference") as null|anything in GLOB.meat_types if(new_meat) features["meat_type"] = new_meat @@ -1995,7 +1995,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey))) snowflake_snouts_list[S.name] = path var/new_snout - new_snout = tgui_input_list(user, "Choose your character's snout:", "Character Preference", snowflake_snouts_list) + new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in snowflake_snouts_list if(new_snout) features["snout"] = new_snout features["mam_snouts"] = "None" @@ -2012,14 +2012,14 @@ GLOBAL_LIST_EMPTY(preferences_datums) if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey))) snowflake_mam_snouts_list[S.name] = path var/new_mam_snouts - new_mam_snouts = tgui_input_list(user, "Choose your character's snout:", "Character Preference", snowflake_mam_snouts_list) + new_mam_snouts = input(user, "Choose your character's snout:", "Character Preference") as null|anything in snowflake_mam_snouts_list if(new_mam_snouts) features["mam_snouts"] = new_mam_snouts features["snout"] = "None" if("horns") var/new_horns - new_horns = tgui_input_list(user, "Choose your character's horns:", "Character Preference", GLOB.horns_list) + new_horns = input(user, "Choose your character's horns:", "Character Preference") as null|anything in GLOB.horns_list if(new_horns) features["horns"] = new_horns @@ -2033,7 +2033,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("wings") var/new_wings - new_wings = tgui_input_list(user, "Choose your character's wings:", "Character Preference", GLOB.r_wings_list) + new_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.r_wings_list if(new_wings) features["wings"] = new_wings @@ -2047,61 +2047,61 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("frills") var/new_frills - new_frills = tgui_input_list(user, "Choose your character's frills:", "Character Preference", GLOB.frills_list) + new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in GLOB.frills_list if(new_frills) features["frills"] = new_frills if("spines") var/new_spines - new_spines = tgui_input_list(user, "Choose your character's spines:", "Character Preference", GLOB.spines_list) + new_spines = input(user, "Choose your character's spines:", "Character Preference") as null|anything in GLOB.spines_list if(new_spines) features["spines"] = new_spines if("legs") var/new_legs - new_legs = tgui_input_list(user, "Choose your character's legs:", "Character Preference", GLOB.legs_list) + new_legs = input(user, "Choose your character's legs:", "Character Preference") as null|anything in GLOB.legs_list if(new_legs) features["legs"] = new_legs if("insect_wings") var/new_insect_wings - new_insect_wings = tgui_input_list(user, "Choose your character's wings:", "Character Preference", GLOB.insect_wings_list) + new_insect_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_wings_list if(new_insect_wings) features["insect_wings"] = new_insect_wings if("deco_wings") var/new_deco_wings - new_deco_wings = tgui_input_list(user, "Choose your character's wings:", "Character Preference", GLOB.deco_wings_list) + new_deco_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.deco_wings_list if(new_deco_wings) features["deco_wings"] = new_deco_wings if("insect_fluff") var/new_insect_fluff - new_insect_fluff = tgui_input_list(user, "Choose your character's wings:", "Character Preference", GLOB.insect_fluffs_list) + new_insect_fluff = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_fluffs_list if(new_insect_fluff) features["insect_fluff"] = new_insect_fluff if("insect_markings") var/new_insect_markings - new_insect_markings = tgui_input_list(user, "Choose your character's markings:", "Character Preference", GLOB.insect_markings_list) + new_insect_markings = input(user, "Choose your character's markings:", "Character Preference") as null|anything in GLOB.insect_markings_list if(new_insect_markings) features["insect_markings"] = new_insect_markings if("arachnid_legs") var/new_arachnid_legs - new_arachnid_legs = tgui_input_list(user, "Choose your character's variant of arachnid legs:", "Character Preference", GLOB.arachnid_legs_list) + new_arachnid_legs = input(user, "Choose your character's variant of arachnid legs:", "Character Preference") as null|anything in GLOB.arachnid_legs_list if(new_arachnid_legs) features["arachnid_legs"] = new_arachnid_legs if("arachnid_spinneret") var/new_arachnid_spinneret - new_arachnid_spinneret = tgui_input_list(user, "Choose your character's spinneret markings:", "Character Preference", GLOB.arachnid_spinneret_list) + new_arachnid_spinneret = input(user, "Choose your character's spinneret markings:", "Character Preference") as null|anything in GLOB.arachnid_spinneret_list if(new_arachnid_spinneret) features["arachnid_spinneret"] = new_arachnid_spinneret if("arachnid_mandibles") var/new_arachnid_mandibles - new_arachnid_mandibles = tgui_input_list(user, "Choose your character's variant of mandibles:", "Character Preference", GLOB.arachnid_mandibles_list) + new_arachnid_mandibles = input(user, "Choose your character's variant of mandibles:", "Character Preference") as null|anything in GLOB.arachnid_mandibles_list if (new_arachnid_mandibles) features["arachnid_mandibles"] = new_arachnid_mandibles @@ -2109,7 +2109,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/list/choices = GLOB.skin_tones - GLOB.nonstandard_skin_tones if(CONFIG_GET(flag/allow_custom_skintones)) choices += "custom" - var/new_s_tone = tgui_input_list(user, "Choose your character's skin tone:", "Character Preference", choices) + var/new_s_tone = input(user, "Choose your character's skin tone:", "Character Preference") as null|anything in choices if(new_s_tone) if(new_s_tone == "custom") var/default = use_custom_skin_tone ? skin_tone : null @@ -2136,7 +2136,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey))) snowflake_taur_list[S.name] = path var/new_taur - new_taur = tgui_input_list(user, "Choose your character's tauric body:", "Character Preference", snowflake_taur_list) + new_taur = input(user, "Choose your character's tauric body:", "Character Preference") as null|anything in snowflake_taur_list if(new_taur) features["taur"] = new_taur if(new_taur != "None") @@ -2157,7 +2157,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey))) snowflake_ears_list[S.name] = path var/new_ears - new_ears = tgui_input_list(user, "Choose your character's ears:", "Character Preference", snowflake_ears_list) + new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in snowflake_ears_list if(new_ears) features["ears"] = new_ears @@ -2172,20 +2172,20 @@ GLOBAL_LIST_EMPTY(preferences_datums) if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey))) snowflake_ears_list[S.name] = path var/new_ears - new_ears = tgui_input_list(user, "Choose your character's ears:", "Character Preference", snowflake_ears_list) + new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in snowflake_ears_list if(new_ears) features["mam_ears"] = new_ears //Xeno Bodyparts if("xenohead")//Head or caste type var/new_head - new_head = tgui_input_list(user, "Choose your character's caste:", "Character Preference", GLOB.xeno_head_list) + new_head = input(user, "Choose your character's caste:", "Character Preference") as null|anything in GLOB.xeno_head_list if(new_head) features["xenohead"] = new_head if("xenotail")//Currently one one type, more maybe later if someone sprites them. Might include animated variants in the future. var/new_tail - new_tail = tgui_input_list(user, "Choose your character's tail:", "Character Preference", GLOB.xeno_tail_list) + new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.xeno_tail_list if(new_tail) features["xenotail"] = new_tail if(new_tail != "None") @@ -2196,7 +2196,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("xenodorsal") var/new_dors - new_dors = tgui_input_list(user, "Choose your character's dorsal tube type:", "Character Preference", GLOB.xeno_dorsal_list) + new_dors = input(user, "Choose your character's dorsal tube type:", "Character Preference") as null|anything in GLOB.xeno_dorsal_list if(new_dors) features["xenodorsal"] = new_dors @@ -2239,7 +2239,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("cock_length") var/min_D = CONFIG_GET(number/penis_min_inches_prefs) var/max_D = CONFIG_GET(number/penis_max_inches_prefs) - var/new_length = tgui_input_num(user, "Penis length in inches:\n([min_D]-[max_D])", "Character Preference", features["cock_length"]) + var/new_length = input(user, "Penis length in inches:\n([min_D]-[max_D])", "Character Preference") as num|null if(new_length) features["cock_length"] = clamp(round(new_length), min_D, max_D) @@ -2252,7 +2252,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/datum/sprite_accessory/penis/P = GLOB.cock_shapes_list[A] if(P.taur_icon && T.taur_mode & P.accepted_taurs) LAZYSET(hockeys, "[A] (Taur)", A) - new_shape = tgui_input_list(user, "Penis shape:", "Character Preference", GLOB.cock_shapes_list + hockeys) + new_shape = input(user, "Penis shape:", "Character Preference") as null|anything in (GLOB.cock_shapes_list + hockeys) if(new_shape) features["cock_taur"] = FALSE if(hockeys[new_shape]) @@ -2261,7 +2261,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) features["cock_shape"] = new_shape if("cock_visibility") - var/n_vis = tgui_input_list(user, "Penis Visibility", "Character Preference", CONFIG_GET(keyed_list/safe_visibility_toggles)) + var/n_vis = input(user, "Penis Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles) if(n_vis) features["cock_visibility"] = n_vis @@ -2277,18 +2277,18 @@ GLOBAL_LIST_EMPTY(preferences_datums) to_chat(user,"Invalid color. Your color is not bright enough.") if("balls_visibility") - var/n_vis = tgui_input_list(user, "Testicles Visibility", "Character Preference", CONFIG_GET(keyed_list/safe_visibility_toggles)) + var/n_vis = input(user, "Testicles Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles) if(n_vis) features["balls_visibility"] = n_vis if("breasts_size") - var/new_size = tgui_input_list(user, "Breast Size", "Character Preference", CONFIG_GET(keyed_list/breasts_cups_prefs)) + var/new_size = input(user, "Breast Size", "Character Preference") as null|anything in CONFIG_GET(keyed_list/breasts_cups_prefs) if(new_size) features["breasts_size"] = new_size if("breasts_shape") var/new_shape - new_shape = tgui_input_list(user, "Breast Shape", "Character Preference", GLOB.breasts_shapes_list) + new_shape = input(user, "Breast Shape", "Character Preference") as null|anything in GLOB.breasts_shapes_list if(new_shape) features["breasts_shape"] = new_shape @@ -2304,13 +2304,13 @@ GLOBAL_LIST_EMPTY(preferences_datums) to_chat(user,"Invalid color. Your color is not bright enough.") if("breasts_visibility") - var/n_vis = tgui_input_list(user, "Breasts Visibility", "Character Preference", CONFIG_GET(keyed_list/safe_visibility_toggles)) + var/n_vis = input(user, "Breasts Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles) if(n_vis) features["breasts_visibility"] = n_vis if("vag_shape") var/new_shape - new_shape = tgui_input_list(user, "Vagina Type", "Character Preference", GLOB.vagina_shapes_list) + new_shape = input(user, "Vagina Type", "Character Preference") as null|anything in GLOB.vagina_shapes_list if(new_shape) features["vag_shape"] = new_shape @@ -2326,7 +2326,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) to_chat(user,"Invalid color. Your color is not bright enough.") if("vag_visibility") - var/n_vis = tgui_input_list(user, "Vagina Visibility", "Character Preference", CONFIG_GET(keyed_list/safe_visibility_toggles)) + var/n_vis = input(user, "Vagina Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles) if(n_vis) features["vag_visibility"] = n_vis @@ -2341,7 +2341,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) aooccolor = new_aooccolor if("bag") - var/new_backbag = tgui_input_list(user, "Choose your character's style of bag:", "Character Preference", GLOB.backbaglist) + var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in GLOB.backbaglist if(new_backbag) backbag = new_backbag @@ -2353,17 +2353,17 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("uplink_loc") - var/new_loc = tgui_input_list(user, "Choose your character's traitor uplink spawn location:", "Character Preference", GLOB.uplink_spawn_loc_list) + var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in GLOB.uplink_spawn_loc_list if(new_loc) uplink_spawn_loc = new_loc if("ai_core_icon") - var/ai_core_icon = tgui_input_list(user, "Choose your preferred AI core display screen:", "AI Core Display Screen Selection", GLOB.ai_core_display_screens) + var/ai_core_icon = input(user, "Choose your preferred AI core display screen:", "AI Core Display Screen Selection") as null|anything in GLOB.ai_core_display_screens if(ai_core_icon) preferred_ai_core_display = ai_core_icon if("sec_dept") - var/department = tgui_input_list(user, "Choose your preferred security department:", "Security Departments", GLOB.security_depts_prefs) + var/department = input(user, "Choose your preferred security department:", "Security Departments") as null|anything in GLOB.security_depts_prefs if(department) prefered_security_department = department @@ -2379,26 +2379,26 @@ GLOBAL_LIST_EMPTY(preferences_datums) friendlyname += " (disabled)" maplist[friendlyname] = VM.map_name maplist[default] = null - var/pickedmap = tgui_input_list(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference", maplist) + var/pickedmap = input(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference") as null|anything in maplist if (pickedmap) preferred_map = maplist[pickedmap] if ("preferred_chaos") - var/pickedchaos = tgui_input_list(user, "Choose your preferred level of chaos. This will help with dynamic threat level ratings.", "Character Preference", list(CHAOS_NONE,CHAOS_LOW,CHAOS_MED,CHAOS_HIGH,CHAOS_MAX)) + var/pickedchaos = input(user, "Choose your preferred level of chaos. This will help with dynamic threat level ratings.", "Character Preference") as null|anything in list(CHAOS_NONE,CHAOS_LOW,CHAOS_MED,CHAOS_HIGH,CHAOS_MAX) preferred_chaos = pickedchaos if ("clientfps") - var/desiredfps = tgui_input_num(user, "Choose your desired fps. (0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) + var/desiredfps = input(user, "Choose your desired fps. (0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num if (!isnull(desiredfps)) clientfps = desiredfps parent.fps = desiredfps if("ui") - var/pickedui = tgui_input_list(user, "Choose your UI style.", "Character Preference", GLOB.available_ui_styles) + var/pickedui = input(user, "Choose your UI style.", "Character Preference", UI_style) as null|anything in GLOB.available_ui_styles if(pickedui) UI_style = pickedui if (parent && parent.mob && parent.mob.hud_used) parent.mob.hud_used.update_ui_style(ui_style2icon(UI_style)) if("pda_style") - var/pickedPDAStyle = tgui_input_list(user, "Choose your PDA style.", "Character Preference", GLOB.pda_styles) + var/pickedPDAStyle = input(user, "Choose your PDA style.", "Character Preference", pda_style) as null|anything in GLOB.pda_styles if(pickedPDAStyle) pda_style = pickedPDAStyle if("pda_color") @@ -2406,11 +2406,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(pickedPDAColor) pda_color = pickedPDAColor if("pda_skin") - var/pickedPDASkin = tgui_input_list(user, "Choose your PDA reskin.", "Character Preference", pda_skin, GLOB.pda_reskins) + var/pickedPDASkin = input(user, "Choose your PDA reskin.", "Character Preference", pda_skin) as null|anything in GLOB.pda_reskins if(pickedPDASkin) pda_skin = pickedPDASkin if ("max_chat_length") - var/desiredlength = tgui_input_num(user, "Choose the max character length of shown Runechat messages. Valid range is 1 to [CHAT_MESSAGE_MAX_LENGTH] (default: [initial(max_chat_length)]))", "Character Preference", max_chat_length) + var/desiredlength = input(user, "Choose the max character length of shown Runechat messages. Valid range is 1 to [CHAT_MESSAGE_MAX_LENGTH] (default: [initial(max_chat_length)]))", "Character Preference", max_chat_length) as null|num if (!isnull(desiredlength)) max_chat_length = clamp(desiredlength, 1, CHAT_MESSAGE_MAX_LENGTH) @@ -2420,7 +2420,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) hud_toggle_color = new_toggle_color if("gender") - var/chosengender = tgui_input_list(user, "Select your character's gender.", "Gender Selection", list(MALE,FEMALE,"nonbinary","object")) + var/chosengender = input(user, "Select your character's gender.", "Gender Selection", gender) as null|anything in list(MALE,FEMALE,"nonbinary","object") if(!chosengender) return switch(chosengender) @@ -2435,27 +2435,27 @@ GLOBAL_LIST_EMPTY(preferences_datums) gender = chosengender if("body_size") - var/new_body_size = tgui_input_num(user, "Choose your desired sprite size: (90-125%)\nWarning: This may make your character look distorted. Additionally, any size under 100% takes a 10% maximum health penalty", "Character Preference", features["body_size"]*100) + var/new_body_size = input(user, "Choose your desired sprite size: (90-125%)\nWarning: This may make your character look distorted. Additionally, any size under 100% takes a 10% maximum health penalty", "Character Preference", features["body_size"]*100) as num|null if(new_body_size) features["body_size"] = clamp(new_body_size * 0.01, CONFIG_GET(number/body_size_min), CONFIG_GET(number/body_size_max)) if("tongue") - var/selected_custom_tongue = tgui_input_list(user, "Choose your desired tongue (none means your species tongue)", "Character Preference", GLOB.roundstart_tongues) + var/selected_custom_tongue = input(user, "Choose your desired tongue (none means your species tongue)", "Character Preference") as null|anything in GLOB.roundstart_tongues if(selected_custom_tongue) custom_tongue = selected_custom_tongue if("speech_verb") - var/selected_custom_speech_verb = tgui_input_list(user, "Choose your desired speech verb (none means your species speech verb)", "Character Preference", GLOB.speech_verbs) + var/selected_custom_speech_verb = input(user, "Choose your desired speech verb (none means your species speech verb)", "Character Preference") as null|anything in GLOB.speech_verbs if(selected_custom_speech_verb) custom_speech_verb = selected_custom_speech_verb if("language") - var/selected_language = tgui_input_list(user, "Choose your desired additional language", "Character Preference", GLOB.roundstart_languages) + var/selected_language = input(user, "Choose your desired additional language", "Character Preference") as null|anything in GLOB.roundstart_languages if(selected_language) additional_language = selected_language if("bodysprite") - var/selected_body_sprite = tgui_input_list(user, "Choose your desired body sprite", "Character Preference", pref_species.allowed_limb_ids) + var/selected_body_sprite = input(user, "Choose your desired body sprite", "Character Preference") as null|anything in pref_species.allowed_limb_ids if(selected_body_sprite) chosen_limb_id = selected_body_sprite //this gets sanitized before loading @@ -2496,7 +2496,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) // add a marking var/marking_type = href_list["marking_type"] if(marking_type && features[marking_type]) - var/selected_limb = tgui_input_list(user, "Choose the limb to apply to.", "Character Preference", list("Head", "Chest", "Left Arm", "Right Arm", "Left Leg", "Right Leg", "All")) + var/selected_limb = input(user, "Choose the limb to apply to.", "Character Preference") as null|anything in list("Head", "Chest", "Left Arm", "Right Arm", "Left Leg", "Right Leg", "All") if(selected_limb) var/list/marking_list = GLOB.mam_body_markings_list var/list/snowflake_markings_list = list() @@ -2511,7 +2511,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey))) snowflake_markings_list[S.name] = path - var/selected_marking = tgui_input_list(user, "Select the marking to apply to the limb.", snowflake_markings_list) + var/selected_marking = input(user, "Select the marking to apply to the limb.") as null|anything in snowflake_markings_list if(selected_marking) if(selected_limb != "All") var/limb_value = text2num(GLOB.bodypart_values[selected_limb]) @@ -2534,7 +2534,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) options += "Secondary" if(number_colors == 3) options += "Tertiary" - var/color_option = tgui_input_list(user, "Select the colour you wish to edit", "", options) + var/color_option = input(user, "Select the colour you wish to edit") as null|anything in options if(color_option) if(color_option == "Secondary") color_number = 2 if(color_option == "Tertiary") color_number = 3 @@ -2623,7 +2623,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("no_tetris_storage") no_tetris_storage = !no_tetris_storage if ("screenshake") - var/desiredshake = tgui_input_num(user, "Set the amount of screenshake you want. \n(0 = disabled, 100 = full, 200 = maximum.)", "Character Preference", screenshake) + var/desiredshake = input(user, "Set the amount of screenshake you want. \n(0 = disabled, 100 = full, 200 = maximum.)", "Character Preference", screenshake) as null|num if (!isnull(desiredshake)) screenshake = desiredshake if("damagescreenshake") @@ -2718,7 +2718,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) save_preferences() if("keybindings_reset") - var/choice = tgui_alert(user, "Would you prefer 'hotkey' or 'classic' defaults?", "Setup keybindings", list("Hotkey", "Classic", "Cancel")) + var/choice = tgalert(user, "Would you prefer 'hotkey' or 'classic' defaults?", "Setup keybindings", "Hotkey", "Classic", "Cancel") if(choice == "Cancel") ShowChoices(user) return @@ -2971,7 +2971,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/list/color_options = list() for(var/i=1, i<=length(G.loadout_initial_colors), i++) color_options += "Color [i]" - var/color_to_change = tgui_input_list(user, "Polychromic options", "Recolor [name]", color_options) + var/color_to_change = input(user, "Polychromic options", "Recolor [name]") as null|anything in color_options if(color_to_change) var/color_index = text2num(copytext(color_to_change, 7)) var/current_color = user_gear[LOADOUT_COLOR][color_index] @@ -3175,7 +3175,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(!namedata) return - var/raw_name = tgui_input_text(user, "Choose your character's [namedata["qdesc"]]:","Character Preference", custom_names[name_id]) + var/raw_name = input(user, "Choose your character's [namedata["qdesc"]]:","Character Preference") as text|null if(!raw_name) if(namedata["allow_null"]) custom_names[name_id] = get_default_name(name_id) @@ -3199,7 +3199,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) /// Resets the client's keybindings. Asks them for which /datum/preferences/proc/force_reset_keybindings() - var/choice = tgui_alert(parent.mob, "Your basic keybindings need to be reset, emotes will remain as before. Would you prefer 'hotkey' or 'classic' mode?", "Reset keybindings", list("Hotkey", "Classic")) + var/choice = tgalert(parent.mob, "Your basic keybindings need to be reset, emotes will remain as before. Would you prefer 'hotkey' or 'classic' mode?", "Reset keybindings", "Hotkey", "Classic") hotkeys = (choice != "Classic") force_reset_keybindings_direct(hotkeys) diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index c2b06253c9..a019ade471 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -277,9 +277,9 @@ GLOBAL_LIST_INIT(ghost_forms, list("ghost","ghostking","ghostian2","skeleghost", "ghost_mellow","ghost_rainbow","ghost_camo","ghost_fire", "catghost")) /client/proc/pick_form() if(!is_content_unlocked()) - tgui_alert(src, "This setting is for accounts with BYOND premium only.") + alert("This setting is for accounts with BYOND premium only.") return - var/new_form = tgui_input_list(src, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND", GLOB.ghost_forms) + var/new_form = input(src, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_forms if(new_form) prefs.ghost_form = new_form prefs.save_preferences() @@ -291,9 +291,9 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS /client/proc/pick_ghost_orbit() if(!is_content_unlocked()) - tgui_alert(src, "This setting is for accounts with BYOND premium only.") + alert("This setting is for accounts with BYOND premium only.") return - var/new_orbit = tgui_input_list(src, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND", GLOB.ghost_orbits) + var/new_orbit = input(src, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_orbits if(new_orbit) prefs.ghost_orbit = new_orbit prefs.save_preferences() @@ -302,7 +302,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS O.ghost_orbit = new_orbit /client/proc/pick_ghost_accs() - var/new_ghost_accs = tgui_alert(src, "Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,list("full accessories", "only directional sprites", "default sprites")) + var/new_ghost_accs = alert("Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,"full accessories", "only directional sprites", "default sprites") if(new_ghost_accs) switch(new_ghost_accs) if("full accessories") @@ -321,7 +321,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS set category = "Preferences" set desc = "Customize your ghastly appearance." if(is_content_unlocked()) - switch(tgui_alert(src, "Which setting do you want to change?",,list("Ghost Form","Ghost Orbit","Ghost Accessories"))) + switch(alert("Which setting do you want to change?",,"Ghost Form","Ghost Orbit","Ghost Accessories")) if("Ghost Form") pick_form() if("Ghost Orbit") @@ -335,7 +335,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS set name = "Ghosts of Others" set category = "Preferences" set desc = "Change display settings for the ghosts of other players." - var/new_ghost_others = tgui_alert(src, "Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,list("Their Setting", "Default Sprites", "White Ghost")) + var/new_ghost_others = alert("Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,"Their Setting", "Default Sprites", "White Ghost") if(new_ghost_others) switch(new_ghost_others) if("Their Setting") diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index f8a3cf5ffb..07087e70a3 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -37,7 +37,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8") msg = emoji_parse(msg) if((msg[1] in list(".",";",":","#")) || findtext_char(msg, "say", 1, 5)) - if(tgui_alert(src, "Your message \"[raw_msg]\" looks like it was meant for in game communication, say it in OOC?", "Meant for OOC?", list("No", "Yes")) != "Yes") + if(alert("Your message \"[raw_msg]\" looks like it was meant for in game communication, say it in OOC?", "Meant for OOC?", "No", "Yes") != "Yes") return if(!holder) @@ -215,7 +215,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8") else choices[C] = C choices = sortList(choices) - var/selection = tgui_input_list(src, "Please, select a player!", "Ignore", choices) + var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in choices if(!selection || !(selection in choices)) return selection = choices[selection] diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm index fbfba04996..453c22e7f2 100644 --- a/code/modules/client/verbs/suicide.dm +++ b/code/modules/client/verbs/suicide.dm @@ -5,7 +5,7 @@ if(!canSuicide()) return var/oldkey = ckey - var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(ckey != oldkey) return if(!canSuicide()) @@ -84,7 +84,7 @@ set hidden = 1 if(!canSuicide()) return - var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(!canSuicide()) return if(confirm == "Yes") @@ -100,7 +100,7 @@ set hidden = 1 if(!canSuicide()) return - var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(!canSuicide()) return if(confirm == "Yes") @@ -117,7 +117,7 @@ set hidden = 1 if(!canSuicide()) return - var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(!canSuicide()) return if(confirm == "Yes") @@ -135,7 +135,7 @@ set hidden = 1 if(!canSuicide()) return - var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(!canSuicide()) return if(confirm == "Yes") @@ -151,7 +151,7 @@ /mob/living/silicon/pai/verb/suicide() set hidden = 1 - var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(confirm == "Yes") var/turf/T = get_turf(src.loc) T.visible_message("[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"", null, \ @@ -167,7 +167,7 @@ set hidden = 1 if(!canSuicide()) return - var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(!canSuicide()) return if(confirm == "Yes") @@ -186,7 +186,7 @@ set hidden = 1 if(!canSuicide()) return - var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(!canSuicide()) return if(confirm == "Yes") diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 1713a558cd..008772663d 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -93,7 +93,7 @@ /datum/action/chameleon_outfit/proc/select_outfit(mob/user) if(!user || !IsAvailable()) return FALSE - var/selected = tgui_input_list(user, "Select outfit to change into", "Chameleon Outfit", outfit_options) + var/selected = input("Select outfit to change into", "Chameleon Outfit") as null|anything in outfit_options if(!IsAvailable() || QDELETED(src) || QDELETED(user)) return FALSE var/outfit_type = outfit_options[selected] @@ -178,7 +178,7 @@ /datum/action/item_action/chameleon/change/proc/select_look(mob/user) var/obj/item/picked_item var/picked_name - picked_name = tgui_input_list(user, "Select [chameleon_name] to change into", "Chameleon [chameleon_name]", chameleon_list) + picked_name = input("Select [chameleon_name] to change into", "Chameleon [chameleon_name]", picked_name) as null|anything in chameleon_list if(!picked_name) return picked_item = chameleon_list[picked_name] diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 60db121b72..cd48a81350 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -986,7 +986,7 @@ to_chat(user, "You can't do that right now!") return TRUE - if(tgui_alert(user, "Are you sure you want to recolor your armor stripes?", "Confirm Repaint", list("Yes", "No")) == "Yes") + if(alert("Are you sure you want to recolor your armor stripes?", "Confirm Repaint", "Yes", "No") == "Yes") var/energy_color_input = input(usr,"","Choose Energy Color",energy_color) as color|null if(energy_color_input) energy_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index 1535e9265d..59af632d2a 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -232,7 +232,7 @@ return 0 var/list/modes = list("Off", "Binary vitals", "Exact vitals", "Tracking beacon") - var/switchMode = tgui_input_list(usr, "Select a sensor mode:", "Suit Sensor Mode", modes) + var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes if(get_dist(usr, src) > 1) to_chat(usr, "You have moved too far away!") return diff --git a/code/modules/economy/paystand.dm b/code/modules/economy/paystand.dm index 6b36c6a10b..f674bc230d 100644 --- a/code/modules/economy/paystand.dm +++ b/code/modules/economy/paystand.dm @@ -22,7 +22,7 @@ name = rename_msg return else if(user.a_intent == INTENT_GRAB) - var/force_fee_input = tgui_input_num(user,"Set the fee!","Set a fee!",force_fee) + var/force_fee_input = input(user,"Set the fee!","Set a fee!",0) as num|null if(isnull(force_fee_input) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return force_fee = force_fee_input @@ -46,7 +46,7 @@ if(vbucks.registered_account) var/momsdebitcard = 0 if(!force_fee) - momsdebitcard = tgui_input_num(user, "How much would you like to deposit?", "Money Deposit", force_fee) + momsdebitcard = input(user, "How much would you like to deposit?", "Money Deposit") as null|num else momsdebitcard = force_fee if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) @@ -66,7 +66,7 @@ return if(istype(W, /obj/item/holochip)) var/obj/item/holochip/H = W - var/cashmoney = tgui_input_num(user, "How much would you like to deposit?", "Money Deposit", force_fee) + var/cashmoney = input(user, "How much would you like to deposit?", "Money Deposit") as null|num if(H.spend(cashmoney, FALSE)) purchase(user, cashmoney) to_chat(user, "Thanks for purchasing! The vendor has been informed.") @@ -89,7 +89,7 @@ to_chat(user, "ERROR: No identification card has been assigned to this paystand yet!") return if(!signaler) - var/cash_limit = tgui_input_num(user, "Enter the minimum amount of cash needed to deposit before the signaler is activated.", "Signaler Activation Threshold", signaler_threshold) + var/cash_limit = input(user, "Enter the minimum amount of cash needed to deposit before the signaler is activated.", "Signaler Activation Threshold") as null|num if(cash_limit < 1) to_chat(user, "ERROR: Invalid amount designated.") return diff --git a/code/modules/events/false_alarm.dm b/code/modules/events/false_alarm.dm index 650af7eeb8..5ac75cf087 100644 --- a/code/modules/events/false_alarm.dm +++ b/code/modules/events/false_alarm.dm @@ -17,8 +17,8 @@ if(!initial(event.fakeable)) continue possible_types += E - - forced_type = tgui_input_list(usr, "Select the scare.","False event", possible_types) + + forced_type = input(usr, "Select the scare.","False event") as null|anything in possible_types /datum/round_event_control/falsealarm/canSpawnEvent(players_amt, gamemode) return ..() && length(gather_false_events()) diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index 0675ea39f4..a9ee0f5412 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -19,7 +19,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 if(!check_rights(R_FUN)) return - var/aimed = tgui_alert(usr, "Aimed at current location?","Sniperod", list("Yes", "No")) + var/aimed = alert("Aimed at current location?","Sniperod", "Yes", "No") if(aimed == "Yes") special_target = get_turf(usr) diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm index a86e7f34ef..0801e38507 100644 --- a/code/modules/events/mass_hallucination.dm +++ b/code/modules/events/mass_hallucination.dm @@ -10,7 +10,7 @@ if(!check_rights(R_FUN)) return - forced_hallucination = tgui_input_list(usr, "Choose the hallucination to apply","Send Hallucination", subtypesof(/datum/hallucination)) + forced_hallucination = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in subtypesof(/datum/hallucination) /datum/round_event/mass_hallucination fakeable = FALSE diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm index cc02d7b7d0..31859b4fc0 100644 --- a/code/modules/events/pirates.dm +++ b/code/modules/events/pirates.dm @@ -145,7 +145,7 @@ /obj/machinery/shuttle_scrambler/interact(mob/user) if(!active) - if(tgui_alert(user, "Turning the scrambler on will make the shuttle trackable by GPS. Are you sure you want to do it?", "Scrambler", list("Yes", "Cancel")) == "Cancel") + if(alert(user, "Turning the scrambler on will make the shuttle trackable by GPS. Are you sure you want to do it?", "Scrambler", "Yes", "Cancel") == "Cancel") return if(active || !user.canUseTopic(src, BE_CLOSE)) return diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index 9f90a4e288..6fcaa5e6b0 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -391,7 +391,7 @@ /datum/spacevine_controller/vv_do_topic(href_list) . = ..() if(href_list[VV_HK_SPACEVINE_PURGE]) - if(tgui_alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", list("Yes", "No")) == "Yes") + if(alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", "Yes", "No") == "Yes") DeleteVines() /datum/spacevine_controller/proc/DeleteVines() //this is kill diff --git a/code/modules/events/wizard/madness.dm b/code/modules/events/wizard/madness.dm index 8619590b49..ac86236623 100644 --- a/code/modules/events/wizard/madness.dm +++ b/code/modules/events/wizard/madness.dm @@ -12,7 +12,7 @@ var/suggested = pick(strings(REDPILL_FILE, "redpill_questions")) - forced_secret = (tgui_input_text(usr, "What horrifying truth will you reveal?", "Curse of Madness", sortList(suggested))) || suggested + forced_secret = (input(usr, "What horrifying truth will you reveal?", "Curse of Madness", sortList(suggested)) as text|null) || suggested /datum/round_event/wizard/madness/start() var/datum/round_event_control/wizard/madness/C = control diff --git a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm index 70bfd80217..f09d3d6728 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm @@ -122,7 +122,7 @@ log_combat(usr, src, "dispensed [O] from", null, "with [stored_food[href_list["dispense"]]] remaining") if(href_list["portion"]) - portion = clamp(tgui_input_num(usr, "How much drink do you want to dispense per glass?"), 0, 50) + portion = clamp(input("How much drink do you want to dispense per glass?") as num|null, 0, 50) if (isnull(portion)) return diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 0d338c583b..58769cebf1 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -213,7 +213,7 @@ if (params["amount"]) desired = text2num(params["amount"]) else - desired = tgui_input_num(usr, "How many items?", "How many items would you like to take out?", 1) + desired = input("How many items?", "How many items would you like to take out?", 1) as null|num if(QDELETED(src) || QDELETED(usr) || !usr.Adjacent(src)) // Sanity checkin' in case stupid stuff happens while we wait for input() return FALSE diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm index cf3e9f69b3..a2603d07ab 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -123,7 +123,7 @@ update_icon() return else - bomb_timer = tgui_input_num(user, "Set the [bomb] timer from [BOMB_TIMER_MIN] to [BOMB_TIMER_MAX].", bomb, bomb_timer) + bomb_timer = input(user, "Set the [bomb] timer from [BOMB_TIMER_MIN] to [BOMB_TIMER_MAX].", bomb, bomb_timer) as num bomb_timer = clamp(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX) bomb_defused = FALSE diff --git a/code/modules/holiday/halloween/jacqueen.dm b/code/modules/holiday/halloween/jacqueen.dm index 49cb3ff630..ed7453ad3e 100644 --- a/code/modules/holiday/halloween/jacqueen.dm +++ b/code/modules/holiday/halloween/jacqueen.dm @@ -183,7 +183,7 @@ progression["[C.real_name]"] = progression["[C.real_name]"] | JACQ_HELLO var/choices = list("Trick", "Treat", "How do I get candies?", "Do I know you from somewhere?") - var/choice = tgui_input_list(C, "Trick or Treat?", "Trick or Treat?", choices) + var/choice = input(C, "Trick or Treat?", "Trick or Treat?") in choices switch(choice) if("Trick") trick(C) @@ -207,7 +207,7 @@ visible_message("[src] gives off a glowing smile, \"What ken Ah offer ye? I can magic up an object, a potion or a plushie fer ye.\"") jacqrunes("What ken Ah offer ye? I can magic up an object, a potion or a plushie fer ye.", C) var/choices_reward = list("Object - 3 candies", "Potion - 2 candies", "Jacqueline Tracker - 2 candies", "Plushie - 1 candy", "Can I get to know you instead?", "Become a pumpkinhead dullahan (perma) - 4 candies") - var/choice_reward = tgui_input_list(usr, "Trick or Treat?", "Trick or Treat?", choices_reward) + var/choice_reward = input(usr, "Trick or Treat?", "Trick or Treat?") in choices_reward //rewards switch(choice_reward) @@ -320,7 +320,7 @@ jacqrunes("A question? Sure, it'll cost you a candy though!", C) choices += "Nevermind" //Candies for chitchats - var/choice = tgui_input_list(C, "What do you want to ask?", "What do you want to ask?", choices) + var/choice = input(C, "What do you want to ask?", "What do you want to ask?") in choices if(!take_candies(C, 1)) visible_message("[src] raises an eyebrow, \"It's a candy per question [gender]! Thems the rules!\"") jacqrunes("It's a candy per question [gender]! Thems the rules!", C) diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index 1655f7769f..2857099d0f 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -212,7 +212,7 @@ else visible_message("[user] disturbs the [name] to no effect!") else - var/option = tgui_alert(user, "What action do you wish to perform?","Apiary",list("Remove a Honey Frame","Remove the Queen Bee", "Cancel")) + var/option = alert(user, "What action do you wish to perform?","Apiary","Remove a Honey Frame","Remove the Queen Bee", "Cancel") if(!Adjacent(user)) return switch(option) diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index dc7b6c576d..38e4fcc6ff 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -173,7 +173,7 @@ /obj/structure/bonfire/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/stack/rods) && !can_buckle && !grill) var/obj/item/stack/rods/R = W - var/choice = tgui_input_list(user, "What would you like to construct?", "Bonfire", list("Stake","Grill")) + var/choice = input(user, "What would you like to construct?", "Bonfire") as null|anything in list("Stake","Grill") switch(choice) if("Stake") R.use(1) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 62f14127bf..fa7decc437 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -626,7 +626,7 @@ for(var/muties in myseed.mutatelist) var/obj/item/seeds/another_mut = new muties fresh_mut_list[another_mut.plantname] = muties - var/locked_mutation = (tgui_input_list(user, "Select a mutation to lock.", "Plant Mutation Locks", sortList(fresh_mut_list))) + var/locked_mutation = (input(user, "Select a mutation to lock.", "Plant Mutation Locks") as null|anything in sortList(fresh_mut_list)) if(!user.canUseTopic(src, BE_CLOSE) || !locked_mutation) return myseed.mutatelist = list(fresh_mut_list[locked_mutation]) @@ -684,7 +684,7 @@ if(!anchored) update_icon() return FALSE - var/warning = tgui_alert(user, "Are you sure you wish to empty the tray's nutrient beaker?","Empty Tray Nutrients?", list("Yes", "No")) + var/warning = alert(user, "Are you sure you wish to empty the tray's nutrient beaker?","Empty Tray Nutrients?", "Yes", "No") if(warning == "Yes" && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) reagents.clear_reagents() to_chat(user, "You empty [src]'s nutrient tank.") diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 79cd96e0b2..577635cd1c 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -444,7 +444,7 @@ return if(istype(O, /obj/item/pen)) - var/choice = tgui_input_list(user, "What would you like to change?", "", list("Plant Name", "Seed Description", "Product Description", "Cancel")) + var/choice = input("What would you like to change?") in list("Plant Name", "Seed Description", "Product Description", "Cancel") if(!user.canUseTopic(src, BE_CLOSE)) return switch(choice) diff --git a/code/modules/instruments/songs/editor.dm b/code/modules/instruments/songs/editor.dm index 47347315bd..e385eed142 100644 --- a/code/modules/instruments/songs/editor.dm +++ b/code/modules/instruments/songs/editor.dm @@ -127,12 +127,12 @@ else if(href_list["import"]) var/t = "" do - t = html_encode(tgui_input_message(usr, "Please paste the entire song, formatted:", text("[]", name), t)) + t = html_encode(input(usr, "Please paste the entire song, formatted:", text("[]", name), t) as message) if(!in_range(parent, usr)) return if(length_char(t) >= MUSIC_MAXLINES * MUSIC_MAXLINECHARS) - var/cont = tgui_input_list(usr, "Your message is too long! Would you like to continue editing it?", "", list("yes", "no")) + var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no") if(cont == "no") break while(length_char(t) > MUSIC_MAXLINES * MUSIC_MAXLINECHARS) @@ -160,7 +160,7 @@ INVOKE_ASYNC(src, .proc/start_playing, usr) else if(href_list["newline"]) - var/newline = html_encode(tgui_input_text(usr, "Enter your line: ", parent.name)) + var/newline = html_encode(input("Enter your line: ", parent.name) as text|null) if(!newline || !in_range(parent, usr)) return if(lines.len > MUSIC_MAXLINES) @@ -188,22 +188,22 @@ stop_playing() else if(href_list["setlinearfalloff"]) - var/amount = tgui_input_num(usr, "Set linear sustain duration in seconds", "Linear Sustain Duration") + var/amount = input(usr, "Set linear sustain duration in seconds", "Linear Sustain Duration") as null|num if(!isnull(amount)) set_linear_falloff_duration(round(amount * 10, world.tick_lag)) else if(href_list["setexpfalloff"]) - var/amount = tgui_input_num(usr, "Set exponential sustain factor", "Exponential sustain factor") + var/amount = input(usr, "Set exponential sustain factor", "Exponential sustain factor") as null|num if(!isnull(amount)) set_exponential_drop_rate(round(amount, 0.00001)) else if(href_list["setvolume"]) - var/amount = tgui_input_num(usr, "Set volume", "Volume") + var/amount = input(usr, "Set volume", "Volume") as null|num if(!isnull(amount)) set_volume(round(amount, 1)) else if(href_list["setdropoffvolume"]) - var/amount = tgui_input_num(usr, "Set dropoff threshold", "Dropoff Threshold Volume") + var/amount = input(usr, "Set dropoff threshold", "Dropoff Threshold Volume") as null|num if(!isnull(amount)) set_dropoff_volume(round(amount, 0.01)) @@ -218,11 +218,11 @@ var/datum/instrument/I = SSinstruments.get_instrument(i) if(I) LAZYSET(categories[I.category || "ERROR CATEGORY"], I.name, I.id) - var/cat = tgui_input_list(usr, "Select Category", "Instrument Category", categories) + var/cat = input(usr, "Select Category", "Instrument Category") as null|anything in categories if(!cat) return var/list/instruments = categories[cat] - var/choice = tgui_input_list(usr, "Select Instrument", "Instrument Selection", instruments) + var/choice = input(usr, "Select Instrument", "Instrument Selection") as null|anything in instruments if(!choice) return choice = instruments[choice] //get id @@ -230,12 +230,12 @@ set_instrument(choice) else if(href_list["setnoteshift"]) - var/amount = tgui_input_num(usr, "Set note shift", "Note Shift", note_shift) + var/amount = input(usr, "Set note shift", "Note Shift") as null|num if(!isnull(amount)) note_shift = clamp(amount, note_shift_min, note_shift_max) else if(href_list["setsustainmode"]) - var/choice = tgui_input_list(usr, "Choose a sustain mode", "Sustain Mode", list("Linear", "Exponential")) + var/choice = input(usr, "Choose a sustain mode", "Sustain Mode") as null|anything in list("Linear", "Exponential") switch(choice) if("Linear") sustain_mode = SUSTAIN_LINEAR diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index 2706558391..ac27b4a30e 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -294,7 +294,7 @@ if(!check_interactivity(M)) return - var/input = reject_bad_name(tgui_input_text(usr, "What do you want to name this?", "Rename", src.name), TRUE) + var/input = reject_bad_name(input("What do you want to name this?", "Rename", src.name) as null|text, TRUE) if(!check_interactivity(M)) return if(src && input) @@ -506,7 +506,7 @@ if(input_selection.len == 1) choice = input_selection[input_selection[1]] else - var/selection = tgui_input_list(user, "Where do you want to insert that item?", "Interaction", input_selection) + var/selection = input(user, "Where do you want to insert that item?", "Interaction") as null|anything in input_selection if(!check_interactivity(user)) return ..() if(selection) @@ -548,7 +548,7 @@ if(input_selection.len ==1) choice = input_selection[input_selection[1]] else - var/selection = tgui_input_list(user, "What do you want to interact with?", "Interaction", input_selection) + var/selection = input(user, "What do you want to interact with?", "Interaction") as null|anything in input_selection if(!check_interactivity(user)) return if(selection) diff --git a/code/modules/integrated_electronics/core/debugger.dm b/code/modules/integrated_electronics/core/debugger.dm index 7f5dd87dbc..e3fded3a82 100644 --- a/code/modules/integrated_electronics/core/debugger.dm +++ b/code/modules/integrated_electronics/core/debugger.dm @@ -12,7 +12,7 @@ var/copy_values = FALSE /obj/item/integrated_electronics/debugger/attack_self(mob/user) - var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref","copy","null")) + var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref","copy","null") if(!user.IsAdvancedToolUser()) return @@ -28,7 +28,7 @@ if("number") accepting_refs = FALSE copy_values = FALSE - new_data = tgui_input_num(user, "Now type in a number.","[src] number writing") + new_data = input(user, "Now type in a number.","[src] number writing") as null|num if(isnum(new_data) && user.IsAdvancedToolUser()) data_to_write = new_data to_chat(user, "You set \the [src]'s memory to [new_data].") diff --git a/code/modules/integrated_electronics/core/detailer.dm b/code/modules/integrated_electronics/core/detailer.dm index 387ec22e94..9720bccfe5 100644 --- a/code/modules/integrated_electronics/core/detailer.dm +++ b/code/modules/integrated_electronics/core/detailer.dm @@ -40,7 +40,7 @@ /obj/item/integrated_electronics/detailer/attack_self(mob/user) - var/color_choice = tgui_input_list(user, "Select color.", "Assembly Detailer", color_list) + var/color_choice = input(user, "Select color.", "Assembly Detailer") as null|anything in color_list if(!color_list[color_choice]) return if(!in_range(src, user)) diff --git a/code/modules/integrated_electronics/core/pins.dm b/code/modules/integrated_electronics/core/pins.dm index 43421ec7eb..e08d77007d 100644 --- a/code/modules/integrated_electronics/core/pins.dm +++ b/code/modules/integrated_electronics/core/pins.dm @@ -177,7 +177,7 @@ D [1]/ || /datum/integrated_io/proc/ask_for_data_type(mob/user, var/default, var/list/allowed_data_types = list("string","number","null")) - var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", allowed_data_types) + var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in allowed_data_types if(!holder.check_interactivity(user)) return @@ -189,7 +189,7 @@ D [1]/ || to_chat(user, "You input "+new_data+" into the pin.") return new_data if("number") - new_data = tgui_input_num(user, "Now type in a number.","[src] number writing", isnum(default) ? default : null) + new_data = input("Now type in a number.","[src] number writing", isnum(default) ? default : null) as null|num if(isnum(new_data) && holder.check_interactivity(user) ) to_chat(user, "You input [new_data] into the pin.") return new_data diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm index b585b51a42..5f6440bffb 100644 --- a/code/modules/integrated_electronics/core/printer.dm +++ b/code/modules/integrated_electronics/core/printer.dm @@ -232,7 +232,7 @@ if("load") if(cloning) return - var/input = tgui_input_message(usr, "Put your code there:", "loading", null, null) + var/input = input("Put your code there:", "loading", null, null) as message | null if(!check_interactivity(usr) || cloning) return if(!input) diff --git a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm index f971b28e3e..24dae1439d 100644 --- a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm @@ -3,7 +3,7 @@ name = "dir pin" /datum/integrated_io/dir/ask_for_pin_data(mob/user) - var/new_data = tgui_input_num(user, "Please type in a valid dir number. \ + var/new_data = input("Please type in a valid dir number. \ Valid dirs are;\n\ North/Fore = [NORTH],\n\ South/Aft = [SOUTH],\n\ @@ -12,7 +12,7 @@ Northeast = [NORTHEAST],\n\ Northwest = [NORTHWEST],\n\ Southeast = [SOUTHEAST],\n\ - Southwest = [SOUTHWEST]","[src] dir writing") + Southwest = [SOUTHWEST]","[src] dir writing") as null|num if(isnum(new_data) && holder.check_interactivity(user) ) to_chat(user, "You input [new_data] into the pin.") write_data_to_pin(new_data) diff --git a/code/modules/integrated_electronics/core/special_pins/index_pin.dm b/code/modules/integrated_electronics/core/special_pins/index_pin.dm index 981a0c6ea0..e904c4c6d0 100644 --- a/code/modules/integrated_electronics/core/special_pins/index_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/index_pin.dm @@ -4,7 +4,7 @@ data = 1 /datum/integrated_io/index/ask_for_pin_data(mob/user) - var/new_data = tgui_input_num(user, "Please type in an index.","[src] index writing") + var/new_data = input("Please type in an index.","[src] index writing") as num if(isnum(new_data) && holder.check_interactivity(user)) to_chat(user, "You input [new_data] into the pin.") write_data_to_pin(new_data) diff --git a/code/modules/integrated_electronics/core/special_pins/list_pin.dm b/code/modules/integrated_electronics/core/special_pins/list_pin.dm index d96a253871..3532d68d70 100644 --- a/code/modules/integrated_electronics/core/special_pins/list_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/list_pin.dm @@ -54,7 +54,7 @@ to_chat(user, "The list is empty, there's nothing to remove.") return if(!target_entry) - target_entry = tgui_input_list(user, "Which piece of data do you want to remove?", "Remove", my_list) + target_entry = input(user, "Which piece of data do you want to remove?", "Remove") as null|anything in my_list if(holder.check_interactivity(user) && target_entry) my_list.Remove(target_entry) @@ -64,7 +64,7 @@ to_chat(user, "The list is empty, there's nothing to modify.") return if(!target_entry) - target_entry = tgui_input_list(user, "Which piece of data do you want to edit?", "Edit", my_list) + target_entry = input(user, "Which piece of data do you want to edit?", "Edit") as null|anything in my_list if(holder.check_interactivity(user) && target_entry) var/edited_entry = ask_for_data_type(user, target_entry) if(edited_entry) @@ -89,11 +89,11 @@ to_chat(user, "The list is empty, or too small to do any meaningful swapping.") return if(!first_target) - first_target = tgui_input_list(user, "Which piece of data do you want to swap? (1)", "Swap", my_list) + first_target = input(user, "Which piece of data do you want to swap? (1)", "Swap") as null|anything in my_list if(holder.check_interactivity(user) && first_target) if(!second_target) - second_target = tgui_input_list(user, "Which piece of data do you want to swap? (2)", "Swap", my_list - first_target) + second_target = input(user, "Which piece of data do you want to swap? (2)", "Swap") as null|anything in my_list - first_target if(holder.check_interactivity(user) && second_target) var/first_pos = my_list.Find(first_target) diff --git a/code/modules/integrated_electronics/core/special_pins/number_pin.dm b/code/modules/integrated_electronics/core/special_pins/number_pin.dm index 2b47739d9a..e864c3c789 100644 --- a/code/modules/integrated_electronics/core/special_pins/number_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/number_pin.dm @@ -3,7 +3,7 @@ name = "number pin" /datum/integrated_io/number/ask_for_pin_data(mob/user) - var/new_data = tgui_input_num(user, "Please type in a number.","[src] number writing") + var/new_data = input("Please type in a number.","[src] number writing") as null|num if(isnum(new_data) && holder.check_interactivity(user) ) to_chat(user, "You input [new_data] into the pin.") write_data_to_pin(new_data) diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index 4b23d83e1d..f66931e253 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -51,7 +51,7 @@ power_draw_per_use = 4 /obj/item/integrated_circuit/input/numberpad/ask_for_input(mob/user) - var/new_input = tgui_input_num(user, "Enter a number, please.",displayed_name) + var/new_input = input(user, "Enter a number, please.",displayed_name) as null|num if(isnum(new_input) && user.IsAdvancedToolUser()) set_pin_data(IC_OUTPUT, 1, new_input) push_data() @@ -1263,7 +1263,7 @@ var/I = get_pin_data(IC_INPUT, k) if(istext(I)) selection.Add(I) - var/selected = tgui_input_list(user,"Choose input.","Selection", selection) + var/selected = input(user,"Choose input.","Selection") in selection if(!selected) return set_pin_data(IC_OUTPUT, 1, selected) diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm index 26893af5ff..34c36883d1 100644 --- a/code/modules/integrated_electronics/subtypes/memory.dm +++ b/code/modules/integrated_electronics/subtypes/memory.dm @@ -104,19 +104,19 @@ var/datum/integrated_io/O = outputs[1] if(!user.IsAdvancedToolUser()) return - var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null")) + var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref", "null") var/new_data = null switch(type_to_use) if("string") accepting_refs = FALSE - new_data = tgui_input_text(user, "Now type in a string.","[src] string writing") + new_data = input("Now type in a string.","[src] string writing") as null|text if(istext(new_data) && user.IsAdvancedToolUser()) O.data = new_data to_chat(user, "You set \the [src]'s memory to [O.display_data(O.data)].") if("number") accepting_refs = FALSE - new_data = tgui_input_num(user, "Now type in a number.","[src] number writing") + new_data = input("Now type in a number.","[src] number writing") as null|num if(isnum(new_data) && user.IsAdvancedToolUser()) O.data = new_data to_chat(user, "You set \the [src]'s memory to [O.display_data(O.data)].") diff --git a/code/modules/language/language_menu.dm b/code/modules/language/language_menu.dm index b773404da0..bffd3d59af 100644 --- a/code/modules/language/language_menu.dm +++ b/code/modules/language/language_menu.dm @@ -84,7 +84,7 @@ if("grant_language") if((is_admin || isobserver(AM)) && language_datum) var/list/choices = list("Only Spoken", "Only Understood", "Both") - var/choice = tgui_input_list(user,"How do you want to add this language?","[language_datum]", choices) + var/choice = input(user,"How do you want to add this language?","[language_datum]",null) as null|anything in choices var/spoken = FALSE var/understood = FALSE switch(choice) @@ -103,7 +103,7 @@ if("remove_language") if((is_admin || isobserver(AM)) && language_datum) var/list/choices = list("Only Spoken", "Only Understood", "Both") - var/choice = tgui_input_list(user,"Which part do you wish to remove?","[language_datum]", choices) + var/choice = input(user,"Which part do you wish to remove?","[language_datum]",null) as null|anything in choices var/spoken = FALSE var/understood = FALSE switch(choice) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 8e132071d4..9d5dbe8f63 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -140,7 +140,7 @@ create_random_books(books_to_load, src, FALSE, random_category) load_random_books = FALSE if(contents.len) - var/obj/item/book/choice = tgui_input_list(user, "Which book would you like to remove from the shelf?", "", sortNames(contents.Copy())) + var/obj/item/book/choice = input(user, "Which book would you like to remove from the shelf?") as null|obj in sortNames(contents.Copy()) if(choice) if(!(user.mobility_flags & MOBILITY_USE) || user.stat != CONSCIOUS || !in_range(loc, user)) return @@ -239,7 +239,7 @@ if(!literate) to_chat(user, "You scribble illegibly on the cover of [src]!") return - var/choice = tgui_input_list(user, "What would you like to change?", "", list("Title", "Contents", "Author", "Cancel")) + var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel") if(!user.canUseTopic(src, BE_CLOSE, literate)) return switch(choice) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 6609f56345..1125d15bca 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -110,19 +110,19 @@ return if(href_list["settitle"]) - var/newtitle = tgui_input_text(usr, "Enter a title to search for:") + var/newtitle = input("Enter a title to search for:") as text|null if(newtitle) title = sanitize(newtitle) else title = null if(href_list["setcategory"]) - var/newcategory = tgui_input_list(usr, "Choose a category to search for:", "", list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion")) + var/newcategory = input("Choose a category to search for:") in list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion") if(newcategory) category = sanitize(newcategory) else category = "Any" if(href_list["setauthor"]) - var/newauthor = tgui_input_text(usr, "Enter an author to search for:") + var/newauthor = input("Enter an author to search for:") as text|null if(newauthor) author = sanitize(newauthor) else @@ -407,16 +407,16 @@ if(newauthor) scanner.cache.author = newauthor if(href_list["setcategory"]) - var/newcategory = tgui_input_list(usr, "Choose a category: ", "", list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion","Technical")) + var/newcategory = input("Choose a category: ") in list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion","Technical") if(newcategory) upload_category = newcategory if(href_list["upload"]) if(scanner) if(scanner.cache) - var/choice = tgui_input_list(usr, "Are you certain you wish to upload this title to the Archive?", "", list("Confirm", "Abort")) + var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort") if(choice == "Confirm") if (!SSdbcore.Connect()) - tgui_alert(usr, "Connection to Archive has been severed. Aborting.") + alert("Connection to Archive has been severed. Aborting.") else var/msg = "[key_name(usr)] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs" var/datum/db_query/query_library_upload = SSdbcore.NewQuery({" @@ -425,15 +425,15 @@ "}, list("title" = scanner.cache.name, "author" = scanner.cache.author, "content" = scanner.cache.dat, "category" = upload_category, "ckey" = usr.ckey, "round_id" = GLOB.round_id)) if(!query_library_upload.Execute()) qdel(query_library_upload) - tgui_alert(usr, "Database error encountered uploading to Archive") + alert("Database error encountered uploading to Archive") return else log_game(msg) qdel(query_library_upload) - tgui_alert(usr, "Upload Complete. Uploaded title will be unavailable for printing for a short period") + alert("Upload Complete. Uploaded title will be unavailable for printing for a short period") if(href_list["newspost"]) if(!GLOB.news_network) - tgui_alert(usr, "No news network found on station. Aborting.") + alert("No news network found on station. Aborting.") var/channelexists = 0 for(var/datum/news/feed_channel/FC in GLOB.news_network.network_channels) if(FC.channel_name == "Nanotrasen Book Club") @@ -442,12 +442,12 @@ if(!channelexists) GLOB.news_network.CreateFeedChannel("Nanotrasen Book Club", "Library", null) GLOB.news_network.SubmitArticle(scanner.cache.dat, "[scanner.cache.name]", "Nanotrasen Book Club", null) - tgui_alert(usr, "Upload complete. Your uploaded title is now available on station newscasters.") + alert("Upload complete. Your uploaded title is now available on station newscasters.") if(href_list["orderbyid"]) if(printer_cooldown > world.time) say("Printer unavailable. Please allow a short time before attempting to print.") else - var/orderid = tgui_input_num(usr, "Enter your order:") + var/orderid = input("Enter your order:") as num|null if(orderid) if(isnum(orderid) && ISINTEGER(orderid)) href_list["targetid"] = num2text(orderid) @@ -455,7 +455,7 @@ if(href_list["targetid"]) var/id = href_list["targetid"] if (!SSdbcore.Connect()) - tgui_alert(usr, "Connection to Archive has been severed. Aborting.") + alert("Connection to Archive has been severed. Aborting.") if(printer_cooldown > world.time) say("Printer unavailable. Please allow a short time before attempting to print.") else diff --git a/code/modules/library/soapstone.dm b/code/modules/library/soapstone.dm index 86da58339e..fd268a7774 100644 --- a/code/modules/library/soapstone.dm +++ b/code/modules/library/soapstone.dm @@ -265,7 +265,7 @@ if("delete") if(!is_admin) return - var/confirm = tgui_alert(user, "Confirm deletion of engraved message?", "Confirm Deletion", list("Yes", "No")) + var/confirm = alert(user, "Confirm deletion of engraved message?", "Confirm Deletion", "Yes", "No") if(confirm == "Yes") persists = FALSE qdel(src) diff --git a/code/modules/mafia/controller.dm b/code/modules/mafia/controller.dm index f2e11b1bad..43d15ebffe 100644 --- a/code/modules/mafia/controller.dm +++ b/code/modules/mafia/controller.dm @@ -728,13 +728,13 @@ rolelist_dict = list("CANCEL", "FINISH") + rolelist_dict while(!done) to_chat(usr, "You have a total player count of [assoc_value_sum(debug_setup)] in this setup.") - var/chosen_role_name = tgui_input_list(usr,"Select a role!","Custom Setup Creation", rolelist_dict) + var/chosen_role_name = input(usr,"Select a role!","Custom Setup Creation",rolelist_dict[1]) as null|anything in rolelist_dict if(chosen_role_name == "CANCEL") return if(chosen_role_name == "FINISH") break var/found_path = rolelist_dict[chosen_role_name] - var/role_count = tgui_input_num(usr,"How many? Zero to cancel.","Custom Setup Creation",0) + var/role_count = input(usr,"How many? Zero to cancel.","Custom Setup Creation",0) as null|num if(role_count > 0) debug_setup[found_path] = role_count custom_setup = debug_setup diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index 9b83e15d8f..e97060b45d 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -152,7 +152,7 @@ /obj/structure/closet/crate/secure/loot/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(locked) to_chat(user, "The crate is locked with a Deca-code lock.") - var/input = tgui_input_text(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") + var/input = input(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") as text if(user.canUseTopic(src, BE_CLOSE)) var/list/sanitised = list() var/sanitycheck = TRUE diff --git a/code/modules/mining/aux_base_camera.dm b/code/modules/mining/aux_base_camera.dm index 18eef50e80..be0a41427f 100644 --- a/code/modules/mining/aux_base_camera.dm +++ b/code/modules/mining/aux_base_camera.dm @@ -200,7 +200,7 @@ return var/list/buildlist = list("Walls and Floors" = 1,"Airlocks" = 2,"Deconstruction" = 3,"Windows and Grilles" = 4) - var/buildmode = tgui_input_list(usr, "Set construction mode.", "Base Console", buildlist) + var/buildmode = input("Set construction mode.", "Base Console", null) in buildlist if(buildmode) B.RCD.mode = buildlist[buildmode] to_chat(owner, "Build mode is now [buildmode].") diff --git a/code/modules/mining/equipment/marker_beacons.dm b/code/modules/mining/equipment/marker_beacons.dm index 31025c6153..296513af8d 100644 --- a/code/modules/mining/equipment/marker_beacons.dm +++ b/code/modules/mining/equipment/marker_beacons.dm @@ -60,7 +60,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) return . = TRUE - var/input_color = tgui_input_list(user, "Choose a color.", "Beacon Color", GLOB.marker_beacon_colors) + var/input_color = input(user, "Choose a color.", "Beacon Color") as null|anything in GLOB.marker_beacon_colors if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) return if(input_color) @@ -133,7 +133,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) return . = TRUE - var/input_color = tgui_input_list(user, "Choose a color.", "Beacon Color", GLOB.marker_beacon_colors) + var/input_color = input(user, "Choose a color.", "Beacon Color") as null|anything in GLOB.marker_beacon_colors if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) return if(input_color) diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index dec21100ca..5044a73c10 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons) else var/A - A = tgui_input_list(user, "Select a beacon to connect to", "Balloon Extraction Pack", possible_beacons) + A = input("Select a beacon to connect to", "Balloon Extraction Pack", A) as null|anything in possible_beacons if(!A) return diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index c91663d0e6..e64505df7e 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -1138,7 +1138,7 @@ var/mob/living/L = I da_list[L.real_name] = L - var/choice = tgui_input_list(user,"Who do you want dead?","Choose Your Victim", da_list) + var/choice = input(user,"Who do you want dead?","Choose Your Victim") as null|anything in da_list choice = da_list[choice] diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 45e88a1ae0..1adc951447 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -287,7 +287,7 @@ if (params["sheets"]) desired = text2num(params["sheets"]) else - desired = tgui_input_num(usr, "How many sheets?", "How many sheets would you like to smelt?", 1) + desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num var/sheets_to_remove = round(min(desired,50,stored_amount)) @@ -332,7 +332,7 @@ if (params["sheets"]) desired = text2num(params["sheets"]) else - desired = tgui_input_num(usr, "How many sheets?", "How many sheets would you like to smelt?", 1) + desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num var/amount = round(min(desired,50,smelt_amount)) mat_container.use_materials(alloy.materials, amount) materials.silo_log(src, "released", -amount, "sheets", alloy.materials) diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index d3ee2a87ea..ce767ae00d 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -79,14 +79,14 @@ INITIALIZE_IMMEDIATE(/mob/dead) if(1) pick = csa[1] else - pick = tgui_input_list(src, "Pick a server to jump to", "Server Hop", csa) + pick = input(src, "Pick a server to jump to", "Server Hop") as null|anything in csa if(!pick) return var/addr = csa[pick] - if(tgui_alert(src, "Jump to server [pick] ([addr])?", "Server Hop", list("Yes", "No")) != "Yes") + if(alert(src, "Jump to server [pick] ([addr])?", "Server Hop", "Yes", "No") != "Yes") return var/client/C = client diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index ec2dd4bc7c..2068ed47e8 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -258,7 +258,7 @@ var/list/days = list() for(var/number in 1 to total_days_in_player_month) days += number - var/player_day = tgui_input_list(src, "What day of the month were you born in.", "", days) + var/player_day = input(src, "What day of the month were you born in.") as anything in days if(player_day <= current_day) //their birthday has passed age_gate_result = TRUE @@ -455,7 +455,7 @@ var/mintime = max(CONFIG_GET(number/respawn_delay), (SSticker.round_start_time + (CONFIG_GET(number/respawn_minimum_delay_roundstart) * 600)) - world.time, 0) - var/this_is_like_playing_right = tgui_alert(src, "Are you sure you wish to observe? You will not be able to respawn for [round(mintime / 600, 0.1)] minutes!!","Player Setup",list("Yes","No")) + var/this_is_like_playing_right = alert(src,"Are you sure you wish to observe? You will not be able to respawn for [round(mintime / 600, 0.1)] minutes!!","Player Setup","Yes","No") if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes") ready = PLAYER_NOT_READY @@ -537,11 +537,11 @@ /mob/dead/new_player/proc/AttemptLateSpawn(rank) var/error = IsJobUnavailable(rank) if(error != JOB_AVAILABLE) - tgui_alert(src, get_job_unavailable_error_message(error, rank)) + alert(src, get_job_unavailable_error_message(error, rank)) return FALSE if(SSticker.late_join_disabled) - tgui_alert(src, "An administrator has disabled late join spawning.") + alert(src, "An administrator has disabled late join spawning.") return FALSE if(!respawn_latejoin_check(notify = TRUE)) @@ -551,7 +551,7 @@ if(SSshuttle.arrivals) close_spawn_windows() //In case we get held up if(SSshuttle.arrivals.damaged && CONFIG_GET(flag/arrivals_shuttle_require_safe_latejoin)) - tgui_alert(src, "The arrivals shuttle is currently malfunctioning! You cannot join.") + src << alert("The arrivals shuttle is currently malfunctioning! You cannot join.") return FALSE if(CONFIG_GET(flag/arrivals_shuttle_require_undocked)) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 5f7fb58e38..0f30fe20fc 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -336,7 +336,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(stat == DEAD || sig_flags & COMPONENT_FREE_GHOSTING) ghostize(1) else - var/response = tgui_alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?",list("Ghost","Stay in body")) + var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body") if(response != "Ghost") return //didn't want to ghost after-all if(istype(loc, /obj/machinery/cryopod)) @@ -372,7 +372,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(sig_flags & COMPONENT_FREE_GHOSTING) ghostize(1) else - var/response = tgui_alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?",list("Ghost","Stay in body")) + var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body") if(response != "Ghost") return ghostize(0, penalize = TRUE) @@ -431,7 +431,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(usr, "You're already stuck out of your body!") return FALSE - var/response = tgui_alert(src, "Are you sure you want to prevent (almost) all means of resuscitation? This cannot be undone. THIS WILL ALSO STOP YOU FROM RESPAWNING!!!","Are you sure you want to stay dead and never respawn?",list("Yes","No")) + var/response = alert(src, "Are you sure you want to prevent (almost) all means of resuscitation? This cannot be undone. THIS WILL ALSO STOP YOU FROM RESPAWNING!!!","Are you sure you want to stay dead and never respawn?","Yes","No") if(response != "Yes") return @@ -475,7 +475,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/area/A = V if(!A.hidden) filtered += A - var/area/thearea = tgui_input_list(usr, "Area to jump to", "BOOYEA", filtered) + var/area/thearea = input("Area to jump to", "BOOYEA") as null|anything in filtered if(!thearea) return @@ -557,7 +557,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/target = null //Chosen target. dest += getpois(mobs_only = TRUE) //Fill list, prompt user with list - target = tgui_input_list(usr, "Please, select a player!", "Jump to Mob", dest) + target = input("Please, select a player!", "Jump to Mob", null, null) as null|anything in dest if (!target)//Make sure we actually have a target return @@ -582,7 +582,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/list/views = list() for(var/i in 7 to max_view) views |= i - var/new_view = tgui_input_list(usr, "Choose your new view", "Modify view range", views) + var/new_view = input("Choose your new view", "Modify view range", 0) as null|anything in views if(new_view) client.view_size.setTo(clamp(new_view, 7, max_view) - 7) else @@ -697,7 +697,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!(L in GLOB.player_list) && !L.mind) possessible += L - var/mob/living/target = tgui_input_list(usr, "Your new life begins today!", "Possess Mob", possessible) + var/mob/living/target = input("Your new life begins today!", "Possess Mob", null, null) as null|anything in possessible if(!target) return 0 @@ -707,7 +707,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return 0 if(can_reenter_corpse && mind && mind.current) - if(tgui_alert(src, "Your soul is still tied to your former life as [mind.current.name], if you go forward there is no going back to that life. Are you sure you wish to continue?", "Move On", list("Yes", "No")) == "No") + if(alert(src, "Your soul is still tied to your former life as [mind.current.name], if you go forward there is no going back to that life. Are you sure you wish to continue?", "Move On", "Yes", "No") == "No") return 0 if(target.key) to_chat(src, "Someone has taken this body while you were choosing!") @@ -888,7 +888,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/eye_name = null - eye_name = tgui_input_list(usr, "Please, select a player!", "Observe", creatures) + eye_name = input("Please, select a player!", "Observe", null, null) as null|anything in creatures if (!eye_name) return diff --git a/code/modules/mob/dead/observer/respawn.dm b/code/modules/mob/dead/observer/respawn.dm index 0b0c86e360..94ebf42a2a 100644 --- a/code/modules/mob/dead/observer/respawn.dm +++ b/code/modules/mob/dead/observer/respawn.dm @@ -21,7 +21,7 @@ if(!valid.len) to_chat(src, "No player found that is either a ghost or is in lobby with restrictions active.") return - var/ckey = valid[tgui_input_list(src, "Choose a player (only showing logged in players who have restrictions)", "Unrestricted Respawn", valid)] + var/ckey = valid[input(src, "Choose a player (only showing logged in players who have restrictions)", "Unrestricted Respawn") as null|anything in valid] var/client/player = GLOB.directory[ckey] if(!player) to_chat(src, "Client not found.") @@ -29,7 +29,7 @@ var/mob/M = player.mob if(istype(M, /mob/dead/observer)) var/mob/dead/observer/O = M - var/confirm = tgui_alert(src, "Send [O]([ckey]) back to the lobby without respawn restrictions?", "Send to Lobby", list("Yes", "No")) + var/confirm = alert(src, "Send [O]([ckey]) back to the lobby without respawn restrictions?", "Send to Lobby", "Yes", "No") if(confirm != "Yes") return message_admins("[key_name_admin(src)] gave [key_name_admin(O)] a full respawn and sent them back to the lobby.") @@ -39,7 +39,7 @@ O.client.prefs.dnr_triggered = FALSE else if(istype(M, /mob/dead/new_player)) var/mob/dead/new_player/NP = M - var/confirm = tgui_alert(src, "Remove [NP]'s respawn restrictions?", "Remove Restrictions", list("Yes", "No")) + var/confirm = alert(src, "Remove [NP]'s respawn restrictions?", "Remove Restrictions", "Yes", "No") if(confirm != "Yes") return message_admins("[key_name_admin(src)] removed [ckey]'s respawn restrictions.") @@ -67,7 +67,7 @@ if(!valid.len) to_chat(src, "No logged in ghosts found.") return - var/mob/dead/observer/O = valid[tgui_input_list(src, "Choose a player (only showing logged in)", "Remove Respawn Timer", valid)] + var/mob/dead/observer/O = valid[input(src, "Choose a player (only showing logged in)", "Remove Respawn Timer") as null|anything in valid] if(!O.client) to_chat(src, "[O] has no client.") @@ -165,7 +165,7 @@ /** * Actual proc that removes us and puts us back on lobby - * + * * Returns the new mob. */ /mob/dead/observer/proc/transfer_to_lobby() diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index c30c4c13eb..e1eb09405a 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -119,7 +119,7 @@ GLOBAL_VAR(posibrain_notify_cooldown) if(!O.can_reenter_round()) return FALSE - var/posi_ask = tgui_alert(user, "Become a [name]? (Warning, You can no longer be cloned, and all past lives will be forgotten!)","Are you positive?",list("Yes","No")) + var/posi_ask = alert("Become a [name]? (Warning, You can no longer be cloned, and all past lives will be forgotten!)","Are you positive?","Yes","No") if(posi_ask == "No" || QDELETED(src)) return transfer_personality(user) diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index b38b982e69..28d311b034 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -61,7 +61,7 @@ Doesn't work on other aliens/AI.*/ /obj/effect/proc_holder/alien/proc/check_vent_block(mob/living/user) var/obj/machinery/atmospherics/components/unary/atmos_thing = locate() in user.loc if(atmos_thing) - var/rusure = tgui_alert(user, "Laying eggs and shaping resin here would block access to [atmos_thing]. Do you want to continue?", "Blocking Atmospheric Component", list("Yes", "No")) + var/rusure = alert(user, "Laying eggs and shaping resin here would block access to [atmos_thing]. Do you want to continue?", "Blocking Atmospheric Component", "Yes", "No") if(rusure != "Yes") return FALSE return TRUE @@ -91,13 +91,13 @@ Doesn't work on other aliens/AI.*/ var/list/options = list() for(var/mob/living/Ms in oview(user)) options += Ms - var/mob/living/M = tgui_input_list(user, "Select who to whisper to:","Whisper to?", options) + var/mob/living/M = input("Select who to whisper to:","Whisper to?",null) as null|mob in options if(!M) return 0 if(M.anti_magic_check(FALSE, FALSE, TRUE, 0)) to_chat(user, "As you try to communicate with [M], you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.") return FALSE - var/msg = sanitize(tgui_input_text(user, "Message:", "Alien Whisper")) + var/msg = sanitize(input("Message:", "Alien Whisper") as text|null) if(msg) if(M.anti_magic_check(FALSE, FALSE, TRUE, 0)) to_chat(user, "As you try to communicate with [M], you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.") @@ -126,10 +126,10 @@ Doesn't work on other aliens/AI.*/ for(var/mob/living/carbon/A in oview(user)) if(A.getorgan(/obj/item/organ/alien/plasmavessel)) aliens_around.Add(A) - var/mob/living/carbon/M = tgui_input_list(user, "Select who to transfer to:","Transfer plasma to?", aliens_around) + var/mob/living/carbon/M = input("Select who to transfer to:","Transfer plasma to?",null) as mob in aliens_around if(!M) return 0 - var/amount = tgui_input_num(user, "Amount:", "Transfer Plasma to [M]") + var/amount = input("Amount:", "Transfer Plasma to [M]") as num if (amount) amount = min(abs(round(amount)), user.getPlasma()) if (get_dist(user,M) <= 1) @@ -169,7 +169,7 @@ Doesn't work on other aliens/AI.*/ /obj/effect/proc_holder/alien/acid/fire(mob/living/carbon/alien/user) - var/O = tgui_input_list(user, "Select what to dissolve:","Dissolve", oview(1,user)) + var/O = input("Select what to dissolve:","Dissolve",null) as obj|turf in oview(1,user) if(!O || user.incapacitated()) return 0 else @@ -272,7 +272,7 @@ Doesn't work on other aliens/AI.*/ if(!check_vent_block(user)) return FALSE - var/choice = tgui_input_list(user, "Choose what you wish to shape.","Resin building", structures) + var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in structures if(!choice) return FALSE if (!cost_check(check_turf,user)) diff --git a/code/modules/mob/living/carbon/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm index cb26d7b51f..7204759db5 100644 --- a/code/modules/mob/living/carbon/alien/larva/powers.dm +++ b/code/modules/mob/living/carbon/alien/larva/powers.dm @@ -42,7 +42,7 @@ to_chat(L, "Hunters are the most agile caste, tasked with hunting for hosts. They are faster than a human and can even pounce, but are not much tougher than a drone.") to_chat(L, "Sentinels are tasked with protecting the hive. With their ranged spit, invisibility, and high health, they make formidable guardians and acceptable secondhand hunters.") to_chat(L, "Drones are the weakest and slowest of the castes, but can grow into a praetorian and then queen if no queen exists, and are vital to maintaining a hive with their resin secretion abilities.") - var/alien_caste = tgui_alert(L, "Please choose which alien caste you shall belong to.",,list("Hunter","Sentinel","Drone")) + var/alien_caste = alert(L, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone") if(user.incapacitated()) //something happened to us while we were choosing. return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 69dc2f220f..f6ef8e8177 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1038,7 +1038,7 @@ if(href_list[VV_HK_MODIFY_BODYPART]) if(!check_rights(R_SPAWN)) return - var/edit_action = tgui_input_list(usr, "What would you like to do?","Modify Body Part", list("add","remove", "augment")) + var/edit_action = input(usr, "What would you like to do?","Modify Body Part") as null|anything in list("add","remove", "augment") if(!edit_action) return var/list/limb_list = list() @@ -1051,7 +1051,7 @@ limb_list = list(BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) for(var/obj/item/bodypart/B in bodyparts) limb_list -= B.body_zone - var/result = tgui_input_list(usr, "Please choose which body part to [edit_action]","[capitalize(edit_action)] Body Part", limb_list) + var/result = input(usr, "Please choose which body part to [edit_action]","[capitalize(edit_action)] Body Part") as null|anything in limb_list if(result) var/obj/item/bodypart/BP = get_bodypart(result) switch(edit_action) @@ -1078,7 +1078,7 @@ if(href_list[VV_HK_MAKE_AI]) if(!check_rights(R_SPAWN)) return - if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform") + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return usr.client.holder.Topic("vv_override", list("makeai"=href_list[VV_HK_TARGET])) if(href_list[VV_HK_MODIFY_ORGANS]) @@ -1093,7 +1093,7 @@ for(var/i in artpaths) var/datum/martial_art/M = i artnames[initial(M.name)] = M - var/result = tgui_input_list(usr, "Choose the martial art to teach","JUDO CHOP", artnames) + var/result = input(usr, "Choose the martial art to teach","JUDO CHOP") as null|anything in artnames if(!usr) return if(QDELETED(src)) @@ -1109,7 +1109,7 @@ if(!check_rights(NONE)) return var/list/traumas = subtypesof(/datum/brain_trauma) - var/result = tgui_input_list(usr, "Choose the brain trauma to apply","Traumatize", traumas) + var/result = input(usr, "Choose the brain trauma to apply","Traumatize") as null|anything in traumas if(!usr) return if(QDELETED(src)) @@ -1131,7 +1131,7 @@ if(!check_rights(NONE)) return var/list/hallucinations = subtypesof(/datum/hallucination) - var/result = tgui_input_list(usr, "Choose the hallucination to apply","Send Hallucination", hallucinations) + var/result = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in hallucinations if(!usr) return if(QDELETED(src)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 55afe78e2e..8669a1458a 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -333,7 +333,7 @@ if(href_list["hud"] == "m") if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical)) if(href_list["p_stat"]) - var/health_status = tgui_input_list(usr, "Specify a new physical status for this person.", "Medical HUD", list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel")) + var/health_status = input(usr, "Specify a new physical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel") if(R) if(!H.canUseHUD()) return @@ -343,7 +343,7 @@ R.fields["p_stat"] = health_status return if(href_list["m_stat"]) - var/health_status = tgui_input_list(usr, "Specify a new mental status for this person.", "Medical HUD", list("Stable", "*Watch*", "*Unstable*", "*Insane*", "Cancel")) + var/health_status = input(usr, "Specify a new mental status for this person.", "Medical HUD", R.fields["m_stat"]) in list("Stable", "*Watch*", "*Unstable*", "*Insane*", "Cancel") if(R) if(!H.canUseHUD()) return @@ -419,7 +419,7 @@ R = find_record("name", perpname, GLOB.data_core.security) if(R) if(href_list["status"]) - var/setcriminal = tgui_input_list(usr, "Specify a new criminal status for this person.", "Security HUD", list("None", "*Arrest*", "Incarcerated", "Paroled", "Discharged", "Cancel")) + var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Paroled", "Discharged", "Cancel") if(setcriminal != "Cancel") if(R) if(H.canUseHUD()) @@ -452,7 +452,7 @@ return if(href_list["add_crime"]) - switch(tgui_alert(usr, "What crime would you like to add?","Security HUD",list("Minor Crime","Major Crime","Cancel"))) + switch(alert("What crime would you like to add?","Security HUD","Minor Crime","Major Crime","Cancel")) if("Minor Crime") if(R) var/t1 = stripped_input("Please input minor crime names:", "Security HUD", "", null) @@ -878,7 +878,7 @@ var/qname = initial(T.name) options[has_quirk(T) ? "[qname] (Remove)" : "[qname] (Add)"] = T - var/result = tgui_input_list(usr, "Choose quirk to add/remove","Quirk Mod", options) + var/result = input(usr, "Choose quirk to add/remove","Quirk Mod") as null|anything in options if(result) if(result == "Clear") for(var/datum/quirk/q in roundstart_quirks) @@ -892,31 +892,31 @@ if(href_list[VV_HK_MAKE_MONKEY]) if(!check_rights(R_SPAWN)) return - if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform") + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return usr.client.holder.Topic("vv_override", list("monkeyone"=href_list[VV_HK_TARGET])) if(href_list[VV_HK_MAKE_CYBORG]) if(!check_rights(R_SPAWN)) return - if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform") + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return usr.client.holder.Topic("vv_override", list("makerobot"=href_list[VV_HK_TARGET])) if(href_list[VV_HK_MAKE_ALIEN]) if(!check_rights(R_SPAWN)) return - if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform") + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return usr.client.holder.Topic("vv_override", list("makealien"=href_list[VV_HK_TARGET])) if(href_list[VV_HK_MAKE_SLIME]) if(!check_rights(R_SPAWN)) return - if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform") + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return usr.client.holder.Topic("vv_override", list("makeslime"=href_list[VV_HK_TARGET])) if(href_list[VV_HK_SET_SPECIES]) if(!check_rights(R_SPAWN)) return - var/result = tgui_input_list(usr, "Please choose a new species","Species", GLOB.species_list) + var/result = input(usr, "Please choose a new species","Species") as null|anything in GLOB.species_list if(result) var/newtype = GLOB.species_list[result] admin_ticket_log("[key_name_admin(usr)] has modified the bodyparts of [src] to [result]") diff --git a/code/modules/mob/living/carbon/human/innate_abilities/customization.dm b/code/modules/mob/living/carbon/human/innate_abilities/customization.dm index ccce6141b6..363f6ecbb2 100644 --- a/code/modules/mob/living/carbon/human/innate_abilities/customization.dm +++ b/code/modules/mob/living/carbon/human/innate_abilities/customization.dm @@ -22,7 +22,7 @@ /datum/action/innate/ability/humanoid_customization/proc/change_form() var/mob/living/carbon/human/H = owner - var/select_alteration = tgui_input_list(owner, "Select what part of your form to alter", "Form Alteration", list("Body Color","Hair Style", "Genitals", "Tail", "Snout", "Markings", "Ears", "Taur body", "Penis", "Vagina", "Penis Length", "Breast Size", "Breast Shape", "Cancel")) + var/select_alteration = input(owner, "Select what part of your form to alter", "Form Alteration", "cancel") in list("Body Color","Hair Style", "Genitals", "Tail", "Snout", "Markings", "Ears", "Taur body", "Penis", "Vagina", "Penis Length", "Breast Size", "Breast Shape", "Cancel") if(select_alteration == "Body Color") var/new_color = input(owner, "Choose your skin color:", "Race change","#"+H.dna.features["mcolor"]) as color|null @@ -36,21 +36,21 @@ to_chat(H, "Invalid color. Your color is not bright enough.") else if(select_alteration == "Hair Style") if(H.gender == MALE) - var/new_style = tgui_input_list(owner, "Select a facial hair style", "Hair Alterations", GLOB.facial_hair_styles_list) + var/new_style = input(owner, "Select a facial hair style", "Hair Alterations") as null|anything in GLOB.facial_hair_styles_list if(new_style) H.facial_hair_style = new_style else H.facial_hair_style = "Shaved" //handle normal hair - var/new_style = tgui_input_list(owner, "Select a hair style", "Hair Alterations", GLOB.hair_styles_list) + var/new_style = input(owner, "Select a hair style", "Hair Alterations") as null|anything in GLOB.hair_styles_list if(new_style) H.hair_style = new_style H.update_hair() else if (select_alteration == "Genitals") - var/operation = tgui_input_list(owner, "Select organ operation.", "Organ Manipulation", list("add sexual organ", "remove sexual organ", "cancel")) + var/operation = input("Select organ operation.", "Organ Manipulation", "cancel") in list("add sexual organ", "remove sexual organ", "cancel") switch(operation) if("add sexual organ") - var/new_organ = tgui_input_list(owner, "Select sexual organ:", "Organ Manipulation", GLOB.genitals_list) + var/new_organ = input("Select sexual organ:", "Organ Manipulation") as null|anything in GLOB.genitals_list if(!new_organ) return H.give_genital(GLOB.genitals_list[new_organ]) @@ -60,7 +60,7 @@ for(var/obj/item/organ/genital/X in H.internal_organs) var/obj/item/organ/I = X organs["[I.name] ([I.type])"] = I - var/obj/item/O = tgui_input_list(owner, "Select sexual organ:", "Organ Manipulation", organs) + var/obj/item/O = input("Select sexual organ:", "Organ Manipulation", null) as null|anything in organs var/obj/item/organ/genital/G = organs[O] if(!G) return @@ -77,7 +77,7 @@ if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey))) snowflake_ears_list[S.name] = path var/new_ears - new_ears = tgui_input_list(owner, "Choose your character's ears:", "Ear Alteration", snowflake_ears_list) + new_ears = input(owner, "Choose your character's ears:", "Ear Alteration") as null|anything in snowflake_ears_list if(new_ears) H.dna.features["mam_ears"] = new_ears H.update_body() @@ -91,7 +91,7 @@ if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey))) snowflake_snouts_list[S.name] = path var/new_snout - new_snout = tgui_input_list(owner, "Choose your character's face:", "Face Alteration", snowflake_snouts_list) + new_snout = input(owner, "Choose your character's face:", "Face Alteration") as null|anything in snowflake_snouts_list if(new_snout) H.dna.features["mam_snouts"] = new_snout H.update_body() @@ -105,7 +105,7 @@ if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey))) snowflake_markings_list[S.name] = path var/new_mam_body_markings - new_mam_body_markings = tgui_input_list(H, "Choose your character's body markings:", "Marking Alteration", snowflake_markings_list) + new_mam_body_markings = input(H, "Choose your character's body markings:", "Marking Alteration") as null|anything in snowflake_markings_list if(new_mam_body_markings) H.dna.features["mam_body_markings"] = new_mam_body_markings for(var/X in H.bodyparts) //propagates the markings changes @@ -122,7 +122,7 @@ if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey))) snowflake_tails_list[S.name] = path var/new_tail - new_tail = tgui_input_list(owner, "Choose your character's Tail(s):", "Tail Alteration", snowflake_tails_list) + new_tail = input(owner, "Choose your character's Tail(s):", "Tail Alteration") as null|anything in snowflake_tails_list if(new_tail) H.dna.features["mam_tail"] = new_tail if(new_tail != "None") @@ -138,7 +138,7 @@ if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey))) snowflake_taur_list[S.name] = path var/new_taur - new_taur = tgui_input_list(owner, "Choose your character's tauric body:", "Tauric Alteration", snowflake_taur_list) + new_taur = input(owner, "Choose your character's tauric body:", "Tauric Alteration") as null|anything in snowflake_taur_list if(new_taur) H.dna.features["taur"] = new_taur if(new_taur != "None") @@ -149,7 +149,7 @@ for(var/obj/item/organ/genital/penis/X in H.internal_organs) qdel(X) var/new_shape - new_shape = tgui_input_list(owner, "Choose your character's dong", "Genital Alteration", GLOB.cock_shapes_list) + new_shape = input(owner, "Choose your character's dong", "Genital Alteration") as null|anything in GLOB.cock_shapes_list if(new_shape) H.dna.features["cock_shape"] = new_shape H.update_genitals() @@ -162,7 +162,7 @@ for(var/obj/item/organ/genital/vagina/X in H.internal_organs) qdel(X) var/new_shape - new_shape = tgui_input_list(owner, "Choose your character's pussy", "Genital Alteration", GLOB.vagina_shapes_list) + new_shape = input(owner, "Choose your character's pussy", "Genital Alteration") as null|anything in GLOB.vagina_shapes_list if(new_shape) H.dna.features["vag_shape"] = new_shape H.update_genitals() @@ -175,7 +175,7 @@ qdel(X) var/min_D = CONFIG_GET(number/penis_min_inches_prefs) var/max_D = CONFIG_GET(number/penis_max_inches_prefs) - var/new_length = tgui_input_num(owner, "Penis length in inches:\n([min_D]-[max_D])", "Genital Alteration", H.dna.features["cock_length"]) + var/new_length = input(owner, "Penis length in inches:\n([min_D]-[max_D])", "Genital Alteration") as num|null if(new_length) H.dna.features["cock_length"] = clamp(round(new_length), min_D, max_D) H.update_genitals() @@ -186,7 +186,7 @@ else if (select_alteration == "Breast Size") for(var/obj/item/organ/genital/breasts/X in H.internal_organs) qdel(X) - var/new_size = tgui_input_list(owner, "Breast Size", "Genital Alteration", CONFIG_GET(keyed_list/breasts_cups_prefs)) + var/new_size = input(owner, "Breast Size", "Genital Alteration") as null|anything in CONFIG_GET(keyed_list/breasts_cups_prefs) if(new_size) H.dna.features["breasts_size"] = new_size H.update_genitals() @@ -197,7 +197,7 @@ for(var/obj/item/organ/genital/breasts/X in H.internal_organs) qdel(X) var/new_shape - new_shape = tgui_input_list(owner, "Breast Shape", "Genital Alteration", GLOB.breasts_shapes_list) + new_shape = input(owner, "Breast Shape", "Genital Alteration") as null|anything in GLOB.breasts_shapes_list if(new_shape) H.dna.features["breasts_shape"] = new_shape H.update_genitals() diff --git a/code/modules/mob/living/carbon/human/species_types/ipc.dm b/code/modules/mob/living/carbon/human/species_types/ipc.dm index 6797881279..eb870f9624 100644 --- a/code/modules/mob/living/carbon/human/species_types/ipc.dm +++ b/code/modules/mob/living/carbon/human/species_types/ipc.dm @@ -51,7 +51,7 @@ /datum/action/innate/monitor_change/Activate() var/mob/living/carbon/human/H = owner - var/new_ipc_screen = tgui_input_list(usr, "Choose your character's screen:", "Monitor Display", GLOB.ipc_screens_list) + var/new_ipc_screen = input(usr, "Choose your character's screen:", "Monitor Display") as null|anything in GLOB.ipc_screens_list if(!new_ipc_screen) return H.dna.features["ipc_screen"] = new_ipc_screen diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 9e1c5e63bc..04c69a4138 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -663,7 +663,7 @@ Remove(H) return - var/message = sanitize(tgui_input_text(usr, "Message:", "Slime Telepathy")) + var/message = sanitize(input("Message:", "Slime Telepathy") as text|null) if(!species || !(H in species.linked_mobs)) to_chat(H, "The link seems to have been severed...") @@ -700,13 +700,13 @@ var/list/options = list() for(var/mob/living/Ms in oview(H)) options += Ms - var/mob/living/M = tgui_input_list(usr, "Select who to send your message to:","Send thought to?", options) + var/mob/living/M = input("Select who to send your message to:","Send thought to?",null) as null|mob in options if(!M) return if(M.anti_magic_check(FALSE, FALSE, TRUE, 0)) to_chat(H, "As you try to communicate with [M], you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.") return - var/msg = sanitize(tgui_input_text(usr, "Message:", "Telepathy")) + var/msg = sanitize(input("Message:", "Telepathy") as text|null) if(msg) if(M.anti_magic_check(FALSE, FALSE, TRUE, 0)) to_chat(H, "As you try to communicate with [M], you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.") diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a68f20aa18..c05215bc6f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -489,7 +489,7 @@ to_chat(src, "You are already sleeping.") return else - if(tgui_alert(src, "You sure you want to sleep for a while?", "Sleep", list("Yes", "No")) == "Yes") + if(alert(src, "You sure you want to sleep for a while?", "Sleep", "Yes", "No") == "Yes") SetSleeping(400) //Short nap /mob/proc/get_contents() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 58ba34e1fb..b2b1d2fb5f 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -271,7 +271,7 @@ to_chat(usr, "Wireless control is disabled!") return - var/reason = tgui_input_text(src, "What is the nature of your emergency? ([CALL_SHUTTLE_REASON_LENGTH] characters required.)", "Confirm Shuttle Call") + var/reason = input(src, "What is the nature of your emergency? ([CALL_SHUTTLE_REASON_LENGTH] characters required.)", "Confirm Shuttle Call") as null|text if(incapacitated()) return @@ -573,7 +573,7 @@ for(var/i in C.network) cameralist[i] = i var/old_network = network - network = tgui_input_list(U, "Which network would you like to view?", "", cameralist) + network = input(U, "Which network would you like to view?") as null|anything in cameralist if(!U.eyeobj) U.view_core() @@ -605,7 +605,7 @@ if(incapacitated()) return var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Thinking", "Friend Computer", "Dorfy", "Blue Glow", "Red Glow") - var/n_emote = tgui_input_list(src, "Please, select a status!", "AI Status", ai_emotions) + var/n_emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions if(!n_emote) return emote_display = n_emote @@ -632,7 +632,7 @@ if(incapacitated()) return var/input - switch(tgui_alert(src, "Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,list("Crew Member","Unique","Animal"))) + switch(alert("Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,"Crew Member","Unique","Animal")) if("Crew Member") var/list/personnel_list = list() @@ -640,13 +640,13 @@ personnel_list["[t.fields["name"]]: [t.fields["rank"]]"] = t.fields["image"]//Pull names, rank, and image. if(personnel_list.len) - input = tgui_input_list(src, "Select a crew member:", "", personnel_list) + input = input("Select a crew member:") as null|anything in personnel_list var/icon/character_icon = personnel_list[input] if(character_icon) qdel(holo_icon)//Clear old icon so we're not storing it in memory. holo_icon = getHologramIcon(icon(character_icon)) else - tgui_alert(src, "No suitable records found. Aborting.") + alert("No suitable records found. Aborting.") if("Animal") var/list/icon_list = list( @@ -665,7 +665,7 @@ "spider" = 'icons/mob/animal.dmi' ) - input = tgui_input_list(src, "Please select a hologram:", "", icon_list) + input = input("Please select a hologram:") as null|anything in icon_list if(input) qdel(holo_icon) switch(input) @@ -689,7 +689,7 @@ "custom" ) - input = tgui_input_list(src, "Please select a hologram:", "", icon_list) + input = input("Please select a hologram:") as null|anything in icon_list if(input) qdel(holo_icon) switch(input) @@ -949,7 +949,7 @@ to_chat(src, "No usable AI shell beacons detected.") if(!target || !(target in possible)) //If the AI is looking for a new shell, or its pre-selected shell is no longer valid - target = tgui_input_list(src, "Which body to control?", "", possible) + target = input(src, "Which body to control?") as null|anything in possible if (!target || target.stat == DEAD || target.deployed || !(!target.connected_ai ||(target.connected_ai == src))) return @@ -1018,7 +1018,7 @@ if(incapacitated()) return - switch(tgui_alert(src, "Would you like to enter cryo? This will ghost you. Remember to AHELP before cryoing out of important roles, even with no admins online.",,list("Yes.","No."))) + switch(alert("Would you like to enter cryo? This will ghost you. Remember to AHELP before cryoing out of important roles, even with no admins online.",,"Yes.","No.")) if("Yes.") src.ghostize(FALSE, penalize = TRUE) var/announce_rank = "Artificial Intelligence," diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index 2e9a9ef62e..2b5d3d98f2 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -97,11 +97,11 @@ to_chat(src, "Please wait [DisplayTimeText(announcing_vox - world.time)].") return - var/message = tgui_input_text(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement) + var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement) as text last_announcement = message - var/voxType = tgui_input_list(src, "Male or female VOX?", "VOX-gender", list("male", "female")) + var/voxType = input(src, "Male or female VOX?", "VOX-gender") in list("male", "female") if(!message || announcing_vox > world.time) return diff --git a/code/modules/mob/living/silicon/pai/pai_shell.dm b/code/modules/mob/living/silicon/pai/pai_shell.dm index 2a5cb9cdc7..63fb82082f 100644 --- a/code/modules/mob/living/silicon/pai/pai_shell.dm +++ b/code/modules/mob/living/silicon/pai/pai_shell.dm @@ -77,19 +77,19 @@ if(CONFIG_GET(flag/pai_custom_holoforms)) choices += "Custom" var/old_chassis = chassis - var/choicetype = tgui_input_list(src, "What type of chassis do you want to use?", "", choices) + var/choicetype = input(src, "What type of chassis do you want to use?") as null|anything in choices if(!choicetype) return FALSE switch(choicetype) if("Custom") chassis = "custom" if("Preset - Basic") - var/choice = tgui_input_list(src, "What would you like to use for your holochassis composite?", "", possible_chassis) + var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in possible_chassis if(!choice) return FALSE chassis = choice if("Preset - Dynamic") - var/choice = tgui_input_list(src, "What would you like to use for your holochassis composite?", "", dynamic_chassis_icons) + var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in dynamic_chassis_icons if(!choice) return FALSE chassis = "dynamic" diff --git a/code/modules/mob/living/silicon/pai/personality.dm b/code/modules/mob/living/silicon/pai/personality.dm index 41be56268d..62f2ed7047 100644 --- a/code/modules/mob/living/silicon/pai/personality.dm +++ b/code/modules/mob/living/silicon/pai/personality.dm @@ -51,7 +51,7 @@ if (isnull(version) || version != 1) fdel(path) if (!silent) - tgui_alert(user, "Your savefile was incompatible with this version and was deleted.") + alert(user, "Your savefile was incompatible with this version and was deleted.") return 0 F["name"] >> src.name diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index de17c9edbe..04665401c5 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -147,7 +147,7 @@ radio.attack_self(src) if("image") - var/newImage = tgui_input_list(usr, "Select your new display image.", "Display Image", list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What" , "Exclamation" ,"Question", "Sunglasses")) + var/newImage = input("Select your new display image.", "Display Image", "Happy") in list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What" , "Exclamation" ,"Question", "Sunglasses") var/pID = 1 switch(newImage) @@ -222,7 +222,7 @@ pda.silent = !pda.silent else if(href_list["target"]) if(silent) - return tgui_alert(src, "Communications circuits remain uninitialized.") + return alert("Communications circuits remain uninitialized.") var/target = locate(href_list["target"]) pda.create_message(src, target) @@ -395,7 +395,7 @@ return dat /mob/living/silicon/pai/proc/CheckDNA(mob/living/carbon/M, mob/living/silicon/pai/P) - var/answer = tgui_input_list(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", list("Yes", "No")) + var/answer = input(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", "No") in list("Yes", "No") if(answer == "Yes") M.visible_message("[M] presses [M.p_their()] thumb against [P].",\ "You press your thumb against [P].",\ diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index d18494fd0d..bd1c260bf5 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -150,7 +150,7 @@ if(BORG_SEC_AVAILABLE) modulelist["Security"] = /obj/item/robot_module/security - var/input_module = tgui_input_list(src, "Please, select a module!", "Robot", sortList(modulelist)) + var/input_module = input("Please, select a module!", "Robot", null, null) as null|anything in sortList(modulelist) if(!input_module || module.type != /obj/item/robot_module) return @@ -516,7 +516,7 @@ if(stat == DEAD) return //won't work if dead if(locked) - switch(tgui_alert(src, "You cannot lock your cover again, are you sure?\n (You can still ask for a human to lock it)", "Unlock Own Cover", list("Yes", "No"))) + switch(alert("You cannot lock your cover again, are you sure?\n (You can still ask for a human to lock it)", "Unlock Own Cover", "Yes", "No")) if("Yes") locked = FALSE update_icons() @@ -1298,7 +1298,7 @@ set desc = "Select your resting pose." sitting = 0 bellyup = 0 - var/choice = tgui_alert(src, "Select resting pose", "", list("Resting", "Sitting", "Belly up")) + var/choice = alert(src, "Select resting pose", "", "Resting", "Sitting", "Belly up") switch(choice) if("Resting") update_icons() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index a83f4e84ca..77d1be2bcd 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -338,7 +338,7 @@ return //Ask the user to pick a channel from what it has available. - var/Autochan = tgui_input_list(src, "Select a channel:", "", list("Default","None") + radio.channels) + var/Autochan = input("Select a channel:") as null|anything in list("Default","None") + radio.channels if(!Autochan) return diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index d2a2f841a3..ff6941ec70 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -181,7 +181,7 @@ empty_tiles() if("linemode") - var/setdir = tgui_input_list(usr, "Select construction direction:", "", list("north","east","south","west","disable")) + var/setdir = input("Select construction direction:") as null|anything in list("north","east","south","west","disable") switch(setdir) if("north") targetdirection = 1 @@ -433,4 +433,4 @@ if(robot.mode == BOT_REPAIRING) return TRUE return FALSE - + diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 554bd247e8..b287b854a3 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -240,7 +240,7 @@ if("destination") var/new_dest if(pda) - new_dest = tgui_input_list(user, "Enter Destination:", name, GLOB.deliverybeacontags) + new_dest = input(user, "Enter Destination:", name, destination) as null|anything in GLOB.deliverybeacontags else new_dest = params["value"] if(new_dest) @@ -256,7 +256,7 @@ if("sethome") var/new_home if(pda) - new_home = tgui_input_list(user, "Enter Home:", name, GLOB.deliverybeacontags) + new_home = input(user, "Enter Home:", name, home_destination) as null|anything in GLOB.deliverybeacontags else new_home = params["value"] if(new_home) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm index 921c600f5a..948be53abc 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm @@ -54,7 +54,7 @@ if(!SSticker.mode) to_chat(user, "Can't become a drone before the game has started.") return - var/be_drone = tgui_alert(user, "Become a drone? (Warning, You can no longer be cloned!)",,list("Yes","No")) + var/be_drone = alert("Become a drone? (Warning, You can no longer be cloned!)",,"Yes","No") if(be_drone == "No" || QDELETED(src) || !isobserver(user)) return var/mob/living/simple_animal/drone/D = new drone_type(get_turf(loc)) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm index 6ab2eb5e3e..d9ea6f4a8a 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm @@ -8,7 +8,7 @@ /mob/living/simple_animal/drone/attack_drone(mob/living/simple_animal/drone/D) if(D != src && stat == DEAD) - var/d_input = tgui_alert(D, "Perform which action?","Drone Interaction",list("Reactivate","Cannibalize","Nothing")) + var/d_input = alert(D,"Perform which action?","Drone Interaction","Reactivate","Cannibalize","Nothing") if(d_input) switch(d_input) if("Reactivate") diff --git a/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm b/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm index 710341e923..0f0d4dea72 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm @@ -16,7 +16,7 @@ set category = "Drone" set name = "Drone ping" - var/alert_s = tgui_input_list(src,"Alert severity level","Drone ping",list("Low","Medium","High","Critical")) + var/alert_s = input(src,"Alert severity level","Drone ping",null) as null|anything in list("Low","Medium","High","Critical") var/area/A = get_area(loc) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm index be67455177..815c2bc0db 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm @@ -95,11 +95,11 @@ /mob/living/simple_animal/drone/proc/pickVisualAppearence() picked = FALSE - var/appearence = tgui_input_list(usr, "Choose your appearance!", "Appearance", list("Maintenance Drone", "Repair Drone", "Scout Drone")) + var/appearence = input("Choose your appearance!", "Appearance", "Maintenance Drone") in list("Maintenance Drone", "Repair Drone", "Scout Drone") switch(appearence) if("Maintenance Drone") visualAppearence = MAINTDRONE - colour = tgui_input_list(usr, "Choose your colour!", "Colour", list("grey", "blue", "red", "green", "pink", "orange")) + colour = input("Choose your colour!", "Colour", "grey") in list("grey", "blue", "red", "green", "pink", "orange") icon_state = "[visualAppearence]_[colour]" icon_living = "[visualAppearence]_[colour]" icon_dead = "[visualAppearence]_dead" diff --git a/code/modules/mob/living/simple_animal/friendly/plushie.dm b/code/modules/mob/living/simple_animal/friendly/plushie.dm index 5c4b8d40f1..ff95e8fe86 100644 --- a/code/modules/mob/living/simple_animal/friendly/plushie.dm +++ b/code/modules/mob/living/simple_animal/friendly/plushie.dm @@ -45,7 +45,7 @@ //attacking yourself transfers your mind into the plush! /obj/item/toy/plushie_shell/attack_self(mob/user) if(user.mind) - var/safety = tgui_alert(user, "The plushie is staring back at you intensely, it seems cursed! (Permanently become a plushie)", "Hugging this is a bad idea.", list("Hug it!", "Cancel")) + var/safety = alert(user, "The plushie is staring back at you intensely, it seems cursed! (Permanently become a plushie)", "Hugging this is a bad idea.", "Hug it!", "Cancel") if(safety == "Cancel" || !in_range(src, user)) return to_chat(user, "You hug the strange plushie. You fool.") diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 547d808673..ec11a3e83e 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -461,7 +461,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians if(P.reset) guardians -= P //clear out guardians that are already reset if(guardians.len) - var/mob/living/simple_animal/hostile/guardian/G = tgui_input_list(src, "Pick the guardian you wish to reset", "Guardian Reset", guardians) + var/mob/living/simple_animal/hostile/guardian/G = input(src, "Pick the guardian you wish to reset", "Guardian Reset") as null|anything in guardians if(G) to_chat(src, "You attempt to reset [G.real_name]'s personality...") var/list/mob/candidates = pollGhostCandidates("Do you want to play as [src.real_name]'s [G.real_name]?", ROLE_PAI, null, FALSE, 100) @@ -555,7 +555,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians if(random) guardiantype = pick(possible_guardians) else - guardiantype = tgui_input_list(user, "Pick the type of [mob_name]", "[mob_name] Creation", possible_guardians) + guardiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians if(!guardiantype) to_chat(user, "[failure_message]" ) used = FALSE diff --git a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm index 6a082fbc88..5df446085a 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm @@ -96,7 +96,7 @@ set name = "Remove Surveillance Snare" set category = "Guardian" set desc = "Disarm unwanted surveillance snares." - var/picked_snare = tgui_input_list(src, "Pick which snare to remove", "Remove Snare", src.snares) + var/picked_snare = input(src, "Pick which snare to remove", "Remove Snare") as null|anything in src.snares if(picked_snare) src.snares -= picked_snare qdel(picked_snare) diff --git a/code/modules/mob/living/simple_animal/hostile/banana_spider.dm b/code/modules/mob/living/simple_animal/hostile/banana_spider.dm index 9c1c0dae89..a88593ed74 100644 --- a/code/modules/mob/living/simple_animal/hostile/banana_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/banana_spider.dm @@ -51,7 +51,7 @@ if(!SSticker.mode) to_chat(user, "Can't become a banana spider before the game has started.") return - var/be_spider = tgui_alert(user, "Become a banana spider? (Warning, You can no longer be cloned!)",,list("Yes","No")) + var/be_spider = alert("Become a banana spider? (Warning, You can no longer be cloned!)",,"Yes","No") if(be_spider == "No" || QDELETED(src) || !isobserver(user)) return if(key) diff --git a/code/modules/mob/living/simple_animal/hostile/bread.dm b/code/modules/mob/living/simple_animal/hostile/bread.dm index 3eadc7104c..70c8b0c540 100644 --- a/code/modules/mob/living/simple_animal/hostile/bread.dm +++ b/code/modules/mob/living/simple_animal/hostile/bread.dm @@ -52,7 +52,7 @@ if(!SSticker.mode) to_chat(user, "Can't become a tumor bread before the game has started.") return - var/be_bread = tgui_alert(user, "Become a tumor bread? (Warning, You can no longer be cloned!)",,list("Yes","No")) + var/be_bread = alert("Become a tumor bread? (Warning, You can no longer be cloned!)",,"Yes","No") if(be_bread == "No" || QDELETED(src) || !isobserver(user)) return if(key) diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 9c165f3ef4..2349685a4e 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -93,7 +93,7 @@ var/mob/dead/observer/O = user if(!O.can_reenter_round()) return FALSE - var/spider_ask = tgui_alert(user, "Become a spider?", "Are you australian?", list("Yes", "No")) + var/spider_ask = alert("Become a spider?", "Are you australian?", "Yes", "No") if(spider_ask == "No" || !src || QDELETED(src)) return TRUE if(key) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 46d3463684..7ca2f6c561 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -426,7 +426,7 @@ Difficulty: Very Hard /obj/machinery/anomalous_crystal/honk //Strips and equips you as a clown. I apologize for nothing observer_desc = "This crystal strips and equips its targets as clowns." - possible_methods = list(ACTIVATE_TOUCH) //Because We love AOE transformations! + possible_methods = list(ACTIVATE_TOUCH) //Because We love AOE transformations! activation_sound = 'sound/items/bikehorn.ogg' /obj/machinery/anomalous_crystal/honk/ActivationReaction(mob/user) @@ -574,7 +574,7 @@ Difficulty: Very Hard if(ready_to_deploy) if(!user.can_reenter_round()) return FALSE - var/be_helper = tgui_alert(user, "Become a Lightgeist? (Warning, You can no longer be cloned!)",,list("Yes","No")) + var/be_helper = alert("Become a Lightgeist? (Warning, You can no longer be cloned!)",,"Yes","No") if(be_helper == "Yes" && !QDELETED(src) && isobserver(user)) var/mob/living/simple_animal/hostile/lightgeist/W = new /mob/living/simple_animal/hostile/lightgeist(get_turf(loc)) user.transfer_ckey(W, FALSE) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm index 82df5af169..de6b858f79 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm @@ -44,7 +44,7 @@ if(istype(target, /obj/structure/elite_tumor)) var/obj/structure/elite_tumor/T = target if(T.mychild == src && T.activity == TUMOR_PASSIVE) - var/elite_remove = tgui_alert(usr, "Re-enter the tumor?", "Despawn yourself?", list("Yes", "No")) + var/elite_remove = alert("Re-enter the tumor?", "Despawn yourself?", "Yes", "No") if(elite_remove == "No" || !src || QDELETED(src)) return T.mychild = null diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm index 74f5f0c2bf..800c7d29ca 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm @@ -99,7 +99,7 @@ if(!chosen_color) dragon_name() color_selection() - + /mob/living/simple_animal/hostile/space_dragon/Life() . = ..() @@ -666,7 +666,7 @@ /obj/structure/carp_rift/proc/summon_carp(mob/user) if(carp_stored <= 0)//Not enough carp points return FALSE - var/carp_ask = tgui_alert(user, "Become a carp?", "Help bring forth the horde?", list("Yes", "No")) + var/carp_ask = alert("Become a carp?", "Help bring forth the horde?", "Yes", "No") if(carp_ask == "No" || !src || QDELETED(src) || QDELETED(user)) return FALSE if(carp_stored <= 0) diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm index cf86fcfe7a..cc5b0b8a75 100644 --- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm +++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm @@ -157,7 +157,7 @@ /mob/living/simple_animal/hostile/venus_human_trap/proc/humanize_plant(mob/user) if(key || !playable_plant || stat) return - var/plant_ask = tgui_alert(user, "Become a venus human trap?", "Are you reverse vegan?", list("Yes", "No")) + var/plant_ask = alert("Become a venus human trap?", "Are you reverse vegan?", "Yes", "No") if(plant_ask == "No" || QDELETED(src)) return if(key) diff --git a/code/modules/mob/living/simple_animal/simple_animal_vr.dm b/code/modules/mob/living/simple_animal/simple_animal_vr.dm index 355c940d76..de5bb578b8 100644 --- a/code/modules/mob/living/simple_animal/simple_animal_vr.dm +++ b/code/modules/mob/living/simple_animal/simple_animal_vr.dm @@ -113,13 +113,13 @@ return if(vore_selected.digest_mode == DM_HOLD) - var/confirm = tgui_alert(usr, "Enabling digestion on [name] will cause it to digest all stomach contents. Using this to break OOC prefs is against the rules. Digestion will disable itself after 20 minutes.", "Enabling [name]'s Digestion", list("Enable", "Cancel")) + var/confirm = alert(usr, "Enabling digestion on [name] will cause it to digest all stomach contents. Using this to break OOC prefs is against the rules. Digestion will disable itself after 20 minutes.", "Enabling [name]'s Digestion", "Enable", "Cancel") if(confirm == "Enable") vore_selected.digest_mode = DM_DIGEST sleep(20 MINUTES) vore_selected.digest_mode = vore_default_mode else - var/confirm = tgui_alert(usr, "This mob is currently set to digest all stomach contents. Do you want to disable this?", "Disabling [name]'s Digestion", list("Disable", "Cancel")) + var/confirm = alert(usr, "This mob is currently set to digest all stomach contents. Do you want to disable this?", "Disabling [name]'s Digestion", "Disable", "Cancel") if(confirm == "Disable") vore_selected.digest_mode = DM_HOLD diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index 6327ef77df..d93993bf1f 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -32,7 +32,7 @@ if(C!=src && Adjacent(C)) choices += C - var/mob/living/M = tgui_input_list(src,"Who do you wish to feed on?", "", choices) + var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices if(!M) return 0 if(CanFeedon(M)) diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index 7c4325fdcd..2c2efee534 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -9,7 +9,7 @@ return if(!new_type) - new_type = tgui_input_text(usr, "Mob type path:", "Mob type") + new_type = input("Mob type path:", "Mob type") as text|null if(istext(new_type)) new_type = text2path(new_type) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index d41f59d104..d8ef440ef9 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -5,13 +5,8 @@ set hidden = TRUE set category = "IC" client?.last_activity = world.time - for(var/datum/tgui/window in tgui_open_uis) - if(istype(window.src_object, /datum/tgui_input_dialog)) - var/datum/tgui_input_dialog/say_box = window.src_object - if(say_box.title == "say") // Yes, i am dead serious. - return display_typing_indicator() - var/message = tgui_input_text(usr, null, "say") + var/message = input(usr, "", "say") as text|null // If they don't type anything just drop the message. clear_typing_indicator() // clear it immediately! if(!length(message)) @@ -37,13 +32,8 @@ set hidden = TRUE set category = "IC" client?.last_activity = world.time - for(var/datum/tgui/window in tgui_open_uis) - if(istype(window.src_object, /datum/tgui_input_dialog)) - var/datum/tgui_input_dialog/emote_box = window.src_object - if(emote_box.title == "me") // Yes, i am dead serious. - return display_typing_indicator() - var/message = tgui_input_message(usr, null, "me") + var/message = input(usr, "", "me") as message|null // If they don't type anything just drop the message. clear_typing_indicator() // clear it immediately! if(!length(message)) @@ -91,7 +81,7 @@ /mob/proc/whisper_keybind() client?.last_activity = world.time - var/message = tgui_input_text(src, "", "whisper") + var/message = input(src, "", "whisper") as text|null if(!length(message)) return return whisper_verb(message) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 15e28ceaf1..fcaa77cac4 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -538,11 +538,11 @@ /mob/living/carbon/human/Animalize(mind_transfer = TRUE) var/list/mobtypes = typesof(/mob/living/simple_animal) - var/mobpath = tgui_input_list(usr, "Which type of mob should [src] turn into?", "Choose a type", mobtypes) + var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") as null|anything in mobtypes if(!mobpath) return if(mind) - mind_transfer = tgui_alert(usr, "Want to transfer their mind into the new mob", "Mind Transfer", list("Yes", "No")) == "Yes" ? TRUE : FALSE + mind_transfer = alert("Want to transfer their mind into the new mob", "Mind Transfer", "Yes", "No") == "Yes" ? TRUE : FALSE if(mob_transforming) return @@ -573,11 +573,11 @@ /mob/proc/Animalize(mind_transfer = TRUE) var/list/mobtypes = typesof(/mob/living/simple_animal) - var/mobpath = tgui_input_list(usr, "Which type of mob should [src] turn into?", "Choose a type", mobtypes) + var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") as null|anything in mobtypes if(!mobpath) return if(mind) - mind_transfer = tgui_alert(usr, "Want to transfer their mind into the new mob", "Mind Transfer", list("Yes", "No")) == "Yes" ? TRUE : FALSE + mind_transfer = alert("Want to transfer their mind into the new mob", "Mind Transfer", "Yes", "No") == "Yes" ? TRUE : FALSE var/mob/new_mob = new mobpath(src.loc) diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index 3cfd342122..635ec2e54c 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -137,7 +137,7 @@ if(enabled) ui_interact(user) else if(IsAdminGhost(user)) - var/response = tgui_alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", list("Yes", "No")) + var/response = alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", "Yes", "No") if(response == "Yes") turn_on(user) @@ -425,7 +425,7 @@ var/obj/item/computer_hardware/H = all_components[h] component_names.Add(H.name) - var/choice = tgui_input_list(user, "Which component do you want to uninstall?", "Computer maintenance", sortList(component_names)) + var/choice = input(user, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in sortList(component_names) if(!choice) return diff --git a/code/modules/modular_computers/file_system/programs/cargoship.dm b/code/modules/modular_computers/file_system/programs/cargoship.dm index a023f92831..89a3b3247d 100644 --- a/code/modules/modular_computers/file_system/programs/cargoship.dm +++ b/code/modules/modular_computers/file_system/programs/cargoship.dm @@ -54,7 +54,7 @@ if("resetid") payments_acc = null if("setsplit") - var/potential_cut = tgui_input_num(usr, "How much would you like to payout to the registered card?","Percentage Profit") + var/potential_cut = input("How much would you like to payout to the registered card?","Percentage Profit") as num|null percent_cut = potential_cut ? clamp(round(potential_cut, 1), 1, 50) : 20 if("print") if(!printer) diff --git a/code/modules/newscaster/newscaster_machine.dm b/code/modules/newscaster/newscaster_machine.dm index 819d7411ae..c81a8f5d1a 100644 --- a/code/modules/newscaster/newscaster_machine.dm +++ b/code/modules/newscaster/newscaster_machine.dm @@ -369,7 +369,7 @@ GLOBAL_LIST_EMPTY(allCasters) if(channel_name == "" || channel_name == "\[REDACTED\]" || scanned_user == "Unknown" || check || (scanned_user in existing_authors) ) screen=7 else - var/choice = tgui_alert(usr, "Please confirm Feed channel creation","Network Channel Handler",list("Confirm","Cancel")) + var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel") if(choice=="Confirm") scan_user(usr) GLOB.news_network.CreateFeedChannel(channel_name, scanned_user, c_locked) @@ -381,7 +381,7 @@ GLOBAL_LIST_EMPTY(allCasters) for(var/datum/news/feed_channel/F in GLOB.news_network.network_channels) if( (!F.locked || F.author == scanned_user) && !F.censored) available_channels += F.channel_name - channel_name = tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels) + channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels updateUsrDialog() else if(href_list["set_new_message"]) var/temp_message = trim(stripped_multiline_input(usr, "Write your Feed story", "Network Channel Handler", msg)) @@ -442,7 +442,7 @@ GLOBAL_LIST_EMPTY(allCasters) if(msg == "" || channel_name == "" || scanned_user == "Unknown") screen = 16 else - var/choice = tgui_alert(usr, "Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler",list("Confirm","Cancel")) + var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel") if(choice=="Confirm") scan_user(usr) if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. @@ -450,16 +450,16 @@ GLOBAL_LIST_EMPTY(allCasters) screen = 15 else if(GLOB.news_network.wanted_issue.isAdminMsg) - tgui_alert(usr, "The wanted issue has been distributed by a Nanotrasen higherup. You cannot edit it.",list("Ok")) + alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot edit it.","Ok") return GLOB.news_network.submitWanted(channel_name, msg, scanned_user, picture) screen = 19 updateUsrDialog() else if(href_list["cancel_wanted"]) if(GLOB.news_network.wanted_issue.isAdminMsg) - tgui_alert(usr, "The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.",list("Ok")) + alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.","Ok") return - var/choice = tgui_alert(usr, "Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel")) + var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel") if(choice=="Confirm") GLOB.news_network.deleteWanted() screen=17 @@ -470,21 +470,21 @@ GLOBAL_LIST_EMPTY(allCasters) else if(href_list["censor_channel_author"]) var/datum/news/feed_channel/FC = locate(href_list["censor_channel_author"]) if(FC.is_admin_channel) - tgui_alert(usr, "This channel was created by a Nanotrasen Officer. You cannot censor it.",list("Ok")) + alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok") return FC.toggleCensorAuthor() updateUsrDialog() else if(href_list["censor_channel_story_author"]) var/datum/news/feed_message/MSG = locate(href_list["censor_channel_story_author"]) if(MSG.is_admin_message) - tgui_alert(usr, "This message was created by a Nanotrasen Officer. You cannot censor its author.",list("Ok")) + alert("This message was created by a Nanotrasen Officer. You cannot censor its author.","Ok") return MSG.toggleCensorAuthor() updateUsrDialog() else if(href_list["censor_channel_story_body"]) var/datum/news/feed_message/MSG = locate(href_list["censor_channel_story_body"]) if(MSG.is_admin_message) - tgui_alert(usr, "This channel was created by a Nanotrasen Officer. You cannot censor it.",list("Ok")) + alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok") return MSG.toggleCensorBody() updateUsrDialog() @@ -496,7 +496,7 @@ GLOBAL_LIST_EMPTY(allCasters) else if(href_list["toggle_d_notice"]) var/datum/news/feed_channel/FC = locate(href_list["toggle_d_notice"]) if(FC.is_admin_channel) - tgui_alert(usr, "This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.",list("Ok")) + alert("This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.","Ok") return FC.toggleCensorDclass() updateUsrDialog() diff --git a/code/modules/ninja/suit/ninja_equipment_actions/ninja_net.dm b/code/modules/ninja/suit/ninja_equipment_actions/ninja_net.dm index 1b11b320c2..ab52f3e018 100644 --- a/code/modules/ninja/suit/ninja_equipment_actions/ninja_net.dm +++ b/code/modules/ninja/suit/ninja_equipment_actions/ninja_net.dm @@ -12,7 +12,7 @@ */ /obj/item/clothing/suit/space/space_ninja/proc/ninjanet() var/mob/living/carbon/human/ninja = affecting - var/mob/living/net_target = tgui_input_list(ninja, "Select who to capture:","Capture who?",sortNames(oview(ninja))) + var/mob/living/net_target = input("Select who to capture:","Capture who?",null) as null|mob in sortNames(oview(ninja)) if(QDELETED(net_target)||!(net_target in oview(ninja))) return diff --git a/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm b/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm index 9c041977de..c1a3c77814 100644 --- a/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm +++ b/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm @@ -95,7 +95,7 @@ GLOBAL_LIST_INIT(ninja_deinitialize_messages, list( if (!ninja || !ninja.mind) s_busy = FALSE return - if (phase == 0 && tgui_alert(ninja, "Are you certain you wish to remove the suit? This will take time and remove all abilities.",,list("Yes","No")) == "No") + if (phase == 0 && alert("Are you certain you wish to remove the suit? This will take time and remove all abilities.",,"Yes","No") == "No") s_busy = FALSE return diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index ea2bcad3aa..f46d4bf029 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -228,11 +228,11 @@ var/response = "No" if(ghost) ghost.notify_cloning("A devil has offered you revival, at the cost of your soul.",'sound/effects/genetics.ogg', H) - response = tgui_alert(ghost, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", list("Yes", "No", "Never for this round"), 200, 0) + response = tgalert(ghost, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", "Yes", "No", "Never for this round", 0, 200) if(!ghost) return //handle logouts that happen whilst the alert is waiting for a response. else - response = tgui_alert(target.current, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", list("Yes", "No", "Never for this round"), 200, 0) + response = tgalert(target.current, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", "Yes", "No", "Never for this round", 0, 200) if(response == "Yes") H.revive(1,0) log_combat(user, H, "infernally revived via contract") diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 7b19a7ad42..b4f1acbed4 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -123,7 +123,7 @@ desc = "It's an expensive [current_skin] fountain pen. The nib is quite sharp." /obj/item/pen/attack_self(mob/living/carbon/user) - var/deg = tgui_input_num(user, "What angle would you like to rotate the pen head to? (1-360)", "Rotate Pen Head") + var/deg = input(user, "What angle would you like to rotate the pen head to? (1-360)", "Rotate Pen Head") as null|num if(deg && (deg > 0 && deg <= 360)) degrees = deg to_chat(user, "You rotate the top of the pen to [degrees] degrees.") @@ -149,7 +149,7 @@ . = ..() //Changing name/description of items. Only works if they have the UNIQUE_RENAME object flag set if(isobj(O) && proximity && (O.obj_flags & UNIQUE_RENAME)) - var/penchoice = tgui_input_list(user, "What would you like to edit?", "Rename, change description or reset both?", list("Rename","Change description","Reset")) + var/penchoice = input(user, "What would you like to edit?", "Rename, change description or reset both?") as null|anything in list("Rename","Change description","Reset") if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE)) return if(penchoice == "Rename") diff --git a/code/modules/photography/camera/camera.dm b/code/modules/photography/camera/camera.dm index a22d5f8e16..49821e55e0 100644 --- a/code/modules/photography/camera/camera.dm +++ b/code/modules/photography/camera/camera.dm @@ -52,8 +52,8 @@ . = ..() if(!user.canUseTopic(src, BE_CLOSE)) return - var/desired_x = tgui_input_num(user, "How high do you want the camera to shoot, between [picture_size_x_min] and [picture_size_x_max]?", "Zoom", picture_size_x) - var/desired_y = tgui_input_num(user, "How wide do you want the camera to shoot, between [picture_size_y_min] and [picture_size_y_max]?", "Zoom", picture_size_y) + var/desired_x = input(user, "How high do you want the camera to shoot, between [picture_size_x_min] and [picture_size_x_max]?", "Zoom", picture_size_x) as num + var/desired_y = input(user, "How wide do you want the camera to shoot, between [picture_size_y_min] and [picture_size_y_max]?", "Zoom", picture_size_y) as num picture_size_x = min(clamp(desired_x, picture_size_x_min, picture_size_x_max), CAMERA_PICTURE_SIZE_HARD_LIMIT) picture_size_y = min(clamp(desired_y, picture_size_y_min, picture_size_y_max), CAMERA_PICTURE_SIZE_HARD_LIMIT) return TRUE @@ -204,7 +204,7 @@ to_chat(user, "[pictures_left] photos left.") var/customise = "No" if(can_customise) - customise = tgui_alert(user, "Do you want to customize the photo?", "Customization", list("Yes", "No")) + customise = alert(user, "Do you want to customize the photo?", "Customization", "Yes", "No") if(customise == "Yes") var/name1 = stripped_input(user, "Set a name for this photo, or leave blank. 32 characters max.", "Name", max_length = 32) var/desc1 = stripped_input(user, "Set a description to add to photo, or leave blank. 128 characters max.", "Caption", max_length = 128) diff --git a/code/modules/photography/camera/silicon_camera.dm b/code/modules/photography/camera/silicon_camera.dm index 69dcfd89a8..28a080d5f1 100644 --- a/code/modules/photography/camera/silicon_camera.dm +++ b/code/modules/photography/camera/silicon_camera.dm @@ -33,7 +33,7 @@ var/datum/picture/p = i nametemp += p.picture_name temp[p.picture_name] = p - find = tgui_input_list(user, "Select image", "", nametemp) + find = input(user, "Select image") in nametemp|null if(!find) return return temp[find] diff --git a/code/modules/plumbing/ducts.dm b/code/modules/plumbing/ducts.dm index 915678ef5b..8a27f2669c 100644 --- a/code/modules/plumbing/ducts.dm +++ b/code/modules/plumbing/ducts.dm @@ -407,10 +407,10 @@ All the important duct code: . += "It's current color and layer are [duct_color] and [duct_layer]. Use in-hand to change." /obj/item/stack/ducts/attack_self(mob/user) - var/new_layer = tgui_input_list(user, "Select a layer", "Layer", layers) + var/new_layer = input("Select a layer", "Layer") as null|anything in layers if(new_layer) duct_layer = new_layer - var/new_color = tgui_input_list(user, "Select a color", "Color", GLOB.pipe_paint_colors) + var/new_color = input("Select a color", "Color") as null|anything in GLOB.pipe_paint_colors if(new_color) duct_color = new_color add_atom_colour(GLOB.pipe_paint_colors[new_color], FIXED_COLOUR_PRIORITY) diff --git a/code/modules/plumbing/plumbers/bottler.dm b/code/modules/plumbing/plumbers/bottler.dm index 8bab3937b9..396c7cac22 100644 --- a/code/modules/plumbing/plumbers/bottler.dm +++ b/code/modules/plumbing/plumbers/bottler.dm @@ -51,7 +51,7 @@ ///changing input ammount with a window /obj/machinery/plumbing/bottler/interact(mob/user) . = ..() - wanted_amount = clamp(round(tgui_input_num(user,"maximum is 100u","set ammount to fill with"), 1), 1, 100) + wanted_amount = clamp(round(input(user,"maximum is 100u","set ammount to fill with") as num|null, 1), 1, 100) reagents.clear_reagents() to_chat(user, " The [src] will now fill for [wanted_amount]u.") diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 51388a236b..515349d666 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1303,7 +1303,7 @@ user.visible_message("[user] slots [card] into [src]...", "Transfer process initiated. Sending request for AI approval...") playsound(src, 'sound/machines/click.ogg', 50, TRUE) SEND_SOUND(occupier, sound('sound/misc/notice2.ogg')) //To alert the AI that someone's trying to card them if they're tabbed out - if(tgui_alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", list("Yes - Transfer Me", "No - Keep Me Here")) == "No - Keep Me Here") + if(alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", "Yes - Transfer Me", "No - Keep Me Here") == "No - Keep Me Here") to_chat(user, "AI denied transfer request. Process terminated.") playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE) transfer_in_progress = FALSE diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 191ec3499f..9e779b9c1b 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -520,7 +520,7 @@ By design, d1 is the smallest direction and d2 is the highest cost = 1 /obj/item/stack/cable_coil/cyborg/attack_self(mob/user) - var/cable_color = tgui_input_list(user,"Pick a cable color.","Cable Color", list("red","yellow","green","blue","pink","orange","cyan","white")) + var/cable_color = input(user,"Pick a cable color.","Cable Color") in list("red","yellow","green","blue","pink","orange","cyan","white") color = cable_color update_icon() diff --git a/code/modules/procedural_mapping/mapGenerator.dm b/code/modules/procedural_mapping/mapGenerator.dm index 0487feb1d8..323f74d0ef 100644 --- a/code/modules/procedural_mapping/mapGenerator.dm +++ b/code/modules/procedural_mapping/mapGenerator.dm @@ -147,16 +147,16 @@ set category = "Debug" var/datum/mapGenerator/nature/N = new() - var/startInput = tgui_input_text(usr,"Start turf of Map, (X;Y;Z)", "Map Gen Settings", "1;1;1") + var/startInput = input(usr,"Start turf of Map, (X;Y;Z)", "Map Gen Settings", "1;1;1") as text|null if (isnull(startInput)) return - var/endInput = tgui_input_text(usr,"End turf of Map (X;Y;Z)", "Map Gen Settings", "[world.maxx];[world.maxy];[mob ? mob.z : 1]") - + var/endInput = input(usr,"End turf of Map (X;Y;Z)", "Map Gen Settings", "[world.maxx];[world.maxy];[mob ? mob.z : 1]") as text|null + if (isnull(endInput)) return - + //maxx maxy and current z so that if you fuck up, you only fuck up one entire z level instead of the entire universe if(!startInput || !endInput) to_chat(src, "Missing Input") @@ -182,7 +182,7 @@ "Same turfs"=CLUSTER_CHECK_SAME_TURFS, "Same atoms"=CLUSTER_CHECK_SAME_ATOMS, "Different turfs"=CLUSTER_CHECK_DIFFERENT_TURFS, \ "Different atoms"=CLUSTER_CHECK_DIFFERENT_ATOMS, "All turfs"=CLUSTER_CHECK_ALL_TURFS,"All atoms"=CLUSTER_CHECK_ALL_ATOMS) - var/moduleClusters = tgui_input_list(src, "Cluster Flags (Cancel to leave unchanged from defaults)","Map Gen Settings", clusters) + var/moduleClusters = input("Cluster Flags (Cancel to leave unchanged from defaults)","Map Gen Settings") as null|anything in clusters //null for default var/theCluster = 0 diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 2ff8130527..cef730366e 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -259,20 +259,20 @@ . = TRUE if(!can_toggle || !user.canUseTopic(src, BE_CLOSE)) return - var/selection = tgui_alert(user, "Which setting would you want to modify?", "Firing Pin Settings", list("Minimum Level Setting", "Maximum Level Setting", "Lethals Only Toggle")) + var/selection = alert(user, "Which setting would you want to modify?", "Firing Pin Settings", "Minimum Level Setting", "Maximum Level Setting", "Lethals Only Toggle") if(QDELETED(src) || QDELETED(user) || !user.canUseTopic(src, BE_CLOSE)) return var/static/list/till_designs_pr_isnt_merged = list("green", "blue", "amber", "red", "delta") switch(selection) if("Minimum Level Setting") - var/input = tgui_input_list(user, "Input the new minimum level setting.", "Firing Pin Settings", till_designs_pr_isnt_merged) + var/input = input(user, "Input the new minimum level setting.", "Firing Pin Settings", NUM2SECLEVEL(min_sec_level)) as null|anything in till_designs_pr_isnt_merged if(!input) return min_sec_level = till_designs_pr_isnt_merged.Find(input) - 1 if(min_sec_level > max_sec_level) max_sec_level = SEC_LEVEL_DELTA if("Maximum Level Setting") - var/input = tgui_input_list(user, "Input the new maximum level setting.", "Firing Pin Settings", till_designs_pr_isnt_merged) + var/input = input(user, "Input the new maximum level setting.", "Firing Pin Settings", NUM2SECLEVEL(max_sec_level)) as null|anything in till_designs_pr_isnt_merged if(!input) return max_sec_level = till_designs_pr_isnt_merged.Find(input) - 1 diff --git a/code/modules/reagents/chem_wiki_render.dm b/code/modules/reagents/chem_wiki_render.dm index c4f4cab0ff..018161b075 100644 --- a/code/modules/reagents/chem_wiki_render.dm +++ b/code/modules/reagents/chem_wiki_render.dm @@ -17,7 +17,7 @@ var/prefix = "|Name | Reagents | Reaction vars | Description | Chem properties |\n|---|---|---|-----------|---|\n" - var/input_reagent = replacetext(lowertext(tgui_input_text(src, "Input the name/type of a reagent to get it's description on it's own, or leave blank to parse every chem.", "Input")), " ", "") //95% of the time, the reagent type is a lowercase, no spaces / underscored version of the name + var/input_reagent = replacetext(lowertext(input("Input the name/type of a reagent to get it's description on it's own, or leave blank to parse every chem.", "Input") as text), " ", "") //95% of the time, the reagent type is a lowercase, no spaces / underscored version of the name if(input_reagent) var/input_reagent2 = find_reagent(input_reagent) if(!input_reagent2) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index e9ae0ac1cb..22aadc06f4 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -322,7 +322,7 @@ if("clear_recipes") if(!is_operational()) return - var/yesno = tgui_alert(usr, "Clear all recipes?",, list("Yes","No")) + var/yesno = alert("Clear all recipes?",, "Yes","No") if(yesno == "Yes") saved_recipes = list() . = TRUE @@ -337,7 +337,7 @@ var/name = stripped_input(usr,"Name","What do you want to name this recipe?", "Recipe", MAX_NAME_LEN) if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr))) return - if(saved_recipes[name] && tgui_alert(usr, "\"[name]\" already exists, do you want to overwrite it?",, list("Yes", "No")) == "No") + if(saved_recipes[name] && alert("\"[name]\" already exists, do you want to overwrite it?",, "Yes", "No") == "No") return if(name && recording_recipe) var/list/logstring = list() diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index e6e8070663..285ef70433 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -221,8 +221,7 @@ var/to_container = params["to"] // Custom amount if (amount == -1) - amount = text2num(tgui_input_num( - usr, + amount = text2num(input( "Enter the amount you want to transfer:", name, "")) if (amount == null || amount <= 0) @@ -257,7 +256,7 @@ // Get amount of items var/amount = text2num(params["amount"]) if(amount == null) - amount = text2num(tgui_input_num(usr, + amount = text2num(input(usr, "Max 20. Buffer content will be split evenly.", "How many to make?", 1)) amount = clamp(round(amount), 0, 20) @@ -286,7 +285,7 @@ if(vol_each_text == "auto") vol_each = vol_each_max if(vol_each == null) - vol_each = text2num(tgui_input_num(usr, + vol_each = text2num(input(usr, "Maximum [vol_each_max] units per item.", "How many units to fill?", vol_each_max)) diff --git a/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm b/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm index 9644cd36e6..489f9dd179 100644 --- a/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm +++ b/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm @@ -30,7 +30,7 @@ beaker = null . = TRUE if("input") - var/input_reagent = replacetext(lowertext(tgui_input_text(usr, "Enter the name of any reagent", "Input")), " ", "") //95% of the time, the reagent id is a lowercase/no spaces version of the name + var/input_reagent = replacetext(lowertext(input("Enter the name of any reagent", "Input") as text|null), " ", "") //95% of the time, the reagent id is a lowercase/no spaces version of the name if (isnull(input_reagent)) return diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 375aef573c..9b8ff7b262 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -47,7 +47,7 @@ set name = "Set Transfer Amount" set category = "Object" set waitfor = FALSE - var/N = tgui_input_list(usr, "Amount per transfer from this:","[src]", possible_transfer_amounts) + var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts if(N) amount_per_transfer_from_this = N to_chat(usr, "[src]'s transfer amount is now [amount_per_transfer_from_this] units.") diff --git a/code/modules/reagents/reagent_containers/borghypo.dm b/code/modules/reagents/reagent_containers/borghypo.dm index 5dd0273372..3388018280 100644 --- a/code/modules/reagents/reagent_containers/borghypo.dm +++ b/code/modules/reagents/reagent_containers/borghypo.dm @@ -122,7 +122,7 @@ Borg Hypospray log_combat(user, M, "injected", src, "(CHEMICALS: [english_list(injected)])") /obj/item/reagent_containers/borghypo/attack_self(mob/user) - var/chosen_reagent = modes[reagent_names[tgui_input_list(user, "What reagent do you want to dispense?", "", reagent_names)]] + var/chosen_reagent = modes[reagent_names[input(user, "What reagent do you want to dispense?") as null|anything in reagent_names]] if(!chosen_reagent) return mode = chosen_reagent diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 17366e31d4..f59e45ff01 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -111,7 +111,7 @@ set src in usr if(usr.incapacitated()) return - if (tgui_alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", list("Yes", "No")) != "Yes") + if (alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes") return if(isturf(usr.loc) && src.loc == usr) to_chat(usr, "You empty \the [src] onto the floor.") diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 5df70f7e56..cc02e271f9 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -116,7 +116,7 @@ Note: Must be placed within 3 tiles of the R&D Console differences[i] = value if(length(worths) && !length(differences)) return FALSE - var/choice = tgui_input_list(user, "Are you sure you want to destroy [loaded_item] to [!length(worths) ? "reveal [TN.display_name]" : "boost [TN.display_name] by [json_encode(differences)] point\s"]?", "", list("Proceed", "Cancel")) + var/choice = input("Are you sure you want to destroy [loaded_item] to [!length(worths) ? "reveal [TN.display_name]" : "boost [TN.display_name] by [json_encode(differences)] point\s"]?") in list("Proceed", "Cancel") if(choice == "Cancel") return FALSE if(QDELETED(loaded_item) || QDELETED(linked_console) || !user.Adjacent(linked_console) || QDELETED(src)) @@ -134,7 +134,7 @@ Note: Must be placed within 3 tiles of the R&D Console user_mode_string = " for [json_encode(point_value)] points" else if(loaded_item.custom_materials?.len) user_mode_string = " for material reclamation" - var/choice = tgui_input_list(user, "Are you sure you want to destroy [loaded_item][user_mode_string]?", "", list("Proceed", "Cancel")) + var/choice = input("Are you sure you want to destroy [loaded_item][user_mode_string]?") in list("Proceed", "Cancel") if(choice == "Cancel") return FALSE if(QDELETED(loaded_item) || QDELETED(linked_console) || !user.Adjacent(linked_console) || QDELETED(src)) diff --git a/code/modules/research/xenobiology/crossbreeding/_misc.dm b/code/modules/research/xenobiology/crossbreeding/_misc.dm index cb6a2f25bc..4684352ef5 100644 --- a/code/modules/research/xenobiology/crossbreeding/_misc.dm +++ b/code/modules/research/xenobiology/crossbreeding/_misc.dm @@ -100,7 +100,7 @@ return if(M.mind) to_chat(user, "You offer the device to [M].") - if(tgui_alert(M, "Would you like to enter [user]'s capture device?", "Gold Capture Device", list("Yes", "No")) == "Yes") + if(alert(M, "Would you like to enter [user]'s capture device?", "Gold Capture Device", "Yes", "No") == "Yes") if(user.canUseTopic(src, BE_CLOSE) && user.canUseTopic(M, BE_CLOSE)) to_chat(user, "You store [M] in the capture device.") to_chat(M, "The world warps around you, and you're suddenly in an endless void, with a window to the outside floating in front of you.") diff --git a/code/modules/research/xenobiology/crossbreeding/charged.dm b/code/modules/research/xenobiology/crossbreeding/charged.dm index e4d344f9ba..75a15be9ce 100644 --- a/code/modules/research/xenobiology/crossbreeding/charged.dm +++ b/code/modules/research/xenobiology/crossbreeding/charged.dm @@ -153,7 +153,7 @@ Charged extracts: if(!istype(H)) to_chat(user, "You must be a humanoid to use this!") return - var/racechoice = tgui_input_list(H, "Choose your slime subspecies.", "Slime Selection", subtypesof(/datum/species/jelly)) + var/racechoice = input(H, "Choose your slime subspecies.", "Slime Selection") as null|anything in subtypesof(/datum/species/jelly) if(!racechoice) to_chat(user, "You decide not to become a slime for now.") return diff --git a/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm b/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm index bc1597aac8..a88b5cd35b 100644 --- a/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm +++ b/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm @@ -28,7 +28,7 @@ Self-sustaining extracts: return INITIALIZE_HINT_QDEL /obj/item/autoslime/attack_self(mob/user) - var/reagentselect = tgui_input_list(user, "Choose the reagent the extract will produce.", "Self-sustaining Reaction", extract.activate_reagents) + var/reagentselect = input(user, "Choose the reagent the extract will produce.", "Self-sustaining Reaction") as null|anything in extract.activate_reagents var/amount = 5 var/secondary diff --git a/code/modules/research/xenobiology/crossbreeding/stabilized.dm b/code/modules/research/xenobiology/crossbreeding/stabilized.dm index 5fc7a628da..69bd2c7e28 100644 --- a/code/modules/research/xenobiology/crossbreeding/stabilized.dm +++ b/code/modules/research/xenobiology/crossbreeding/stabilized.dm @@ -115,7 +115,7 @@ Stabilized extracts: generate_mobtype() /obj/item/slimecross/stabilized/gold/attack_self(mob/user) - var/choice = tgui_input_list(user, "Which do you want to reset?", "Familiar Adjustment", list("Familiar Location", "Familiar Species", "Familiar Sentience", "Familiar Name")) + var/choice = input(user, "Which do you want to reset?", "Familiar Adjustment") as null|anything in list("Familiar Location", "Familiar Species", "Familiar Sentience", "Familiar Name") if(!user.canUseTopic(src, BE_CLOSE)) return if(isliving(user)) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index d9679d0fb3..70cd28718c 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -737,7 +737,7 @@ return prompted = 1 - if(tgui_alert(usr, "This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,list("Yes","No"))=="No") + if(alert("This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,"Yes","No")=="No") prompted = 0 return diff --git a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm index cccb37a359..d62b3c2611 100644 --- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm +++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm @@ -169,7 +169,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate) /obj/structure/necropolis_gate/legion_gate/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!open && !changing_openness) - var/safety = tgui_alert(user, "You think this might be a bad idea...", "Knock on the door?", list("Proceed", "Abort")) + var/safety = alert(user, "You think this might be a bad idea...", "Knock on the door?", "Proceed", "Abort") if(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]...") diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index 89fd64f3ad..7109c87999 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -47,7 +47,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) promptAndCheckIn(user) /obj/item/hilbertshotel/proc/promptAndCheckIn(mob/user) - var/chosenRoomNumber = tgui_input_num(user, "What number room will you be checking into?", "Room Number") + var/chosenRoomNumber = input(user, "What number room will you be checking into?", "Room Number") as null|num if(!chosenRoomNumber || !user.CanReach(src)) return if(chosenRoomNumber > SHORT_REAL_LIMIT) @@ -258,7 +258,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) if(!parentSphere) to_chat(user, "The door seems to be malfunctioning and refuses to operate!") return - if(tgui_alert(user, "Hilbert's Hotel would like to remind you that while we will do everything we can to protect the belongings you leave behind, we make no guarantees of their safety while you're gone, especially that of the health of any living creatures. With that in mind, are you ready to leave?", "Exit", list("Leave", "Stay")) == "Leave") + if(alert(user, "Hilbert's Hotel would like to remind you that while we will do everything we can to protect the belongings you leave behind, we make no guarantees of their safety while you're gone, especially that of the health of any living creatures. With that in mind, are you ready to leave?", "Exit", "Leave", "Stay") == "Leave") if(!CHECK_MOBILITY(user, MOBILITY_MOVE) || (get_dist(get_turf(src), get_turf(user)) > 1)) //no teleporting around if they're dead or moved away during the prompt. return user.forceMove(get_turf(parentSphere)) diff --git a/code/modules/shuttle/assault_pod.dm b/code/modules/shuttle/assault_pod.dm index 43877819a3..1258b9f4b8 100644 --- a/code/modules/shuttle/assault_pod.dm +++ b/code/modules/shuttle/assault_pod.dm @@ -35,7 +35,7 @@ /obj/item/assault_pod/attack_self(mob/living/user) var/target_area - target_area = tgui_input_list(user, "Area to land", "Select a Landing Zone", GLOB.teleportlocs) + target_area = input("Area to land", "Select a Landing Zone", target_area) as null|anything in GLOB.teleportlocs if(!target_area) return var/area/picked_area = GLOB.teleportlocs[target_area] diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index 05ecb3f05c..a215b58b55 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -346,7 +346,7 @@ L["([L.len]) [nav_beacon.name] locked"] = null playsound(console, 'sound/machines/terminal_prompt.ogg', 25, 0) - var/selected = tgui_input_list(usr, "Choose location to jump to", "Locations", L) + var/selected = input("Choose location to jump to", "Locations", null) as null|anything in L if(QDELETED(src) || QDELETED(target) || !isliving(target)) return playsound(src, "terminal_type", 25, 0) diff --git a/code/modules/shuttle/spaceship_navigation_beacon.dm b/code/modules/shuttle/spaceship_navigation_beacon.dm index de826af62f..dbf81d791e 100644 --- a/code/modules/shuttle/spaceship_navigation_beacon.dm +++ b/code/modules/shuttle/spaceship_navigation_beacon.dm @@ -43,7 +43,7 @@ if(!I.tool_behaviour == TOOL_MULTITOOL) return if(panel_open) - var/new_name = "Beacon_[tgui_input_list(user, "Enter the custom name for this beacon", "It be Beacon ..your input..")]" + var/new_name = "Beacon_[input("Enter the custom name for this beacon", "It be Beacon ..your input..") as text]" if(new_name && Adjacent(user)) name = new_name to_chat(user, "You change beacon name to [name].") diff --git a/code/modules/smithing/anvil.dm b/code/modules/smithing/anvil.dm index c89f338f29..9dffc883d4 100644 --- a/code/modules/smithing/anvil.dm +++ b/code/modules/smithing/anvil.dm @@ -115,7 +115,7 @@ currentquality += qualitychange var/list/shapingsteps = list("weak hit", "strong hit", "heavy hit", "fold", "draw", "shrink", "bend", "punch", "upset") //weak/strong/heavy hit affect strength. All the other steps shape. workpiece_state = WORKPIECE_INPROGRESS - var/stepdone = tgui_input_list(user, "How would you like to work the metal?", "", shapingsteps) + var/stepdone = input(user, "How would you like to work the metal?") in shapingsteps var/steptime = 50 if(user.mind.skill_holder) var/skillmod = user.mind.get_skill_level(/datum/skill/level/dwarfy/blacksmithing)/10 + 1 diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index c999f01794..2272a14612 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -376,11 +376,11 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th continue possible_targets += M - //targets += tgui_input_list(user, "Choose the target for the spell.", "Targeting", possible_targets) + //targets += input("Choose the target for the spell.", "Targeting") as mob in possible_targets //Adds a safety check post-input to make sure those targets are actually in range. var/mob/M if(!random_target) - M = tgui_input_list(user, "Choose the target for the spell.", "Targeting", sortNames(possible_targets)) + M = input("Choose the target for the spell.", "Targeting") as null|mob in sortNames(possible_targets) else switch(random_target_priority) if(TARGET_RANDOM) diff --git a/code/modules/spells/spell_types/area_teleport.dm b/code/modules/spells/spell_types/area_teleport.dm index 19a0d12a2b..50d5ee0ad6 100644 --- a/code/modules/spells/spell_types/area_teleport.dm +++ b/code/modules/spells/spell_types/area_teleport.dm @@ -28,7 +28,7 @@ var/A = null if(!randomise_selection) - A = tgui_input_list(usr, "Area to teleport to", "Teleport", GLOB.teleportlocs) + A = input("Area to teleport to", "Teleport", A) as null|anything in GLOB.teleportlocs else A = pick(GLOB.teleportlocs) if(!A) diff --git a/code/modules/spells/spell_types/devil.dm b/code/modules/spells/spell_types/devil.dm index 3ff78e24c2..3b76107905 100644 --- a/code/modules/spells/spell_types/devil.dm +++ b/code/modules/spells/spell_types/devil.dm @@ -54,7 +54,7 @@ user.put_in_hands(contract) else var/obj/item/paper/contract/infernal/contract // = new(user.loc, C.mind, contractType, user.mind) - var/contractTypeName = tgui_input_list(user, "What type of contract?", "", list("Power", "Wealth", "Prestige", "Magic", "Knowledge", "Friendship")) + var/contractTypeName = input(user, "What type of contract?") in list ("Power", "Wealth", "Prestige", "Magic", "Knowledge", "Friendship") switch(contractTypeName) if("Power") contract = new /obj/item/paper/contract/infernal/power(C.loc, C.mind, user.mind) diff --git a/code/modules/spells/spell_types/devil_boons.dm b/code/modules/spells/spell_types/devil_boons.dm index 2be22f6ecb..cf11466d19 100644 --- a/code/modules/spells/spell_types/devil_boons.dm +++ b/code/modules/spells/spell_types/devil_boons.dm @@ -43,7 +43,7 @@ for(var/mob/C in targets) if(!C.client) continue - C.client.view_size.setTo((tgui_input_list(user, "Select view range:", "Range", ranges - 7))) + C.client.view_size.setTo((input("Select view range:", "Range", 4) in ranges) - 7) /obj/effect/proc_holder/spell/targeted/summon_friend name = "Summon Friend" diff --git a/code/modules/spells/spell_types/shapeshift.dm b/code/modules/spells/spell_types/shapeshift.dm index f686fdfcd5..67c2e3e941 100644 --- a/code/modules/spells/spell_types/shapeshift.dm +++ b/code/modules/spells/spell_types/shapeshift.dm @@ -34,7 +34,7 @@ for(var/path in possible_shapes) var/mob/living/simple_animal/A = path animal_list[initial(A.name)] = path - var/new_shapeshift_type = tgui_input_list(M, "Choose Your Animal Form!", "It's Morphing Time!", animal_list) + var/new_shapeshift_type = input(M, "Choose Your Animal Form!", "It's Morphing Time!", null) as null|anything in animal_list if(shapeshift_type) return shapeshift_type = new_shapeshift_type diff --git a/code/modules/spells/spell_types/voice_of_god.dm b/code/modules/spells/spell_types/voice_of_god.dm index 77a66f74ae..fa41b59c0d 100644 --- a/code/modules/spells/spell_types/voice_of_god.dm +++ b/code/modules/spells/spell_types/voice_of_god.dm @@ -24,7 +24,7 @@ /obj/effect/proc_holder/spell/voice_of_god/choose_targets(mob/user = usr) perform(user=user) /obj/effect/proc_holder/spell/voice_of_god/perform(list/targets, recharge = 1, mob/user = usr) - command = tgui_input_text(user, "Speak with the Voice of God", "Command") + command = input(user, "Speak with the Voice of God", "Command") if(QDELETED(src) || QDELETED(user)) return if(!command) diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index 442038c563..cb1fdcfc2e 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -286,7 +286,7 @@ var/list/options = gps_locators if(area_aim) options += GLOB.teleportlocs - var/V = tgui_input_list(user,"Select target", "Select target", options) + var/V = input(user,"Select target", "Select target",null) in options|null target = options[V] diff --git a/code/modules/surgery/graft_synthtissue.dm b/code/modules/surgery/graft_synthtissue.dm index b036d86005..afe8c9d1d1 100644 --- a/code/modules/surgery/graft_synthtissue.dm +++ b/code/modules/surgery/graft_synthtissue.dm @@ -37,7 +37,7 @@ O.on_find(user) organs -= O organs[O.name] = O - chosen_organ = tgui_input_list(user, "Target which organ?", "Surgery", organs) + chosen_organ = input("Target which organ?", "Surgery", null, null) as null|anything in organs chosen_organ = organs[chosen_organ] if(!chosen_organ) return -1 diff --git a/code/modules/surgery/helpers.dm b/code/modules/surgery/helpers.dm index c28c7d9848..652c49519a 100644 --- a/code/modules/surgery/helpers.dm +++ b/code/modules/surgery/helpers.dm @@ -53,7 +53,7 @@ if(!available_surgeries.len) return - var/P = tgui_input_list(user, "Begin which procedure?", "Surgery", available_surgeries) + var/P = input("Begin which procedure?", "Surgery", null, null) as null|anything in available_surgeries if(P && user && user.Adjacent(M) && (I in user)) var/datum/surgery/S = available_surgeries[P] diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm index 0cbd232afc..0876357e8e 100644 --- a/code/modules/surgery/organ_manipulation.dm +++ b/code/modules/surgery/organ_manipulation.dm @@ -105,7 +105,7 @@ O.on_find(user) organs -= O organs[O.name] = O - I = tgui_input_list(user, "Remove which organ?", "Surgery", organs) + I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs if(I && user && target && user.Adjacent(target) && user.get_active_held_item() == tool) I = organs[I] if(!I) diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index bc35298953..9861a1b639 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -280,7 +280,7 @@ var/C = input(owner, "Select Color", "Select color", "#ffffff") as color|null if(!C || QDELETED(src) || QDELETED(user) || QDELETED(owner) || owner != user) return - var/range = tgui_input_num(user, "Enter range (0 - [max_light_beam_distance])", "Range Select", 0) + var/range = input(user, "Enter range (0 - [max_light_beam_distance])", "Range Select", 0) as null|num if(!isnum(range)) return diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index e2ddfe6cab..e41980cdd3 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -46,7 +46,7 @@ /datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger() if(!IsAvailable()) return - var/message = tgui_input_text(owner, "Resonate a message to all nearby golems.", "Resonate") + var/message = input(owner, "Resonate a message to all nearby golems.", "Resonate") if(QDELETED(src) || QDELETED(owner) || !message) return owner.say(".x[message]") @@ -100,7 +100,7 @@ if(world.time < cords.next_command) to_chat(owner, "You must wait [DisplayTimeText(cords.next_command - world.time)] before Speaking again.") return - var/command = tgui_input_text(owner, "Speak with the Voice of God", "Command") + var/command = input(owner, "Speak with the Voice of God", "Command") if(QDELETED(src) || QDELETED(owner)) return if(!command) @@ -644,7 +644,7 @@ /datum/action/item_action/organ_action/velvet/Trigger() . = ..() - var/command = tgui_input_text(owner, "Speak in a sultry tone", "Command") + var/command = input(owner, "Speak in a sultry tone", "Command") if(QDELETED(src) || QDELETED(owner)) return if(!command) @@ -1220,7 +1220,7 @@ if (E.mental_capacity >= 5) var/trigger = html_decode(stripped_input(user, "Enter the trigger phrase", MAX_MESSAGE_LEN)) var/custom_words_words_list = list("Speak", "Echo", "Shock", "Cum", "Kneel", "Strip", "Trance", "Cancel") - var/trigger2 = tgui_input_list(user, "Pick an effect", "Effects", custom_words_words_list) + var/trigger2 = input(user, "Pick an effect", "Effects") in custom_words_words_list trigger2 = lowertext(trigger2) if ((findtext(trigger2, custom_words_words))) if (trigger2 == "speak" || trigger2 == "echo") @@ -1260,7 +1260,7 @@ H.SetStun(1000) var/trigger = stripped_input(user, "Enter the loop phrase", MAX_MESSAGE_LEN) var/customSpan = list("Notice", "Warning", "Hypnophrase", "Love", "Velvet") - var/trigger2 = tgui_input_list(user, "Pick the style", "Style", customSpan) + var/trigger2 = input(user, "Pick the style", "Style") in customSpan trigger2 = lowertext(trigger2) E.customEcho = trigger E.customSpan = trigger2 diff --git a/code/modules/surgery/plastic_surgery.dm b/code/modules/surgery/plastic_surgery.dm index 91809859c0..d3597ba516 100644 --- a/code/modules/surgery/plastic_surgery.dm +++ b/code/modules/surgery/plastic_surgery.dm @@ -30,7 +30,7 @@ for(var/_i in 1 to 9) names += "Subject [target.gender == MALE ? "i" : "o"]-[pick("a", "b", "c", "d", "e")]-[rand(10000, 99999)]" names += target.dna.species.random_name(target.gender, TRUE) //give one normal name in case they want to do regular plastic surgery - var/chosen_name = tgui_input_list(user, "Choose a new name to assign.", "Plastic Surgery", names) + var/chosen_name = input(user, "Choose a new name to assign.", "Plastic Surgery") as null|anything in names if(!chosen_name) return var/oldname = target.real_name diff --git a/code/modules/tcg/cards.dm b/code/modules/tcg/cards.dm index 6b1cbd9884..f5c7c47aaf 100644 --- a/code/modules/tcg/cards.dm +++ b/code/modules/tcg/cards.dm @@ -214,11 +214,11 @@ result = show_radial_menu(user, src, possible_actions, require_near = TRUE, tooltips = TRUE) switch(result) if("Health") - card_datum.health = tgui_input_num(user, "What do you want health to be?", "Changing [src]'s health", card_datum.health) + card_datum.health = input(user, "What do you want health to be?", "Changing [src]'s health") as num|null if("Attack") - card_datum.attack = tgui_input_num(user, "What do you want attack to be?", "Changing [src]'s attack", card_datum.attack) + card_datum.attack = input(user, "What do you want attack to be?", "Changing [src]'s attack") as num|null if("Mana") - card_datum.mana_cost = tgui_input_num(user, "What do you want mana cost to be?", "Changing [src]'s mana cost", card_datum.mana_cost) + card_datum.mana_cost = input(user, "What do you want mana cost to be?", "Changing [src]'s mana cost") as num|null user.visible_message("[user] changes [src]'s [result].") /obj/item/tcg_card/equipped(mob/user, slot, initial) @@ -575,7 +575,7 @@ qdel(I) if(istype(I, /obj/item/tcgcard_deck)) var/obj/item/tcgcard_deck/deck = I - var/named = tgui_input_text(user, "How will this deck be named? Leave this field empty if you don't want to save this deck.") + var/named = input(user, "How will this deck be named? Leave this field empty if you don't want to save this deck.") if(named) decks[named] = list() for(var/obj/item/tcg_card/card in deck.contents) diff --git a/code/modules/tgui/tgui_input_text.dm b/code/modules/tgui/tgui_input_text.dm deleted file mode 100644 index a8dcb6a984..0000000000 --- a/code/modules/tgui/tgui_input_text.dm +++ /dev/null @@ -1,299 +0,0 @@ -/** - * Creates a TGUI input text window and returns the user's response. - * - * This proc should be used to create alerts that the caller will wait for a response from. - * Arguments: - * * user - The user to show the input box to. - * * message - The content of the input box, shown in the body of the TGUI window. - * * title - The title of the input box, shown on the top of the TGUI window. - * * default - The default value pre-populated in the input box. - * * timeout - The timeout of the input box, after which the input box will close and qdel itself. Set to zero for no timeout. - */ -/proc/tgui_input_text(mob/user, message, title, default, timeout = 0) - if (istext(user)) - stack_trace("tgui_input_text() received text for user instead of mob") - return - if (!user) - user = usr - if (!istype(user)) - if (istype(user, /client)) - var/client/client = user - user = client.mob - else - return - var/datum/tgui_input_dialog/input = new(user, message, title, default, timeout) - input.input_type = "text" - input.ui_interact(user) - input.wait() - if (input) - . = input.choice - qdel(input) - -/** - * Creates a TGUI input message window and returns the user's response. - * - * This proc should be used to create alerts that the caller will wait for a response from. - * Arguments: - * * user - The user to show the input box to. - * * message - The content of the input box, shown in the body of the TGUI window. - * * title - The title of the input box, shown on the top of the TGUI window. - * * default - The default value pre-populated in the input box. - * * timeout - The timeout of the input box, after which the input box will close and qdel itself. Set to zero for no timeout. - */ -/proc/tgui_input_message(mob/user, message, title, default, timeout = 0) - if (istext(user)) - stack_trace("tgui_input_message() received text for user instead of mob") - return - if (!user) - user = usr - if (!istype(user)) - if (istype(user, /client)) - var/client/client = user - user = client.mob - else - return - var/datum/tgui_input_dialog/input = new(user, message, title, default, timeout) - input.input_type = "message" - input.ui_interact(user) - input.wait() - if (input) - . = input.choice - qdel(input) - -/** - * Creates a TGUI input num window and returns the user's response. - * - * This proc should be used to create alerts that the caller will wait for a response from. - * Arguments: - * * user - The user to show the input box to. - * * message - The content of the input box, shown in the body of the TGUI window. - * * title - The title of the input box, shown on the top of the TGUI window. - * * default - The default value pre-populated in the input box. - * * timeout - The timeout of the input box, after which the input box will close and qdel itself. Set to zero for no timeout. - */ -/proc/tgui_input_num(mob/user, message, title, default, timeout = 0) - if (istext(user)) - stack_trace("tgui_input_num() received text for user instead of mob") - return - if (!user) - user = usr - if (!istype(user)) - if (istype(user, /client)) - var/client/client = user - user = client.mob - else - return - var/datum/tgui_input_dialog/input = new(user, message, title, default, timeout) - input.input_type = "num" - input.ui_interact(user) - input.wait() - if (input) - . = input.choice - qdel(input) - -/** - * Creates an asynchronous TGUI input text window with an associated callback. - * - * This proc should be used to create inputs that invoke a callback with the user's chosen option. - * Arguments: - * * user - The user to show the input box to. - * * message - The content of the input box, shown in the body of the TGUI window. - * * title - The title of the input box, shown on the top of the TGUI window. - * * default - The default value pre-populated in the input box. - * * callback - The callback to be invoked when a choice is made. - * * timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout. - */ -/proc/tgui_input_text_async(mob/user, message, title, default, datum/callback/callback, timeout = 60 SECONDS) - if (istext(user)) - stack_trace("tgui_input_text_async() received text for user instead of mob") - return - if (!user) - user = usr - if (!istype(user)) - if (istype(user, /client)) - var/client/client = user - user = client.mob - else - return - var/datum/tgui_input_dialog/async/input = new(user, message, title, default, callback, timeout) - input.input_type = "text" - input.ui_interact(user) - -/** - * Creates an asynchronous TGUI input message window with an associated callback. - * - * This proc should be used to create inputs that invoke a callback with the user's chosen option. - * Arguments: - * * user - The user to show the input box to. - * * message - The content of the input box, shown in the body of the TGUI window. - * * title - The title of the input box, shown on the top of the TGUI window. - * * default - The default value pre-populated in the input box. - * * callback - The callback to be invoked when a choice is made. - * * timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout. - */ -/proc/tgui_input_message_async(mob/user, message, title, default, datum/callback/callback, timeout = 60 SECONDS) - if (istext(user)) - stack_trace("tgui_input_message_async() received text for user instead of mob") - return - if (!user) - user = usr - if (!istype(user)) - if (istype(user, /client)) - var/client/client = user - user = client.mob - else - return - var/datum/tgui_input_dialog/async/input = new(user, message, title, default, callback, timeout) - input.input_type = "message" - input.ui_interact(user) - -/** - * Creates an asynchronous TGUI input num window with an associated callback. - * - * This proc should be used to create inputs that invoke a callback with the user's chosen option. - * Arguments: - * * user - The user to show the input box to. - * * message - The content of the input box, shown in the body of the TGUI window. - * * title - The title of the input box, shown on the top of the TGUI window. - * * default - The default value pre-populated in the input box. - * * callback - The callback to be invoked when a choice is made. - * * timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout. - */ -/proc/tgui_input_num_async(mob/user, message, title, default, datum/callback/callback, timeout = 60 SECONDS) - if (istext(user)) - stack_trace("tgui_input_num_async() received text for user instead of mob") - return - if (!user) - user = usr - if (!istype(user)) - if (istype(user, /client)) - var/client/client = user - user = client.mob - else - return - var/datum/tgui_input_dialog/async/input = new(user, message, title, default, callback, timeout) - input.input_type = "num" - input.ui_interact(user) - -/** - * # tgui_input_dialog - * - * Datum used for instantiating and using a TGUI-controlled input that prompts the user with - * a message and a box for accepting text/message/num input. - */ -/datum/tgui_input_dialog - /// The title of the TGUI window - var/title - /// The textual body of the TGUI window - var/message - /// The default value to initially populate the input box. - var/initial - /// The value that the user input into the input box, null if cancelled. - var/choice - /// The time at which the tgui_text_input was created, for displaying timeout progress. - var/start_time - /// The lifespan of the tgui_text_input, after which the window will close and delete itself. - var/timeout - /// Boolean field describing if the tgui_text_input was closed by the user. - var/closed - /// Indicates the data type we want to collect ("text", "message", "num") - var/input_type = "text" - -/datum/tgui_input_dialog/New(mob/user, message, title, default, timeout) - src.title = title - src.message = message - // TODO - Do we need to sanitize the initial value for illegal characters? - src.initial = default - if (timeout) - src.timeout = timeout - start_time = world.time - QDEL_IN(src, timeout) - -/datum/tgui_input_dialog/Destroy(force, ...) - SStgui.close_uis(src) - . = ..() - -/** - * Waits for a user's response to the tgui_text_input's prompt before returning. Returns early if - * the window was closed by the user. - */ -/datum/tgui_input_dialog/proc/wait() - while (!choice && !closed) - stoplag(1) - -/datum/tgui_input_dialog/ui_interact(mob/user, datum/tgui/ui) - ui = SStgui.try_update_ui(user, src, ui) - if(!ui) - ui = new(user, src, "InputModal") - ui.open() - -/datum/tgui_input_dialog/ui_close(mob/user) - . = ..() - closed = TRUE - -/datum/tgui_input_dialog/ui_state(mob/user) - return GLOB.always_state - -/datum/tgui_input_dialog/ui_static_data(mob/user) - . = list( - "title" = title, - "message" = message, - "initial" = initial, - "input_type" = input_type - ) - -/datum/tgui_input_dialog/ui_data(mob/user) - . = list() - if(timeout) - .["timeout"] = clamp((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS), 0, 1) - -/datum/tgui_input_dialog/ui_act(action, list/params) - . = ..() - if (.) - return - switch(action) - if("choose") - set_choice(params["choice"]) - if(isnull(src.choice)) - return - SStgui.close_uis(src) - return TRUE - if("cancel") - SStgui.close_uis(src) - closed = TRUE - return TRUE - -/datum/tgui_input_dialog/proc/set_choice(choice) - if(input_type == "num") - src.choice = text2num(choice) - return - src.choice = choice - -/** - * # async tgui_text_input - * - * An asynchronous version of tgui_text_input to be used with callbacks instead of waiting on user responses. - */ -/datum/tgui_input_dialog/async - /// The callback to be invoked by the tgui_text_input upon having a choice made. - var/datum/callback/callback - -/datum/tgui_input_dialog/async/New(mob/user, message, title, default, callback, timeout) - ..(user, title, message, default, timeout) - src.callback = callback - -/datum/tgui_input_dialog/async/Destroy(force, ...) - QDEL_NULL(callback) - . = ..() - -/datum/tgui_input_dialog/async/ui_close(mob/user) - . = ..() - qdel(src) - -/datum/tgui_input_dialog/async/set_choice(choice) - . = ..() - if(!isnull(src.choice)) - callback?.InvokeAsync(src.choice) - -/datum/tgui_input_dialog/async/wait() - return diff --git a/code/modules/tgui_panel/external.dm b/code/modules/tgui_panel/external.dm index 3db779c758..89973a925d 100644 --- a/code/modules/tgui_panel/external.dm +++ b/code/modules/tgui_panel/external.dm @@ -17,7 +17,7 @@ nuke_chat() // Failed to fix - action = tgui_alert(src, "Did that work?", "", list("Yes", "No, switch to old ui")) + action = alert(src, "Did that work?", "", "Yes", "No, switch to old ui") if (action == "No, switch to old ui") winset(src, "output", "on-show=&is-disabled=0&is-visible=1") winset(src, "browseroutput", "is-disabled=1;is-visible=0") diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 6434a694b1..eab1c55ca9 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -1141,7 +1141,7 @@ GLOBAL_LIST_EMPTY(vending_products) var/price = 1 /obj/item/price_tagger/attack_self(mob/user) - price = max(1, round(tgui_input_num(user,"set price","price"), 1)) + price = max(1, round(input(user,"set price","price") as num|null, 1)) to_chat(user, " The [src] will now give things a [price] cr tag.") /obj/item/price_tagger/afterattack(atom/target, mob/user, proximity) diff --git a/code/modules/vore/eating/living.dm b/code/modules/vore/eating/living.dm index f65ffd3f82..6bc44e6489 100644 --- a/code/modules/vore/eating/living.dm +++ b/code/modules/vore/eating/living.dm @@ -104,12 +104,12 @@ /mob/living/proc/feed_self_to_grabbed(var/mob/living/user, var/mob/living/pred) pred.lazy_init_belly() - var/belly = tgui_input_list(user, "Choose Belly", "", pred.vore_organs) + var/belly = input("Choose Belly") in pred.vore_organs return perform_the_nom(user, user, pred, belly) /mob/living/proc/feed_grabbed_to_other(var/mob/living/user, var/mob/living/prey, var/mob/living/pred) pred.lazy_init_belly() - var/belly = tgui_input_list(user, "Choose Belly", "", pred.vore_organs) + var/belly = input("Choose Belly") in pred.vore_organs return perform_the_nom(user, prey, pred, belly) // @@ -226,7 +226,7 @@ //You're in a belly! if(isbelly(loc)) var/obj/belly/B = loc - var/confirm = tgui_alert(src, "You're in a mob. If you're otherwise unable to escape from a pred AFK for a long time, use this.", "Confirmation", list("Okay", "Cancel")) + var/confirm = alert(src, "You're in a mob. If you're otherwise unable to escape from a pred AFK for a long time, use this.", "Confirmation", "Okay", "Cancel") if(!confirm == "Okay" || loc != B) return //Actual escaping @@ -246,7 +246,7 @@ else if(istype(loc, /obj/item/dogborg/sleeper)) var/obj/item/dogborg/sleeper/belly = loc //The belly! - var/confirm = tgui_alert(src, "You're in a dogborg sleeper. This is for escaping from preference-breaking or if your predator disconnects/AFKs. You can also resist out naturally too.", "Confirmation", list("Okay", "Cancel")) + var/confirm = alert(src, "You're in a dogborg sleeper. This is for escaping from preference-breaking or if your predator disconnects/AFKs. You can also resist out naturally too.", "Confirmation", "Okay", "Cancel") if(!confirm == "Okay" || loc != belly) return //Actual escaping diff --git a/code/modules/vore/eating/vorepanel.dm b/code/modules/vore/eating/vorepanel.dm index 6ea0693df2..8e8cfc4935 100644 --- a/code/modules/vore/eating/vorepanel.dm +++ b/code/modules/vore/eating/vorepanel.dm @@ -222,7 +222,7 @@ if(host.vore_organs.len >= BELLIES_MAX) return FALSE - var/new_name = html_encode(tgui_input_text(usr,"New belly's name:","New Belly")) + var/new_name = html_encode(input(usr,"New belly's name:","New Belly") as text|null) var/failure_msg if(length(new_name) > BELLIES_NAME_MAX || length(new_name) < BELLIES_NAME_MIN) @@ -283,7 +283,7 @@ unsaved_changes = FALSE return TRUE if("setflavor") - var/new_flavor = html_encode(tgui_input_message(usr,"What your character tastes like (400ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",host.vore_taste)) + var/new_flavor = html_encode(input(usr,"What your character tastes like (400ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",host.vore_taste) as text|null) if(!new_flavor) return FALSE @@ -295,7 +295,7 @@ unsaved_changes = TRUE return TRUE if("setsmell") - var/new_smell = html_encode(tgui_input_message(usr,"What your character smells like (400ch limit). This text will be printed to the pred after 'X smells of...' so just put something like 'strawberries and cream':","Character Smell",host.vore_smell)) + var/new_smell = html_encode(input(usr,"What your character smells like (400ch limit). This text will be printed to the pred after 'X smells of...' so just put something like 'strawberries and cream':","Character Smell",host.vore_smell) as text|null) if(!new_smell) return FALSE @@ -504,7 +504,7 @@ var/attr = params["attribute"] switch(attr) if("b_name") - var/new_name = html_encode(tgui_input_text(usr,"Belly's new name:","New Name", host.vore_selected.name)) + var/new_name = html_encode(input(usr,"Belly's new name:","New Name") as text|null) var/failure_msg if(length(new_name) > BELLIES_NAME_MAX || length(new_name) < BELLIES_NAME_MIN) @@ -538,7 +538,7 @@ host.vore_selected.digest_mode = new_mode . = TRUE if("b_desc") - var/new_desc = html_encode(tgui_input_message(usr,"Belly Description ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc)) + var/new_desc = html_encode(input(usr,"Belly Description ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc) as message|null) if(new_desc) new_desc = readd_quotes(new_desc) @@ -552,27 +552,27 @@ var/help = " Press enter twice to separate messages. '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. '%count' will be replaced with the number of anything in your belly (will not work for absorbed examine). '%countprey' will be replaced with the number of living prey in your belly (or absorbed prey for absorbed examine)." switch(params["msgtype"]) if("dmp") - var/new_message = tgui_input_message(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",host.vore_selected.get_messages("dmp")) + var/new_message = input(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",host.vore_selected.get_messages("dmp")) as message if(new_message) host.vore_selected.set_messages(new_message,"dmp") if("dmo") - var/new_message = tgui_input_message(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",host.vore_selected.get_messages("dmo")) + var/new_message = input(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",host.vore_selected.get_messages("dmo")) as message if(new_message) host.vore_selected.set_messages(new_message,"dmo") if("smo") - var/new_message = tgui_input_message(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",host.vore_selected.get_messages("smo")) + var/new_message = input(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",host.vore_selected.get_messages("smo")) as message if(new_message) host.vore_selected.set_messages(new_message,"smo") if("smi") - var/new_message = tgui_input_message(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",host.vore_selected.get_messages("smi")) + var/new_message = input(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",host.vore_selected.get_messages("smi")) as message if(new_message) host.vore_selected.set_messages(new_message,"smi") if("em") - var/new_message = tgui_input_message(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",host.vore_selected.get_messages("em")) + var/new_message = input(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",host.vore_selected.get_messages("em")) as message if(new_message) host.vore_selected.set_messages(new_message,"em") @@ -587,7 +587,7 @@ host.vore_selected.emote_lists = initial(host.vore_selected.emote_lists) . = TRUE if("b_verb") - var/new_verb = html_encode(tgui_input_text(usr,"New verb when eating (infinitive tense, e.g. nom or swallow):","New Verb", host.vore_selected.vore_verb)) + var/new_verb = html_encode(input(usr,"New verb when eating (infinitive tense, e.g. nom or swallow):","New Verb") as text|null) if(length(new_verb) > BELLIES_NAME_MAX || length(new_verb) < BELLIES_NAME_MIN) tgui_alert_async(usr, "Entered verb length invalid (must be longer than [BELLIES_NAME_MIN], no longer than [BELLIES_NAME_MAX]).","Error") @@ -626,7 +626,7 @@ host.vore_selected.can_taste = !host.vore_selected.can_taste . = TRUE if("b_bulge_size") - var/new_bulge = tgui_input_num(user, "Choose the required size prey must be to show up on examine, ranging from 25% to 200% Set this to 0 for no text on examine.", "Set Belly Examine Size.", host.vore_selected.bulge_size) + var/new_bulge = input(user, "Choose the required size prey must be to show up on examine, ranging from 25% to 200% Set this to 0 for no text on examine.", "Set Belly Examine Size.") as num|null if(new_bulge == null) return FALSE if(new_bulge == 0) //Disable. @@ -650,17 +650,17 @@ host.vore_selected.escapable = 0 . = TRUE if("b_escapechance") - var/escape_chance_input = tgui_input_num(user, "Set prey escape chance on resist (as %)", "Prey Escape Chance", host.vore_selected.escapechance) + var/escape_chance_input = input(user, "Set prey escape chance on resist (as %)", "Prey Escape Chance") as num|null if(!isnull(escape_chance_input)) //These have to be 'null' because both cancel and 0 are valid, separate options host.vore_selected.escapechance = sanitize_integer(escape_chance_input, 0, 100, initial(host.vore_selected.escapechance)) . = TRUE if("b_escapetime") - var/escape_time_input = tgui_input_num(user, "Set number of seconds for prey to escape on resist (1-60)", "Prey Escape Time", host.vore_selected.escapetime) + var/escape_time_input = input(user, "Set number of seconds for prey to escape on resist (1-60)", "Prey Escape Time") as num|null if(!isnull(escape_time_input)) host.vore_selected.escapetime = sanitize_integer(escape_time_input*10, 10, 600, initial(host.vore_selected.escapetime)) . = TRUE if("b_transferchance") - var/transfer_chance_input = tgui_input_num(user, "Set belly transfer chance on resist (as %). You must also set the location for this to have any effect.", "Prey Escape Time", host.vore_selected.transferchance) + var/transfer_chance_input = input(user, "Set belly transfer chance on resist (as %). You must also set the location for this to have any effect.", "Prey Escape Time") as num|null if(!isnull(transfer_chance_input)) host.vore_selected.transferchance = sanitize_integer(transfer_chance_input, 0, 100, initial(host.vore_selected.transferchance)) . = TRUE @@ -675,12 +675,12 @@ host.vore_selected.transferlocation = choice.name . = TRUE if("b_absorbchance") - var/absorb_chance_input = tgui_input_num(user, "Set belly absorb mode chance on resist (as %)", "Prey Absorb Chance", host.vore_selected.absorbchance) + var/absorb_chance_input = input(user, "Set belly absorb mode chance on resist (as %)", "Prey Absorb Chance") as num|null if(!isnull(absorb_chance_input)) host.vore_selected.absorbchance = sanitize_integer(absorb_chance_input, 0, 100, initial(host.vore_selected.absorbchance)) . = TRUE if("b_digestchance") - var/digest_chance_input = tgui_input_num(user, "Set belly digest mode chance on resist (as %)", "Prey Digest Chance", host.vore_selected.digestchance) + var/digest_chance_input = input(user, "Set belly digest mode chance on resist (as %)", "Prey Digest Chance") as num|null if(!isnull(digest_chance_input)) host.vore_selected.digestchance = sanitize_integer(digest_chance_input, 0, 100, initial(host.vore_selected.digestchance)) . = TRUE diff --git a/interface/interface.dm b/interface/interface.dm index fdcc461b6d..2aece7cb6c 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -24,7 +24,7 @@ set hidden = 1 var/forumurl = CONFIG_GET(string/forumurl) if(forumurl) - if(tgui_alert(src, "This will open the forum in your browser. Are you sure?",,list("Yes","No"))!="Yes") + if(alert("This will open the forum in your browser. Are you sure?",,"Yes","No")!="Yes") return src << link(forumurl) else @@ -37,7 +37,7 @@ set hidden = 1 var/rulesurl = CONFIG_GET(string/rulesurl) if(rulesurl) - if(tgui_alert(src, "This will open the rules in your browser. Are you sure?",,list("Yes","No"))!="Yes") + if(alert("This will open the rules in your browser. Are you sure?",,"Yes","No")!="Yes") return src << link(rulesurl) else @@ -50,7 +50,7 @@ set hidden = 1 var/githuburl = CONFIG_GET(string/githuburl) if(githuburl) - if(tgui_alert(src, "This will open the Github repository in your browser. Are you sure?",,list("Yes","No"))!="Yes") + if(alert("This will open the Github repository in your browser. Are you sure?",,"Yes","No")!="Yes") return src << link(githuburl) else @@ -67,7 +67,7 @@ if(GLOB.revdata.testmerge.len) message += "
    The following experimental changes are active and are probably the cause of any new or sudden issues you may experience. If possible, please try to find a specific thread for your issue instead of posting to the general issue tracker:
    " message += GLOB.revdata.GetTestMergeInfo(FALSE) - if(tgalert(src, message, "Report Issue","Yes","No")!="Yes") //Untouched, issues must be reported at all costs. + if(tgalert(src, message, "Report Issue","Yes","No")!="Yes") return var/static/issue_template = file2text(".github/ISSUE_TEMPLATE.md") var/servername = CONFIG_GET(string/servername) diff --git a/modular_citadel/code/modules/mentor/mentor_memo.dm b/modular_citadel/code/modules/mentor/mentor_memo.dm index 24b7ed32d2..59ea92febd 100644 --- a/modular_citadel/code/modules/mentor/mentor_memo.dm +++ b/modular_citadel/code/modules/mentor/mentor_memo.dm @@ -6,7 +6,7 @@ if(!SSdbcore.IsConnected()) to_chat(src, "Failed to establish database connection.", confidential = TRUE) return - var/memotask = tgui_input_list(usr,"Choose task.","Memo", list("Show","Write","Edit","Remove")) + var/memotask = input(usr,"Choose task.","Memo") in list("Show","Write","Edit","Remove") if(!memotask) return mentor_memo_output(memotask) @@ -43,7 +43,7 @@ return qdel(query_memocheck) - var/memotext = tgui_input_message(src,"Write your Memo","Memo") + var/memotext = input(src,"Write your Memo","Memo") as message if(!memotext) return var/datum/db_query/query_memoadd = SSdbcore.NewQuery({" @@ -73,7 +73,7 @@ if(!memolist.len) to_chat(src, "No memos found in database.") return - var/target_ckey = tgui_input_list(src, "Select whose memo to edit", "Select memo", memolist) + var/target_ckey = input(src, "Select whose memo to edit", "Select memo") as null|anything in memolist if(!target_ckey) return var/datum/db_query/query_memofind = SSdbcore.NewQuery({" @@ -87,7 +87,7 @@ if(query_memofind.NextRow()) var/old_memo = query_memofind.item[1] qdel(query_memofind) - var/new_memo = tgui_input_message(src, "Input new memo", "New Memo", "[old_memo]") + var/new_memo = input("Input new memo", "New Memo", "[old_memo]", null) as message if(!new_memo) return var/edit_text = "Edited by [ckey] on [SQLtime()] from
    [old_memo]
    to
    [new_memo]
    " @@ -146,7 +146,7 @@ if(!memolist.len) to_chat(src, "No memos found in database.") return - var/target_ckey = tgui_input_list(src, "Select whose mentor memo to delete", "Select mentor memo", memolist) + var/target_ckey = input(src, "Select whose mentor memo to delete", "Select mentor memo") as null|anything in memolist if(!target_ckey) return var/datum/db_query/query_memodel = SSdbcore.NewQuery({" diff --git a/modular_citadel/code/modules/mentor/mentorpm.dm b/modular_citadel/code/modules/mentor/mentorpm.dm index b99f1cdde1..3260e96767 100644 --- a/modular_citadel/code/modules/mentor/mentorpm.dm +++ b/modular_citadel/code/modules/mentor/mentorpm.dm @@ -10,7 +10,7 @@ targets["[T]"] = T var/list/sorted = sortList(targets) - var/target = tgui_input_list(src,"To whom shall we send a message?","Mentor PM",sorted) + var/target = input(src,"To whom shall we send a message?","Mentor PM",null) in sorted|null cmd_mentor_pm(targets[target],null) SSblackbox.record_feedback("tally", "Mentor_verb", 1, "APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -36,7 +36,7 @@ //get message text, limit it's length.and clean/escape html if(!msg) - msg = tgui_input_text(src,"Message:", "Private message") + msg = input(src,"Message:", "Private message") as text|null if(!msg) if (is_mentor(whom)) diff --git a/modular_citadel/code/modules/projectiles/guns/ballistic/rifles.dm b/modular_citadel/code/modules/projectiles/guns/ballistic/rifles.dm index eacb7a7038..e89bb92b33 100644 --- a/modular_citadel/code/modules/projectiles/guns/ballistic/rifles.dm +++ b/modular_citadel/code/modules/projectiles/guns/ballistic/rifles.dm @@ -98,7 +98,7 @@ wound_bonus = 15 sharpness = SHARP_EDGED wound_falloff_tile = 0 - + ///ammo casings (CASELESS AMMO CASINGS WOOOOOOOO)/// /obj/item/ammo_casing/caseless/flechetteap @@ -239,7 +239,7 @@ if(user.incapacitated() || !istype(user)) to_chat(user, "You can't do that right now!") return - if(tgui_alert(user, "Are you sure you want to recolor your gun?", "Confirm Repaint", list("Yes", "No")) == "Yes") + if(alert("Are you sure you want to recolor your gun?", "Confirm Repaint", "Yes", "No") == "Yes") var/body_color_input = input(usr,"","Choose Shroud Color",body_color) as color|null if(body_color_input) body_color = sanitize_hexcolor(body_color_input, desired_format=6, include_crunch=1) diff --git a/modular_citadel/code/modules/projectiles/guns/energy/energy_gun.dm b/modular_citadel/code/modules/projectiles/guns/energy/energy_gun.dm index 5a5f20652f..9a8ee4bab1 100644 --- a/modular_citadel/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/modular_citadel/code/modules/projectiles/guns/energy/energy_gun.dm @@ -33,7 +33,7 @@ if(user.incapacitated() || !istype(user)) to_chat(user, "You can't do that right now!") return - if(tgui_alert(user, "Are you sure you want to repaint your gun?", "Confirm Repaint", list("Yes", "No")) == "Yes") + if(alert("Are you sure you want to repaint your gun?", "Confirm Repaint", "Yes", "No") == "Yes") var/body_color_input = input(usr,"","Choose Body Color",body_color) as color|null if(body_color_input) body_color = sanitize_hexcolor(body_color_input, desired_format=6, include_crunch=1) diff --git a/tgstation.dme b/tgstation.dme index 7a8a7a173e..dd51cfced1 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3613,7 +3613,6 @@ #include "code\modules\tgui\tgui.dm" #include "code\modules\tgui\tgui_alert.dm" #include "code\modules\tgui\tgui_input_list.dm" -#include "code\modules\tgui\tgui_input_text.dm" #include "code\modules\tgui\tgui_window.dm" #include "code\modules\tgui\states\admin.dm" #include "code\modules\tgui\states\always.dm" diff --git a/tgui/packages/tgui/interfaces/InputModal.js b/tgui/packages/tgui/interfaces/InputModal.js deleted file mode 100644 index 1818abccda..0000000000 --- a/tgui/packages/tgui/interfaces/InputModal.js +++ /dev/null @@ -1,119 +0,0 @@ -/** - * @file - * @copyright 2021 Leshana - * @license MIT - */ - -import { clamp01 } from 'common/math'; -import { useBackend, useLocalState } from '../backend'; -import { Box, Button, Section, Input, Stack, TextArea } from '../components'; -import { KEY_ESCAPE } from 'common/keycodes'; -import { Window } from '../layouts'; -import { createLogger } from '../logging'; - -const logger = createLogger('inputmodal'); - -export const InputModal = (props, context) => { - const { act, data } = useBackend(context); - const { title, message, initial, input_type, timeout } = data; - - // Current Input Value - const [curValue, setCurValue] = useLocalState(context, 'curValue', initial); - - const handleKeyDown = e => { - if (e.keyCode === KEY_ESCAPE) { - e.preventDefault(); - act("cancel"); - return; - } - }; - - let initialHeight, initialWidth, canResize; - let modalBody; - switch (input_type) { - case 'text': - case 'num': - initialWidth = 325; - initialHeight = message ? Math.max(150, message.length) : 110; - canResize = false; - modalBody = ( - { - setCurValue(val); - }} - onEnter={(_e, val) => { - act('choose', { choice: val }); - }} - /> - ); - break; - case 'message': - initialWidth = 450; - initialHeight = 350; - canResize = true; - modalBody = ( -
    NamePosition