From 783536d2784928e06f408e6c73938f9f204d672a Mon Sep 17 00:00:00 2001 From: Krausus Date: Thu, 7 Jul 2016 01:25:56 -0400 Subject: [PATCH] Replaces ID photos with bicons --- code/datums/datacore.dm | 2 ++ code/game/machinery/computer/medical.dm | 7 ++---- code/game/machinery/computer/security.dm | 8 ++----- code/game/machinery/computer/skills.dm | 8 ++----- code/game/objects/items/weapons/cards_ids.dm | 23 +++++++++----------- code/modules/computer3/computers/medical.dm | 7 ++---- code/modules/computer3/computers/security.dm | 8 ++----- 7 files changed, 22 insertions(+), 41 deletions(-) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index d07b6e3eb73..ff081676b43 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -66,6 +66,8 @@ G.fields["sex"] = capitalize(H.gender) G.fields["species"] = H.get_species() G.fields["photo"] = get_id_photo(H) + G.fields["photo-south"] = "'data:image/png;base64,[icon2base64(icon(G.fields["photo"], dir = SOUTH))]'" + G.fields["photo-west"] = "'data:image/png;base64,[icon2base64(icon(G.fields["photo"], dir = WEST))]'" if(H.gen_record && !jobban_isbanned(H, "Records")) G.fields["notes"] = H.gen_record else diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 6e331d46cf3..4727953e5df 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -54,10 +54,6 @@ 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) - var/icon/front = new(active1.fields["photo"], dir = SOUTH) - var/icon/side = new(active1.fields["photo"], dir = WEST) - user << browse_rsc(front, "front.png") - user << browse_rsc(side, "side.png") dat += "
Medical Record

" if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) dat += "
Name: [active1.fields["name"]] \ @@ -67,7 +63,8 @@ Fingerprint: [active1.fields["fingerprint"]]
\n \ Physical Status: [active1.fields["p_stat"]]
\n \ Mental Status: [active1.fields["m_stat"]]
\ - Photo:
" + Photo:
\ + " else dat += "General Record Lost!
" if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 6f285930ab7..f1c475a122b 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -165,10 +165,6 @@ if(3.0) dat += "
Security Record

" if ((istype(active1, /datum/data/record) && data_core.general.Find(active1))) - var/icon/front = new(active1.fields["photo"], dir = SOUTH) - var/icon/side = new(active1.fields["photo"], dir = WEST) - user << browse_rsc(front, "front.png") - user << browse_rsc(side, "side.png") dat += {"
Name: [active1.fields["name"]]
@@ -182,8 +178,8 @@
Photo:
- -
+ +
Print Photo
"} else diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index ddcfeed9a74..1d5e0ce53dd 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -87,10 +87,6 @@ if(3.0) dat += "
Employment Record

" if ((istype(active1, /datum/data/record) && data_core.general.Find(active1))) - var/icon/front = new(active1.fields["photo"], dir = SOUTH) - var/icon/side = new(active1.fields["photo"], dir = WEST) - user << browse_rsc(front, "front.png") - user << browse_rsc(side, "side.png") dat += text(" \ -
\ Name: [active1.fields["name"]]
\ ID: [active1.fields["id"]]
\n \ @@ -101,8 +97,8 @@ Physical Status: [active1.fields["p_stat"]]
\n \ Mental Status: [active1.fields["m_stat"]]

\n \ Employment/skills summary:
[active1.fields["notes"]]
Photo:
\ -
") + Photo:
\ + ") else dat += "General Record Lost!
" dat += text("\nDelete Record (ALL)

\nPrint Record
\nBack
", src, src, src) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 97f66ec6a72..85c25d2b98a 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -103,8 +103,6 @@ var/sex var/age var/photo - var/icon/front - var/icon/side var/dat var/stamped = 0 @@ -137,12 +135,6 @@ var/datum/asset/assets = get_asset_datum(/datum/asset/simple/paper) assets.send(user) - if(!front) - front = new(photo, dir = SOUTH) - if(!side) - side = new(photo, dir = WEST) - user << browse_rsc(front, "front.png") - user << browse_rsc(side, "side.png") var/datum/browser/popup = new(user, "idcard", name, 600, 400) popup.set_content(dat) popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state)) @@ -170,6 +162,9 @@ dna_hash = H.dna.unique_enzymes fingerprint_hash = md5(H.dna.uni_identity) + var/photo_front = "'data:image/png;base64,[icon2base64(icon(photo, dir = SOUTH))]'" + var/photo_side = "'data:image/png;base64,[icon2base64(icon(photo, dir = WEST))]'" + dat = ("
") dat += text("Name: []
", registered_name) dat += text("Sex: []
\n", sex) @@ -178,8 +173,8 @@ dat += text("Fingerprint: []
\n", fingerprint_hash) dat += text("Blood Type: []
\n", blood_type) dat += text("DNA Hash: []

\n", dna_hash) - dat +="
Photo:
\ -
" + dat +="Photo:
\ + " /obj/item/weapon/card/id/GetAccess() if(!guest_pass) @@ -341,7 +336,7 @@ if("Show") return ..() if("Edit") - switch(input(user,"What would you like to edit on \the [src]?") in list("Name","Photo","Appearance","Sex","Age","Occupation","Money Account","Blood Type","DNA Hash","Fingerprint Hash","Reset Card")) + switch(input(user,"What would you like to edit on \the [src]?") in list("Name","Appearance","Sex","Age","Occupation","Money Account","Blood Type","DNA Hash","Fingerprint Hash","Reset Card")) if("Name") var/new_name = reject_bad_name(input(user,"What name would you like to put on this card?","Agent Card Name", ishuman(user) ? user.real_name : user.name)) if(!Adjacent(user)) @@ -350,13 +345,15 @@ UpdateName() to_chat(user, "Name changed to [new_name].") + // This option is now disabled. I had to comment out the front/side lines. + // It didn't work anyway, so nothing of value was lost! if("Photo") if(!Adjacent(user)) return photo = fake_id_photo(user) var/icon/photoside = fake_id_photo(user,1) - front = new(photo) - side = new(photoside) + // front = new(photo) + // side = new(photoside) if(photo && photoside) to_chat(user, "Photo changed.") diff --git a/code/modules/computer3/computers/medical.dm b/code/modules/computer3/computers/medical.dm index 5d283af5b53..b3feb23c6a5 100644 --- a/code/modules/computer3/computers/medical.dm +++ b/code/modules/computer3/computers/medical.dm @@ -86,10 +86,6 @@ 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) - var/icon/front = new(active1.fields["photo"], dir = SOUTH) - var/icon/side = new(active1.fields["photo"], dir = WEST) - usr << browse_rsc(front, "front.png") - usr << browse_rsc(side, "side.png") dat += "
Medical Record

" if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) dat += "
Name: [active1.fields["name"]] \ @@ -99,7 +95,8 @@ Fingerprint: [active1.fields["fingerprint"]]
\n \ Physical Status: [active1.fields["p_stat"]]
\n \ Mental Status: [active1.fields["m_stat"]]
\ - Photo:
" + Photo:
\ + " else dat += "General Record Lost!
" if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) diff --git a/code/modules/computer3/computers/security.dm b/code/modules/computer3/computers/security.dm index ebb218b5cee..57e8de72a79 100644 --- a/code/modules/computer3/computers/security.dm +++ b/code/modules/computer3/computers/security.dm @@ -127,10 +127,6 @@ if(3.0) dat += "
Security Record

" if ((istype(active1, /datum/data/record) && data_core.general.Find(active1))) - var/icon/front = new(active1.fields["photo"], dir = SOUTH) - var/icon/side = new(active1.fields["photo"], dir = WEST) - usr << browse_rsc(front, "front.png") - usr << browse_rsc(side, "side.png") dat += text(" \ -
\ Name: [active1.fields["name"]]
\ ID: [active1.fields["id"]]
\n \ @@ -140,8 +136,8 @@ Fingerprint: [active1.fields["fingerprint"]]
\n \ Physical Status: [active1.fields["p_stat"]]
\n \ Mental Status: [active1.fields["m_stat"]]
Photo:
\ -
") + Photo:
\ + ") else dat += "General Record Lost!
" if ((istype(active2, /datum/data/record) && data_core.security.Find(active2)))