Skip to content

Commit

Permalink
Convert input lists to tgui (ss220club#761)
Browse files Browse the repository at this point in the history
<!-- Пишите **НИЖЕ** заголовков и **ВЫШЕ** комментариев, иначе что то
может пойти не так. -->
<!-- Вы можете прочитать Contributing.MD, если хотите узнать больше. -->

## Что этот PR делает
Переносит наши списки на ТГУИ.

<!-- Вкратце опишите изменения, которые вносите. -->
<!-- Опишите **все** изменения, так как противное может сказаться на
рассмотрении этого PR'а! -->
<!-- Если вы исправляете Issue, добавьте "Fixes ss220club#1234" (где 1234 - номер
Issue) где-нибудь в описании PR'а. Это автоматически закроет Issue после
принятия PR'а. -->

## Почему это хорошо для игры
ТГУИ - красиво.
<!-- Опишите, почему, по вашему, следует добавить эти изменения в игру.
-->

## Изображения изменений

![image](https://github.com/ss220club/Paradise-SS220/assets/69762909/bdfb42dd-32d3-42eb-98c7-900c6009767a)

![image](https://github.com/ss220club/Paradise-SS220/assets/69762909/8c8bba5e-421a-4d0a-8a8c-78acec584ea6)

![image](https://github.com/ss220club/Paradise-SS220/assets/69762909/5d3b8191-a6a0-4813-aa79-a747a2adb998)

<!-- Если вы не меняли карту или спрайты, можете опустить эту секцию.
Если хотите, можете вставить видео. -->

## Тестирование
На пол шишечки.

<!-- Как вы тестировали свой PR, если делали это вовсе? -->

## Changelog

:cl:
tweak: Админские проки "change_voice" и "select_voice" теперь с поиском
и TGUI
/:cl:

<!-- Оба :cl:'а должны быть на месте, что-бы чейнджлог работал! Вы
можете написать свой ник справа от первого :cl:, если хотите. Иначе
будет использован ваш ник на ГитХабе. -->
<!-- Вы можете использовать несколько записей с одинаковым префиксом
(Они используются только для иконки в игре) и удалить ненужные. Помните,
что чейнджлог должен быть понятен обычным игроком. -->
<!-- Если чейнджлог не влияет на игроков(например, это рефактор), вы
можете исключить всю секцию. -->
  • Loading branch information
AyIong authored Nov 25, 2023
1 parent 35d8770 commit 4ea5ae7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
32 changes: 16 additions & 16 deletions modular_ss220/agent_id_tgui/code/agent_id_tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
8 changes: 4 additions & 4 deletions modular_ss220/clothing/code/shoes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion modular_ss220/detective_rework/code/swabs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions modular_ss220/maps220/code/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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--
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions modular_ss220/objects/code/card_skins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modular_ss220/text_to_speech/code/tts_seed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4ea5ae7

Please sign in to comment.