mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
Convert some more globals (#19231)
* move ref lists from world new to ref list creation * tg styl * . * next globals * ugh * some more * pain * . * horror * . * . * . * shoe me * ye * . * eh * . * . --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
ecca95d008
commit
1fcbb216e7
@@ -59,7 +59,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
qdel(C)
|
||||
|
||||
if(GLOB.camera_range_display_status)
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
new/obj/effect/debugging/camera_range(C.loc)
|
||||
feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -75,7 +75,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
|
||||
var/list/obj/machinery/camera/CL = list()
|
||||
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
CL += C
|
||||
|
||||
var/output = span_bold("CAMERA ANNOMALITIES REPORT") + {"<HR>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define SHELLEO_STDOUT 2
|
||||
#define SHELLEO_STDERR 3
|
||||
|
||||
var/list/sounds_cache = list()
|
||||
GLOBAL_LIST_EMPTY(sounds_cache)
|
||||
|
||||
ADMIN_VERB(play_sound, R_SOUNDS, "Play Global Sound", "Plays a sound to all players.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound)
|
||||
var/freq = 1
|
||||
@@ -22,7 +22,7 @@ ADMIN_VERB(play_sound, R_SOUNDS, "Play Global Sound", "Plays a sound to all play
|
||||
admin_sound.status = SOUND_STREAM
|
||||
admin_sound.volume = vol
|
||||
|
||||
sounds_cache += S
|
||||
GLOB.sounds_cache += S
|
||||
|
||||
var/res = tgui_alert(user, "Show the title of this song ([S]) to the players?\nOptions 'Yes' and 'No' will play the sound.",, list("Yes", "No", "Cancel"))
|
||||
if(!res)
|
||||
@@ -64,7 +64,7 @@ ADMIN_VERB(play_z_sound, R_SOUNDS, "Play Z Sound", "Plays a sound to a single z-
|
||||
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
|
||||
uploaded_sound.priority = 250
|
||||
|
||||
sounds_cache += S
|
||||
GLOB.sounds_cache += S
|
||||
|
||||
if(tgui_alert(user, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request", list("Play","Cancel")) != "Play")
|
||||
return
|
||||
@@ -80,7 +80,7 @@ ADMIN_VERB(play_z_sound, R_SOUNDS, "Play Z Sound", "Plays a sound to a single z-
|
||||
ADMIN_VERB(play_server_sound, R_SOUNDS, "Play Server Sound", "Plays a sound from the server to play.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound)
|
||||
var/list/sounds = world.file2list("sound/serversound_list.txt");
|
||||
sounds += "--CANCEL--"
|
||||
sounds += sounds_cache
|
||||
sounds += GLOB.sounds_cache
|
||||
|
||||
var/melody = tgui_input_list(user, "Select a sound from the server to play", "Server sound list", sounds, "--CANCEL--")
|
||||
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(resize, (R_ADMIN|R_FUN|R_VAREDIT), "Resize", "Resizes any living mob without any restrictions on size.", "Fun.Event Kit", mob/living/L in GLOB.mob_list)
|
||||
user.do_resize(L)
|
||||
ADMIN_VERB_ONLY_CONTEXT_MENU(resize, (R_ADMIN|R_FUN|R_VAREDIT), "Resize", mob/living/living_target)
|
||||
user.do_resize(living_target)
|
||||
|
||||
/client/proc/do_resize(var/mob/living/L)
|
||||
var/size_multiplier = tgui_input_number(usr, "Input size multiplier.", "Resize", 1, round_value=FALSE)
|
||||
ADMIN_VERB(mob_resize, (R_ADMIN|R_FUN|R_VAREDIT), "Resize Mob", "Resizes any living mob without any restrictions on size.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/mob/target_mob = tgui_input_list(user, "Select target to resize.", "Resize Target", GLOB.mob_list)
|
||||
if(!target_mob)
|
||||
return
|
||||
user.do_resize(target_mob)
|
||||
|
||||
/client/proc/do_resize(mob/living/living_target)
|
||||
var/size_multiplier = tgui_input_number(src, "Input size multiplier.", "Resize", 1, round_value=FALSE)
|
||||
if(!size_multiplier)
|
||||
return //cancelled
|
||||
|
||||
size_multiplier = clamp(size_multiplier, -50, 50) //being able to make people upside down is fun. Also 1000 is way, WAY too big. Honestly 50 is too big but at least you can see 50 and it doesn't break the rendering.
|
||||
var/can_be_big = L.has_large_resize_bounds()
|
||||
var/can_be_big = living_target.has_large_resize_bounds()
|
||||
var/very_big = is_extreme_size(size_multiplier)
|
||||
|
||||
if(very_big && can_be_big) // made an extreme size in an area that allows it, don't assume adminbuse
|
||||
to_chat(src, span_warning("[L] will lose this size upon moving into an area where this size is not allowed."))
|
||||
to_chat(src, span_warning("[living_target] will lose this size upon moving into an area where this size is not allowed."))
|
||||
else if(very_big) // made an extreme size in an area that doesn't allow it, assume adminbuse
|
||||
to_chat(src, span_warning("[L] will retain this normally unallowed size outside this area."))
|
||||
to_chat(src, span_warning("[living_target] will retain this normally unallowed size outside this area."))
|
||||
|
||||
L.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE)
|
||||
living_target.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE)
|
||||
|
||||
log_and_message_admins("has changed [key_name(L)]'s size multiplier to [size_multiplier].", src)
|
||||
log_and_message_admins("has changed [key_name(living_target)]'s size multiplier to [size_multiplier].", src)
|
||||
feedback_add_details("admin_verb","RESIZE")
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
//Allows some list search inputs
|
||||
/client/proc/tgui_admin_lists()
|
||||
set name = "TGUI Admin Lists"
|
||||
set desc = "Allows to have some procs with searchable lists."
|
||||
set category = "Admin.Game"
|
||||
if(!check_rights(R_ADMIN|R_EVENT))
|
||||
return
|
||||
|
||||
var/list/modification_options = list(TGUI_VIEW_ATTACK_LOGS, TGUI_VIEW_DIALOG_LOGS, TGUI_RESIZE)
|
||||
|
||||
|
||||
var/tgui_list_choice = tgui_input_list(src, "Select the verb you would like to use with a tgui input","Choice", modification_options)
|
||||
if(!tgui_list_choice || tgui_list_choice == "Cancel")
|
||||
return
|
||||
|
||||
log_and_message_admins("[key_name(src)] has used TGUI Admin Lists with ([tgui_list_choice])].")
|
||||
feedback_add_details("admin_verb","TGUIADL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
switch(tgui_list_choice)
|
||||
if(TGUI_VIEW_ATTACK_LOGS)
|
||||
var/mob/living/L = tgui_input_list(src, "Check a player's attack logs.", "Check Player Attack Logs", GLOB.mob_list)
|
||||
show_cmd_admin_check_player_logs(L)
|
||||
if(TGUI_VIEW_DIALOG_LOGS)
|
||||
var/mob/living/L = tgui_input_list(src, "Check a player's dialogue logs.", "Check Player Dialogue Logs", GLOB.mob_list)
|
||||
show_cmd_admin_check_dialogue_logs(L)
|
||||
if(TGUI_RESIZE)
|
||||
var/mob/living/L = tgui_input_list(src, "Resizes any living mob without any restrictions on size.", "Resize", GLOB.mob_list)
|
||||
if(L)
|
||||
do_resize(L)
|
||||
Reference in New Issue
Block a user