Tweaks some admin verbs (#30219)

* pretty

* this as well

* no need to use var/
This commit is contained in:
kyunkyunkyun
2025-09-07 10:54:19 +05:00
committed by GitHub
parent 6330252351
commit 28a2381628
6 changed files with 42 additions and 16 deletions
+15 -13
View File
@@ -97,10 +97,12 @@ GLOBAL_LIST_INIT(admin_verbs_event, list(
/client/proc/cmd_admin_add_freeform_ai_law,
/client/proc/cmd_admin_add_random_ai_law,
/client/proc/economy_manager,
/client/proc/everyone_random,
/client/proc/make_sound,
/client/proc/toggle_random_events,
/client/proc/toggle_random_events,
/client/proc/toggle_ert_calling,
/client/proc/set_holiday,
/client/proc/show_tip,
/client/proc/cmd_admin_change_custom_event,
/client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/
@@ -115,7 +117,8 @@ GLOBAL_LIST_INIT(admin_verbs_event, list(
/client/proc/cmd_admin_headset_message,
/client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
/client/proc/change_human_appearance_self, /* Allows the human-based mob itself to change its basic appearance */
/datum/admins/proc/station_traits_panel
/datum/admins/proc/station_traits_panel,
/datum/admins/proc/toggle_ai,
))
GLOBAL_LIST_INIT(admin_verbs_spawn, list(
@@ -127,7 +130,6 @@ GLOBAL_LIST_INIT(admin_verbs_spawn, list(
))
GLOBAL_LIST_INIT(admin_verbs_server, list(
/client/proc/reload_admins,
/client/proc/Set_Holiday,
/datum/admins/proc/startnow,
/datum/admins/proc/restart,
/datum/admins/proc/end_round,
@@ -136,12 +138,6 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
/datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/
/datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/
/client/proc/toggle_log_hrefs,
/client/proc/everyone_random,
/datum/admins/proc/toggleAI,
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
/client/proc/cmd_debug_del_sing,
/client/proc/library_manager,
/client/proc/view_asays,
/client/proc/toggle_antagHUD_use,
/client/proc/toggle_antagHUD_restrictions,
/client/proc/set_next_map,
@@ -153,7 +149,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list(
/client/proc/cmd_debug_make_powernets,
/client/proc/debug_controller,
/client/proc/cmd_debug_mob_lists,
/client/proc/cmd_admin_delete,
/client/proc/cmd_debug_del_sing,
/client/proc/restart_controller,
/client/proc/enable_debug_verbs,
@@ -230,7 +225,6 @@ GLOBAL_LIST_INIT(admin_verbs_mentor, list(
/client/proc/cmd_mentor_say, /* mentor say*/
/client/proc/view_msays,
/client/proc/cmd_staff_say,
/client/proc/view_staffsays
// cmd_mentor_say is added/removed by the toggle_mentor_chat verb
))
GLOBAL_LIST_INIT(admin_verbs_dev, list(
@@ -890,6 +884,10 @@ GLOBAL_LIST_INIT(view_logs_verbs, list(
if(!check_rights(R_SERVER))
return
if(!usr.client.is_connecting_from_localhost())
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
return
// Why would we ever turn this off?
if(GLOB.configuration.logging.href_logging)
GLOB.configuration.logging.href_logging = FALSE
@@ -1146,14 +1144,18 @@ GLOBAL_LIST_INIT(view_logs_verbs, list(
if(SSair.interesting_tile_count > 500)
// This can potentially iterate through a list thats 20k things long. Give ample warning to the user
if(tgui_alert(usr, "WARNING: There are [SSair.interesting_tile_count] Interesting Turfs. This process will be lag intensive and should only be used if the atmos controller is screaming bloody murder. Are you sure you wish to continue?", "WARNING", list("I am sure", "No")) != "I am sure")
if(tgui_alert(usr, "WARNING: There are [SSair.interesting_tile_count] Interesting Turfs. This process will be lag intensive and should only be used if the atmos controller \
is screaming bloody murder. Are you sure you with to continue", "WARNING", list("I am sure", "Nope")) != "I am sure")
return
else
if(tgui_alert(usr, "Visualizing turfs may cause server to lag. Are you sure?", "Warning", list("Yes", "No")) != "Yes")
return
var/display_turfs_overlay = FALSE
if(tgui_alert(usr, "Would you like to have all interesting turfs have a client side overlay applied as well?", "Optional", list("Yes", "No")) != "No")
display_turfs_overlay = TRUE
message_admins("[key_name_admin(usr)] is visualising interesting atmos turfs. Server may lag.")
message_admins("[key_name_admin(usr)] is visualizing interesting atmos turfs. Server may lag.")
var/list/zlevel_turf_indexes = list()
@@ -1182,7 +1184,7 @@ GLOBAL_LIST_INIT(view_logs_verbs, list(
for(var/key in zlevel_turf_indexes)
to_chat(usr, "<span class='notice'>Z[key]: <b>[length(zlevel_turf_indexes["[key]"])] Interesting Turfs</b></span>")
var/z_to_view = input(usr, "A list of z-levels their ITs has appeared in chat. Please enter a Z to visualise. Enter 0 to cancel.", "Selection", 0) as num
var/z_to_view = tgui_input_number(usr, "A list of z-levels their ITs has appeared in chat. Please enter a Z to visualize. Enter 0 or close the window to cancel", "Selection", 0)
if(!z_to_view)
return
+17 -1
View File
@@ -549,6 +549,10 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
if(!check_rights(R_SERVER))
return
if(!usr.client.is_connecting_from_localhost())
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
return
GLOB.enter_allowed = !GLOB.enter_allowed
if(!GLOB.enter_allowed)
to_chat(world, "<B>New players may no longer enter the game.</B>")
@@ -559,7 +563,7 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
world.update_status()
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Entering") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggleAI()
/datum/admins/proc/toggle_ai()
set category = "Event"
set desc="People can't be AI"
set name="Toggle AI"
@@ -586,6 +590,10 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
if(!check_rights(R_SERVER))
return
if(!usr.client.is_connecting_from_localhost())
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
return
GLOB.configuration.general.respawn_enabled = !(GLOB.configuration.general.respawn_enabled)
if(GLOB.configuration.general.respawn_enabled)
to_chat(world, "<B>You may now respawn.</B>")
@@ -608,6 +616,10 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
alert("Slow down a moment, let the ticker start first!")
return
if(!usr.client.is_connecting_from_localhost())
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
return
if(SSblackbox)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -786,6 +798,10 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
if(!check_rights(R_SERVER))
return
if(!usr.client.is_connecting_from_localhost())
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
return
GLOB.configuration.general.guest_ban = !(GLOB.configuration.general.guest_ban)
if(GLOB.configuration.general.guest_ban)
to_chat(world, "<B>Guests may no longer enter the game.</B>")
+4
View File
@@ -113,6 +113,10 @@
if(!check_rights(R_SERVER))
return
if(!usr.client.is_connecting_from_localhost())
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
return
message_admins("[key_name_admin(usr)] has manually reloaded admins")
log_admin("[key_name(usr)] has manually reloaded admins")
+1 -1
View File
@@ -45,7 +45,7 @@
if(!check_rights(R_SERVER))
return
var/bypass_ckey = input(usr, "Please, enter a ckey", "Queue Server Bypass")
var/bypass_ckey = tgui_input_text(usr, "Please, enter a ckey. Enter nothing to cancel", "Queue Server Bypass")
if(!bypass_ckey)
return
+4
View File
@@ -329,6 +329,10 @@
if(!check_rights(R_SERVER))
return
if(!usr.client.is_connecting_from_localhost())
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
return
var/action=""
if(GLOB.configuration.general.restrict_antag_hud_rejoin)
for(var/mob/dead/observer/g in get_ghosts())