diff --git a/baystation12.dme b/baystation12.dme index 7aadf41ef0..677d4ed90c 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -171,6 +171,7 @@ #include "code\defines\procs\AStar.dm" #include "code\defines\procs\command_alert.dm" #include "code\defines\procs\dbcore.dm" +#include "code\defines\procs\records.dm" #include "code\defines\procs\sd_Alert.dm" #include "code\defines\procs\statistics.dm" #include "code\game\asteroid.dm" diff --git a/code/WorkInProgress/computer3/computers/medical.dm b/code/WorkInProgress/computer3/computers/medical.dm index f1d5018bc0..5cb984ee36 100644 --- a/code/WorkInProgress/computer3/computers/medical.dm +++ b/code/WorkInProgress/computer3/computers/medical.dm @@ -86,8 +86,8 @@ if(3.0) dat += text("Records Maintenance
| \
@@ -430,34 +430,11 @@ What a mess.*/
//RECORD CREATE
if ("New Record (Security)")
if ((istype(active1, /datum/data/record) && !( istype(active2, /datum/data/record) )))
- var/datum/data/record/R = new /datum/data/record()
- R.fields["name"] = active1.fields["name"]
- R.fields["id"] = active1.fields["id"]
- R.name = text("Security Record #[]", R.fields["id"])
- R.fields["criminal"] = "None"
- R.fields["mi_crim"] = "None"
- R.fields["mi_crim_d"] = "No minor crime convictions."
- R.fields["ma_crim"] = "None"
- R.fields["ma_crim_d"] = "No major crime convictions."
- R.fields["notes"] = "No notes."
- data_core.security += R
- active2 = R
+ active2 = CreateSecurityRecord(active1.fields["name"], active1.fields["id"])
screen = 3
if ("New Record (General)")
- var/datum/data/record/G = new /datum/data/record()
- G.fields["name"] = "New Record"
- G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
- G.fields["rank"] = "Unassigned"
- G.fields["real_rank"] = "Unassigned"
- G.fields["sex"] = "Male"
- G.fields["age"] = "Unknown"
- G.fields["fingerprint"] = "Unknown"
- G.fields["p_stat"] = "Active"
- G.fields["m_stat"] = "Stable"
- G.fields["species"] = "Human"
- data_core.general += G
- active1 = G
+ active1 = CreateGeneralRecord()
active2 = null
//FIELD FUNCTIONS
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index a1a626313b..143e24a7f9 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -52,7 +52,8 @@
var/id = add_zero(num2hex(rand(1, 1.6777215E7)), 6) //this was the best they could come up with? A large random number? *sigh*
-
+ var/icon/front = new(get_id_photo(H), dir = SOUTH)
+ var/icon/side = new(get_id_photo(H), dir = WEST)
//General Record
var/datum/data/record/G = new()
G.fields["id"] = id
@@ -65,7 +66,8 @@
G.fields["m_stat"] = "Stable"
G.fields["sex"] = H.gender
G.fields["species"] = H.get_species()
- G.fields["photo"] = get_id_photo(H)
+ G.fields["photo_front"] = front
+ G.fields["photo_side"] = side
if(H.gen_record && !jobban_isbanned(H, "Records"))
G.fields["notes"] = H.gen_record
else
diff --git a/code/defines/procs/records.dm b/code/defines/procs/records.dm
new file mode 100644
index 0000000000..9d419607c0
--- /dev/null
+++ b/code/defines/procs/records.dm
@@ -0,0 +1,36 @@
+/proc/CreateGeneralRecord()
+ var/mob/living/carbon/human/dummy = new()
+ dummy.mind = new()
+ var/icon/front = new(get_id_photo(dummy), dir = SOUTH)
+ var/icon/side = new(get_id_photo(dummy), dir = WEST)
+ var/datum/data/record/G = new /datum/data/record()
+ G.fields["name"] = "New Record"
+ G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
+ G.fields["rank"] = "Unassigned"
+ G.fields["real_rank"] = "Unassigned"
+ G.fields["sex"] = "Male"
+ G.fields["age"] = "Unknown"
+ G.fields["fingerprint"] = "Unknown"
+ G.fields["p_stat"] = "Active"
+ G.fields["m_stat"] = "Stable"
+ G.fields["species"] = "Human"
+ G.fields["photo_front"] = front
+ G.fields["photo_side"] = side
+ data_core.general += G
+
+ del(dummy)
+ return G
+
+/proc/CreateSecurityRecord(var/name as text, var/id as text)
+ var/datum/data/record/R = new /datum/data/record()
+ R.fields["name"] = name
+ R.fields["id"] = id
+ R.name = text("Security Record #[id]")
+ R.fields["criminal"] = "None"
+ R.fields["mi_crim"] = "None"
+ R.fields["mi_crim_d"] = "No minor crime convictions."
+ R.fields["ma_crim"] = "None"
+ R.fields["ma_crim_d"] = "No major crime convictions."
+ R.fields["notes"] = "No notes."
+ data_core.security += R
+ return R
\ No newline at end of file
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index 18f1ca059f..a23c717a7b 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -78,8 +78,8 @@
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) + var/icon/front = active1.fields["photo_front"] + var/icon/side = active1.fields["photo_side"] user << browse_rsc(front, "front.png") user << browse_rsc(side, "side.png") dat += " " diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index e7060f7577..fde49fb7e3 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -123,21 +123,21 @@ if(3.0) dat += " " 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") + user << browse_rsc(active1.fields["photo_front"], "front.png") + user << browse_rsc(active1.fields["photo_side"], "side.png") dat += text("
| Photo: \ +
|
| \ @@ -302,22 +302,9 @@ What a mess.*/ temp += "No" //RECORD CREATE if ("New Record (General)") - if(PDA_Manifest.len) PDA_Manifest.Cut() - var/datum/data/record/G = new /datum/data/record() - G.fields["name"] = "New Record" - G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6)) - G.fields["rank"] = "Unassigned" - G.fields["real_rank"] = "Unassigned" - G.fields["sex"] = "Male" - G.fields["age"] = "Unknown" - G.fields["fingerprint"] = "Unknown" - G.fields["p_stat"] = "Active" - G.fields["m_stat"] = "Stable" - G.fields["species"] = "Human" - data_core.general += G - active1 = G + active1 = CreateGeneralRecord() //FIELD FUNCTIONS if ("Edit Field") diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 18b8e96186..794fd75c2e 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -758,11 +758,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co photo.loc = src else if(istype(user,/mob/living/silicon)) var/mob/living/silicon/tempAI = user - var/obj/item/device/camera/siliconcam/camera = tempAI.aiCamera - - if(!camera) - return - var/datum/picture/selection = camera.selectpicture() + var/datum/picture/selection = tempAI.GetPicture() if (!selection) return diff --git a/code/modules/paperwork/silicon_photography.dm b/code/modules/paperwork/silicon_photography.dm index 4fbe953d72..ce31514adc 100644 --- a/code/modules/paperwork/silicon_photography.dm +++ b/code/modules/paperwork/silicon_photography.dm @@ -160,3 +160,8 @@ obj/item/device/camera/siliconcam/proc/getsource() else Cinfo = src return Cinfo + +/mob/living/silicon/proc/GetPicture() + if(!aiCamera) + return + return aiCamera.selectpicture() |