mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
* Removes Captain as a title, sets default to Station Administrator, and adds a new title, Site Manager * Fix atmo_control interface temperature reading * Adds Multiple Alternative Titles * Removed Supply Assistant * Removed Sergeant * Removed Computer Scientist * Revert "Revert "Frame Cleanup"" This reverts commit82722ba42f. * Changed Supply Officer to Requisitions Officer * Changed Requisitions Officer to Supply Chief and Removed Courier * Removed Life Support Technician * Removed Brig Officer * Tweaks the lowest level of heat damage to be less insane * Corrects damage amount for heat_damage_level_1 * Maybe Perhaps Last Major Technomancer PR Adds ability to sort the spells section of the catalog into categories. The categories available are 'All', 'Offensive', 'Defensive', 'Utility', and 'Support'. Removes preset section on catalog as it was unused. Projectile spells now have a sound when fired. Haste lasts five seconds instead of three. Repel Missiles lasts for five minutes instead of two. All healing spells work five times as fast, healing in five seconds instead of twenty five seconds. The amount of instability and healing done has been multiplied to remain consistent. Passwall can now be used on more than just walls, if there's something dense on the same tile. Force Missile is now 25% cheaper to cast, and has a cooldown of .5 seconds instead of one second, and does 5 more damage. Beam's damage is increased by 10, and energy cost decreased by 25%. Lightning's warm-up time is now one second instead of two. Overload now costs 10% of total energy instead of 15%, and damage scaled with 4% of their current energy reserves, and 5% with the Scepter, instead of 3%/4%. Additionally, instability per shot is lowered to 12 from 15. Track now costs 25 points instead of 30 in the catalog, because roundness. Fire Aura should look more impressive without a Scepter. Fixes bug where shooting Lightning made you motionless for twenty seconds. * Adds Multiple New Clothing Items * Makes Loincloths only Availiable to Taj and Unathi * Tweaks the contents of the captain's closet * Smokables now give an approximation of how much longer they'll burn once lit * make teshari not bad to play * Tea Tweaks - Minor changes to the color of some of the drinks such as tea and iced tea. Still not happy with the colors, but they seem better than before. - Modification to the British cup sprite. - Addition of a tea sprite for the coffee cups. * fixes exception handling runtiming * Adds missing error handler that made it difficult to debug runtimes. * Corrects error handling proc * Adds missing runtime viewer Topic calls. Relocates them to the datum itself rather than it being an admin topic for maximum self-containment. Also adds 'adminplayerobservefollow', making it possible for admins to not only jump to mobs but also follow them with a single click. Misc tweaks from Paradise. * gib population * Adds the ash() mob proc, preps ninja suit * Fixes #2352 * Changelog * alt title * Rigs now have suit coolers * Map edit - Fixes lighting in Security. Again. - Fixes lighting in Library. - Adds a new maint tunnel between engineering solars and atmos, now outside the blast radius of SME explosions. * Almost forgot emergency shutters. * Examine Cigarette Lore * Fixes Capitalization * Eliminates colon * Should clear up the usr issue * Fixes cryopods of all types not setting occupant correctly. * updates changelog * Fixes runtime that occured if someone touched a blast door with an empty hand. * Fixes check_rights() runtime. * Adds magboots to ling spacesuits * Adds Changelog * Turret Fix Turrets can now deploy properly and not be stuck in a state of deploying forever if a target is in range. * Revert "Adds hub passwordu" * Makes changeling recursive enhancement a passive power * Corrects a description * Adss changelog * Add files via upload * Changeling/Wizard/Future Stuff Hud Button Fix Hopefully this stops the roundstop changeling hud wonkiness. * Changes Mining Hardsuit slowdown to 1, from 3 * Widened hallway * Speeds up arm_guard and leg_guard wearers slightly * Forgot to use map cleanup tool. * Adds changelog * Adds changelog * Minor Emitter Tweaks Emitters no longer die by shooting a taser or laser tag gun at it. Emitters don't explode if they are not on a powered wire with sufficient electricity in it. They will just crumple away instead if integrity is reduced to zero. Taking any damage to the emitter no longer results in instant death due to me being an idiot awhile ago. Emitters can be examined to see if they are damaged, and can be repaired by applying metal sheets to it. * Github, stop being stupid! * Tweaks Sec Voidsuit values * Fixes external airlocks * Elevator-MMI fix * Shoveling Snow * Laptop ID Computer Fix The manifest should now be updated correctly when using laptops. * do_after is more immersive * Fixes second bug involving inability to change title to station admin. * Adds more unathi hair and facial options * Adds the changelog * Retweaks secret player requirements * Updates changelog * Fixes sprite not updating to not be floating when leaving non-gravity * Adds changelog * Fixes changeling revive not working when you're missing a limb * Fixes #860 * Adds changelog * Makes flash confused duration the same length as the flash blurry eyes * Increases the change of lung rupturing * Adds vomit as an emote * Adds changelog * Removes revolution shuttle delay * Adds changelog * Projectile flash rounds will now do the same as a flash when hitting a target * Adds changelog * Fixes dna-lockable gun explosion security level * Drink Container Lore * Decapitalizes 'Sleeper' Because Why * Fixes Grammatical/Flow/Sarcasm Errors * Completes dna lockable guns implementation by adding a dna chip that can be added to guns * Fixes + forgotten file * Moves DNA locking stuff down to the item level rather than gun, also adds the ability to emag to remove the lock * Adds changelog * Adds the ability to wear ponchos as an accessory, also adds the ability to have ponchos as a suit accessory * Adds changelog * Closes 2 missing spans * Adds secure briefcase to custom loadout * Adds changelog * Headgear Additions, and an Undershirt * Medical splint buff and new ghetto splints. Adds hands and feet to splint-splintable organs. Also adds ghetto splints that can't do hands and feet. * Fixed Sleeper... Again * Renames "poncho" slot to "over" * Speeds Hyperzine metabolism * 1.5.8 Map bug fixes -Fixed brit cup sprite. - Replaced a maintenance door leading into atmospherics with one with the proper access. - Fixed Missing Disposals pipe next to atmos. - Tweaked some light placement in the main hallways. - AI core redesign. - Turned off medbay lobby intercom. - Cyborg charging station added to prison wing. - Cyborg charging station added to the research outpost. - Medical rig suit added to medical. - EVA rig suit for engineering added to EVA. - Second residential elevator installed. Due to budget cuts the size of the elevators has been reduced. * Updates changelog * Sombrero Code * Fixes #2365 * Adds changelog * Sleeper is evil. * no message * Changelog * Stops observers from leaving prints on the ground. No more spooking the mortals, ghosts. * Allows autotraitor in secret to start with 0 players * Adds changelog * Makes diona slightly less slow * Adds changelog * Bowling Shirts * Updates changelog * Adds a missing description * Flat Cap Changes and Hair Bow * Fixed Error * Adds an in-hand * Lower Torso cannot be amputated * Smoke works, adds changelog * Updates changelog * Makes Unathi Voidsuits Less Fat * Medical related fixes * Fuzzy Cuffs * Tube Top * Made Icons for Security Suit Less Gaunt * Revert "Medical related fixes" This reverts commitd7c59520e6. * Just the fix to random med item now * Fixes Evening Glove Coloring * HAZMAT Suits * Changes Unathi sprite slightly * Tweaks skirt pathing * Corrects changelog * Adds changelog * Construction Voidsuits * makes people bleed real good * adderino changeling * Revert "Revert "Adds hub passwordu"" * Explosive implants should no longer gib on limbs. * I still have no idea what I am doing. * Resolves #331
612 lines
26 KiB
Plaintext
612 lines
26 KiB
Plaintext
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
|
/obj/machinery/computer3/secure_data
|
|
default_prog = /datum/file/program/secure_data
|
|
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/cardslot,/obj/item/part/computer/networking/radio)
|
|
icon_state = "frame-sec"
|
|
|
|
/obj/machinery/computer3/laptop/secure_data
|
|
default_prog = /datum/file/program/secure_data
|
|
spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/cardslot,/obj/item/part/computer/networking/radio)
|
|
icon_state = "laptop"
|
|
|
|
|
|
/datum/file/program/secure_data
|
|
name = "Security Records"
|
|
desc = "Used to view and edit personnel's security records"
|
|
active_state = "security"
|
|
image = 'icons/ntos/records.png'
|
|
|
|
req_one_access = list(access_security, access_forensics_lockers)
|
|
|
|
var/obj/item/weapon/card/id/scan = null
|
|
var/obj/item/weapon/card/id/scan2 = null
|
|
var/authenticated = null
|
|
var/rank = null
|
|
var/screen = null
|
|
var/datum/data/record/active1 = null
|
|
var/datum/data/record/active2 = null
|
|
var/a_id = null
|
|
var/temp = null
|
|
var/printing = null
|
|
var/can_change_id = 0
|
|
var/list/Perp
|
|
var/tempname = null
|
|
//Sorting Variables
|
|
var/sortBy = "name"
|
|
var/order = 1 // -1 = Descending - 1 = Ascending
|
|
|
|
|
|
|
|
proc/authenticate()
|
|
if(access_security in scan.access || access_forensics_lockers in scan.access )
|
|
return 1
|
|
if(istype(usr,/mob/living/silicon/ai))
|
|
return 1
|
|
return 0
|
|
|
|
interact()
|
|
if(!computer.cardslot)
|
|
computer.Crash(MISSING_PERIPHERAL)
|
|
return
|
|
usr.set_machine(src)
|
|
scan = computer.cardslot.reader
|
|
|
|
if (computer.cardslot.dualslot)
|
|
scan2 = computer.cardslot.writer
|
|
|
|
if(!interactable())
|
|
return
|
|
|
|
if (computer.z > 6)
|
|
usr << "<span class='danger'>Unable to establish a connection:</span> You're too far away from the station!"
|
|
return
|
|
var/dat
|
|
|
|
if (temp)
|
|
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];choice=Clear Screen'>Clear Screen</A>", temp, src)
|
|
else
|
|
dat = text("Confirm Identity (R): <A href='?src=\ref[];choice=Confirm Identity R'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
|
|
if (computer.cardslot.dualslot)
|
|
dat += text("Check Identity (W): <A href='?src=\ref[];choice=Confirm Identity W'>[]</A><BR>", src, (scan2 ? text("[]", scan2.name) : "----------"))
|
|
if(scan2 && !scan)
|
|
dat += text("<div class='notice'>Insert card into reader slot to log in.</div><br>")
|
|
if (authenticated)
|
|
switch(screen)
|
|
if(1.0)
|
|
dat += {"
|
|
<p style='text-align:center;'>"}
|
|
dat += text("<A href='?src=\ref[];choice=Search Records'>Search Records</A><BR>", src)
|
|
dat += text("<A href='?src=\ref[];choice=New Record (General)'>New Record</A><BR>", src)
|
|
dat += {"
|
|
</p>
|
|
<table style="text-align:center;" cellspacing="0" width="100%">
|
|
<tr>
|
|
<th>Records:</th>
|
|
</tr>
|
|
</table>
|
|
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
|
|
<tr>
|
|
<th><A href='?src=\ref[src];choice=Sorting;sort=name'>Name</A></th>
|
|
<th><A href='?src=\ref[src];choice=Sorting;sort=id'>ID</A></th>
|
|
<th><A href='?src=\ref[src];choice=Sorting;sort=rank'>Rank</A></th>
|
|
<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))
|
|
var/crimstat = ""
|
|
for(var/datum/data/record/E in data_core.security)
|
|
if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
|
|
crimstat = E.fields["criminal"]
|
|
var/background
|
|
switch(crimstat)
|
|
if("*Arrest*")
|
|
background = "'background-color:#DC143C;'"
|
|
if("Incarcerated")
|
|
background = "'background-color:#CD853F;'"
|
|
if("Parolled")
|
|
background = "'background-color:#CD853F;'"
|
|
if("Released")
|
|
background = "'background-color:#3BB9FF;'"
|
|
if("None")
|
|
background = "'background-color:#00FF00;'"
|
|
if("")
|
|
background = "'background-color:#00FF7F;'"
|
|
crimstat = "No Record."
|
|
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
|
|
dat += text("<td>[]</td>", R.fields["id"])
|
|
dat += text("<td>[]</td>", R.fields["rank"])
|
|
dat += text("<td>[]</td>", R.fields["fingerprint"])
|
|
dat += text("<td>[]</td></tr>", crimstat)
|
|
dat += "</table><hr width='75%' />"
|
|
dat += text("<A href='?src=\ref[];choice=Record Maintenance'>Record Maintenance</A><br><br>", src)
|
|
dat += text("<A href='?src=\ref[];choice=Log Out'>{Log Out}</A>",src)
|
|
if(2.0)
|
|
dat += "<B>Records Maintenance</B><HR>"
|
|
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.0)
|
|
dat += "<CENTER><B>Security Record</B></CENTER><BR>"
|
|
if ((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
|
|
var/icon/front = active1.fields["photo_front"]
|
|
var/icon/side = active1.fields["photo_side"]
|
|
usr << browse_rsc(front, "front.png")
|
|
usr << browse_rsc(side, "side.png")
|
|
dat += text("<table><tr><td> \
|
|
Name: <A href='?src=\ref[src];choice=Edit Field;field=name'>[active1.fields["name"]]</A><BR> \
|
|
ID: <A href='?src=\ref[src];choice=Edit Field;field=id'>[active1.fields["id"]]</A><BR>\n \
|
|
Sex: <A href='?src=\ref[src];choice=Edit Field;field=sex'>[active1.fields["sex"]]</A><BR>\n \
|
|
Age: <A href='?src=\ref[src];choice=Edit Field;field=age'>[active1.fields["age"]]</A><BR>\n \
|
|
Rank: <A href='?src=\ref[src];choice=Edit Field;field=rank'>[active1.fields["rank"]]</A><BR>\n \
|
|
Fingerprint: <A href='?src=\ref[src];choice=Edit Field;field=fingerprint'>[active1.fields["fingerprint"]]</A><BR>\n \
|
|
Physical Status: [active1.fields["p_stat"]]<BR>\n \
|
|
Mental Status: [active1.fields["m_stat"]]<BR></td> \
|
|
<td align = center valign = top>Photo:<br><img src=front.png height=80 width=80 border=4> \
|
|
<img src=side.png height=80 width=80 border=4></td></tr></table>")
|
|
else
|
|
dat += "<B>General Record Lost!</B><BR>"
|
|
if ((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
|
|
dat += text("<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: <A href='?src=\ref[];choice=Edit Field;field=criminal'>[]</A><BR>\n<BR>\nMinor Crimes: <A href='?src=\ref[];choice=Edit Field;field=mi_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];choice=Edit Field;field=mi_crim_d'>[]</A><BR>\n<BR>\nMajor Crimes: <A href='?src=\ref[];choice=Edit Field;field=ma_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];choice=Edit Field;field=ma_crim_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];choice=Edit Field;field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src, active2.fields["criminal"], src, active2.fields["mi_crim"], src, active2.fields["mi_crim_d"], src, active2.fields["ma_crim"], src, active2.fields["ma_crim_d"], src, decode(active2.fields["notes"]))
|
|
var/counter = 1
|
|
while(active2.fields[text("com_[]", counter)])
|
|
dat += text("[]<BR><A href='?src=\ref[];choice=Delete Entry;del_c=[]'>Delete Entry</A><BR><BR>", active2.fields[text("com_[]", counter)], src, counter)
|
|
counter++
|
|
dat += text("<A href='?src=\ref[];choice=Add Entry'>Add Entry</A><BR><BR>", src)
|
|
dat += text("<A href='?src=\ref[];choice=Delete Record (Security)'>Delete Record (Security Only)</A><BR><BR>", src)
|
|
else
|
|
dat += "<B>Security Record Lost!</B><BR>"
|
|
dat += text("<A href='?src=\ref[];choice=New Record (Security)'>New Security Record</A><BR><BR>", src)
|
|
dat += text("\n<A href='?src=\ref[];choice=Delete Record (ALL)'>Delete Record (ALL)</A><BR><BR>\n<A href='?src=\ref[];choice=Print Record'>Print Record</A><BR>\n<A href='?src=\ref[];choice=Return'>Back</A><BR>", src, src, src)
|
|
if(4.0)
|
|
if(!Perp.len)
|
|
dat += text("ERROR. String could not be located.<br><br><A href='?src=\ref[];choice=Return'>Back</A>", src)
|
|
else
|
|
dat += {"
|
|
<table style="text-align:center;" cellspacing="0" width="100%">
|
|
<tr> "}
|
|
dat += text("<th>Search Results for '[]':</th>", tempname)
|
|
dat += {"
|
|
</tr>
|
|
</table>
|
|
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>ID</th>
|
|
<th>Rank</th>
|
|
<th>Fingerprints</th>
|
|
<th>Criminal Status</th>
|
|
</tr> "}
|
|
for(var/i=1, i<=Perp.len, i += 2)
|
|
var/crimstat = ""
|
|
var/datum/data/record/R = Perp[i]
|
|
if(istype(Perp[i+1],/datum/data/record/))
|
|
var/datum/data/record/E = Perp[i+1]
|
|
crimstat = E.fields["criminal"]
|
|
var/background
|
|
switch(crimstat)
|
|
if("*Arrest*")
|
|
background = "'background-color:#DC143C;'"
|
|
if("Incarcerated")
|
|
background = "'background-color:#CD853F;'"
|
|
if("Parolled")
|
|
background = "'background-color:#CD853F;'"
|
|
if("Released")
|
|
background = "'background-color:#3BB9FF;'"
|
|
if("None")
|
|
background = "'background-color:#00FF7F;'"
|
|
if("")
|
|
background = "'background-color:#FFFFFF;'"
|
|
crimstat = "No Record."
|
|
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
|
|
dat += text("<td>[]</td>", R.fields["id"])
|
|
dat += text("<td>[]</td>", R.fields["rank"])
|
|
dat += text("<td>[]</td>", R.fields["fingerprint"])
|
|
dat += text("<td>[]</td></tr>", crimstat)
|
|
dat += "</table><hr width='75%' />"
|
|
dat += text("<br><A href='?src=\ref[];choice=Return'>Return to index.</A>", src)
|
|
else
|
|
else
|
|
dat += text("<A href='?src=\ref[];choice=Log In'>{Log In}</A>", src)
|
|
popup.width = 600
|
|
popup.height = 400
|
|
popup.set_content(dat)
|
|
popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
|
|
popup.open()
|
|
return
|
|
|
|
/*Revised /N
|
|
I can't be bothered to look more of the actual code outside of switch but that probably needs revising too.
|
|
What a mess.*/
|
|
Topic(href, href_list)
|
|
if(!interactable() || !computer.cardslot || ..(href,href_list))
|
|
return
|
|
if (!( data_core.general.Find(active1) ))
|
|
active1 = null
|
|
if (!( data_core.security.Find(active2) ))
|
|
active2 = null
|
|
switch(href_list["choice"])
|
|
// SORTING!
|
|
if("Sorting")
|
|
// Reverse the order if clicked twice
|
|
if(sortBy == href_list["sort"])
|
|
if(order == 1)
|
|
order = -1
|
|
else
|
|
order = 1
|
|
else
|
|
// New sorting order!
|
|
sortBy = href_list["sort"]
|
|
order = initial(order)
|
|
//BASIC FUNCTIONS
|
|
if("Clear Screen")
|
|
temp = null
|
|
|
|
if ("Return")
|
|
screen = 1
|
|
active1 = null
|
|
active2 = null
|
|
|
|
if("Confirm Identity R")
|
|
if (scan)
|
|
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
|
|
computer.cardslot.remove(1)
|
|
else
|
|
scan.loc = get_turf(src)
|
|
scan = null
|
|
else
|
|
var/obj/item/I = usr.get_active_hand()
|
|
if (istype(I, /obj/item/weapon/card/id) && usr.drop_item(I))
|
|
computer.cardslot.insert(I, 1)
|
|
scan = I
|
|
|
|
if("Confirm Identity W")
|
|
if (scan2)
|
|
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
|
|
computer.cardslot.remove(2)
|
|
else
|
|
scan2.loc = get_turf(src)
|
|
scan2 = null
|
|
else
|
|
var/obj/item/I = usr.get_active_hand()
|
|
if (istype(I, /obj/item/weapon/card/id) && usr.drop_item(I))
|
|
computer.cardslot.insert(I, 2)
|
|
scan2 = I
|
|
|
|
if("Log Out")
|
|
authenticated = null
|
|
screen = null
|
|
active1 = null
|
|
active2 = null
|
|
|
|
if("Log In")
|
|
if (istype(usr, /mob/living/silicon/ai))
|
|
src.active1 = null
|
|
src.active2 = null
|
|
src.authenticated = usr.name
|
|
src.rank = "AI"
|
|
src.screen = 1
|
|
else if (istype(usr, /mob/living/silicon/robot))
|
|
src.active1 = null
|
|
src.active2 = null
|
|
src.authenticated = usr.name
|
|
var/mob/living/silicon/robot/R = usr
|
|
src.rank = "[R.modtype] [R.braintype]"
|
|
src.screen = 1
|
|
else if (istype(scan, /obj/item/weapon/card/id))
|
|
active1 = null
|
|
active2 = null
|
|
if(authenticate())
|
|
authenticated = scan.registered_name
|
|
rank = scan.assignment
|
|
screen = 1
|
|
//RECORD FUNCTIONS
|
|
if("Search Records")
|
|
var/t1 = input("Search String: (Partial Name or ID or Fingerprints or Rank)", "Secure. records", null, null) as text
|
|
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !interactable()))
|
|
return
|
|
Perp = new/list()
|
|
t1 = lowertext(t1)
|
|
var/list/components = splittext(t1, " ")
|
|
if(components.len > 5)
|
|
return //Lets not let them search too greedily.
|
|
for(var/datum/data/record/R in data_core.general)
|
|
var/temptext = R.fields["name"] + " " + R.fields["id"] + " " + R.fields["fingerprint"] + " " + R.fields["rank"]
|
|
for(var/i = 1, i<=components.len, i++)
|
|
if(findtext(temptext,components[i]))
|
|
var/prelist = new/list(2)
|
|
prelist[1] = R
|
|
Perp += prelist
|
|
for(var/i = 1, i<=Perp.len, i+=2)
|
|
for(var/datum/data/record/E in data_core.security)
|
|
var/datum/data/record/R = Perp[i]
|
|
if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
|
|
Perp[i+1] = E
|
|
tempname = t1
|
|
screen = 4
|
|
|
|
if("Record Maintenance")
|
|
screen = 2
|
|
active1 = null
|
|
active2 = null
|
|
|
|
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) ))
|
|
temp = "Record Not Found!"
|
|
else
|
|
for(var/datum/data/record/E in data_core.security)
|
|
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
|
S = E
|
|
active1 = R
|
|
active2 = S
|
|
screen = 3
|
|
|
|
/* if ("Search Fingerprints")
|
|
var/t1 = input("Search String: (Fingerprint)", "Secure. records", null, null) as text
|
|
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || (!interactable()) && (!istype(usr, /mob/living/silicon))))
|
|
return
|
|
active1 = null
|
|
active2 = null
|
|
t1 = lowertext(t1)
|
|
for(var/datum/data/record/R in data_core.general)
|
|
if (lowertext(R.fields["fingerprint"]) == t1)
|
|
active1 = R
|
|
if (!( active1 ))
|
|
temp = text("Could not locate record [].", t1)
|
|
else
|
|
for(var/datum/data/record/E in data_core.security)
|
|
if ((E.fields["name"] == active1.fields["name"] || E.fields["id"] == active1.fields["id"]))
|
|
active2 = E
|
|
screen = 3 */
|
|
|
|
if ("Print Record")
|
|
if (!( printing ))
|
|
printing = 1
|
|
var/datum/data/record/record1 = null
|
|
var/datum/data/record/record2 = null
|
|
if ((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
|
|
record1 = active1
|
|
if ((istype(active2, /datum/data/record) && data_core.security.Find(active2)))
|
|
record2 = active2
|
|
sleep(50)
|
|
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( computer.loc )
|
|
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
|
|
if (record1)
|
|
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", record1.fields["name"], record1.fields["id"], record1.fields["sex"], record1.fields["age"], record1.fields["fingerprint"], record1.fields["p_stat"], record1.fields["m_stat"])
|
|
P.name = text("Security Record ([])", record1.fields["name"])
|
|
else
|
|
P.info += "<B>General Record Lost!</B><BR>"
|
|
P.name = "Security Record"
|
|
if (record2)
|
|
P.info += text("<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: []<BR>\n<BR>\nMinor Crimes: []<BR>\nDetails: []<BR>\n<BR>\nMajor Crimes: []<BR>\nDetails: []<BR>\n<BR>\nImportant Notes:<BR>\n\t[]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", record2.fields["criminal"], record2.fields["mi_crim"], record2.fields["mi_crim_d"], record2.fields["ma_crim"], record2.fields["ma_crim_d"], decode(record2.fields["notes"]))
|
|
var/counter = 1
|
|
while(record2.fields[text("com_[]", counter)])
|
|
P.info += text("[]<BR>", record2.fields[text("com_[]", counter)])
|
|
counter++
|
|
else
|
|
P.info += "<B>Security Record Lost!</B><BR>"
|
|
P.info += "</TT>"
|
|
printing = null
|
|
computer.updateUsrDialog()
|
|
//RECORD DELETE
|
|
if ("Delete All Records")
|
|
temp = ""
|
|
temp += "Are you sure you wish to delete all Security records?<br>"
|
|
temp += "<a href='?src=\ref[src];choice=Purge All Records'>Yes</a><br>"
|
|
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
|
|
|
|
if ("Purge All Records")
|
|
for(var/datum/data/record/R in data_core.security)
|
|
qdel(R)
|
|
temp = "All Security records deleted."
|
|
|
|
if ("Add Entry")
|
|
if (!( istype(active2, /datum/data/record) ))
|
|
return
|
|
var/a2 = active2
|
|
var/t1 = sanitize(input("Add Comment:", "Secure. records", null, null) as message)
|
|
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
|
return
|
|
var/counter = 1
|
|
while(active2.fields[text("com_[]", counter)])
|
|
counter++
|
|
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]<BR>[t1]")
|
|
|
|
if ("Delete Record (ALL)")
|
|
if (active1)
|
|
temp = "<h5>Are you sure you wish to delete the record (ALL)?</h5>"
|
|
temp += "<a href='?src=\ref[src];choice=Delete Record (ALL) Execute'>Yes</a><br>"
|
|
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
|
|
|
|
if ("Delete Record (Security)")
|
|
if (active2)
|
|
temp = "<h5>Are you sure you wish to delete the record (Security Portion Only)?</h5>"
|
|
temp += "<a href='?src=\ref[src];choice=Delete Record (Security) Execute'>Yes</a><br>"
|
|
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
|
|
|
|
if ("Delete Entry")
|
|
if ((istype(active2, /datum/data/record) && active2.fields[text("com_[]", href_list["del_c"])]))
|
|
active2.fields[text("com_[]", href_list["del_c"])] = "<B>Deleted</B>"
|
|
//RECORD CREATE
|
|
if ("New Record (Security)")
|
|
if ((istype(active1, /datum/data/record) && !( istype(active2, /datum/data/record) )))
|
|
active2 = data_core.CreateSecurityRecord(active1.fields["name"], active1.fields["id"])
|
|
screen = 3
|
|
|
|
if ("New Record (General)")
|
|
active1 = data_core.CreateGeneralRecord()
|
|
active2 = null
|
|
|
|
//FIELD FUNCTIONS
|
|
if ("Edit Field")
|
|
var/a1 = active1
|
|
var/a2 = active2
|
|
switch(href_list["field"])
|
|
if("name")
|
|
if (istype(active1, /datum/data/record))
|
|
var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
|
|
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
|
|
return
|
|
active1.fields["name"] = t1
|
|
if("id")
|
|
if (istype(active2, /datum/data/record))
|
|
var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)
|
|
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
|
return
|
|
active1.fields["id"] = t1
|
|
if("fingerprint")
|
|
if (istype(active1, /datum/data/record))
|
|
var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)
|
|
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
|
return
|
|
active1.fields["fingerprint"] = t1
|
|
if("sex")
|
|
if (istype(active1, /datum/data/record))
|
|
if (active1.fields["sex"] == "Male")
|
|
active1.fields["sex"] = "Female"
|
|
else
|
|
active1.fields["sex"] = "Male"
|
|
if("age")
|
|
if (istype(active1, /datum/data/record))
|
|
var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num
|
|
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
|
return
|
|
active1.fields["age"] = t1
|
|
if("mi_crim")
|
|
if (istype(active2, /datum/data/record))
|
|
var/t1 = sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)
|
|
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
|
return
|
|
active2.fields["mi_crim"] = t1
|
|
if("mi_crim_d")
|
|
if (istype(active2, /datum/data/record))
|
|
var/t1 = sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)
|
|
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
|
return
|
|
active2.fields["mi_crim_d"] = t1
|
|
if("ma_crim")
|
|
if (istype(active2, /datum/data/record))
|
|
var/t1 = sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)
|
|
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
|
return
|
|
active2.fields["ma_crim"] = t1
|
|
if("ma_crim_d")
|
|
if (istype(active2, /datum/data/record))
|
|
var/t1 = sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)
|
|
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
|
return
|
|
active2.fields["ma_crim_d"] = t1
|
|
if("notes")
|
|
if (istype(active2, /datum/data/record))
|
|
var/t1 = sanitize(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message, extra = 0)
|
|
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
|
return
|
|
active2.fields["notes"] = t1
|
|
if("criminal")
|
|
if (istype(active2, /datum/data/record))
|
|
temp = "<h5>Criminal Status:</h5>"
|
|
temp += "<ul>"
|
|
temp += "<li><a href='?src=\ref[src];choice=Change Criminal Status;criminal2=none'>None</a></li>"
|
|
temp += "<li><a href='?src=\ref[src];choice=Change Criminal Status;criminal2=arrest'>*Arrest*</a></li>"
|
|
temp += "<li><a href='?src=\ref[src];choice=Change Criminal Status;criminal2=incarcerated'>Incarcerated</a></li>"
|
|
temp += "<li><a href='?src=\ref[src];choice=Change Criminal Status;criminal2=parolled'>Parolled</a></li>"
|
|
temp += "<li><a href='?src=\ref[src];choice=Change Criminal Status;criminal2=released'>Released</a></li>"
|
|
temp += "</ul>"
|
|
if("rank")
|
|
var/list/L = list( "Head of Personnel", "Station Administrator", "AI" )
|
|
//This was so silly before the change. Now it actually works without beating your head against the keyboard. /N
|
|
if ((istype(active1, /datum/data/record) && L.Find(rank)))
|
|
temp = "<h5>Rank:</h5>"
|
|
temp += "<ul>"
|
|
for(var/rank in joblist)
|
|
temp += "<li><a href='?src=\ref[src];choice=Change Rank;rank=[rank]'>[rank]</a></li>"
|
|
temp += "</ul>"
|
|
else
|
|
alert(usr, "You do not have the required rank to do this!")
|
|
if("species")
|
|
if (istype(active1, /datum/data/record))
|
|
var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)
|
|
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
|
return
|
|
active1.fields["species"] = t1
|
|
|
|
//TEMPORARY MENU FUNCTIONS
|
|
else//To properly clear as per clear screen.
|
|
temp=null
|
|
switch(href_list["choice"])
|
|
if ("Change Rank")
|
|
if (active1)
|
|
active1.fields["rank"] = href_list["rank"]
|
|
if(href_list["rank"] in joblist)
|
|
active1.fields["real_rank"] = href_list["real_rank"]
|
|
|
|
if ("Change Criminal Status")
|
|
if (active2)
|
|
for(var/mob/living/carbon/human/H in player_list)
|
|
BITSET(H.hud_updateflag, WANTED_HUD)
|
|
switch(href_list["criminal2"])
|
|
if("none")
|
|
active2.fields["criminal"] = "None"
|
|
if("arrest")
|
|
active2.fields["criminal"] = "*Arrest*"
|
|
if("incarcerated")
|
|
active2.fields["criminal"] = "Incarcerated"
|
|
if("parolled")
|
|
active2.fields["criminal"] = "Parolled"
|
|
if("released")
|
|
active2.fields["criminal"] = "Released"
|
|
|
|
if ("Delete Record (Security) Execute")
|
|
if (active2)
|
|
qdel(active2)
|
|
|
|
if ("Delete Record (ALL) Execute")
|
|
if (active1)
|
|
for(var/datum/data/record/R in data_core.medical)
|
|
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
|
|
qdel(R)
|
|
else
|
|
qdel(active1)
|
|
if (active2)
|
|
qdel(active2)
|
|
else
|
|
temp = "This function does not appear to be working at the moment. Our apologies."
|
|
|
|
//computer.updateUsrDialog()
|
|
interact()
|
|
return
|
|
|
|
/obj/machinery/computer3/secure_data/emp_act(severity)
|
|
if(stat & (BROKEN|NOPOWER))
|
|
..(severity)
|
|
return
|
|
|
|
for(var/datum/data/record/R in data_core.security)
|
|
if(prob(10/severity))
|
|
switch(rand(1,6))
|
|
if(1)
|
|
R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
|
|
if(2)
|
|
R.fields["sex"] = pick("Male", "Female")
|
|
if(3)
|
|
R.fields["age"] = rand(5, 85)
|
|
if(4)
|
|
R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Parolled", "Released")
|
|
if(5)
|
|
R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit")
|
|
if(PDA_Manifest.len)
|
|
PDA_Manifest.Cut()
|
|
if(6)
|
|
R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
|
|
continue
|
|
|
|
else if(prob(1))
|
|
qdel(R)
|
|
continue
|
|
|
|
..(severity)
|
|
|
|
/obj/machinery/computer3/secure_data/detective_computer
|
|
icon = 'icons/obj/computer.dmi'
|
|
icon_state = "messyfiles"
|