Job specific ID cards (#45112)

* Job based IDs attempt one

* This doesn't actually work

* Back to overlays

* The Comment Section

* Cached flat icons
This commit is contained in:
Alek2ander
2019-07-14 07:24:35 +03:00
committed by Rob Bailey
parent 73f2b2804e
commit 4e26573f7b
12 changed files with 141 additions and 45 deletions
@@ -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("<span class='notice'>[computer] buzzes rudely.</span>")
//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)