mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
Fixes tgui alert in reload config never returning (#89397)
## About The Pull Request I was just clicking random buttons and noticed this would always pass even when I said no or closed the alert. ## Why It's Good For The Game Let me back out of doing things to the server ## Changelog 🆑 admin: Reload Configuration can be cancelled via the alert it gives you. /🆑
This commit is contained in:
@@ -710,10 +710,10 @@ ADMIN_VERB(stop_line_profiling, R_DEBUG, "Stop Line Profiling", "Stops tracking
|
||||
|
||||
ADMIN_VERB_VISIBILITY(show_line_profiling, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
|
||||
ADMIN_VERB(show_line_profiling, R_DEBUG, "Show Line Profiling", "Shows tracked profiling info from code lines that support it.", ADMIN_CATEGORY_PROFILE)
|
||||
var/sortlist = list(
|
||||
var/list/sortlist = list(
|
||||
"Avg time" = GLOBAL_PROC_REF(cmp_profile_avg_time_dsc),
|
||||
"Total Time" = GLOBAL_PROC_REF(cmp_profile_time_dsc),
|
||||
"Call Count" = GLOBAL_PROC_REF(cmp_profile_count_dsc)
|
||||
"Call Count" = GLOBAL_PROC_REF(cmp_profile_count_dsc),
|
||||
)
|
||||
var/sort = input(user, "Sort type?", "Sort Type", "Avg time") as null|anything in sortlist
|
||||
if (!sort)
|
||||
@@ -722,7 +722,7 @@ ADMIN_VERB(show_line_profiling, R_DEBUG, "Show Line Profiling", "Shows tracked p
|
||||
profile_show(user, sort)
|
||||
|
||||
ADMIN_VERB(reload_configuration, R_DEBUG, "Reload Configuration", "Reloads the configuration from the default path on the disk, wiping any in-round modifications.", ADMIN_CATEGORY_DEBUG)
|
||||
if(!tgui_alert(user, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modifications?", "Really reset?", list("No", "Yes")) == "Yes")
|
||||
if(tgui_alert(user, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modifications?", "Really reset?", list("No", "Yes")) != "Yes")
|
||||
return
|
||||
config.admin_reload()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user