mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Ports the TG globals controller and converts globals. (#18057)
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -503,7 +503,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
if(holder.rights & R_SERVER) add_verb(src, admin_verbs_server)
|
||||
if(holder.rights & R_DEBUG)
|
||||
add_verb(src, admin_verbs_debug)
|
||||
if(config.debugparanoid && !(holder.rights & R_ADMIN))
|
||||
if(GLOB.config.debugparanoid && !(holder.rights & R_ADMIN))
|
||||
remove_verb(src, admin_verbs_paranoid_debug) //Right now it's just callproc but we can easily add others later on.
|
||||
if(holder.rights & R_POSSESS) add_verb(src, admin_verbs_possess)
|
||||
if(holder.rights & R_PERMISSIONS) add_verb(src, admin_verbs_permissions)
|
||||
@@ -631,7 +631,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
set name = "Display Job bans"
|
||||
set category = "Admin"
|
||||
if(holder)
|
||||
if(config.ban_legacy_system)
|
||||
if(GLOB.config.ban_legacy_system)
|
||||
holder.Jobbans()
|
||||
else
|
||||
holder.DB_ban_panel()
|
||||
@@ -642,7 +642,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
set name = "Unban Panel"
|
||||
set category = "Admin"
|
||||
if(holder)
|
||||
if(config.ban_legacy_system)
|
||||
if(GLOB.config.ban_legacy_system)
|
||||
holder.unbanpanel()
|
||||
else
|
||||
holder.DB_ban_panel()
|
||||
@@ -824,7 +824,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/living/silicon/S = input("Select silicon.", "Rename Silicon.") as null|anything in silicon_mob_list
|
||||
var/mob/living/silicon/S = input("Select silicon.", "Rename Silicon.") as null|anything in GLOB.silicon_mob_list
|
||||
if(!S) return
|
||||
|
||||
var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name))
|
||||
@@ -839,7 +839,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in silicon_mob_list
|
||||
var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in GLOB.silicon_mob_list
|
||||
if(!S) return
|
||||
|
||||
var/datum/tgui_module/admin/law_manager/L = new(S)
|
||||
@@ -854,7 +854,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Self", human_mob_list)
|
||||
var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Self", GLOB.human_mob_list)
|
||||
if(!H) return
|
||||
|
||||
log_and_message_admins("is altering the appearance of [H].")
|
||||
@@ -868,7 +868,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Self", human_mob_list)
|
||||
var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Self", GLOB.human_mob_list)
|
||||
if(!H) return
|
||||
|
||||
if(!H.client)
|
||||
@@ -913,7 +913,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/mob/living/carbon/human/M = input("Select mob.", "Edit Appearance") as null|anything in human_mob_list
|
||||
var/mob/living/carbon/human/M = input("Select mob.", "Edit Appearance") as null|anything in GLOB.human_mob_list
|
||||
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
to_chat(usr, "<span class='warning'>You can only do this to humans!</span>")
|
||||
@@ -953,12 +953,12 @@ var/list/admin_verbs_cciaa = list(
|
||||
M.s_tone = -M.s_tone + 35
|
||||
|
||||
// hair
|
||||
var/new_hstyle = input(usr, "Select a hair style", "Grooming") as null|anything in hair_styles_list
|
||||
var/new_hstyle = input(usr, "Select a hair style", "Grooming") as null|anything in GLOB.hair_styles_list
|
||||
if(new_hstyle)
|
||||
M.h_style = new_hstyle
|
||||
|
||||
// facial hair
|
||||
var/new_fstyle = input(usr, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list
|
||||
var/new_fstyle = input(usr, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list
|
||||
if(new_fstyle)
|
||||
M.f_style = new_fstyle
|
||||
|
||||
@@ -1015,13 +1015,13 @@ var/list/admin_verbs_cciaa = list(
|
||||
set name = "Toggle ghost writers"
|
||||
set category = "Server"
|
||||
if(!holder) return
|
||||
if(config)
|
||||
if(config.cult_ghostwriter)
|
||||
config.cult_ghostwriter = 0
|
||||
if(GLOB.config)
|
||||
if(GLOB.config.cult_ghostwriter)
|
||||
GLOB.config.cult_ghostwriter = 0
|
||||
to_chat(src, "<b>Disallowed ghost writers.</b>")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled ghost writers.", 1)
|
||||
else
|
||||
config.cult_ghostwriter = 1
|
||||
GLOB.config.cult_ghostwriter = 1
|
||||
to_chat(src, "<b>Enabled ghost writers.</b>")
|
||||
message_admins("Admin [key_name_admin(usr)] has enabled ghost writers.", 1)
|
||||
|
||||
@@ -1029,13 +1029,13 @@ var/list/admin_verbs_cciaa = list(
|
||||
set name = "Toggle maintenance drones"
|
||||
set category = "Server"
|
||||
if(!holder) return
|
||||
if(config)
|
||||
if(config.allow_drone_spawn)
|
||||
config.allow_drone_spawn = 0
|
||||
if(GLOB.config)
|
||||
if(GLOB.config.allow_drone_spawn)
|
||||
GLOB.config.allow_drone_spawn = 0
|
||||
to_chat(src, "<b>Disallowed maint drones.</b>")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled maint drones.", 1)
|
||||
else
|
||||
config.allow_drone_spawn = 1
|
||||
GLOB.config.allow_drone_spawn = 1
|
||||
to_chat(src, "<b>Enabled maint drones.</b>")
|
||||
message_admins("Admin [key_name_admin(usr)] has enabled maint drones.", 1)
|
||||
|
||||
@@ -1049,7 +1049,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
else
|
||||
to_chat(usr, "You now won't get debug log messages")
|
||||
|
||||
/client/proc/damage_menu(mob/living/carbon/human/H as null|mob in human_mob_list)
|
||||
/client/proc/damage_menu(mob/living/carbon/human/H as null|mob in GLOB.human_mob_list)
|
||||
set name = "Damage Menu"
|
||||
set desc = "Access a human mob's damage menu, allowing you to make their life hell."
|
||||
set category = "Fun"
|
||||
@@ -1057,7 +1057,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
if(H)
|
||||
new /datum/tgui_module/damage_menu(WEAKREF(H), usr)
|
||||
|
||||
/client/proc/man_up(mob/T as mob in mob_list)
|
||||
/client/proc/man_up(mob/T as mob in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Man Up"
|
||||
set desc = "Tells mob to man up and deal with it."
|
||||
@@ -1073,14 +1073,14 @@ var/list/admin_verbs_cciaa = list(
|
||||
set name = "Man Up Global"
|
||||
set desc = "Tells everyone to man up and deal with it."
|
||||
|
||||
for (var/mob/T as mob in mob_list)
|
||||
for (var/mob/T as mob in GLOB.mob_list)
|
||||
to_chat(T, "<br><center><span class='notice'><b><font size=4>Man up.<br> Deal with it.</font></b><br>Move on.</span></center><br>")
|
||||
sound_to(T, 'sound/voice/ManUp1.ogg')
|
||||
|
||||
log_admin("[key_name(usr)] told everyone to man up and deal with it.",admin_key=key_name(usr))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] told everyone to man up and deal with it.</span>", 1)
|
||||
|
||||
/client/proc/give_spell(mob/T as mob in mob_list) // -- Urist
|
||||
/client/proc/give_spell(mob/T as mob in GLOB.mob_list) // -- Urist
|
||||
set category = "Fun"
|
||||
set name = "Give Spell"
|
||||
set desc = "Gives a spell to a mob."
|
||||
@@ -1099,15 +1099,15 @@ var/list/admin_verbs_cciaa = list(
|
||||
if (!check_rights(R_SERVER|R_DEBUG))
|
||||
return
|
||||
|
||||
var/ans = alert(src, "This will force explosions to run in the [config.use_spreading_explosions ? "old manner (circular)" : "new, realistic manner (spreading)"]. Do you want to proceed?", "Switch explosion type", "Yes", "Cancel")
|
||||
var/ans = alert(src, "This will force explosions to run in the [GLOB.config.use_spreading_explosions ? "old manner (circular)" : "new, realistic manner (spreading)"]. Do you want to proceed?", "Switch explosion type", "Yes", "Cancel")
|
||||
|
||||
if (!ans || ans == "Cancel")
|
||||
to_chat(src, "<span class='notice'>Cancelled.</span>")
|
||||
return
|
||||
|
||||
config.use_spreading_explosions = !config.use_spreading_explosions
|
||||
GLOB.config.use_spreading_explosions = !GLOB.config.use_spreading_explosions
|
||||
|
||||
log_and_message_admins("has toggled explosions to be [config.use_spreading_explosions ? "iterative/spreading" : "simple/circular"].")
|
||||
log_and_message_admins("has toggled explosions to be [GLOB.config.use_spreading_explosions ? "iterative/spreading" : "simple/circular"].")
|
||||
feedback_add_details("admin_verb", "TRE")
|
||||
|
||||
/client/proc/wipe_ai()
|
||||
@@ -1153,7 +1153,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
|
||||
log_and_message_admins("is attempting to reconnect the server to MySQL.")
|
||||
|
||||
dbcon.Reconnect()
|
||||
GLOB.dbcon.Reconnect()
|
||||
|
||||
/client/proc/fix_player_list()
|
||||
set category = "Special Verbs"
|
||||
@@ -1167,19 +1167,19 @@ var/list/admin_verbs_cciaa = list(
|
||||
return
|
||||
|
||||
log_and_message_admins("is rebuilding the master player mob list.")
|
||||
for (var/P in player_list)
|
||||
for (var/P in GLOB.player_list)
|
||||
if (isnull(P) || !ismob(P))
|
||||
var/msg = "P_LIST DEBUG: Found null entry in player_list!"
|
||||
var/msg = "P_LIST DEBUG: Found null entry in GLOB.player_list!"
|
||||
log_debug(msg)
|
||||
message_admins(SPAN_DANGER(msg))
|
||||
player_list -= P
|
||||
GLOB.player_list -= P
|
||||
else
|
||||
var/mob/M = P
|
||||
if (!M.client)
|
||||
var/msg = "P_LIST DEBUG: Found a mob without a client in player_list! [M.name]"
|
||||
var/msg = "P_LIST DEBUG: Found a mob without a client in GLOB.player_list! [M.name]"
|
||||
log_debug(msg)
|
||||
message_admins(SPAN_DANGER(msg))
|
||||
player_list -= M
|
||||
GLOB.player_list -= M
|
||||
|
||||
/client/proc/reset_openturf()
|
||||
set category = "Debug"
|
||||
@@ -1196,7 +1196,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
|
||||
SSzcopy.hard_reset()
|
||||
|
||||
/client/proc/add_client_color(mob/T as mob in mob_list)
|
||||
/client/proc/add_client_color(mob/T as mob in GLOB.mob_list)
|
||||
set category = "Debug"
|
||||
set name = "Add Client Color"
|
||||
set desc = "Adds a client color to a given mob"
|
||||
@@ -1305,7 +1305,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
for(var/turf in range(world.view, get_turf(AI.eyeobj)))
|
||||
messageturfs += turf
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.client || istype(M, /mob/abstract/new_player))
|
||||
continue
|
||||
if(isAI(M))
|
||||
@@ -1324,7 +1324,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
|
||||
var/prefix
|
||||
var/admin_stuff
|
||||
for(var/client/target in clients)
|
||||
for(var/client/target in GLOB.clients)
|
||||
admin_stuff = ""
|
||||
var/display_remote = FALSE
|
||||
if (target.holder && ((R_MOD|R_ADMIN) & target.holder.rights))
|
||||
|
||||
Reference in New Issue
Block a user