mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] List Them Out - A Modern Revision On Extracting Global Lists [MDB IGNORE] (#16531)
* List Them Out - A Modern Revision On Extracting Global Lists (#70080) Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com> * List Them Out - A Modern Revision On Extracting Global Lists Co-authored-by: san7890 <the@san7890.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
This commit is contained in:
co-authored by
John Willard
san7890
parent
20ae59750a
commit
235ca1df15
@@ -133,36 +133,6 @@
|
||||
message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.")
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Tinted Welding Helmets", "[GLOB.tinted_weldhelh ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
var/ai_number = 0
|
||||
for(var/i in GLOB.silicon_mobs)
|
||||
var/mob/living/silicon/S = i
|
||||
ai_number++
|
||||
|
||||
var/message = ""
|
||||
|
||||
if(isAI(S))
|
||||
message += "<b>AI [key_name(S, usr)]'s laws:</b>"
|
||||
else if(iscyborg(S))
|
||||
var/mob/living/silicon/robot/R = S
|
||||
message += "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [key_name(R.connected_ai)])":"(Independent)"]: laws:</b>"
|
||||
else if (ispAI(S))
|
||||
message += "<b>pAI [key_name(S, usr)]'s laws:</b>"
|
||||
else
|
||||
message += "<b>SOMETHING SILICON [key_name(S, usr)]'s laws:</b>"
|
||||
|
||||
message += "<br>"
|
||||
|
||||
if (S.laws == null)
|
||||
message += "[key_name(S, usr)]'s laws are null?? Contact a coder."
|
||||
else
|
||||
message += jointext(S.laws.get_law_list(include_zeroth = TRUE), "<br>")
|
||||
|
||||
to_chat(usr, message, confidential = TRUE)
|
||||
|
||||
if(!ai_number)
|
||||
to_chat(usr, "<b>No AIs located</b>" , confidential = TRUE)
|
||||
|
||||
/datum/admins/proc/dynamic_mode_options(mob/user)
|
||||
var/dat = {"
|
||||
<center><B><h2>Dynamic Mode Options</h2></B></center><hr>
|
||||
|
||||
@@ -89,6 +89,12 @@ GLOBAL_PROTECT(admin_verbs_admin)
|
||||
/datum/admins/proc/paintings_manager,
|
||||
/datum/admins/proc/display_tags,
|
||||
/datum/admins/proc/fishing_calculator,
|
||||
/client/proc/list_bombers,
|
||||
/client/proc/list_signalers,
|
||||
/client/proc/list_law_changes,
|
||||
/client/proc/show_manifest,
|
||||
/client/proc/list_dna,
|
||||
/client/proc/list_fingerprints,
|
||||
)
|
||||
GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel, /client/proc/ban_panel, /client/proc/stickybanpanel))
|
||||
GLOBAL_PROTECT(admin_verbs_ban)
|
||||
@@ -378,6 +384,54 @@ GLOBAL_PROTECT(admin_verbs_poll)
|
||||
message_admins("[key_name_admin(usr)] checked antagonists.")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Antagonists") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/list_bombers()
|
||||
set name = "List Bombers"
|
||||
set category = "Admin.Game"
|
||||
if(!holder)
|
||||
return
|
||||
holder.list_bombers()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "List Bombers") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/list_signalers()
|
||||
set name = "List Signalers"
|
||||
set category = "Admin.Game"
|
||||
if(!holder)
|
||||
return
|
||||
holder.list_signalers()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "List Signalers") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/list_law_changes()
|
||||
set name = "List Law Changes"
|
||||
set category = "Debug"
|
||||
if(!holder)
|
||||
return
|
||||
holder.list_law_changes()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "List Law Changes") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/show_manifest()
|
||||
set name = "Show Manifest"
|
||||
set category = "Debug"
|
||||
if(!holder)
|
||||
return
|
||||
holder.show_manifest()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Manifest") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/list_dna()
|
||||
set name = "List DNA"
|
||||
set category = "Debug"
|
||||
if(!holder)
|
||||
return
|
||||
holder.list_dna()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "List DNA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/list_fingerprints()
|
||||
set name = "List Fingerprints"
|
||||
set category = "Debug"
|
||||
if(!holder)
|
||||
return
|
||||
holder.list_fingerprints()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "List Fingerprints") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/ban_panel()
|
||||
set name = "Banning Panel"
|
||||
set category = "Admin"
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
// All the procs that admins can use to view something like a global list in a cleaner manner than just View Variables are contained in this file.
|
||||
|
||||
/datum/admins/proc/list_bombers()
|
||||
if(!SSticker.HasRoundStarted())
|
||||
tgui_alert(usr, "The game hasn't started yet!")
|
||||
return
|
||||
var/data = "<b>Bombing List</b><hr>"
|
||||
for(var/entry in GLOB.bombers)
|
||||
data += text("[entry]<br>")
|
||||
usr << browse(data, "window=bombers;size=800x500")
|
||||
|
||||
/datum/admins/proc/list_signalers()
|
||||
if(!SSticker.HasRoundStarted())
|
||||
tgui_alert(usr, "The game hasn't started yet!")
|
||||
return
|
||||
var/data = "<b>Showing last [length(GLOB.lastsignalers)] signalers.</b><hr>"
|
||||
for(var/entry in GLOB.lastsignalers)
|
||||
data += "[entry]<BR>"
|
||||
usr << browse(data, "window=lastsignalers;size=800x500")
|
||||
|
||||
/datum/admins/proc/list_law_changes()
|
||||
if(!SSticker.HasRoundStarted())
|
||||
tgui_alert(usr, "The game hasn't started yet!")
|
||||
return
|
||||
var/data = "<b>Showing last [length(GLOB.lawchanges)] law changes.</b><hr>"
|
||||
for(var/entry in GLOB.lawchanges)
|
||||
data += "[entry]<BR>"
|
||||
usr << browse(data, "window=lawchanges;size=800x500")
|
||||
|
||||
/datum/admins/proc/list_dna()
|
||||
var/data = "<b>Showing DNA from blood.</b><hr>"
|
||||
data += "<table cellspacing=5 border=1><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
|
||||
for(var/entry in GLOB.human_list)
|
||||
var/mob/living/carbon/human/subject = entry
|
||||
if(subject.ckey)
|
||||
data += "<tr><td>[subject]</td><td>[subject.dna.unique_enzymes]</td><td>[subject.dna.blood_type]</td></tr>"
|
||||
data += "</table>"
|
||||
usr << browse(data, "window=DNA;size=440x410")
|
||||
|
||||
/datum/admins/proc/list_fingerprints() //kid named fingerprints
|
||||
var/data = "<b>Showing Fingerprints.</b><hr>"
|
||||
data += "<table cellspacing=5 border=1><tr><th>Name</th><th>Fingerprints</th></tr>"
|
||||
for(var/entry in GLOB.human_list)
|
||||
var/mob/living/carbon/human/subject = entry
|
||||
if(subject.ckey)
|
||||
data += "<tr><td>[subject]</td><td>[md5(subject.dna.unique_identity)]</td></tr>"
|
||||
data += "</table>"
|
||||
usr << browse(data, "window=fingerprints;size=440x410")
|
||||
|
||||
/datum/admins/proc/show_manifest()
|
||||
if(!SSticker.HasRoundStarted())
|
||||
tgui_alert(usr, "The game hasn't started yet!")
|
||||
return
|
||||
var/data = "<b>Showing Crew Manifest.</b><hr>"
|
||||
data += "<table cellspacing=5 border=1><tr><th>Name</th><th>Position</th></tr>"
|
||||
for(var/datum/data/record/entry in GLOB.data_core.general)
|
||||
data += "<tr><td>[entry.fields["name"]]</td><td>[entry.fields["rank"]][entry.fields["rank"] != entry.fields["trim"] ? " ([entry.fields["trim"]])" : ""]</td></tr>"
|
||||
data += "</table>"
|
||||
usr << browse(data, "window=manifest;size=440x410")
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
var/law_bound_entities = 0
|
||||
for(var/mob/living/silicon/subject as anything in GLOB.silicon_mobs)
|
||||
law_bound_entities++
|
||||
|
||||
var/message = ""
|
||||
|
||||
if(isAI(subject))
|
||||
message += "<b>AI [key_name(subject, usr)]'s laws:</b>"
|
||||
else if(iscyborg(subject))
|
||||
var/mob/living/silicon/robot/borg = subject
|
||||
message += "<b>CYBORG [key_name(subject, usr)] [borg.connected_ai?"(Slaved to: [key_name(borg.connected_ai)])":"(Independent)"]: laws:</b>"
|
||||
else if (ispAI(subject))
|
||||
message += "<b>pAI [key_name(subject, usr)]'s laws:</b>"
|
||||
else
|
||||
message += "<b>SOMETHING SILICON [key_name(subject, usr)]'s laws:</b>"
|
||||
|
||||
message += "<br>"
|
||||
|
||||
if (!subject.laws)
|
||||
message += "[key_name(subject, usr)]'s laws are null?? Contact a coder."
|
||||
else
|
||||
message += jointext(subject.laws.get_law_list(include_zeroth = TRUE), "<br>")
|
||||
|
||||
to_chat(usr, message, confidential = TRUE)
|
||||
|
||||
if(!law_bound_entities)
|
||||
to_chat(usr, "<b>No law bound entities located</b>", confidential = TRUE)
|
||||
@@ -91,6 +91,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller)
|
||||
sec_job.total_positions = -1
|
||||
sec_job.spawn_positions = -1
|
||||
message_admins("[key_name_admin(holder)] has removed the cap on security officers.")
|
||||
|
||||
//Buttons for helpful stuff. This is where people land in the tgui
|
||||
if("clear_virus")
|
||||
var/choice = tgui_alert(usr, "Are you sure you want to cure all disease?",, list("Yes", "Cancel"))
|
||||
@@ -99,51 +100,31 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller)
|
||||
for(var/thing in SSdisease.active_diseases)
|
||||
var/datum/disease/D = thing
|
||||
D.cure(0)
|
||||
|
||||
if("list_bombers")
|
||||
var/dat = "<B>Bombing List</B><HR>"
|
||||
for(var/l in GLOB.bombers)
|
||||
dat += text("[l]<BR>")
|
||||
holder << browse(dat, "window=bombers")
|
||||
holder.list_bombers()
|
||||
|
||||
if("list_signalers")
|
||||
var/dat = "<B>Showing last [length(GLOB.lastsignalers)] signalers.</B><HR>"
|
||||
for(var/sig in GLOB.lastsignalers)
|
||||
dat += "[sig]<BR>"
|
||||
holder << browse(dat, "window=lastsignalers;size=800x500")
|
||||
holder.list_signalers()
|
||||
|
||||
if("list_lawchanges")
|
||||
var/dat = "<B>Showing last [length(GLOB.lawchanges)] law changes.</B><HR>"
|
||||
for(var/sig in GLOB.lawchanges)
|
||||
dat += "[sig]<BR>"
|
||||
holder << browse(dat, "window=lawchanges;size=800x500")
|
||||
holder.list_law_changes()
|
||||
|
||||
if("showailaws")
|
||||
holder.holder.output_ai_laws()//huh, inconvenient var naming, huh?
|
||||
holder.check_ai_laws()
|
||||
|
||||
if("manifest")
|
||||
var/dat = "<B>Showing Crew Manifest.</B><HR>"
|
||||
dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>"
|
||||
for(var/datum/data/record/t in GLOB.data_core.general)
|
||||
dat += "<tr><td>[t.fields["name"]]</td><td>[t.fields["rank"]][t.fields["rank"] != t.fields["trim"] ? " ([t.fields["trim"]])" : ""]</td></tr>"
|
||||
dat += "</table>"
|
||||
holder << browse(dat, "window=manifest;size=440x410")
|
||||
holder.show_manifest()
|
||||
|
||||
if("dna")
|
||||
var/dat = "<B>Showing DNA from blood.</B><HR>"
|
||||
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
|
||||
for(var/i in GLOB.human_list)
|
||||
var/mob/living/carbon/human/H = i
|
||||
if(H.ckey)
|
||||
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.dna.blood_type]</td></tr>"
|
||||
dat += "</table>"
|
||||
holder << browse(dat, "window=DNA;size=440x410")
|
||||
holder.list_dna()
|
||||
|
||||
if("fingerprints")
|
||||
var/dat = "<B>Showing Fingerprints.</B><HR>"
|
||||
dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>"
|
||||
for(var/i in GLOB.human_list)
|
||||
var/mob/living/carbon/human/H = i
|
||||
if(H.ckey)
|
||||
dat += "<tr><td>[H]</td><td>[md5(H.dna.unique_identity)]</td></tr>"
|
||||
dat += "</table>"
|
||||
holder << browse(dat, "window=fingerprints;size=440x410")
|
||||
holder.list_fingerprints()
|
||||
|
||||
if("ctfbutton")
|
||||
toggle_id_ctf(holder, "centcom")
|
||||
|
||||
if("tdomereset")
|
||||
var/delete_mobs = tgui_alert(usr,"Clear all mobs?","Confirm",list("Yes","No","Cancel"))
|
||||
if(delete_mobs == "Cancel")
|
||||
|
||||
Reference in New Issue
Block a user