ID/Agent ID fixes

1. Clown and mime get their new name updated properly on their ID after
renaming
2. Added photo outfits to jobs missing it and some syndicate jobs :
Syndicate Officer
Syndicate Agent
Syndicate Nuclear Operative
Clown (no mask in photo)
Mime (no mask in photo)
Coroner
Barber
3. Agent ID description now update with chosen appearance
4. Agent ID photo taking now uses the same proc as a real ID photo, so
they actually look authentic.
The photo is no longer a snapshot of your current mob icon, but instead
forge a photo the same way IDs do, with an outfit matching the job
you've forged on the ID.
5. Agent ID age field when editing now defaults to your real age, as
other fields for it do
This commit is contained in:
datlo
2019-01-27 20:36:51 +00:00
parent f0740fd717
commit 33dc194469
3 changed files with 194 additions and 166 deletions
+32 -29
View File
@@ -333,25 +333,6 @@
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over \the [I], copying its access.</span>")
src.access |= I.access //Don't copy access if user isn't an antag -- to prevent metagaming
/obj/item/card/id/syndicate/proc/fake_id_photo(var/mob/living/carbon/human/H)//get_id_photo wouldn't work correctly
if(!istype(H))
return
var/storedDir = H.dir //don't want to lose track of this
var/icon/faked = new()
if(!H.equip_to_slot_if_possible(src, slot_l_store, 0, 1))
to_chat(H, "<span class='warning'>You need to empty your pockets before taking the ID picture.</span>")
return
H.dir = WEST //ensure the icon is actually the proper direction before copying it
faked.Insert(getFlatIcon(H), dir = WEST)
H.dir = SOUTH
faked.Insert(getFlatIcon(H), dir = SOUTH)
H.dir = storedDir
H.equip_to_slot_if_possible(src, slot_l_hand, 0, 1)
return faked
/obj/item/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered_name)
var t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name))
@@ -390,11 +371,14 @@
if("Photo")
if(!Adjacent(user))
return
var/icon/newphoto = fake_id_photo(user)
var/job_clothes = null
if(assignment)
job_clothes = assignment
var/icon/newphoto = get_id_photo(user, job_clothes)
if(!newphoto)
return
photo = newphoto
to_chat(user, "<span class='notice'>Photo changed.</span>")
to_chat(user, "<span class='notice'>Photo changed. Select another occupation and take a new photo if you wish to appear with different clothes.</span>")
RebuildHTML()
if("Appearance")
@@ -432,22 +416,41 @@
return
if(!choice)
return
src.icon_state = choice
icon_state = choice
switch(choice)
if("silver")
desc = "A silver card which shows honour and dedication."
if("gold")
desc = "A golden card which shows power and might."
if("clown")
desc = "Even looking at the card strikes you with deep fear."
if("mime")
desc = "..."
if("prisoner")
desc = "You are a number, you are not a free man."
if("centcom")
desc = "An ID straight from Central Command."
else
desc = "A card used to provide ID and determine access across the station."
to_chat(usr, "<span class='notice'>Appearance changed to [choice].</span>")
if("Sex")
var/new_sex = sanitize(stripped_input(user,"What sex would you like to put on this card?","Agent Card Sex", ishuman(user) ? capitalize(user.gender) : "Male", MAX_MESSAGE_LEN))
if(!Adjacent(user))
return
src.sex = new_sex
sex = new_sex
to_chat(user, "<span class='notice'>Sex changed to [new_sex].</span>")
RebuildHTML()
if("Age")
var/new_age = sanitize(stripped_input(user,"What age would you like to put on this card?","Agent Card Age","21", MAX_MESSAGE_LEN))
var/default = "21"
if(ishuman(user))
var/mob/living/carbon/human/H = user
default = H.age
var/new_age = sanitize(input(user,"What age would you like to be written on this card?","Agent Card Age", default) as text)
if(!Adjacent(user))
return
src.age = new_age
age = new_age
to_chat(user, "<span class='notice'>Age changed to [new_age].</span>")
RebuildHTML()
@@ -485,7 +488,7 @@
if(!Adjacent(user))
return
src.assignment = new_job
assignment = new_job
to_chat(user, "<span class='notice'>Occupation changed to [new_job].</span>")
UpdateName()
RebuildHTML()
@@ -507,7 +510,7 @@
var/new_blood_type = sanitize(input(user,"What blood type would you like to be written on this card?","Agent Card Blood Type",default) as text)
if(!Adjacent(user))
return
src.blood_type = new_blood_type
blood_type = new_blood_type
to_chat(user, "<span class='notice'>Blood type changed to [new_blood_type].</span>")
RebuildHTML()
@@ -521,7 +524,7 @@
var/new_dna_hash = sanitize(input(user,"What DNA hash would you like to be written on this card?","Agent Card DNA Hash",default) as text)
if(!Adjacent(user))
return
src.dna_hash = new_dna_hash
dna_hash = new_dna_hash
to_chat(user, "<span class='notice'>DNA hash changed to [new_dna_hash].</span>")
RebuildHTML()
@@ -535,7 +538,7 @@
var/new_fingerprint_hash = sanitize(input(user,"What fingerprint hash would you like to be written on this card?","Agent Card Fingerprint Hash",default) as text)
if(!Adjacent(user))
return
src.fingerprint_hash = new_fingerprint_hash
fingerprint_hash = new_fingerprint_hash
to_chat(user, "<span class='notice'>Fingerprint hash changed to [new_fingerprint_hash].</span>")
RebuildHTML()