Fixes Sec Hud wanted status not being updated when changing identity. Original PR by Astralenigma, New one by phil235.

This commit is contained in:
Rui Neves Carvalho
2015-10-19 21:22:05 +02:00
committed by phil235
parent cb58e8dca3
commit 80e7024f6c
4 changed files with 22 additions and 11 deletions
+15 -9
View File
@@ -131,7 +131,7 @@
holder.icon_state = "hudno_id"
if(wear_id)
holder.icon_state = "hud[ckey(wear_id.GetJobName())]"
sec_hud_set_security_status()
var/turf/T = get_turf(src)
if (T) crewmonitor.queueUpdate(T.z)
@@ -153,16 +153,22 @@
holder.icon_state = "hud_imp_chem"
/mob/living/carbon/human/proc/sec_hud_set_security_status()
var/image/holder
var/image/holder = hud_list[WANTED_HUD]
var/perpname = get_face_name(get_id_name(""))
if(perpname)
var/datum/data/record/R = find_record("name", perpname, data_core.security)
if(R)
holder = 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("Discharged") holder.icon_state = "huddischarged"
else holder.icon_state = null
if("*Arrest*")
holder.icon_state = "hudwanted"
return
if("Incarcerated")
holder.icon_state = "hudincarcerated"
return
if("Parolled")
holder.icon_state = "hudparolled"
return
if("Discharged")
holder.icon_state = "huddischarged"
return
holder.icon_state = null
@@ -190,7 +190,7 @@
if(internals)
internals.icon_state = "internal0"
internal = null
sec_hud_set_ID()
sec_hud_set_security_status()
..()
/mob/living/carbon/human/head_update(obj/item/I)
@@ -200,6 +200,7 @@
update_inv_glasses()
if(I.flags_inv & HIDEEARS)
update_body()
sec_hud_set_security_status()
..()
+3
View File
@@ -21,4 +21,7 @@
target.real_name = target.dna.species.random_name(target.gender,1)
var/newname = target.real_name //something about how the code handles names required that I use this instead of target.real_name
user.visible_message("[user] alters [oldname]'s appearance completely, they are now [newname]!", "<span class='notice'>You alter [oldname]'s appearance completely, they are now [newname].</span>")
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.sec_hud_set_ID()
return 1
+2 -1
View File
@@ -95,4 +95,5 @@ CoreOverload = Game Master
Jalleo = Game Master
Anonus Tanir = Game Master
FoxPMcCloud = Game Master
Xhuis = Game Master
Xhuis = Game Master
Astralenigma = Game Master