diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index e2e25b07a80..09081948d13 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -343,4 +343,9 @@ proc/listclearnulls(list/list) for(var/T in L) if(istype(T, type)) i++ - return i \ No newline at end of file + return i + +/proc/find_record(field, value, list/L) + for(var/datum/data/record/R in L) + if(R.fields[field] == value) + return R \ No newline at end of file diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 31bbd631c65..9d4cfcb870b 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -252,10 +252,8 @@ Turf and target are seperate in case you want to teleport some distance from a t if(oldname) //update the datacore records! This is goig to be a bit costly. for(var/list/L in list(data_core.general,data_core.medical,data_core.security,data_core.locked)) - for(var/datum/data/record/R in L) - if(R.fields["name"] == oldname) - R.fields["name"] = newname - break + var/datum/data/record/R = find_record("name", oldname, L) + if(R) R.fields["name"] = newname //update our pda and id if we have them on our person var/list/searching = GetAllContents(searchDepth = 3) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 32cd3ab752a..9fc8ff1b449 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -8,18 +8,11 @@ return /obj/effect/datacore/proc/manifest_modify(var/name, var/assignment) - var/datum/data/record/foundrecord - - for(var/datum/data/record/t in data_core.general) - if(t.fields["name"] == name) - foundrecord = t - break - + var/datum/data/record/foundrecord = find_record("name", name, data_core.general) if(foundrecord) foundrecord.fields["rank"] = assignment - - +var/record_id_num = 1001 /obj/effect/datacore/proc/manifest_inject(var/mob/living/carbon/human/H) if(H.mind && (H.mind.assigned_role != "MODE")) var/assignment @@ -30,8 +23,9 @@ else assignment = "Unassigned" - var/id = num2hex(rand(1, 1.6777215E7),6) //this was the best they could come up with? A large random number? *sigh* + var/id = num2hex(record_id_num++,6) + //These records should ~really~ be merged or something //General Record var/datum/data/record/G = new() G.fields["id"] = id @@ -75,9 +69,9 @@ //Locked Record var/datum/data/record/L = new() - L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]") + L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]") //surely this should just be id, like the others? L.fields["name"] = H.real_name - L.fields["rank"] = H.mind.assigned_role + L.fields["rank"] = H.mind.assigned_role L.fields["age"] = H.age L.fields["sex"] = H.gender L.fields["blood_type"] = H.blood_type diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index ab1a52bf30f..fe4dcef4cfa 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -119,6 +119,7 @@ icon = 'icons/obj/items.dmi' icon_state = "bike_horn" item_state = "bike_horn" + hitsound = 'sound/items/bikehorn.ogg' throwforce = 3 w_class = 1.0 throw_speed = 3 diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 60c96808798..ab31e0c44f8 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -240,12 +240,6 @@ proc/process_ghost_teleport_locs() /area/shuttle/prison/ name = "\improper Prison Shuttle" -/area/shuttle/prison/station - icon_state = "shuttle" - -/area/shuttle/prison/prison - icon_state = "shuttle2" - /area/shuttle/specops/centcom name = "\improper Special Ops Shuttle" icon_state = "shuttlered" @@ -1517,7 +1511,6 @@ var/list/the_station_areas = list ( /area/shuttle/mining/station, /area/shuttle/transport1/station, // /area/shuttle/transport2/station, //not present on map - /area/shuttle/prison/station, /area/shuttle/specops/station, /area/atmos, /area/maintenance, @@ -1547,4 +1540,4 @@ var/list/the_station_areas = list ( /area/turret_protected/ai_upload, //do not try to simplify to "/area/turret_protected" --rastaf0 /area/turret_protected/ai_upload_foyer, /area/turret_protected/ai, -) \ No newline at end of file +) diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 5271378738a..a3d1aad72b6 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -10,7 +10,7 @@ var/list/blob_nodes = list() name = "blob" config_tag = "blob" - required_players = 15 + required_players = 30 restricted_jobs = list("Cyborg", "AI") @@ -21,8 +21,9 @@ var/list/blob_nodes = list() var/cores_to_spawn = 1 var/players_per_core = 30 + var/blob_point_rate = 3 - var/blobwincount = 500 + var/blobwincount = 350 var/list/infected_crew = list() @@ -89,7 +90,7 @@ var/list/blob_nodes = list() if(blob_client && location) - var/obj/effect/blob/core/core = new(location, 200, blob_client, 2) + var/obj/effect/blob/core/core = new(location, 200, blob_client, blob_point_rate) if(core.overmind && core.overmind.mind) core.overmind.mind.name = blob.name infected_crew -= blob @@ -151,12 +152,6 @@ var/list/blob_nodes = list() switch(stage) if (0) send_intercept(1) - for (var/mob/living/silicon/ai/aiPlayer in living_mob_list) - if (aiPlayer.client) - var/law = "The station is under quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving. NanoTrasen will not send an emergency shuttle under any circumstances." - //var/law = "The station is under quarantine. The biohazard must be destroyed at all costs and must not be allowed to spread. Anyone using a space suit for any reason other than to destroy the biohazard is to be terminated. NanoTrasen will not send an emergency shuttle under any circumstances." - aiPlayer.set_zeroth_law(law) - aiPlayer << "Laws Updated: [law]" declared = 1 return diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index 8f403e32f4f..a01a40df21c 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -7,9 +7,9 @@ var/mob/camera/blob/overmind = null // the blob core's overmind var/overmind_get_delay = 0 // we don't want to constantly try to find an overmind, do it every 30 seconds var/resource_delay = 0 - var/point_rate = 1 + var/point_rate = 2 - New(loc, var/h = 200, var/client/new_overmind = null, var/new_rate = 1) + New(loc, var/h = 200, var/client/new_overmind = null, var/new_rate = 2) blob_cores += src processing_objects.Add(src) if(!overmind) diff --git a/code/game/gamemodes/blob/blobs/resource.dm b/code/game/gamemodes/blob/blobs/resource.dm index 1ecf63aa80d..340f4344284 100644 --- a/code/game/gamemodes/blob/blobs/resource.dm +++ b/code/game/gamemodes/blob/blobs/resource.dm @@ -18,7 +18,7 @@ if(resource_delay > world.time) return 0 - resource_delay = world.time + 10 // 1 second + resource_delay = world.time + 40 // 4 seconds if(overmind) overmind.add_points(1) diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index 828c3b86e4e..995cfed91fb 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -5,7 +5,7 @@ icon_state = "marker" see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO + see_invisible = SEE_INVISIBLE_MINIMUM invisibility = INVISIBILITY_OBSERVER pass_flags = PASSBLOB diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 3528dde7668..75b333f6522 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -66,7 +66,7 @@ /mob/camera/blob/verb/create_resource() set category = "Blob" - set name = "Create Resource Blob (50)" + set name = "Create Resource Blob (40)" set desc = "Create a resource tower which will generate points for you." @@ -85,11 +85,11 @@ src << "Unable to use this blob, find a normal one." return - for(var/obj/effect/blob/resource/blob in orange(3)) - src << "There is a resource blob nearby, move more than 3 tiles away from it!" + for(var/obj/effect/blob/resource/blob in orange(4)) + src << "There is a resource blob nearby, move more than 4 tiles away from it!" return - if(!can_buy(50)) + if(!can_buy(40)) return diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index cd8b537e2b3..417c1ee0b4d 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -17,6 +17,8 @@ src.dir = pick(1, 2, 4, 8) src.update_icon() ..(loc) + for(var/atom/A in loc) + A.blob_act() return diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 816c5eae8a2..4188f137dfb 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -416,18 +416,10 @@ proc/get_all_job_icons() //For all existing HUD icons /proc/get_all_centcom_jobs() return list("VIP Guest","Custodian","Thunderdome Overseer","Centcom Official","Medical Officer","Death Commando","Research Officer","Special Ops Officer","Admiral","Centcom Commander") -/obj/proc/GetJobName() //Used in secHUD icon generation - if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id)) - return - - var/jobName - - if(istype(src, /obj/item/device/pda)) - if(src:id) - jobName = src:id:assignment - if(istype(src, /obj/item/weapon/card/id)) - jobName = src:assignment - +/obj/item/proc/GetJobName() //Used in secHUD icon generation + var/obj/item/weapon/card/id/I = GetID() + if(!I) return + var/jobName = I.assignment if(jobName in get_all_job_icons()) //Check if the job has a hud icon return jobName if(jobName in get_all_centcom_jobs()) //Return with the NT logo if it is a Centcom job diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index 6ef2df78f21..3ba51076e7f 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -715,19 +715,11 @@ Auto Patrol: []"}, if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag)) threatcount += 2 - if(src.check_records) - for (var/datum/data/record/E in data_core.general) - var/perpname = perp.name - if(perp.wear_id) - var/obj/item/weapon/card/id/id = perp.wear_id.GetID() - if(id) - perpname = id.registered_name - - if(E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) - if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) - threatcount = 4 - break + if(check_records) //check if they are set to *Arrest* on records + var/perpname = perp.get_face_name(perp.get_id_name()) + var/datum/data/record/R = find_record("name", perpname, data_core.security) + if(!R || (R.fields["criminal"] == "*Arrest*")) + threatcount += 4 if((src.idcheck) && (src.allowed(perp)) && !(src.lasercolor)) threatcount = 0//Corrupt cops cannot exist beep boop diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm index 15b484f1b7b..972549eb159 100644 --- a/code/game/machinery/bots/secbot.dm +++ b/code/game/machinery/bots/secbot.dm @@ -628,19 +628,11 @@ Auto Patrol: []"}, if(perp.wear_id && istype(perp:wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) threatcount -= 2 - if(src.check_records) - for (var/datum/data/record/E in data_core.general) - var/perpname = perp.name - if(perp.wear_id) - var/obj/item/weapon/card/id/id = perp.wear_id.GetID() - if(id) - perpname = id.registered_name - - if(E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) - if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) - threatcount = 4 - break + if(check_records) //check if they are set to *Arrest* on records + var/perpname = perp.get_face_name(perp.get_id_name()) + var/datum/data/record/R = find_record("name", perpname, data_core.security) + if(!R || (R.fields["criminal"] == "*Arrest*")) + threatcount += 4 return threatcount diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index a009273ba4b..a8aeeb7668f 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -104,16 +104,11 @@ user.set_machine(src) var/dat - if (!( ticker )) - return + if(!ticker) return if (mode == 1) // accessing crew manifest var/crew = "" - var/list/L = list() - for (var/datum/data/record/t in data_core.general) - var/R = t.fields["name"] + " - " + t.fields["rank"] - L += R - for(var/R in sortList(L)) - crew += "[R]
" + for(var/datum/data/record/t in sortRecord(data_core.general)) + crew += t.fields["name"] + " - " + t.fields["rank"] + "
" dat = "Crew Manifest:
Please use security record computer to modify entries.

[crew]Print

Access ID modification console.
" else if(mode == 2) @@ -407,12 +402,8 @@ sleep(50) var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( loc ) var/t1 = "Crew Manifest:
" - var/list/L = list() - for (var/datum/data/record/t in data_core.general) - var/R = t.fields["name"] + " - " + t.fields["rank"] - L += R - for(var/R in sortList(L)) - t1 += "[R]
" + for(var/datum/data/record/t in sortRecord(data_core.general)) + t1 += t.fields["name"] + " - " + t.fields["rank"] + "
" P.info = t1 P.name = "paper- 'Crew Manifest'" printing = null diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 94f48f4d9b0..63e0ccdc73e 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -140,8 +140,8 @@ if(2) dat += "

Current records

" dat += "<< Back

" - for(var/datum/data/record/R in src.records) - dat += "

[R.fields["name"]]

Scan ID [R.fields["id"]] View Record" + for(var/datum/data/record/R in records) + dat += "

[R.fields["name"]]

Scan ID [R.fields["id"]] View Record" if(3) dat += "

Selected Record

" dat += "<< Back
" @@ -150,7 +150,7 @@ dat += "Record not found." else dat += "

[src.active_record.fields["name"]]

" - dat += "Scan ID [src.active_record.fields["id"]] Clone
" + dat += "Scan ID [src.active_record.fields["id"]] Clone
" var/obj/item/weapon/implant/health/H = locate(src.active_record.fields["imp"]) @@ -226,16 +226,16 @@ else src.scanner.locked = 0 - else if (href_list["view_rec"]) - src.active_record = locate(href_list["view_rec"]) - if(istype(src.active_record,/datum/data/record)) - if (!active_record.fields["ckey"]) - del(src.active_record) + else if(href_list["view_rec"]) + src.active_record = find_record("id", href_list["view_rec"], records) + if(active_record) + if(!active_record.fields["ckey"]) + records -= active_record + active_record = null src.temp = "Record Corrupt" else src.menu = 3 else - src.active_record = null src.temp = "Record missing." else if (href_list["del_rec"]) @@ -250,8 +250,8 @@ if (istype(C)||istype(C, /obj/item/device/pda)) if(src.check_access(C)) src.temp = "[src.active_record.fields["name"]] => Record deleted." - src.records.Remove(src.active_record) - del(src.active_record) + src.records.Remove(active_record) + active_record = null src.menu = 2 else src.temp = "Access Denied." @@ -290,9 +290,9 @@ src.updateUsrDialog() else if (href_list["clone"]) - var/datum/data/record/C = locate(href_list["clone"]) + var/datum/data/record/C = find_record("id", href_list["clone"], records) //Look for that player! They better be dead! - if(istype(C)) + if(C) //Can't clone without someone to clone. Or a pod. Or if the pod is busy. Or full of gibs. if(!pod1) temp = "No Clonepod detected." @@ -305,7 +305,8 @@ else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"])) temp = "[C.fields["name"]] => Cloning cycle in progress..." records.Remove(C) - del(C) + if(active_record == C) + active_record = null menu = 1 else temp = "[C.fields["name"]] => Initialisation failure." @@ -336,11 +337,11 @@ if (NOCLONE in subject.mutations) scantemp = "Mental interface failure." return - if (!isnull(find_record(subject.ckey))) + if (find_record("ckey", subject.ckey, records)) scantemp = "Subject already in database." return - var/datum/data/record/R = new /datum/data/record() + var/datum/data/record/R = new() if(subject.dna) R.fields["mrace"] = subject.dna.mutantrace else @@ -355,7 +356,7 @@ //Add an implant if needed var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject) - if (isnull(imp)) + if(!imp) imp = new /obj/item/weapon/implant/health(subject) imp.implanted = subject R.fields["imp"] = "\ref[imp]" @@ -369,15 +370,6 @@ src.records += R scantemp = "Subject successfully scanned." -//Find a specific record by key. -/obj/machinery/computer/cloning/proc/find_record(var/find_key) - var/selected_record = null - for(var/datum/data/record/R in src.records) - if (R.fields["ckey"] == find_key) - selected_record = R - break - return selected_record - /obj/machinery/computer/cloning/update_icon() if(stat & BROKEN) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index ff0e2a25da4..0598cc4d0d2 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -432,9 +432,6 @@ dat += "
\[ [(src.aistate != STATE_DEFAULT) ? "Main Menu | " : ""]Close \]" return dat -/proc/enable_prison_shuttle(var/mob/user) - for(var/obj/machinery/computer/prison_shuttle/PS in world) - PS.allowedtocall = !(PS.allowedtocall) /proc/call_shuttle_proc(var/mob/user) if ((!( ticker ) || emergency_shuttle.location)) diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 98ccb3990fa..1053e006a5e 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -10,8 +10,8 @@ var/authenticated = null var/rank = null var/screen = null - var/datum/data/record/active1 = null - var/datum/data/record/active2 = null + var/datum/data/record/active1 + var/datum/data/record/active2 var/a_id = null var/temp = null var/printing = null @@ -45,20 +45,20 @@ "} if(2.0) dat += "Record List:
" - if(!isnull(data_core.general)) + if(data_core.general) for(var/datum/data/record/R in sortRecord(data_core.general)) - dat += text("[]: []
", src, R, R.fields["id"], R.fields["name"]) + dat += "
[R.fields["id"]]: [R.fields["name"]]
" //Foreach goto(132) dat += text("
Back", src) if(3.0) dat += text("Records Maintenance
\nBackup To Disk
\nUpload From disk
\nDelete All Records
\n
\nBack", src, src, src, src) if(4.0) dat += "
Medical Record

" - if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) + if(active1 in data_core.general) dat += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src, src.active1.fields["sex"], src, src.active1.fields["age"], src, src.active1.fields["fingerprint"], src, src.active1.fields["p_stat"], src, src.active1.fields["m_stat"]) else dat += "General Record Lost!
" - if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) + if(active2 in data_core.medical) dat += text("
\n
Medical Data

\nBlood Type: []
\nDNA: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\n
Comments/Log

", src, src.active2.fields["blood_type"], src, src.active2.fields["b_dna"], src, src.active2.fields["mi_dis"], src, src.active2.fields["mi_dis_d"], src, src.active2.fields["ma_dis"], src, src.active2.fields["ma_dis_d"], src, src.active2.fields["alg"], src, src.active2.fields["alg_d"], src, src.active2.fields["cdi"], src, src.active2.fields["cdi_d"], src, src.active2.fields["notes"]) var/counter = 1 while(src.active2.fields[text("com_[]", counter)]) @@ -114,10 +114,11 @@ /obj/machinery/computer/med_data/Topic(href, href_list) if(..()) return - if (!( data_core.general.Find(src.active1) )) + if(!(active1 in data_core.general)) src.active1 = null - if (!( data_core.medical.Find(src.active2) )) + if(!(active2 in data_core.medical)) src.active2 = null + if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) usr.set_machine(src) if (href_list["temp"]) @@ -161,7 +162,7 @@ src.active1 = null src.active2 = null - if(href_list["vir"]) + else if(href_list["vir"]) var/type = href_list["vir"] var/datum/disease/Dis = new type(0) var/AfS = "" @@ -177,111 +178,108 @@

Severity: [Dis.severity]"} - if (href_list["del_all"]) + else if (href_list["del_all"]) src.temp = text("Are you sure you wish to delete all records?
\n\tYes
\n\tNo
", src, src) - if (href_list["del_all2"]) - for(var/datum/data/record/R in data_core.medical) - //R = null - del(R) - //Foreach goto(494) + else if (href_list["del_all2"]) + data_core.medical.Cut() src.temp = "All records deleted." - if (href_list["field"]) + else if (href_list["field"]) var/a1 = src.active1 var/a2 = src.active2 switch(href_list["field"]) if("fingerprint") - if (istype(src.active1, /datum/data/record)) + if(active1) var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return src.active1.fields["fingerprint"] = t1 if("sex") - if (istype(src.active1, /datum/data/record)) + if(active1) if (src.active1.fields["sex"] == "Male") src.active1.fields["sex"] = "Female" else src.active1.fields["sex"] = "Male" if("age") - if (istype(src.active1, /datum/data/record)) + if(active1) var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as num if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return src.active1.fields["age"] = t1 if("mi_dis") - if (istype(src.active2, /datum/data/record)) + if(active2) var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["mi_dis"] = t1 if("mi_dis_d") - if (istype(src.active2, /datum/data/record)) + if(active2) var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["mi_dis_d"] = t1 if("ma_dis") - if (istype(src.active2, /datum/data/record)) + if(active2) var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["ma_dis"] = t1 if("ma_dis_d") - if (istype(src.active2, /datum/data/record)) + if(active2) var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["ma_dis_d"] = t1 if("alg") - if (istype(src.active2, /datum/data/record)) + if(active2) var/t1 = copytext(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["alg"] = t1 if("alg_d") - if (istype(src.active2, /datum/data/record)) + if(active2) var/t1 = copytext(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["alg_d"] = t1 if("cdi") - if (istype(src.active2, /datum/data/record)) + if(active2) var/t1 = copytext(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["cdi"] = t1 if("cdi_d") - if (istype(src.active2, /datum/data/record)) + if(active2) var/t1 = copytext(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["cdi_d"] = t1 if("notes") - if (istype(src.active2, /datum/data/record)) + if(active2) var/t1 = copytext(sanitize(input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["notes"] = t1 if("p_stat") - if (istype(src.active1, /datum/data/record)) + if(active1) src.temp = text("Physical Condition:
\n\t*Deceased*
\n\t*Unconscious*
\n\tActive
\n\tPhysically Unfit
", src, src, src, src) if("m_stat") - if (istype(src.active1, /datum/data/record)) + if(active1) src.temp = text("Mental Condition:
\n\t*Insane*
\n\t*Unstable*
\n\t*Watch*
\n\tStable
", src, src, src, src) if("blood_type") - if (istype(src.active2, /datum/data/record)) + if(active2) src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src) if("b_dna") - if (istype(src.active1, /datum/data/record)) + if(active1) var/t1 = copytext(sanitize(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return src.active1.fields["dna"] = t1 else - if (href_list["p_stat"]) - if (src.active1) + else if (href_list["p_stat"]) + if(active1) switch(href_list["p_stat"]) if("deceased") src.active1.fields["p_stat"] = "*Deceased*" @@ -292,8 +290,8 @@ if("unfit") src.active1.fields["p_stat"] = "Physically Unfit" - if (href_list["m_stat"]) - if (src.active1) + else if (href_list["m_stat"]) + if(active1) switch(href_list["m_stat"]) if("insane") src.active1.fields["m_stat"] = "*Insane*" @@ -305,8 +303,8 @@ src.active1.fields["m_stat"] = "Stable" - if (href_list["blood_type"]) - if (src.active2) + else if (href_list["blood_type"]) + if(active2) switch(href_list["blood_type"]) if("an") src.active2.fields["blood_type"] = "A-" @@ -326,31 +324,24 @@ src.active2.fields["blood_type"] = "O+" - if (href_list["del_r"]) - if (src.active2) + else if (href_list["del_r"]) + if(active2) src.temp = text("Are you sure you wish to delete the record (Medical Portion Only)?
\n\tYes
\n\tNo
", src, src) - if (href_list["del_r2"]) - if (src.active2) - //src.active2 = null - del(src.active2) + else if (href_list["del_r2"]) + if(active2) + data_core.medical -= active2 + active2 = null - if (href_list["d_rec"]) - var/datum/data/record/R = locate(href_list["d_rec"]) - var/datum/data/record/M = locate(href_list["d_rec"]) - if (!( data_core.general.Find(R) )) - src.temp = "Record Not Found!" - return - for(var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - M = E - else - //Foreach continue //goto(2540) - src.active1 = R - src.active2 = M - src.screen = 4 + else if (href_list["d_rec"]) + active1 = find_record("id", href_list["d_rec"], data_core.general) + if(active1) + active2 = find_record("id", href_list["d_rec"], data_core.medical) + if(!active2) + active1 = null + screen = 4 - if (href_list["new"]) + else if (href_list["new"]) if ((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) ))) var/datum/data/record/R = new /datum/data/record( ) R.fields["name"] = src.active1.fields["name"] @@ -371,8 +362,8 @@ src.active2 = R src.screen = 4 - if (href_list["add_c"]) - if (!( istype(src.active2, /datum/data/record) )) + else if (href_list["add_c"]) + if(!(active2 in data_core.medical)) return var/a2 = src.active2 var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN) @@ -383,11 +374,11 @@ counter++ src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053
[]", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1) - if (href_list["del_c"]) + else if (href_list["del_c"]) if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) src.active2.fields[text("com_[]", href_list["del_c"])] = "Deleted" - if (href_list["search"]) + else if (href_list["search"]) var/t1 = input("Search String: (Name, DNA, or ID)", "Med. records", null, null) as text if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || ((!in_range(src, usr)) && (!istype(usr, /mob/living/silicon))))) return @@ -409,17 +400,17 @@ //Foreach continue //goto(3334) src.screen = 4 - if (href_list["print_p"]) + else if (href_list["print_p"]) if (!( src.printing )) src.printing = 1 sleep(50) var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc ) P.info = "
Medical Record

" - if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) + if(active1 in data_core.general) P.info += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"], src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"]) else P.info += "General Record Lost!
" - if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) + if(active2 in data_core.medical) P.info += text("
\n
Medical Data

\nBlood Type: []
\nDNA: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\n
Comments/Log

", src.active2.fields["blood_type"], src.active2.fields["b_dna"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"]) var/counter = 1 while(src.active2.fields[text("com_[]", counter)]) diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 1f16e74b83c..b2ff68a8738 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -42,14 +42,20 @@ dat += "********************************
" dat += "
Tracking Implants
" for(var/obj/item/weapon/implant/tracking/T in world) + if(!iscarbon(T.imp_in)) + continue + if(!T.implanted) + continue Tr = get_turf(T) - if((Tr) && (Tr.z != src.z)) continue//Out of range - if(!T.implanted) continue + if((Tr) && (Tr.z != src.z)) + continue//Out of range + var/loc_display = "Unknown" var/mob/living/carbon/M = T.imp_in - if(M.z == 1 && !istype(M.loc, /turf/space)) + if(Tr.z == 1 && !istype(M.loc, /turf/space)) var/turf/mob_loc = get_turf(M) loc_display = mob_loc.loc + dat += "ID: [T.id] | Location: [loc_display]
" dat += "(Message Holder) |
" dat += "********************************
" diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm deleted file mode 100644 index ec6a1a19f22..00000000000 --- a/code/game/machinery/computer/prisonshuttle.dm +++ /dev/null @@ -1,242 +0,0 @@ -//Config stuff -#define PRISON_MOVETIME 150 //Time to station is milliseconds. -#define PRISON_STATION_AREATYPE "/area/shuttle/prison/station" //Type of the prison shuttle area for station -#define PRISON_DOCK_AREATYPE "/area/shuttle/prison/prison" //Type of the prison shuttle area for dock - -var/prison_shuttle_moving_to_station = 0 -var/prison_shuttle_moving_to_prison = 0 -var/prison_shuttle_at_station = 0 -var/prison_shuttle_can_send = 1 -var/prison_shuttle_time = 0 -var/prison_shuttle_timeleft = 0 - -/obj/machinery/computer/prison_shuttle - name = "Prison Shuttle Console" - icon = 'icons/obj/computer.dmi' - icon_state = "shuttle" - req_access = list(access_security) - circuit = "/obj/item/weapon/circuitboard/prison_shuttle" - var/temp = null - var/hacked = 0 - var/allowedtocall = 0 - var/prison_break = 0 - - - attackby(I as obj, user as mob) - return src.attack_hand(user) - - - attack_ai(var/mob/user as mob) - return src.attack_hand(user) - - - attack_paw(var/mob/user as mob) - return src.attack_hand(user) - - - attackby(I as obj, user as mob) - if(istype(I, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - var/obj/item/weapon/circuitboard/prison_shuttle/M = new /obj/item/weapon/circuitboard/prison_shuttle( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.anchored = 1 - - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - new /obj/item/weapon/shard( src.loc ) - A.state = 3 - A.icon_state = "3" - else - user << "\blue You disconnect the monitor." - A.state = 4 - A.icon_state = "4" - - del(src) - else if(istype(I,/obj/item/weapon/card/emag) && (!hacked)) - hacked = 1 - user << "\blue You disable the lock." - else - return src.attack_hand(user) - - - attack_hand(var/mob/user as mob) - if(!src.allowed(user) && (!hacked)) - user << "\red Access Denied." - return - if(prison_break) - user << "\red Unable to locate shuttle." - return - if(..()) - return - user.set_machine(src) - post_signal("prison") - var/dat - if (src.temp) - dat = src.temp - else - dat += {"Location: [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "Moving to station ([prison_shuttle_timeleft] Secs.)":prison_shuttle_at_station ? "Station":"Dock"]
- [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "\n*Shuttle already called*
\n
":prison_shuttle_at_station ? "\nSend to Dock
\n
":"\nSend to Station
\n
"] - \nClose"} - - //user << browse(dat, "window=computer;size=575x450") - //onclose(user, "computer") - var/datum/browser/popup = new(user, "computer", name, 575, 450) - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return - - - Topic(href, href_list) - if(..()) - return - - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.set_machine(src) - - if (href_list["sendtodock"]) - if (!prison_can_move()) - usr << "\red The prison shuttle is unable to leave." - return - if(!prison_shuttle_at_station|| prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return - post_signal("prison") - usr << "\blue The prison shuttle has been called and will arrive in [(PRISON_MOVETIME/10)] seconds." - src.temp += "Shuttle sent.

OK" - src.updateUsrDialog() - prison_shuttle_moving_to_prison = 1 - prison_shuttle_time = world.timeofday + PRISON_MOVETIME - spawn(0) - prison_process() - - else if (href_list["sendtostation"]) - if (!prison_can_move()) - usr << "\red The prison shuttle is unable to leave." - return - if(prison_shuttle_at_station || prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return - post_signal("prison") - usr << "\blue The prison shuttle has been called and will arrive in [(PRISON_MOVETIME/10)] seconds." - src.temp += "Shuttle sent.

OK" - src.updateUsrDialog() - prison_shuttle_moving_to_station = 1 - prison_shuttle_time = world.timeofday + PRISON_MOVETIME - spawn(0) - prison_process() - - else if (href_list["mainmenu"]) - src.temp = null - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - - proc/prison_can_move() - if(prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return 0 - else return 1 - -/* - proc/prison_break() - switch(prison_break) - if (0) - if(!prison_shuttle_at_station || prison_shuttle_moving_to_prison) return - - prison_shuttle_moving_to_prison = 1 - prison_shuttle_at_station = prison_shuttle_at_station - - if (!prison_shuttle_moving_to_prison || !prison_shuttle_moving_to_station) - prison_shuttle_time = world.timeofday + PRISON_MOVETIME - spawn(0) - prison_process() - prison_break = 1 - if(1) - prison_break = 0 -*/ - - proc/post_signal(var/command) - var/datum/radio_frequency/frequency = radio_controller.return_frequency(1311) - if(!frequency) return - var/datum/signal/status_signal = new - status_signal.source = src - status_signal.transmission_method = 1 - status_signal.data["command"] = command - frequency.post_signal(src, status_signal) - return - - - proc/prison_process() - while(prison_shuttle_time - world.timeofday > 0) - var/ticksleft = prison_shuttle_time - world.timeofday - - if(ticksleft > 1e5) - prison_shuttle_time = world.timeofday + 10 // midnight rollover - - prison_shuttle_timeleft = (ticksleft / 10) - sleep(5) - prison_shuttle_moving_to_station = 0 - prison_shuttle_moving_to_prison = 0 - - switch(prison_shuttle_at_station) - - if(0) - prison_shuttle_at_station = 1 - if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return - - if (!prison_can_move()) - usr << "\red The prison shuttle is unable to leave." - return - - var/area/start_location = locate(/area/shuttle/prison/prison) - var/area/end_location = locate(/area/shuttle/prison/station) - - var/list/dstturfs = list() - var/throwy = world.maxy - - for(var/turf/T in end_location) - dstturfs += T - if(T.y < throwy) - throwy = T.y - // hey you, get out of the way! - for(var/turf/T in dstturfs) - // find the turf to move things to - var/turf/D = locate(T.x, throwy - 1, 1) - //var/turf/E = get_step(D, SOUTH) - for(var/atom/movable/AM as mob|obj in T) - AM.Move(D) - if(istype(T, /turf/simulated)) - del(T) - start_location.move_contents_to(end_location) - - if(1) - prison_shuttle_at_station = 0 - if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return - - if (!prison_can_move()) - usr << "\red The prison shuttle is unable to leave." - return - - var/area/start_location = locate(/area/shuttle/prison/station) - var/area/end_location = locate(/area/shuttle/prison/prison) - - var/list/dstturfs = list() - var/throwy = world.maxy - - for(var/turf/T in end_location) - dstturfs += T - if(T.y < throwy) - throwy = T.y - - // hey you, get out of the way! - for(var/turf/T in dstturfs) - // find the turf to move things to - var/turf/D = locate(T.x, throwy - 1, 1) - //var/turf/E = get_step(D, SOUTH) - for(var/atom/movable/AM as mob|obj in T) - AM.Move(D) - if(istype(T, /turf/simulated)) - del(T) - start_location.move_contents_to(end_location) - return \ No newline at end of file diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 5497b39ad3e..fe8eb1a23b4 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -154,7 +154,7 @@ /obj/machinery/door/window/hitby(AM as mob|obj) ..() - visible_message("\red The glass door was hit by [AM].", 1) + visible_message("\red The glass door was hit by [AM].") var/tforce = 0 if(ismob(AM)) tforce = 40 @@ -175,7 +175,7 @@ return src.health = max(0, src.health - 25) playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) - visible_message("\red [user] smashes against the [src.name].", 1) + visible_message("\red [user] smashes against the [src.name].") if (src.health <= 0) new /obj/item/weapon/shard(src.loc) var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src.loc) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 0c2a6ed6b07..0baa0912377 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -552,18 +552,10 @@ threatcount += 2 if(check_records) //if the turret can check the records, check if they are set to *Arrest* on records - for(var/datum/data/record/E in data_core.general) - var/perpname = perp.name - if(perp.wear_id) - var/obj/item/weapon/card/id/id = perp.wear_id.GetID() - if(id) - perpname = id.registered_name - - if(E.fields["name"] == perpname) - for(var/datum/data/record/R in data_core.security) - if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) - threatcount = 4 - break + var/perpname = perp.get_face_name(perp.get_id_name()) + var/datum/data/record/R = find_record("name", perpname, data_core.security) + if(!R || (R.fields["criminal"] == "*Arrest*")) + threatcount += 4 return threatcount diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 679cc820eff..1d25992d125 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -58,7 +58,7 @@ return /obj/item/blob_act() - return + del(src) //user: The mob that is suiciding //damagetype: The type of damage the item will inflict on the user diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index bcb0becb287..6b947bedfed 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -273,7 +273,7 @@ Code: menu = "

Crew Manifest

" menu += "Entries cannot be modified from this terminal.

" - if(!isnull(data_core.general)) + if(data_core.general) for (var/datum/data/record/t in sortRecord(data_core.general)) menu += "[t.fields["name"]] - [t.fields["rank"]]
" menu += "
" @@ -347,14 +347,14 @@ Code: if (44) //medical records //This thing only displays a single screen so it's hard to really get the sub-menu stuff working. menu = "

Medical Record List

" - if(!isnull(data_core.general)) - for (var/datum/data/record/R in sortRecord(data_core.general)) - menu += "[R.fields["id"]]: [R.fields["name"]]
" + if(data_core.general) + for(var/datum/data/record/R in sortRecord(data_core.general)) + menu += "
[R.fields["id"]]: [R.fields["name"]]
" menu += "
" if(441) menu = "

Medical Record

" - if (istype(active1, /datum/data/record) && (active1 in data_core.general)) + if(active1 in data_core.general) menu += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]
" menu += "Sex: [active1.fields["sex"]]
" menu += "Age: [active1.fields["age"]]
" @@ -368,7 +368,7 @@ Code: menu += "
" menu += "

Medical Data

" - if (istype(active2, /datum/data/record) && (active2 in data_core.medical)) + if(active2 in data_core.medical) menu += "Blood Type: [active2.fields["blood_type"]]

" menu += "Minor Disabilities: [active2.fields["mi_dis"]]
" @@ -390,15 +390,15 @@ Code: menu += "
" if (45) //security records menu = "

Security Record List

" - if(!isnull(data_core.general)) + if(data_core.general) for (var/datum/data/record/R in sortRecord(data_core.general)) - menu += "
[R.fields["id"]]: [R.fields["name"]]
" + menu += "
[R.fields["id"]]: [R.fields["name"]]
" menu += "
" if(451) menu = "

Security Record

" - if (istype(active1, /datum/data/record) && (active1 in data_core.general)) + if(active1 in data_core.general) menu += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]
" menu += "Sex: [active1.fields["sex"]]
" menu += "Age: [active1.fields["age"]]
" @@ -412,7 +412,7 @@ Code: menu += "
" menu += "

Security Data

" - if (istype(active3, /datum/data/record) && (active3 in data_core.security)) + if(active3 in data_core.security) menu += "Criminal Status: [active3.fields["criminal"]]
" menu += "Minor Crimes: [active3.fields["mi_crim"]]
" @@ -624,30 +624,22 @@ Code: switch(href_list["choice"]) if("Medical Records") - var/datum/data/record/R = locate(href_list["target"]) - var/datum/data/record/M = locate(href_list["target"]) + active1 = find_record("id", href_list["target"], data_core.general) + if(active1) + active2 = find_record("id", href_list["target"], data_core.medical) loc:mode = 441 mode = 441 - if (R in data_core.general) - for (var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - M = E - break - active1 = R - active2 = M + if(!active2) + active1 = null if("Security Records") - var/datum/data/record/R = locate(href_list["target"]) - var/datum/data/record/S = locate(href_list["target"]) + active1 = find_record("id", href_list["target"], data_core.general) + if(active1) + active3 = find_record("id", href_list["target"], data_core.security) loc:mode = 451 mode = 451 - if (R in data_core.general) - 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 - break - active1 = R - active3 = S + if(!active3) + active1 = null if("Send Signal") spawn( 0 ) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 1a0ffa821f6..ba3f735f151 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -262,11 +262,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use // --- Human: use their job as seen on the crew manifest - makes it unneeded to carry an ID for an AI to see their job if (ishuman(M)) var/voice = M.GetVoice() // Why reinvent the wheel when there is a proc that does nice things already - var/datum/data/record/findjob - for (var/datum/data/record/t in data_core.general) - if(t.fields["name"] == voice) - findjob = t - break + var/datum/data/record/findjob = find_record("name", voice, data_core.general) if(voice != real_name) displayname = voice diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 88a5572fd2d..ad5aa43c8a0 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -11,6 +11,7 @@ heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall var/walltype = "metal" + var/hardness = 40 //lower numbers are harder. Used to determine the probability of a hulk smashing through. /turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0) if(istype(src,/turf/simulated/wall/r_wall)) @@ -89,7 +90,7 @@ /turf/simulated/wall/attack_paw(mob/user as mob) if ((HULK in user.mutations)) - if (prob(40)) + if (prob(hardness)) usr << text("\blue You smash through the wall.") usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) dismantle_wall(1) @@ -120,7 +121,7 @@ /turf/simulated/wall/attack_hand(mob/user as mob) if (HULK in user.mutations) - if (prob(40)) + if (prob(hardness)) usr << text("\blue You smash through the wall.") usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) dismantle_wall(1) diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 6e58836c3f0..057162717f3 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -8,24 +8,7 @@ walltype = "rwall" var/d_state = 0 - -/turf/simulated/wall/r_wall/attack_hand(mob/user as mob) - if (HULK in user.mutations) - if (prob(10)) - usr << text("\blue You smash through the wall.") - usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - dismantle_wall(1) - return - else - usr << text("\blue You punch the wall.") - return - - user << "\blue You push the wall but nothing happens!" - playsound(src, 'sound/weapons/Genhit.ogg', 25, 1) - src.add_fingerprint(user) - ..() - return - + hardness = 10 /turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index d0e4d15b2ba..fe69df3e180 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2082,7 +2082,7 @@ var/dat = "Showing Crew Manifest.
" dat += "" for(var/datum/data/record/t in data_core.general) - dat += text("", t.fields["name"], t.fields["rank"]) + dat += "" dat += "
NamePosition
[][]
[t.fields["name"]][t.fields["rank"]]
" usr << browse(dat, "window=manifest;size=440x410") if("DNA") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index ab0ebf2bf1a..eaf3c7386ab 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -16,32 +16,6 @@ message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1) feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cmd_admin_prison(mob/M as mob in mob_list) - set category = "Admin" - set name = "Prison" - if(!holder) - src << "Only administrators may use this command." - return - if (ismob(M)) - if(istype(M, /mob/living/silicon/ai)) - alert("The AI can't be sent to prison you jerk!", null, null, null, null, null) - return - //strip their stuff before they teleport into a cell :downs: - for(var/obj/item/W in M) - M.drop_from_inventory(W) - //teleport person to cell - M.Paralyse(5) - sleep(5) //so they black out before warping - M.loc = pick(prisonwarp) - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/prisoner = M - prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), slot_w_uniform) - prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes) - spawn(50) - M << "\red You have been sent to the prison station!" - log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.") - message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1) - feedback_add_details("admin_verb","PRISON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_subtle_message(mob/M as mob in mob_list) set category = "Special Verbs" @@ -295,10 +269,8 @@ Traitors and the like can also be revived with the previous role mostly intact. /*Try and locate a record for the person being respawned through data_core. This isn't an exact science but it does the trick more often than not.*/ var/id = md5("[G_found.real_name][G_found.mind.assigned_role]") - for(var/datum/data/record/t in data_core.locked) - if(t.fields["id"]==id) - record_found = t//We shall now reference the record. - break + + record_found = find_record("id", id, data_core.locked) if(record_found)//If they have a record we can determine a few things. new_character.real_name = record_found.fields["name"] diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 1561bf2ab0d..ca72119dc57 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -104,55 +104,38 @@ var/client/C = M.client var/image/holder for(var/mob/living/carbon/human/perp in view(M)) - if(!C) continue - var/perpname = "wot" holder = perp.hud_list[ID_HUD] + holder.icon_state = "hudno_id" if(perp.wear_id) - var/obj/item/weapon/card/id/I = perp.wear_id.GetID() - if(I) - perpname = I.registered_name - holder.icon_state = "hud[ckey(I.GetJobName())]" - C.images += holder - else - perpname = perp.name - holder.icon_state = "hudno_id" - C.images += holder - else - perpname = perp.name - holder.icon_state = "hudno_id" - C.images += holder + holder.icon_state = "hud[ckey(perp.wear_id.GetJobName())]" + C.images += holder + - for(var/datum/data/record/E in data_core.general) - if(E.fields["name"] == perpname) - holder = perp.hud_list[WANTED_HUD] - for (var/datum/data/record/R in data_core.security) - if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) - holder.icon_state = "hudwanted" - C.images += holder - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated")) - holder.icon_state = "hudincarcerated" - C.images += holder - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled")) - holder.icon_state = "hudparolled" - C.images += holder - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released")) - holder.icon_state = "hudreleased" - C.images += holder - break for(var/obj/item/weapon/implant/I in perp) if(I.implanted) if(istype(I,/obj/item/weapon/implant/tracking)) holder = perp.hud_list[IMPTRACK_HUD] holder.icon_state = "hud_imp_tracking" - C.images += holder - if(istype(I,/obj/item/weapon/implant/loyalty)) + else if(istype(I,/obj/item/weapon/implant/loyalty)) holder = perp.hud_list[IMPLOYAL_HUD] holder.icon_state = "hud_imp_loyal" - C.images += holder - if(istype(I,/obj/item/weapon/implant/chem)) + else if(istype(I,/obj/item/weapon/implant/chem)) holder = perp.hud_list[IMPCHEM_HUD] holder.icon_state = "hud_imp_chem" - C.images += holder \ No newline at end of file + else + continue + C.images += holder + + var/perpname = perp.get_face_name(perp.get_id_name("")) + if(perpname) + var/datum/data/record/R = find_record("name", perpname, data_core.security) + if(R) + holder = perp.hud_list[WANTED_HUD] + switch(R.fields["criminal"]) + if("*Arrest*") holder.icon_state = "hudwanted" + if("Incarcerated") holder.icon_state = "hudincarcerated" + if("Parolled") holder.icon_state = "hudparolled" + if("Released") holder.icon_state = "hudreleased" + else + return + C.images += holder \ No newline at end of file diff --git a/code/modules/events/bluespaceanomaly.dm b/code/modules/events/bluespaceanomaly.dm index d6f57c81413..a2956717d2b 100644 --- a/code/modules/events/bluespaceanomaly.dm +++ b/code/modules/events/bluespaceanomaly.dm @@ -25,7 +25,6 @@ /area/shuttle/escape_pod5/station, /area/shuttle/mining/station, /area/shuttle/transport1/station, - /area/shuttle/prison/station, /area/shuttle/specops/station) //These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up. diff --git a/code/modules/events/energetic_flux.dm b/code/modules/events/energetic_flux.dm index d74ad5f5e60..fed6a5359ba 100644 --- a/code/modules/events/energetic_flux.dm +++ b/code/modules/events/energetic_flux.dm @@ -25,7 +25,6 @@ /area/shuttle/escape_pod5/station, /area/shuttle/mining/station, /area/shuttle/transport1/station, - /area/shuttle/prison/station, /area/shuttle/specops/station) //These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up. diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 4769ad663b9..218ba43dc48 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -133,11 +133,6 @@ proc/move_mining_shuttle() usr.set_machine(src) src.add_fingerprint(usr) if(href_list["move"]) - if(mining_shuttle_location == 1 && istype(ticker.mode, /datum/game_mode/blob)) // shuttle is on the station, this will mean miners can come back - if(ticker.mode:declared) - usr << "Under directive 7-10, [station_name()] is quarantined until further notice." - return - if (!mining_shuttle_moving) usr << "\blue Shuttle recieved message and will be sent shortly." move_mining_shuttle() diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index e292afcceed..608cef17e34 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -276,25 +276,13 @@ if(usr.stat || H != usr) //|| !usr.canmove || usr.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at. return //Non-fluff: This allows sec to set people to arrest as they get disarmed or beaten - var/perpname = "wot" var/criminal = "None" - if(wear_id) - var/obj/item/weapon/card/id/I = wear_id.GetID() - if(I) - perpname = I.registered_name - else - perpname = name - else - perpname = name - + var/perpname = H.get_face_name(H.get_id_name("")) if(perpname) - for (var/datum/data/record/E in data_core.general) - if(E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) - if(R.fields["id"] == E.fields["id"]) - criminal = R.fields["criminal"] - + var/datum/data/record/R = find_record("name", perpname, data_core.security) + if(R) + criminal = R.fields["criminal"] msg += "Criminal status:
\[[criminal]\]\n" //msg += "\[Set Hostile Identification\]\n" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index fa14e72d7b6..87125a22448 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -207,7 +207,7 @@ show_message("\red The blob attacks you!") var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") var/datum/limb/affecting = get_organ(ran_zone(dam_zone)) - apply_damage(rand(30,40), BRUTE, affecting, run_armor_check(affecting, "melee")) + apply_damage(rand(20,30), BRUTE, affecting, run_armor_check(affecting, "melee")) return /mob/living/carbon/human/meteorhit(O as obj) @@ -396,74 +396,68 @@ //gets assignment from ID or ID inside PDA or PDA itself //Useful when player do something with computers /mob/living/carbon/human/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job") - var/obj/item/device/pda/pda = wear_id - var/obj/item/weapon/card/id/id = wear_id - if (istype(pda)) - if (pda.id && istype(pda.id, /obj/item/weapon/card/id)) - . = pda.id.assignment - else - . = pda.ownjob - else if (istype(id)) + var/obj/item/weapon/card/id/id = get_idcard() + if(id) . = id.assignment else - return if_no_id - if (!.) - . = if_no_job - return + var/obj/item/device/pda/pda = wear_id + if(istype(pda)) + . = pda.ownjob + else + return if_no_id + if(!.) + return if_no_job //gets name from ID or ID inside PDA or PDA itself //Useful when player do something with computers /mob/living/carbon/human/proc/get_authentification_name(var/if_no_id = "Unknown") + var/obj/item/weapon/card/id/id = get_idcard() + if(id) + return id.registered_name var/obj/item/device/pda/pda = wear_id - var/obj/item/weapon/card/id/id = wear_id - if (istype(pda)) - if (pda.id) - . = pda.id.registered_name - else - . = pda.owner - else if (istype(id)) - . = id.registered_name - else - return if_no_id - return + if(istype(pda)) + return pda.owner + return if_no_id //repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere /mob/living/carbon/human/proc/get_visible_name() - if( wear_mask && (wear_mask.flags_inv&HIDEFACE) ) //Wearing a mask which hides our face, use id-name if possible - return get_id_name("Unknown") - if( head && (head.flags_inv&HIDEFACE) ) - return get_id_name("Unknown") //Likewise for hats - var/face_name = get_face_name() + var/face_name = get_face_name("") var/id_name = get_id_name("") - if(id_name && (id_name != face_name)) - return "[face_name] (as [id_name])" - return face_name + if(face_name) + if(id_name && (id_name != face_name)) + return "[face_name] (as [id_name])" + return face_name + if(id_name) + return id_name + return "Unknown" //Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable -/mob/living/carbon/human/proc/get_face_name() +/mob/living/carbon/human/proc/get_face_name(if_no_face="Unknown") + if( wear_mask && (wear_mask.flags_inv&HIDEFACE) ) //Wearing a mask which hides our face, use id-name if possible + return if_no_face + if( head && (head.flags_inv&HIDEFACE) ) + return if_no_face //Likewise for hats var/datum/limb/O = get_organ("head") if( (status_flags&DISFIGURED) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name ) //disfigured. use id-name if possible - return "Unknown" + return if_no_face return real_name //gets name from ID or PDA itself, ID inside PDA doesn't matter //Useful when player is being seen by other mobs /mob/living/carbon/human/proc/get_id_name(var/if_no_id = "Unknown") + var/obj/item/weapon/storage/wallet/wallet = wear_id var/obj/item/device/pda/pda = wear_id var/obj/item/weapon/card/id/id = wear_id - if(istype(pda)) . = pda.owner - else if(istype(id)) . = id.registered_name - if(!.) . = if_no_id //to prevent null-names making the mob unclickable + if(istype(wallet)) id = wallet.front_id + if(istype(id)) . = id.registered_name + else if(istype(pda)) . = pda.owner + if(!.) . = if_no_id //to prevent null-names making the mob unclickable return //gets ID card object from special clothes slot or null. /mob/living/carbon/human/proc/get_idcard() - var/obj/item/weapon/card/id/id = wear_id - var/obj/item/device/pda/pda = wear_id - if (istype(pda) && pda.id) - id = pda.id - if (istype(id)) - return id + if(wear_id) + return wear_id.GetID() //Added a safety check in case you want to shock a human mob directly through electrocute_act. /mob/living/carbon/human/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/safety = 0) @@ -535,31 +529,19 @@ var/modified = 0 - var/perpname = "wot" - if(wear_id) - var/obj/item/weapon/card/id/I = wear_id.GetID() - if(I) - perpname = I.registered_name - else - perpname = name - else - perpname = name - + var/perpname = H.get_face_name(H.get_id_name("")) if(perpname) - for (var/datum/data/record/E in data_core.general) - if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) - if (R.fields["id"] == E.fields["id"]) + var/datum/data/record/R = find_record("name", perpname, data_core.security) + if(R) + var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel") + if(R) + if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud)) + if(setcriminal != "Cancel") + R.fields["criminal"] = setcriminal + modified = 1 - var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel") - - if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud)) - if(setcriminal != "Cancel") - R.fields["criminal"] = setcriminal - modified = 1 - - spawn() - H.handle_regular_hud_updates() + spawn() + H.handle_regular_hud_updates() if(!modified) usr << "\red Unable to locate a data core entry for this person." diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index eb051aca74a..4a1efcfe614 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -214,12 +214,8 @@ var/list/ai_list = list() set name = "Show Crew Manifest" var/dat = "Crew RosterCrew Roster:

" - var/list/L = list() - for (var/datum/data/record/t in data_core.general) - var/R = t.fields["name"] + " - " + t.fields["rank"] - L += R - for(var/R in sortList(L)) - dat += "[R]
" + for(var/datum/data/record/t in sortRecord(data_core.general)) + dat += t.fields["name"] + " - " + t.fields["rank"] + "
" dat += "" src << browse(dat, "window=airoster") diff --git a/code/modules/mob/living/silicon/pai/hud.dm b/code/modules/mob/living/silicon/pai/hud.dm index f374aebbc78..07ea2fbc9e1 100644 --- a/code/modules/mob/living/silicon/pai/hud.dm +++ b/code/modules/mob/living/silicon/pai/hud.dm @@ -9,42 +9,25 @@ var/image/holder var/turf/T = get_turf(src.loc) for(var/mob/living/carbon/human/perp in view(T)) - var/perpname = "wot" holder = perp.hud_list[ID_HUD] + holder.icon_state = "hudno_id" if(perp.wear_id) - var/obj/item/weapon/card/id/I = perp.wear_id.GetID() - if(I) - perpname = I.registered_name - holder.icon_state = "hud[ckey(perp:wear_id:GetJobName())]" - client.images += holder - else - perpname = perp.name - holder.icon_state = "hudno_id" - client.images += holder - else - holder.icon_state = "hudno_id" - client.images += holder + holder.icon_state = "hud[ckey(perp:wear_id:GetJobName())]" + client.images += holder - for(var/datum/data/record/E in data_core.general) - if(E.fields["name"] == perpname) + var/perpname = perp.get_face_name(perp.get_id_name("")) + if(perpname) + var/datum/data/record/R = find_record("name", perpname, data_core.security) + if(R) holder = perp.hud_list[WANTED_HUD] - for (var/datum/data/record/R in data_core.security) - if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) - holder.icon_state = "hudwanted" - client.images += holder - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated")) - holder.icon_state = "hudincarcerated" - client.images += holder - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled")) - holder.icon_state = "hudparolled" - client.images += holder - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released")) - holder.icon_state = "hudreleased" - client.images += holder - break + switch(R.fields["criminal"]) + if("*Arrest*") holder.icon_state = "hudwanted" + if("Incarcerated") holder.icon_state = "hudincarcerated" + if("Parolled") holder.icon_state = "hudparolled" + if("Released") holder.icon_state = "hudreleased" + else + return + client.images += holder /mob/living/silicon/pai/proc/medicalHUD() if(client) diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 3d076b547d8..544e8fe5610 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -218,33 +218,22 @@ // Accessing medical records if("medicalrecord") - if(src.subscreen == 1) - var/datum/data/record/record = locate(href_list["med_rec"]) - if(record) - var/datum/data/record/R = record - var/datum/data/record/M = record - if (!( data_core.general.Find(R) )) - src.temp = "Unable to locate requested medical record. Record may have been deleted, or never have existed." - else - for(var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - M = E - src.medicalActive1 = R - src.medicalActive2 = M + if(subscreen == 1) + medicalActive1 = find_record("id", href_list["med_rec"], data_core.general) + if(medicalActive1) + medicalActive2 = find_record("id", href_list["med_rec"], data_core.medical) + if(!medicalActive2) + medicalActive1 = null + temp = "Unable to locate requested security record. Record may have been deleted, or never have existed." + if("securityrecord") - if(src.subscreen == 1) - var/datum/data/record/record = locate(href_list["sec_rec"]) - if(record) - var/datum/data/record/R = record - var/datum/data/record/M = record - if (!( data_core.general.Find(R) )) - src.temp = "Unable to locate requested security record. Record may have been deleted, or never have existed." - else - for(var/datum/data/record/E in data_core.security) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - M = E - src.securityActive1 = R - src.securityActive2 = M + if(subscreen == 1) + securityActive1 = find_record("id", href_list["sec_rec"], data_core.general) + if(securityActive1) + securityActive2 = find_record("id", href_list["sec_rec"], data_core.security) + if(!securityActive2) + securityActive1 = null + temp = "Unable to locate requested security record. Record may have been deleted, or never have existed." if("securityhud") if(href_list["toggle"]) src.secHUD = !src.secHUD @@ -410,70 +399,64 @@ // Crew Manifest /mob/living/silicon/pai/proc/softwareManifest() - var/dat = "" - dat += "

Crew Manifest



" - var/list/L = list() - if(!isnull(data_core.general)) - for (var/datum/data/record/t in sortRecord(data_core.general)) - var/R = t.fields["name"] + " - " + t.fields["rank"] - L += R - for(var/R in sortList(L)) - dat += "[R]
" - dat += "" - return dat + . += "

Crew Manifest



" + if(data_core.general) + for(var/datum/data/record/t in sortRecord(data_core.general)) + . += "[t.fields["name"]] - [t.fields["rank"]]" + . += "" + return . // Medical Records /mob/living/silicon/pai/proc/softwareMedicalRecord() - var/dat = "" - if(src.subscreen == 0) - dat += "

Medical Records


" - if(!isnull(data_core.general)) - for(var/datum/data/record/R in sortRecord(data_core.general)) - dat += text("[]: []
", src, R, R.fields["id"], R.fields["name"]) - //dat += text("
Back", src) - if(src.subscreen == 1) - dat += "
Medical Record

" - if ((istype(src.medicalActive1, /datum/data/record) && data_core.general.Find(src.medicalActive1))) - dat += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", - src.medicalActive1.fields["name"], src.medicalActive1.fields["id"], src.medicalActive1.fields["sex"], src.medicalActive1.fields["age"], src.medicalActive1.fields["fingerprint"], src.medicalActive1.fields["p_stat"], src.medicalActive1.fields["m_stat"]) - else - dat += "
Requested medical record not found.

" - if ((istype(src.medicalActive2, /datum/data/record) && data_core.medical.Find(src.medicalActive2))) - dat += text("
\n
Medical Data

\nBlood Type: []
\nDNA: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\n
Comments/Log

", src, src.medicalActive2.fields["blood_type"], src, src.medicalActive2.fields["b_dna"], src, src.medicalActive2.fields["mi_dis"], src, src.medicalActive2.fields["mi_dis_d"], src, src.medicalActive2.fields["ma_dis"], src, src.medicalActive2.fields["ma_dis_d"], src, src.medicalActive2.fields["alg"], src, src.medicalActive2.fields["alg_d"], src, src.medicalActive2.fields["cdi"], src, src.medicalActive2.fields["cdi_d"], src, src.medicalActive2.fields["notes"]) - else - dat += "
Requested medical record not found.

" - dat += text("
\nBack
", src) - return dat + switch(subscreen) + if(0) + . += "

Medical Records


" + if(data_core.general) + for(var/datum/data/record/R in sortRecord(data_core.general)) + . += "[R.fields["id"]]: [R.fields["name"]]
" + if(1) + . += "
Medical Record

" + if(medicalActive1 in data_core.general) + . += "Name: [medicalActive1.fields["name"]] ID: [medicalActive1.fields["id"]]
\nSex: [medicalActive1.fields["sex"]]
\nAge: [medicalActive1.fields["age"]]
\nFingerprint: [medicalActive1.fields["fingerprint"]]
\nPhysical Status: [medicalActive1.fields["p_stat"]]
\nMental Status: [medicalActive1.fields["m_stat"]]
" + else + . += "
Requested medical record not found.

" + if(medicalActive2 in data_core.medical) + . += "
\n
Medical Data

\nBlood Type:
[medicalActive2.fields["blood_type"]]
\nDNA: [medicalActive2.fields["b_dna"]]
\n
\nMinor Disabilities: [medicalActive2.fields["mi_dis"]]
\nDetails: [medicalActive2.fields["mi_dis_d"]]
\n
\nMajor Disabilities: [medicalActive2.fields["ma_dis"]]
\nDetails: [medicalActive2.fields["ma_dis_d"]]
\n
\nAllergies: [medicalActive2.fields["alg"]]
\nDetails: [medicalActive2.fields["alg_d"]]
\n
\nCurrent Diseases: [medicalActive2.fields["cdi"]] (per disease info placed in log/comment section)
\nDetails: [medicalActive2.fields["cdi_d"]]
\n
\nImportant Notes:
\n\t[medicalActive2.fields["notes"]]
\n
\n
Comments/Log

" + else + . += "
Requested medical record not found.

" + . += "
\nBack
" + return . // Security Records /mob/living/silicon/pai/proc/softwareSecurityRecord() - var/dat = "" - if(src.subscreen == 0) - dat += "

Security Records


" - if(!isnull(data_core.general)) - for(var/datum/data/record/R in sortRecord(data_core.general)) - dat += text("[]: []
", src, R, R.fields["id"], R.fields["name"]) - if(src.subscreen == 1) - dat += "

Security Record

" - if ((istype(src.securityActive1, /datum/data/record) && data_core.general.Find(src.securityActive1))) - dat += text("Name:
[] ID: []
\nSex: []
\nAge: []
\nRank: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src, src.securityActive1.fields["name"], src, src.securityActive1.fields["id"], src, src.securityActive1.fields["sex"], src, src.securityActive1.fields["age"], src, src.securityActive1.fields["rank"], src, src.securityActive1.fields["fingerprint"], src.securityActive1.fields["p_stat"], src.securityActive1.fields["m_stat"]) - else - dat += "
Requested security record not found,

" - if ((istype(src.securityActive2, /datum/data/record) && data_core.security.Find(src.securityActive2))) - dat += text("
\nSecurity Data
\nCriminal Status: []
\n
\nMinor Crimes: []
\nDetails: []
\n
\nMajor Crimes: []
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\n
Comments/Log

", src.securityActive2.fields["criminal"], src, src.securityActive2.fields["mi_crim"], src, src.securityActive2.fields["mi_crim_d"], src, src.securityActive2.fields["ma_crim"], src, src.securityActive2.fields["ma_crim_d"], src, src.securityActive2.fields["notes"]) - else - dat += "
Requested security record not found,

" - dat += text("
\nBack
", src) - return dat + . = "" + switch(subscreen) + if(0) + . += "

Security Records


" + if(data_core.general) + for(var/datum/data/record/R in sortRecord(data_core.general)) + . += "[R.fields["id"]]: [R.fields["name"]]
" + if(1) + . += "

Security Record

" + if(securityActive1 in data_core.general) + . += "Name:
[securityActive1.fields["name"]] ID: [securityActive1.fields["id"]]
\nSex: [securityActive1.fields["sex"]]
\nAge: [securityActive1.fields["age"]]
\nRank: [securityActive1.fields["rank"]]
\nFingerprint: [securityActive1.fields["fingerprint"]]
\nPhysical Status: [securityActive1.fields["p_stat"]]
\nMental Status: [securityActive1.fields["m_stat"]]
" + else + . += "
Requested security record not found,

" + if(securityActive2 in data_core.security) + . += "
\nSecurity Data
\nCriminal Status: [securityActive2.fields["criminal"]]
\n
\nMinor Crimes: [securityActive2.fields["mi_crim"]]
\nDetails: [securityActive2.fields["mi_crim_d"]]
\n
\nMajor Crimes: [securityActive2.fields["ma_crim"]]
\nDetails: [securityActive2.fields["ma_crim_d"]]
\n
\nImportant Notes:
\n\t[securityActive2.fields["notes"]]
\n
\n
Comments/Log

" + else + . += "
Requested security record not found,

" + . += text("
\nBack
", src) + return . // Universal Translator /mob/living/silicon/pai/proc/softwareTranslator() - var/dat = {"

Universal Translator


+ . = {"

Universal Translator


When enabled, this device will automatically convert all spoken and written language into a format that any known recipient can understand.

The device is currently [ (src.universal_speak) ? "en" : "dis" ]abled.
Toggle Device
"} - return dat + return . // Security HUD /mob/living/silicon/pai/proc/facialRecognition() diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index cf8b0e2cff8..4d662aea876 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -91,11 +91,8 @@ /obj/structure/filingcabinet/security/attack_hand(mob/user) if(virgin) for(var/datum/data/record/G in data_core.general) - var/datum/data/record/S - for(var/datum/data/record/R in data_core.security) - if((R.fields["name"] == G.fields["name"] || R.fields["id"] == G.fields["id"])) - S = R - break + var/datum/data/record/S = find_record("name", G.fields["name"], data_core.security) + if(!S) continue var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src) P.info = "
Security Record

" P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]
\nSex: [G.fields["sex"]]
\nAge: [G.fields["age"]]
\nFingerprint: [G.fields["fingerprint"]]
\nPhysical Status: [G.fields["p_stat"]]
\nMental Status: [G.fields["m_stat"]]
" @@ -120,11 +117,8 @@ /obj/structure/filingcabinet/medical/attack_hand(mob/user) if(virgin) for(var/datum/data/record/G in data_core.general) - var/datum/data/record/M - for(var/datum/data/record/R in data_core.medical) - if((R.fields["name"] == G.fields["name"] || R.fields["id"] == G.fields["id"])) - M = R - break + var/datum/data/record/M = find_record("name", G.fields["name"], data_core.medical) + if(!M) continue var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src) P.info = "
Medical Record

" P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]
\nSex: [G.fields["sex"]]
\nAge: [G.fields["age"]]
\nFingerprint: [G.fields["fingerprint"]]
\nPhysical Status: [G.fields["p_stat"]]
\nMental Status: [G.fields["m_stat"]]
" diff --git a/html/changelog.html b/html/changelog.html index d65c1afdd3f..e79ed2a2ea1 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -49,7 +49,7 @@ Stuff which is in development and not yet visible to players or just code relate (ie. code improvements for expandability, etc.) should not be listed here. They should be listed in the changelog upon commit tho. Thanks. --> - + @@ -59,6 +59,15 @@ should be listed in the changelog upon commit tho. Thanks. --> + + + +
+

12 August 2013

+

Giacom updated:

+
@@ -72,8 +81,8 @@ should be listed in the changelog upon commit tho. Thanks. -->
  • This was a pretty large edit of repetitive data, so no doubt I've made a mistake or two. Please report any bugs to the usual place
  • - +

    6 August 2013

    Giacom updated:

    diff --git a/interface/skin.dmf b/interface/skin.dmf index 8be56ecb3d8..a3979a4615b 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -1,7 +1,7 @@ macro "macro" elem name = "TAB" - command = ".winset \"mainwindow.macro=hotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.is-disabled=true input.background-color=#F0F0F0\"" + command = ".winset \"mainwindow.macro=hotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0\"" is-disabled = false elem name = "CENTER+REP" @@ -167,7 +167,7 @@ macro "macro" macro "hotkeymode" elem name = "TAB" - command = ".winset \"mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.is-disabled=false input.background-color=#D3B5B5\"" + command = ".winset \"mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5\"" is-disabled = false elem name = "CENTER+REP" @@ -1175,7 +1175,7 @@ window "mainwindow" on-size = "" text = "Hotkey Toggle" image = "" - command = ".winset \"mainwindow.macro!=macro ? mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.is-disabled=false input.background-color=#D3B5B5 : mainwindow.macro=hotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.is-disabled=true input.background-color=#F0F0F0\"" + command = ".winset \"mainwindow.macro!=macro ? mainwindow.macro=macro hotkey_toggle.is-checked=false input.background-color=#D3B5B5 : mainwindow.macro=hotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0\"" is-flat = false stretch = false is-checked = false diff --git a/tgstation.dme b/tgstation.dme index 311dad68c1e..73d457246cf 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -281,6 +281,7 @@ #include "code\game\machinery\portable_turret.dm" #include "code\game\machinery\recharger.dm" #include "code\game\machinery\rechargestation.dm" +#include "code\game\machinery\recycler.dm" #include "code\game\machinery\requests_console.dm" #include "code\game\machinery\robot_fabricator.dm" #include "code\game\machinery\shieldgen.dm" @@ -335,7 +336,6 @@ #include "code\game\machinery\computer\pod.dm" #include "code\game\machinery\computer\power.dm" #include "code\game\machinery\computer\prisoner.dm" -#include "code\game\machinery\computer\prisonshuttle.dm" #include "code\game\machinery\computer\robot.dm" #include "code\game\machinery\computer\security.dm" #include "code\game\machinery\computer\shuttle.dm"