From 33913c2d902c187b27cffb204686181da0fe4ff1 Mon Sep 17 00:00:00 2001 From: Aylong Date: Sat, 25 Nov 2023 03:34:46 +0200 Subject: [PATCH 1/2] TGUI Input --- .../agent_id_tgui/code/agent_id_tgui.dm | 32 +++++++++---------- modular_ss220/clothing/code/shoes.dm | 8 ++--- modular_ss220/detective_rework/code/swabs.dm | 2 +- modular_ss220/maps220/code/misc.dm | 4 +-- modular_ss220/objects/code/card_skins.dm | 4 +-- modular_ss220/text_to_speech/code/tts_seed.dm | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/modular_ss220/agent_id_tgui/code/agent_id_tgui.dm b/modular_ss220/agent_id_tgui/code/agent_id_tgui.dm index 218cf648da54..5931bcea6215 100644 --- a/modular_ss220/agent_id_tgui/code/agent_id_tgui.dm +++ b/modular_ss220/agent_id_tgui/code/agent_id_tgui.dm @@ -225,46 +225,46 @@ "Custom", ) - var/department = input(registered_human, "What job would you like to put on this card?\nChoose a department or a custom job title.\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in departments + var/department = tgui_input_list(registered_human, "What job would you like to put on this card?\nChoose a department or a custom job title.\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", departments) var/new_job = "Civilian" var/new_rank = "Civilian" if(department == "Custom") new_job = sanitize(stripped_input(registered_human,"Choose a custom job title:","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN)) - var/department_icon = input(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in departments + var/department_icon = tgui_input_list(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", departments) switch(department_icon) if("Engineering") - new_rank = input(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.engineering_positions + new_rank = tgui_input_list(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.engineering_positions) if("Medical") - new_rank = input(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.medical_positions + new_rank = tgui_input_list(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.medical_positions) if("Science") - new_rank = input(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.science_positions + new_rank = tgui_input_list(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.science_positions) if("Security") - new_rank = input(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.security_positions + new_rank = tgui_input_list(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.security_positions) if("Support") - new_rank = input(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.support_positions + new_rank = tgui_input_list(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.support_positions) if("Command") - new_rank = input(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.command_positions + new_rank = tgui_input_list(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.command_positions) if("Special") - new_rank = input(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in (get_all_solgov_jobs() + get_all_soviet_jobs() + get_all_centcom_jobs()) + new_rank = tgui_input_list(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", (get_all_solgov_jobs() + get_all_soviet_jobs() + get_all_centcom_jobs())) if("Custom") new_rank = null else if(department != "Civilian") switch(department) if("Engineering") - new_job = input(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.engineering_positions + new_job = tgui_input_list(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.engineering_positions) if("Medical") - new_job = input(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.medical_positions + new_job = tgui_input_list(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.medical_positions) if("Science") - new_job = input(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.science_positions + new_job = tgui_input_list(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.science_positions) if("Security") - new_job = input(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.security_positions + new_job = tgui_input_list(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.security_positions) if("Support") - new_job = input(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.support_positions + new_job = tgui_input_list(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.support_positions) if("Command") - new_job = input(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.command_positions + new_job = tgui_input_list(registered_human, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", GLOB.command_positions) if("Special") - new_job = input(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in (get_all_solgov_jobs() + get_all_soviet_jobs() + get_all_centcom_jobs()) + new_job = tgui_input_list(registered_human, "What job would you like to be shown on this card (for SecHUDs)?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation", (get_all_solgov_jobs() + get_all_soviet_jobs() + get_all_centcom_jobs())) new_rank = new_job if(!Adjacent(registered_human)) diff --git a/modular_ss220/clothing/code/shoes.dm b/modular_ss220/clothing/code/shoes.dm index 9538dd2be850..8d9f149b11d0 100644 --- a/modular_ss220/clothing/code/shoes.dm +++ b/modular_ss220/clothing/code/shoes.dm @@ -16,12 +16,12 @@ var/glow_active = FALSE var/brightness_on = 2 -/obj/item/clothing/shoes/black/neon/attack_self(mob/living/user as mob) - var/choice = input(user,"Neon shoes options") in list("Turn glow","Change Color") +/obj/item/clothing/shoes/black/neon/attack_self(mob/living/user) + var/choice = tgui_input_list(user, "Что вы хотите сделать?", "Неоновые кросовки", list("Переключить подсветку", "Сменить цвет")) switch(choice) - if("Turn glow") + if("Переключить подсветку") turn_glow() - if("Change color") + if("Сменить цвет") change_color() /obj/item/clothing/shoes/black/neon/update_icon_state() diff --git a/modular_ss220/detective_rework/code/swabs.dm b/modular_ss220/detective_rework/code/swabs.dm index 2e1457057acc..c115583acc33 100644 --- a/modular_ss220/detective_rework/code/swabs.dm +++ b/modular_ss220/detective_rework/code/swabs.dm @@ -127,7 +127,7 @@ else if(choices.len == 1) choice = choices[1] else - choice = input("Какие доказательства вы ищете?","Сбор доказательств") as null|anything in choices + choice = tgui_input_list(user, "Какие доказательства вы ищете?", "Сбор доказательств", choices) if(!choice) inuse = FALSE diff --git a/modular_ss220/maps220/code/misc.dm b/modular_ss220/maps220/code/misc.dm index db0ae28a11f9..54b2c05a906b 100644 --- a/modular_ss220/maps220/code/misc.dm +++ b/modular_ss220/maps220/code/misc.dm @@ -37,7 +37,7 @@ return insisting = FALSE - var/wish = input("Вы хотите...","Желание") as null|anything in list("Сила", "Богатство", "Бессмертие", "Покой") + var/wish = tgui_input_list("Вы хотите...", "Желание", list("Силу", "Богатство", "Бессмертие", "Покой")) if(!wish) return charges-- @@ -46,7 +46,7 @@ var/become_shadow = TRUE var/list/output = list() switch(wish) - if("Сила") + if("Силу") for(var/mutation_type in power_mutations) var/datum/mutation/mutation = GLOB.dna_mutations[mutation_type] mutation.activate(human) diff --git a/modular_ss220/objects/code/card_skins.dm b/modular_ss220/objects/code/card_skins.dm index 0ca75c570339..961bd430af39 100644 --- a/modular_ss220/objects/code/card_skins.dm +++ b/modular_ss220/objects/code/card_skins.dm @@ -121,12 +121,12 @@ color = color_list[pick(color_list)] /obj/item/id_skin/colored/attack_self(mob/living) - var/choice = input(usr, "Какой цвет предпочитаете?", "Выбор цвета") as null|anything in list("Выбрать предустановленный", "Выбрать вручную") + var/choice = tgui_input_list(usr, "Какой цвет предпочитаете?", "Выбор цвета", list("Выбрать предустановленный", "Выбрать вручную")) if(!choice) return switch(choice) if("Выбрать предустановленный") - choice = input(usr, "Выберите цвет", "Выбор цвета") as null|anything in color_list + choice = tgui_input_list(usr, "Выберите цвет", "Выбор цвета", color_list) var/color_to_set = color_list[choice] if(!color_to_set) return diff --git a/modular_ss220/text_to_speech/code/tts_seed.dm b/modular_ss220/text_to_speech/code/tts_seed.dm index 1110b2ea1b77..b759570f5c5a 100644 --- a/modular_ss220/text_to_speech/code/tts_seed.dm +++ b/modular_ss220/text_to_speech/code/tts_seed.dm @@ -21,7 +21,7 @@ else tts_seeds = SStts220.get_available_seeds(src) - var/new_tts_seed = input(user || src, "Choose your preferred voice:", "Character Preference", tts_seed) as null|anything in tts_seeds + var/new_tts_seed = tgui_input_list(user || src, "Выберите голос:", "Настройки персонажа", tts_seeds) if(!new_tts_seed) return null if(!silent_target && ismob(src) && src != user) From cfb5f8d6d81fdbcdb029b751f2173ca54808e9c4 Mon Sep 17 00:00:00 2001 From: Aylong Date: Sat, 25 Nov 2023 03:41:17 +0200 Subject: [PATCH 2/2] Spellcheck --- modular_ss220/text_to_speech/code/tts_seed.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_ss220/text_to_speech/code/tts_seed.dm b/modular_ss220/text_to_speech/code/tts_seed.dm index b759570f5c5a..89406dd70316 100644 --- a/modular_ss220/text_to_speech/code/tts_seed.dm +++ b/modular_ss220/text_to_speech/code/tts_seed.dm @@ -21,7 +21,7 @@ else tts_seeds = SStts220.get_available_seeds(src) - var/new_tts_seed = tgui_input_list(user || src, "Выберите голос:", "Настройки персонажа", tts_seeds) + var/new_tts_seed = tgui_input_list(user || src, "Выберите голос:", "Настройка персонажа", tts_seeds) if(!new_tts_seed) return null if(!silent_target && ismob(src) && src != user)