-
Notifications
You must be signed in to change notification settings - Fork 476
add: баг-репорт в игре, отправляется в дс #8484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master220
Are you sure you want to change the base?
Changes from all commits
1acc119
a8374a4
ba75fdf
afc65b1
fdbaae8
aabfdc7
c5296b1
fcb2af4
7c7d36b
f1edadd
0c3740b
e931000
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -652,6 +652,10 @@ | |
| /// Webhook URLs for the requests webhook | ||
| /datum/config_entry/str_list/discord_requests_webhook_urls | ||
|
|
||
| //Needs attention | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Рекомендация по стилю: Комментарий References
|
||
| /// Webhook URLs for the bugreport webhook | ||
| /datum/config_entry/str_list/discord_bugreport_webhook_urls | ||
|
|
||
| /// Do we want to forward all adminhelps to the discord or just ahelps when admins are offline. | ||
| /// (This does not mean all ahelps are pinged, only ahelps sent when staff are offline get the ping, regardless of this setting) | ||
| /datum/config_entry/flag/discord_forward_all_ahelps | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,38 @@ | ||||||
| /client/verb/bugreport() | ||||||
| set name = "Баг-репорт" | ||||||
| set category = ADMIN_CATEGORY_TICKETS | ||||||
|
|
||||||
| if(check_mute(ckey, MUTE_ADMINHELP)) | ||||||
| to_chat(src, span_red("Error: Admin-PM: You cannot send adminhelps (Muted)."), MESSAGE_TYPE_ADMINPM, confidential = TRUE) | ||||||
| return | ||||||
|
|
||||||
| var/msg | ||||||
|
|
||||||
| var/description = tgui_input_text(src, "1. Опишите баг/недочет:", "Баг-репорт", max_length=700, encode = FALSE) | ||||||
| if(!description) | ||||||
| empty_input_alert(1) | ||||||
| return | ||||||
| var/correct_desc = tgui_input_text(src, "2. Опишите ожидаемое поведение (как должно работать):", "Баг-репорт", max_length=700, encode = FALSE) | ||||||
| if(!correct_desc) | ||||||
| empty_input_alert(2) | ||||||
| return | ||||||
| var/discord = tgui_input_text(src, "3. Ваш дискорд для связи (обязательно):", "Баг-репорт", max_length=100, encode = FALSE) | ||||||
| if(!discord) | ||||||
| empty_input_alert(3) | ||||||
| return | ||||||
| var/have_screens = tgui_alert(src, "4. Есть ли у вас скрины/видео?", "Баг-репорт", list("Да", "Нет"))=="Да" | ||||||
| if(!have_screens) | ||||||
| empty_input_alert(4) | ||||||
| return | ||||||
|
|
||||||
| msg = "[key_name(src)]\nID раунда: [GLOB.round_id] \n1. [description]\n2. [correct_desc]\n3. [discord]\n4. Скрины: [have_screens ? "Да" : "Нет"]" | ||||||
|
|
||||||
| if(handle_spam_prevention(msg, MUTE_ADMINHELP, OOC_COOLDOWN)) | ||||||
| return | ||||||
|
|
||||||
| if(tgui_alert(src, "Ваш репорт выглядит так:\n[msg]\nВы уверены что все заполнено правильно?", "Баг-репорт", list("Да", "Нет"))=="Да") | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Сделай нормальный тгуи интерфейс. Нет нужды плодить кучу инпутов |
||||||
| SSdiscord.send2discord_simple(DISCORD_WEBHOOK_BUGREPORT, msg) | ||||||
|
Comment on lines
1
to
34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||||||
| to_chat(src, span_good("Баг-репорт успешно отправлен разработчикам!")) | ||||||
|
|
||||||
| /client/proc/empty_input_alert(question_number) | ||||||
| tgui_alert(src, "Вы пропустили [question_number] пункт! Попробуйте сделать баг-репорт еще раз, заполняя все поля", "Баг-репорт") | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Рекомендация: В коде остался комментарий
//Needs attention. Такие комментарии следует удалять перед слиянием в основную ветку, чтобы поддерживать чистоту кодовой базы.