April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/obj/machinery/computer/secure_data//TODO:SANITY
|
||||
name = "security records console"
|
||||
desc = "Used to view and edit personnel's security records"
|
||||
desc = "Used to view and edit personnel's security records."
|
||||
icon_screen = "security"
|
||||
icon_keyboard = "security_key"
|
||||
req_one_access = list(access_security, access_forensics_lockers)
|
||||
req_one_access = list(GLOB.access_security, GLOB.access_forensics_lockers)
|
||||
circuit = /obj/item/weapon/circuitboard/computer/secure_data
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
var/authenticated = null
|
||||
@@ -122,10 +122,10 @@
|
||||
<th><A href='?src=\ref[src];choice=Sorting;sort=fingerprint'>Fingerprints</A></th>
|
||||
<th>Criminal Status</th>
|
||||
</tr>"}
|
||||
if(!isnull(data_core.general))
|
||||
for(var/datum/data/record/R in sortRecord(data_core.general, sortBy, order))
|
||||
if(!isnull(GLOB.data_core.general))
|
||||
for(var/datum/data/record/R in sortRecord(GLOB.data_core.general, sortBy, order))
|
||||
var/crimstat = ""
|
||||
for(var/datum/data/record/E in data_core.security)
|
||||
for(var/datum/data/record/E in GLOB.data_core.security)
|
||||
if((E.fields["name"] == R.fields["name"]) && (E.fields["id"] == R.fields["id"]))
|
||||
crimstat = E.fields["criminal"]
|
||||
var/background
|
||||
@@ -163,7 +163,7 @@
|
||||
dat += "<BR><A href='?src=\ref[src];choice=Delete All Records'>Delete All Records</A><BR><BR><A href='?src=\ref[src];choice=Return'>Back</A>"
|
||||
if(3)
|
||||
dat += "<font size='4'><b>Security Record</b></font><br>"
|
||||
if(istype(active1, /datum/data/record) && data_core.general.Find(active1))
|
||||
if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1))
|
||||
if(istype(active1.fields["photo_front"], /obj/item/weapon/photo))
|
||||
var/obj/item/weapon/photo/P1 = active1.fields["photo_front"]
|
||||
user << browse_rsc(P1.img, "photo_front")
|
||||
@@ -189,7 +189,7 @@
|
||||
</td></tr></table></td></tr></table>"}
|
||||
else
|
||||
dat += "<br>General Record Lost!<br>"
|
||||
if((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
|
||||
if((istype(active2, /datum/data/record) && GLOB.data_core.security.Find(active2)))
|
||||
dat += "<font size='4'><b>Security Data</b></font>"
|
||||
dat += "<br>Criminal Status: <A href='?src=\ref[src];choice=Edit Field;field=criminal'>[active2.fields["criminal"]]</A>"
|
||||
dat += "<br><br>Minor Crimes: <A href='?src=\ref[src];choice=Edit Field;field=mi_crim_add'>Add New</A>"
|
||||
@@ -262,9 +262,9 @@ What a mess.*/
|
||||
. = ..()
|
||||
if(.)
|
||||
return .
|
||||
if(!( data_core.general.Find(active1) ))
|
||||
if(!( GLOB.data_core.general.Find(active1) ))
|
||||
active1 = null
|
||||
if(!( data_core.security.Find(active2) ))
|
||||
if(!( GLOB.data_core.security.Find(active2) ))
|
||||
active2 = null
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr))
|
||||
usr.set_machine(src)
|
||||
@@ -341,10 +341,10 @@ What a mess.*/
|
||||
if("Browse Record")
|
||||
var/datum/data/record/R = locate(href_list["d_rec"])
|
||||
var/S = locate(href_list["d_rec"])
|
||||
if(!( data_core.general.Find(R) ))
|
||||
if(!( GLOB.data_core.general.Find(R) ))
|
||||
temp = "Record Not Found!"
|
||||
else
|
||||
for(var/datum/data/record/E in data_core.security)
|
||||
for(var/datum/data/record/E in GLOB.data_core.security)
|
||||
if((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
||||
S = E
|
||||
active1 = R
|
||||
@@ -355,19 +355,19 @@ What a mess.*/
|
||||
if("Print Record")
|
||||
if(!( printing ))
|
||||
printing = 1
|
||||
data_core.securityPrintCount++
|
||||
GLOB.data_core.securityPrintCount++
|
||||
playsound(loc, 'sound/items/poster_being_created.ogg', 100, 1)
|
||||
sleep(30)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( loc )
|
||||
P.info = "<CENTER><B>Security Record - (SR-[data_core.securityPrintCount])</B></CENTER><BR>"
|
||||
if((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
|
||||
P.info = "<CENTER><B>Security Record - (SR-[GLOB.data_core.securityPrintCount])</B></CENTER><BR>"
|
||||
if((istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)))
|
||||
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>", active1.fields["name"], active1.fields["id"], active1.fields["sex"], active1.fields["age"])
|
||||
if(config.mutant_races)
|
||||
P.info += "\nSpecies: [active1.fields["species"]]<BR>"
|
||||
P.info += text("\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", active1.fields["fingerprint"], active1.fields["p_stat"], active1.fields["m_stat"])
|
||||
else
|
||||
P.info += "<B>General Record Lost!</B><BR>"
|
||||
if((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
|
||||
if((istype(active2, /datum/data/record) && GLOB.data_core.security.Find(active2)))
|
||||
P.info += text("<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: []", active2.fields["criminal"])
|
||||
|
||||
P.info += "<BR>\n<BR>\nMinor Crimes:<BR>\n"
|
||||
@@ -408,10 +408,10 @@ What a mess.*/
|
||||
while(active2.fields[text("com_[]", counter)])
|
||||
P.info += text("[]<BR>", active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
P.name = text("SR-[] '[]'", data_core.securityPrintCount, active1.fields["name"])
|
||||
P.name = text("SR-[] '[]'", GLOB.data_core.securityPrintCount, active1.fields["name"])
|
||||
else
|
||||
P.info += "<B>Security Record Lost!</B><BR>"
|
||||
P.name = text("SR-[] '[]'", data_core.securityPrintCount, "Record Lost")
|
||||
P.name = text("SR-[] '[]'", GLOB.data_core.securityPrintCount, "Record Lost")
|
||||
P.info += "</TT>"
|
||||
printing = null
|
||||
if("Print Poster")
|
||||
@@ -439,7 +439,7 @@ What a mess.*/
|
||||
playsound(loc, 'sound/items/poster_being_created.ogg', 100, 1)
|
||||
printing = 1
|
||||
sleep(30)
|
||||
if((istype(active1, /datum/data/record) && data_core.general.Find(active1)))//make sure the record still exists.
|
||||
if((istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)))//make sure the record still exists.
|
||||
var/obj/item/weapon/photo/photo = active1.fields["photo_front"]
|
||||
new /obj/item/weapon/poster/wanted(src.loc, photo.img, wanted_name, info)
|
||||
printing = 0
|
||||
@@ -453,9 +453,9 @@ What a mess.*/
|
||||
|
||||
if("Purge All Records")
|
||||
investigate_log("[usr.name] ([usr.key]) has purged all the security records.", "records")
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
qdel(R)
|
||||
data_core.security.Cut()
|
||||
GLOB.data_core.security.Cut()
|
||||
temp = "All Security records deleted."
|
||||
|
||||
if("Add Entry")
|
||||
@@ -468,7 +468,7 @@ What a mess.*/
|
||||
var/counter = 1
|
||||
while(active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", src.authenticated, src.rank, worldtime2text(), time2text(world.realtime, "MMM DD"), year_integer+540, t1)
|
||||
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", src.authenticated, src.rank, worldtime2text(), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1)
|
||||
|
||||
if("Delete Record (ALL)")
|
||||
if(active1)
|
||||
@@ -496,7 +496,7 @@ What a mess.*/
|
||||
R.fields["mi_crim"] = list()
|
||||
R.fields["ma_crim"] = list()
|
||||
R.fields["notes"] = "No notes."
|
||||
data_core.security += R
|
||||
GLOB.data_core.security += R
|
||||
active2 = R
|
||||
screen = 3
|
||||
|
||||
@@ -515,7 +515,7 @@ What a mess.*/
|
||||
G.fields["fingerprint"] = "?????"
|
||||
G.fields["p_stat"] = "Active"
|
||||
G.fields["m_stat"] = "Stable"
|
||||
data_core.general += G
|
||||
GLOB.data_core.general += G
|
||||
active1 = G
|
||||
|
||||
//Security Record
|
||||
@@ -527,7 +527,7 @@ What a mess.*/
|
||||
R.fields["mi_crim"] = list()
|
||||
R.fields["ma_crim"] = list()
|
||||
R.fields["notes"] = "No notes."
|
||||
data_core.security += R
|
||||
GLOB.data_core.security += R
|
||||
active2 = R
|
||||
|
||||
//Medical Record
|
||||
@@ -545,7 +545,7 @@ What a mess.*/
|
||||
M.fields["cdi"] = "None"
|
||||
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
|
||||
M.fields["notes"] = "No notes."
|
||||
data_core.medical += M
|
||||
GLOB.data_core.medical += M
|
||||
|
||||
|
||||
|
||||
@@ -593,7 +593,7 @@ What a mess.*/
|
||||
active1.fields["age"] = t1
|
||||
if("species")
|
||||
if(istype(active1, /datum/data/record))
|
||||
var/t1 = input("Select a species", "Species Selection") as null|anything in roundstart_species
|
||||
var/t1 = input("Select a species", "Species Selection") as null|anything in GLOB.roundstart_species
|
||||
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
||||
return
|
||||
active1.fields["species"] = t1
|
||||
@@ -623,28 +623,28 @@ What a mess.*/
|
||||
var/t2 = stripped_multiline_input(usr, "Please input minor crime details:", "Secure. records", "", null)
|
||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||
return
|
||||
var/crime = data_core.createCrimeEntry(t1, t2, authenticated, worldtime2text())
|
||||
data_core.addMinorCrime(active1.fields["id"], crime)
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, worldtime2text())
|
||||
GLOB.data_core.addMinorCrime(active1.fields["id"], crime)
|
||||
if("mi_crim_delete")
|
||||
if(istype(active1, /datum/data/record))
|
||||
if(href_list["cdataid"])
|
||||
if(!canUseSecurityRecordsConsole(usr, "delete", null, a2))
|
||||
return
|
||||
data_core.removeMinorCrime(active1.fields["id"], href_list["cdataid"])
|
||||
GLOB.data_core.removeMinorCrime(active1.fields["id"], href_list["cdataid"])
|
||||
if("ma_crim_add")
|
||||
if(istype(active1, /datum/data/record))
|
||||
var/t1 = stripped_input(usr, "Please input major crime names:", "Secure. records", "", null)
|
||||
var/t2 = stripped_multiline_input(usr, "Please input major crime details:", "Secure. records", "", null)
|
||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||
return
|
||||
var/crime = data_core.createCrimeEntry(t1, t2, authenticated, worldtime2text())
|
||||
data_core.addMajorCrime(active1.fields["id"], crime)
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, worldtime2text())
|
||||
GLOB.data_core.addMajorCrime(active1.fields["id"], crime)
|
||||
if("ma_crim_delete")
|
||||
if(istype(active1, /datum/data/record))
|
||||
if(href_list["cdataid"])
|
||||
if(!canUseSecurityRecordsConsole(usr, "delete", null, a2))
|
||||
return
|
||||
data_core.removeMajorCrime(active1.fields["id"], href_list["cdataid"])
|
||||
GLOB.data_core.removeMajorCrime(active1.fields["id"], href_list["cdataid"])
|
||||
if("notes")
|
||||
if(istype(active2, /datum/data/record))
|
||||
var/t1 = stripped_input(usr, "Please summarize notes:", "Secure. records", active2.fields["notes"], null)
|
||||
@@ -697,7 +697,7 @@ What a mess.*/
|
||||
if("released")
|
||||
active2.fields["criminal"] = "Discharged"
|
||||
investigate_log("[active1.fields["name"]] has been set from [old_field] to [active2.fields["criminal"]] by [usr.name] ([usr.key]).", "records")
|
||||
for(var/mob/living/carbon/human/H in mob_list) //thanks for forcing me to do this, whoever wrote this shitty records system
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list) //thanks for forcing me to do this, whoever wrote this shitty records system
|
||||
H.sec_hud_set_security_status()
|
||||
if("Delete Record (Security) Execute")
|
||||
investigate_log("[usr.name] ([usr.key]) has deleted the security records for [active1.fields["name"]].", "records")
|
||||
@@ -708,7 +708,7 @@ What a mess.*/
|
||||
if("Delete Record (ALL) Execute")
|
||||
if(active1)
|
||||
investigate_log("[usr.name] ([usr.key]) has deleted all records for [active1.fields["name"]].", "records")
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
for(var/datum/data/record/R in GLOB.data_core.medical)
|
||||
if((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
|
||||
qdel(R)
|
||||
break
|
||||
@@ -742,14 +742,14 @@ What a mess.*/
|
||||
..(severity)
|
||||
return
|
||||
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
if(prob(10/severity))
|
||||
switch(rand(1,8))
|
||||
if(1)
|
||||
if(prob(10))
|
||||
R.fields["name"] = "[pick(lizard_name(MALE),lizard_name(FEMALE))]"
|
||||
else
|
||||
R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
|
||||
R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]"
|
||||
if(2)
|
||||
R.fields["sex"] = pick("Male", "Female")
|
||||
if(3)
|
||||
@@ -761,9 +761,9 @@ What a mess.*/
|
||||
if(6)
|
||||
R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
|
||||
if(7)
|
||||
R.fields["species"] = pick(roundstart_species)
|
||||
R.fields["species"] = pick(GLOB.roundstart_species)
|
||||
if(8)
|
||||
var/datum/data/record/G = pick(data_core.general)
|
||||
var/datum/data/record/G = pick(GLOB.data_core.general)
|
||||
R.fields["photo_front"] = G.fields["photo_front"]
|
||||
R.fields["photo_side"] = G.fields["photo_side"]
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user