diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index ef5dec9079a..f90756f0e81 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -421,10 +421,12 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if (modify)
modify.assignment = t1
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
+ modify.update_label()
if ("demote")
if(modify.assignment in head_subordinates || modify.assignment == "Assistant")
modify.assignment = "Unassigned"
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
+ modify.update_label()
else
to_chat(usr, "You are not authorized to demote this position.")
if ("reg")
@@ -435,6 +437,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if(newName)
modify.registered_name = newName
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
+ modify.update_label()
else
to_chat(usr, "Invalid name entered.")
updateUsrDialog()
@@ -515,8 +518,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
P.name = "paper- 'Crew Manifest'"
printing = null
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
- if (modify)
- modify.update_label()
updateUsrDialog()
/obj/machinery/computer/card/AltClick(mob/user)
@@ -549,7 +550,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
/obj/machinery/computer/card/proc/eject_id_modify(mob/user)
if(modify)
GLOB.data_core.manifest_modify(modify.registered_name, modify.assignment)
- modify.update_label()
modify.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(modify)
diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm
index 192010a9387..3437cc0c5cd 100644
--- a/code/game/objects/items/cards_ids.dm
+++ b/code/game/objects/items/cards_ids.dm
@@ -11,6 +11,7 @@
/*
* DATA CARDS - Used for the IC data card reader
*/
+
/obj/item/card
name = "card"
desc = "Does card things."
@@ -113,12 +114,15 @@
slot_flags = ITEM_SLOT_ID
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
+ var/id_type_name = "identification card"
var/list/access = list()
var/registered_name = null // The name registered_name on the card
var/assignment = null
var/access_txt // mapping aid
var/datum/bank_account/registered_account
var/obj/machinery/paystand/my_store
+ var/uses_overlays = TRUE
+ var/icon/cached_flat_icon
/obj/item/card/id/Initialize(mapload)
. = ..()
@@ -265,23 +269,48 @@
/obj/item/card/id/GetID()
return src
+/obj/item/card/id/update_icon(blank=FALSE)
+ cut_overlays()
+ cached_flat_icon = null
+ if(!uses_overlays)
+ return
+ var/job = assignment ? ckey(GetJobName()) : null
+ var/list/add_overlays = list()
+ if(!blank)
+ add_overlays += mutable_appearance(icon, "assigned")
+ if(job)
+ add_overlays += mutable_appearance(icon, "id[job]")
+ add_overlay(add_overlays)
+ if(istype(loc, /obj/item/storage/wallet))
+ var/obj/item/storage/wallet/powergaming = loc
+ if(powergaming.front_id == src)
+ powergaming.update_icon(add_overlays)
+
+/obj/item/card/id/proc/get_cached_flat_icon()
+ if(!cached_flat_icon)
+ cached_flat_icon = getFlatIcon(src)
+ return cached_flat_icon
+
+
+/obj/item/card/id/get_examine_string(mob/user, thats = FALSE)
+ if(uses_overlays)
+ return "[icon2html(get_cached_flat_icon(), user)] [thats? "That's ":""][get_examine_name(user)]" //displays all overlays in chat
+ return ..()
+
/*
Usage:
update_label()
Sets the id name to whatever registered_name and assignment is
-
-update_label("John Doe", "Clowny")
- Properly formats the name and occupation and sets the id name to the arguments
*/
-/obj/item/card/id/proc/update_label(newname, newjob)
- if(newname || newjob)
- name = "[(!newname) ? "identification card" : "[newname]'s ID Card"][(!newjob) ? "" : " ([newjob])"]"
- return
- name = "[(!registered_name) ? "identification card" : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]"
+/obj/item/card/id/proc/update_label()
+ var/blank = !registered_name
+ update_icon(blank)
+ name = "[blank ? id_type_name : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]"
/obj/item/card/id/silver
name = "silver identification card"
+ id_type_name = "silver identification card"
desc = "A silver card which shows honour and dedication."
icon_state = "silver"
item_state = "silver_id"
@@ -296,6 +325,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/gold
name = "gold identification card"
+ id_type_name = "gold identification card"
desc = "A golden card which shows power and might."
icon_state = "gold"
item_state = "gold_id"
@@ -376,13 +406,17 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/syndicate_command
name = "syndicate ID card"
+ id_type_name = "syndicate ID card"
desc = "An ID straight from the Syndicate."
registered_name = "Syndicate"
assignment = "Syndicate Overlord"
+ icon_state = "syndie"
access = list(ACCESS_SYNDICATE)
+ uses_overlays = FALSE
/obj/item/card/id/captains_spare
name = "captain's spare ID"
+ id_type_name = "captain's spare ID"
desc = "The spare ID of the High Lord himself."
icon_state = "gold"
item_state = "gold_id"
@@ -395,13 +429,23 @@ update_label("John Doe", "Clowny")
var/datum/job/captain/J = new/datum/job/captain
access = J.get_access()
. = ..()
+ update_label()
+
+/obj/item/card/id/captains_spare/update_label() //so it doesn't change to Captain's ID card (Captain) on a sneeze
+ if(registered_name == "Captain")
+ name = "[id_type_name][(!assignment || assignment == "Captain") ? "" : " ([assignment])"]"
+ update_icon(TRUE)
+ else
+ ..()
/obj/item/card/id/centcom
name = "\improper CentCom ID"
+ id_type_name = "\improper CentCom ID"
desc = "An ID straight from Central Command."
icon_state = "centcom"
registered_name = "Central Command"
assignment = "General"
+ uses_overlays = FALSE
/obj/item/card/id/centcom/Initialize()
access = get_all_centcom_access()
@@ -409,10 +453,12 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert
name = "\improper CentCom ID"
+ id_type_name = "\improper CentCom ID"
desc = "An ERT ID card."
- icon_state = "centcom"
+ icon_state = "ert_commander"
registered_name = "Emergency Response Team Commander"
assignment = "Emergency Response Team Commander"
+ uses_overlays = FALSE
/obj/item/card/id/ert/Initialize()
access = get_all_accesses()+get_ert_access("commander")-ACCESS_CHANGE_IDS
@@ -421,6 +467,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert/Security
registered_name = "Security Response Officer"
assignment = "Security Response Officer"
+ icon_state = "ert_security"
/obj/item/card/id/ert/Security/Initialize()
access = get_all_accesses()+get_ert_access("sec")-ACCESS_CHANGE_IDS
@@ -429,6 +476,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert/Engineer
registered_name = "Engineer Response Officer"
assignment = "Engineer Response Officer"
+ icon_state = "ert_engineer"
/obj/item/card/id/ert/Engineer/Initialize()
access = get_all_accesses()+get_ert_access("eng")-ACCESS_CHANGE_IDS
@@ -437,6 +485,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert/Medical
registered_name = "Medical Response Officer"
assignment = "Medical Response Officer"
+ icon_state = "ert_medic"
/obj/item/card/id/ert/Medical/Initialize()
access = get_all_accesses()+get_ert_access("med")-ACCESS_CHANGE_IDS
@@ -445,6 +494,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert/chaplain
registered_name = "Religious Response Officer"
assignment = "Religious Response Officer"
+ icon_state = "ert_chaplain"
/obj/item/card/id/ert/chaplain/Initialize()
access = get_all_accesses()+get_ert_access("sec")-ACCESS_CHANGE_IDS
@@ -453,6 +503,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert/Janitor
registered_name = "Janitorial Response Officer"
assignment = "Janitorial Response Officer"
+ icon_state = "ert_janitor"
/obj/item/card/id/ert/Janitor/Initialize()
access = get_all_accesses()
@@ -460,6 +511,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/prisoner
name = "prisoner ID card"
+ id_type_name = "prisoner ID card"
desc = "You are a number, you are not a free man."
icon_state = "orange"
item_state = "orange-id"
@@ -467,6 +519,7 @@ update_label("John Doe", "Clowny")
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
assignment = "Prisoner"
registered_name = "Scum"
+ uses_overlays = FALSE
var/goal = 0 //How far from freedom?
var/points = 0
@@ -476,30 +529,37 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/prisoner/one
name = "Prisoner #13-001"
registered_name = "Prisoner #13-001"
+ icon_state = "prisoner_001"
/obj/item/card/id/prisoner/two
name = "Prisoner #13-002"
registered_name = "Prisoner #13-002"
+ icon_state = "prisoner_002"
/obj/item/card/id/prisoner/three
name = "Prisoner #13-003"
registered_name = "Prisoner #13-003"
+ icon_state = "prisoner_003"
/obj/item/card/id/prisoner/four
name = "Prisoner #13-004"
registered_name = "Prisoner #13-004"
+ icon_state = "prisoner_004"
/obj/item/card/id/prisoner/five
name = "Prisoner #13-005"
registered_name = "Prisoner #13-005"
+ icon_state = "prisoner_005"
/obj/item/card/id/prisoner/six
name = "Prisoner #13-006"
registered_name = "Prisoner #13-006"
+ icon_state = "prisoner_006"
/obj/item/card/id/prisoner/seven
name = "Prisoner #13-007"
registered_name = "Prisoner #13-007"
+ icon_state = "prisoner_007"
/obj/item/card/id/mining
name = "mining ID"
@@ -515,6 +575,8 @@ update_label("John Doe", "Clowny")
name = "a perfectly generic identification card"
desc = "A perfectly generic identification card. Looks like it could use some flavor."
access = list(ACCESS_AWAY_GENERAL)
+ icon_state = "retro"
+ uses_overlays = FALSE
/obj/item/card/id/away/hotel
name = "Staff ID"
@@ -528,7 +590,6 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/away/old
name = "a perfectly generic identification card"
desc = "A perfectly generic identification card. Looks like it could use some flavor."
- icon_state = "centcom"
/obj/item/card/id/away/old/sec
name = "Charlie Station Security Officer's ID card"
@@ -559,6 +620,8 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/departmental_budget
name = "departmental card (FUCK)"
desc = "Provides access to the departmental budget."
+ icon_state = "budgetcard"
+ uses_overlays = FALSE
var/department_ID = ACCOUNT_CIV
var/department_name = ACCOUNT_CIV_NAME
@@ -577,30 +640,40 @@ update_label("John Doe", "Clowny")
SSeconomy.dep_cards -= src
return ..()
+/obj/item/card/id/departmental_budget/update_label()
+ return
+
/obj/item/card/id/departmental_budget/civ
department_ID = ACCOUNT_CIV
department_name = ACCOUNT_CIV_NAME
+ icon_state = "civ_budget"
/obj/item/card/id/departmental_budget/eng
department_ID = ACCOUNT_ENG
department_name = ACCOUNT_ENG_NAME
+ icon_state = "eng_budget"
/obj/item/card/id/departmental_budget/sci
department_ID = ACCOUNT_SCI
department_name = ACCOUNT_SCI_NAME
+ icon_state = "sci_budget"
/obj/item/card/id/departmental_budget/med
department_ID = ACCOUNT_MED
department_name = ACCOUNT_MED_NAME
+ icon_state = "med_budget"
/obj/item/card/id/departmental_budget/srv
department_ID = ACCOUNT_SRV
department_name = ACCOUNT_SRV_NAME
+ icon_state = "srv_budget"
/obj/item/card/id/departmental_budget/car
department_ID = ACCOUNT_CAR
department_name = ACCOUNT_CAR_NAME
+ icon_state = "car_budget" //saving up for a new tesla
/obj/item/card/id/departmental_budget/sec
department_ID = ACCOUNT_SEC
department_name = ACCOUNT_SEC_NAME
+ icon_state = "sec_budget"
diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm
index 52f715850fa..6f8903a4cb3 100644
--- a/code/game/objects/items/storage/wallets.dm
+++ b/code/game/objects/items/storage/wallets.dm
@@ -7,7 +7,9 @@
slot_flags = ITEM_SLOT_ID
var/obj/item/card/id/front_id = null
+ var/obj/item/card/id/cached_front_id = null
var/list/combined_access
+ var/cached_flat_icon
/obj/item/storage/wallet/ComponentInitialize()
. = ..()
@@ -61,12 +63,31 @@
. = ..()
refreshID()
-/obj/item/storage/wallet/update_icon()
- var/new_state = "wallet"
+/obj/item/storage/wallet/update_icon(list/override_overlays)
+ if(!override_overlays && front_id == cached_front_id) //Icon didn't actually change
+ return
+ cut_overlays()
+ cached_flat_icon = null
+ cached_front_id = front_id
if(front_id)
- new_state = "wallet_[front_id.icon_state]"
- if(new_state != icon_state) //avoid so many icon state changes.
- icon_state = new_state
+ var/list/add_overlays = list()
+ add_overlays += mutable_appearance(front_id.icon, front_id.icon_state)
+ if(override_overlays)
+ add_overlays += override_overlays
+ else
+ add_overlays += front_id.overlays
+ add_overlays += mutable_appearance(icon, "wallet_overlay")
+ add_overlay(add_overlays)
+
+/obj/item/storage/wallet/proc/get_cached_flat_icon()
+ if(!cached_flat_icon)
+ cached_flat_icon = getFlatIcon(src)
+ return cached_flat_icon
+
+/obj/item/storage/wallet/get_examine_string(mob/user, thats = FALSE)
+ if(front_id)
+ return "[icon2html(get_cached_flat_icon(), user)] [thats? "That's ":""][get_examine_name(user)]" //displays all overlays in chat
+ return ..()
/obj/item/storage/wallet/GetID()
return front_id
diff --git a/code/modules/antagonists/highlander/highlander.dm b/code/modules/antagonists/highlander/highlander.dm
index 5622dbe63d6..aa4a2c0a360 100644
--- a/code/modules/antagonists/highlander/highlander.dm
+++ b/code/modules/antagonists/highlander/highlander.dm
@@ -52,14 +52,13 @@
H.equip_to_slot_or_del(new /obj/item/pinpointer/nuke(H), SLOT_L_STORE)
for(var/obj/item/pinpointer/nuke/P in H)
P.attack_self(H)
- var/obj/item/card/id/W = new(H)
- W.icon_state = "centcom"
+ var/obj/item/card/id/centcom/W = new(H)
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "Highlander"
W.registered_name = H.real_name
ADD_TRAIT(W, TRAIT_NODROP, HIGHLANDER)
- W.update_label(H.real_name)
+ W.update_label()
H.equip_to_slot_or_del(W, SLOT_WEAR_ID)
sword = new(H)
diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm
index 86a2f3d0bd1..91c2b3e0c4f 100644
--- a/code/modules/awaymissions/capture_the_flag.dm
+++ b/code/modules/awaymissions/capture_the_flag.dm
@@ -482,7 +482,7 @@
toggle_helmet = FALSE // see the whites of their eyes
shoes = /obj/item/clothing/shoes/combat
gloves = /obj/item/clothing/gloves/combat
- id = /obj/item/card/id/syndicate
+ id = /obj/item/card/id/away
belt = /obj/item/gun/ballistic/automatic/pistol/deagle/ctf
l_pocket = /obj/item/ammo_box/magazine/recharge/ctf
r_pocket = /obj/item/ammo_box/magazine/recharge/ctf
@@ -495,7 +495,7 @@
var/obj/item/card/id/W = H.wear_id
no_drops += W
W.registered_name = H.real_name
- W.update_label(W.registered_name, W.assignment)
+ W.update_label()
no_drops += H.get_item_by_slot(SLOT_WEAR_SUIT)
no_drops += H.get_item_by_slot(SLOT_GLOVES)
@@ -515,6 +515,7 @@
r_hand = /obj/item/gun/ballistic/automatic/laser/ctf/red
l_pocket = /obj/item/ammo_box/magazine/recharge/ctf/red
r_pocket = /obj/item/ammo_box/magazine/recharge/ctf/red
+ id = /obj/item/card/id/syndicate_command //it's red
/datum/outfit/ctf/red/instagib
r_hand = /obj/item/gun/energy/laser/instakill/red
@@ -525,6 +526,7 @@
r_hand = /obj/item/gun/ballistic/automatic/laser/ctf/blue
l_pocket = /obj/item/ammo_box/magazine/recharge/ctf/blue
r_pocket = /obj/item/ammo_box/magazine/recharge/ctf/blue
+ id = /obj/item/card/id/centcom //it's blue
/datum/outfit/ctf/blue/instagib
r_hand = /obj/item/gun/energy/laser/instakill/blue
diff --git a/code/modules/clothing/outfits/ert.dm b/code/modules/clothing/outfits/ert.dm
index f0aac950467..2f90ed0259e 100644
--- a/code/modules/clothing/outfits/ert.dm
+++ b/code/modules/clothing/outfits/ert.dm
@@ -19,7 +19,7 @@
var/obj/item/card/id/W = H.wear_id
W.registered_name = H.real_name
- W.update_label(W.registered_name, W.assignment)
+ W.update_label()
/datum/outfit/ert/commander
name = "ERT Commander"
@@ -173,7 +173,7 @@
back = /obj/item/storage/backpack/satchel
r_pocket = /obj/item/pda/heads
l_hand = /obj/item/clipboard
- id = /obj/item/card/id
+ id = /obj/item/card/id/centcom
/datum/outfit/centcom_official/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
if(visualsOnly)
@@ -185,7 +185,6 @@
pda.update_label()
var/obj/item/card/id/W = H.wear_id
- W.icon_state = "centcom"
W.access = get_centcom_access("CentCom Official")
W.access += ACCESS_WEAPONS
W.assignment = "CentCom Official"
diff --git a/code/modules/clothing/outfits/standard.dm b/code/modules/clothing/outfits/standard.dm
index d44c43899aa..61d953daced 100644
--- a/code/modules/clothing/outfits/standard.dm
+++ b/code/modules/clothing/outfits/standard.dm
@@ -108,7 +108,7 @@
var/obj/item/card/id/W = H.wear_id
if(W)
W.registered_name = H.real_name
- W.update_label(H.real_name)
+ W.update_label()
/datum/outfit/tunnel_clown
name = "Tunnel Clown"
@@ -133,7 +133,7 @@
W.access = get_all_accesses()
W.assignment = "Tunnel Clown!"
W.registered_name = H.real_name
- W.update_label(H.real_name)
+ W.update_label()
/datum/outfit/psycho
name = "Masked Killer"
@@ -197,7 +197,7 @@
W.access = get_all_accesses()
W.assignment = "Reaper"
W.registered_name = H.real_name
- W.update_label(H.real_name)
+ W.update_label()
/datum/outfit/centcom_commander
name = "CentCom Commander"
@@ -214,14 +214,13 @@
r_pocket = /obj/item/lighter
l_pocket = /obj/item/ammo_box/a357
back = /obj/item/storage/backpack/satchel/leather
- id = /obj/item/card/id
+ id = /obj/item/card/id/centcom
/datum/outfit/centcom_commander/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
if(visualsOnly)
return
var/obj/item/card/id/W = H.wear_id
- W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_centcom_access("CentCom Commander")
W.assignment = "CentCom Commander"
@@ -242,14 +241,13 @@
belt = /obj/item/gun/energy/pulse/pistol/m1911
r_pocket = /obj/item/lighter
back = /obj/item/storage/backpack/satchel/leather
- id = /obj/item/card/id
+ id = /obj/item/card/id/centcom
/datum/outfit/spec_ops/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
if(visualsOnly)
return
var/obj/item/card/id/W = H.wear_id
- W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_centcom_access("Special Ops Officer")
W.assignment = "Special Ops Officer"
@@ -323,14 +321,13 @@
back = /obj/item/storage/backpack/satchel/leather
belt = /obj/item/gun/ballistic/revolver/mateba
- id = /obj/item/card/id
+ id = /obj/item/card/id/centcom
/datum/outfit/soviet/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
if(visualsOnly)
return
var/obj/item/card/id/W = H.wear_id
- W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_centcom_access("Admiral")
W.assignment = "Admiral"
@@ -381,7 +378,7 @@
suit_store = /obj/item/tank/internals/emergency_oxygen/double
belt = /obj/item/gun/ballistic/revolver/mateba
r_hand = /obj/item/gun/energy/pulse/loyalpin
- id = /obj/item/card/id
+ id = /obj/item/card/id/centcom
ears = /obj/item/radio/headset/headset_cent/alt
backpack_contents = list(/obj/item/storage/box=1,\
@@ -404,12 +401,11 @@
var/obj/item/card/id/W = H.wear_id
- W.icon_state = "centcom"
W.access = get_all_accesses()//They get full station access.
W.access += get_centcom_access("Death Commando")//Let's add their alloted CentCom access.
W.assignment = "Death Commando"
W.registered_name = H.real_name
- W.update_label(W.registered_name, W.assignment)
+ W.update_label()
/datum/outfit/death_commando/officer
name = "Death Commando Officer"
@@ -426,7 +422,7 @@
/datum/outfit/debug //Debug objs plus hardsuit
name = "Debug outfit"
- uniform = /obj/item/clothing/under/patriotsuit
+ uniform = /obj/item/clothing/under/patriotsuit
suit = /obj/item/clothing/suit/space/hardsuit/syndi/elite
shoes = /obj/item/clothing/shoes/magboots/advance
suit_store = /obj/item/tank/internals/oxygen
diff --git a/code/modules/economy/account.dm b/code/modules/economy/account.dm
index 627bfbd7f3e..29955448203 100644
--- a/code/modules/economy/account.dm
+++ b/code/modules/economy/account.dm
@@ -67,6 +67,11 @@
if(!message || !bank_cards.len)
return
for(var/obj/A in bank_cards)
+ var/icon_source = A
+ if(istype(A, /obj/item/card/id))
+ var/obj/item/card/id/id_card = A
+ if(id_card.uses_overlays)
+ icon_source = id_card.get_cached_flat_icon()
var/mob/card_holder = recursive_loc_check(A, /mob)
if(ismob(card_holder)) //If on a mob
if(card_holder.client && !(card_holder.client.prefs.chat_toggles & CHAT_BANKCARD) && !force)
@@ -74,13 +79,13 @@
card_holder.playsound_local(get_turf(card_holder), 'sound/machines/twobeep_high.ogg', 50, TRUE)
if(card_holder.can_hear())
- to_chat(card_holder, "[icon2html(A, card_holder)] *[message]*")
+ to_chat(card_holder, "[icon2html(icon_source, card_holder)] *[message]*")
else if(isturf(A.loc)) //If on the ground
for(var/mob/M in hearers(1,get_turf(A)))
if(M.client && !(M.client.prefs.chat_toggles & CHAT_BANKCARD) && !force)
return
playsound(A, 'sound/machines/twobeep_high.ogg', 50, TRUE)
- A.audible_message("[icon2html(A, hearers(A))] *[message]*", null, 1)
+ A.audible_message("[icon2html(icon_source, hearers(A))] *[message]*", null, 1)
break
else
for(var/mob/M in A.loc) //If inside a container with other mobs (e.g. locker)
@@ -88,7 +93,7 @@
return
M.playsound_local(get_turf(M), 'sound/machines/twobeep_high.ogg', 50, TRUE)
if(M.can_hear())
- to_chat(M, "[icon2html(A, M)] *[message]*")
+ to_chat(M, "[icon2html(icon_source, M)] *[message]*")
/datum/bank_account/department
account_holder = "Guild Credit Agency"
diff --git a/code/modules/modular_computers/file_system/programs/card.dm b/code/modules/modular_computers/file_system/programs/card.dm
index 028ba014651..b68fed9c853 100644
--- a/code/modules/modular_computers/file_system/programs/card.dm
+++ b/code/modules/modular_computers/file_system/programs/card.dm
@@ -197,6 +197,7 @@
if(computer && ((id_card.assignment in head_subordinates) || id_card.assignment == "Assistant"))
id_card.assignment = "Unassigned"
remove_nt_access(id_card)
+ id_card.update_label()
if("PRG_edit")
if(computer && authorized())
@@ -204,6 +205,7 @@
var/temp_name = reject_bad_name(input("Enter name.", "Name", id_card.registered_name))
if(temp_name)
id_card.registered_name = temp_name
+ id_card.update_label()
else
computer.visible_message("[computer] buzzes rudely.")
//else if(params["account"])
@@ -237,6 +239,7 @@
remove_nt_access(id_card)
apply_access(id_card, access)
id_card.assignment = t1
+ id_card.update_label()
if("PRG_access")
if(params["allowed"] && computer && authorized())
@@ -278,9 +281,6 @@
else
reg_ids += regsel
- if(id_card)
- id_card.name = text("[id_card.registered_name]'s ID Card ([id_card.assignment])")
-
return 1
/datum/computer_file/program/card_mod/proc/remove_nt_access(obj/item/card/id/id_card)
diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm
index 0d6e9459b1d..ade1e44cd8e 100644
--- a/code/modules/paperwork/contract.dm
+++ b/code/modules/paperwork/contract.dm
@@ -289,6 +289,7 @@
id = worn.GetID()
if(id)
id.icon_state = "gold"
+ id.uses_overlays = TRUE
id.access = get_all_accesses()+get_all_centcom_access()
id.assignment = "Captain"
id.update_label()
diff --git a/icons/obj/card.dmi b/icons/obj/card.dmi
index 507801844cc..d63c5da1e78 100644
Binary files a/icons/obj/card.dmi and b/icons/obj/card.dmi differ
diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi
index ced9e38e058..ec419e471cd 100644
Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ