Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions code/game/machinery/PDApainter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
var/obj/item/pda/storedpda = null
var/obj/item/card/id/storedid = null
var/pda_icons = list(
<<<<<<< HEAD
"Assistant" = "pda",
"Atmospheric Technician" = "pda-atmos",
"Bartender" = "pda-bartender",
Expand Down Expand Up @@ -62,6 +63,66 @@
"Service" = "serv",
"Shaft Miner" = "miner",
"Warden" = "warden")
=======
"Misc: Neutral" = "pda",
"Misc: Assistant" = "pda-assistant",
"Command (Standard)" = "pda-heads",
"Command: Captain" = "pda-captain",
"Service (Standard)" = "pda-service",
"Service: Head of Personnel" = "pda-hop",
"Service: Bartender" = "pda-bartender",
"Service: Chaplain" = "pda-chaplain",
"Service: Clown" = "pda-clown",
"Service: Cook" = "pda-cook",
"Service: Curator" = "pda-library",
"Service: Janitor" = "pda-janitor",
"Service: Lawyer" = "pda-lawyer",
"Service: Mime" = "pda-mime",
"Cargo (Standard)" = "pda-cargo",
"Cargo: Quartermaster" = "pda-qm",
"Cargo: Cargo Technician" = "pda-cargo",
"Cargo: Shaft Miner" = "pda-miner",
"Engineering (Standard)" = "pda-engineer",
"Engineering: Chief Engineer" = "pda-ce",
"Engineering: Station Engineer" = "pda-engineer",
"Engineering: Atmospheric Technician" = "pda-atmos",
"Science (Standard)" = "pda-science",
"Science: Research Director" = "pda-rd",
"Science: Roboticist" = "pda-roboticist",
"Science: Scienctist" = "pda-science",
"Science: Exploration Crew" = "pda-exploration",
"Medical (Standard)" = "pda-medical",
"Medical: Chief Medical Officer" = "pda-cmo",
"Medical: Medical Doctor" = "pda-medical",
"Medical: Chemist" = "pda-chemistry",
"Medical: Paramedic" = "pda-paramedical",
"Medical: Geneticist" = "pda-genetics",
"Medical: Virologist" = "pda-virology",
"Security (Standard)" = "pda-security",
"Security: Head of Security" = "pda-hos",
"Security: Warden" = "pda-warden",
"Security: Security Officier" = "pda-security",
"Security: Detective" = "pda-detective",
"Security: Brig Physician" = "pda-brigphys",
"Security: Deputy" = "pda-deputy",
"Misc: Prisoner" = "pda-prisoner"
)

var/valid_jobs = list(
"----Command----", "Command (Custom)",JOB_NAME_CAPTAIN,"Acting Captain",
"----Service----", "Service (Custom)", JOB_NAME_ASSISTANT, JOB_NAME_HEADOFPERSONNEL, JOB_NAME_BARTENDER, JOB_NAME_COOK,
JOB_NAME_BOTANIST, JOB_NAME_JANITOR, JOB_NAME_CURATOR,JOB_NAME_CHAPLAIN, JOB_NAME_LAWYER,
JOB_NAME_CLOWN, JOB_NAME_MIME, JOB_NAME_BARBER, JOB_NAME_STAGEMAGICIAN,
"----Cargo----","Cargo (Custom)",JOB_NAME_QUARTERMASTER, JOB_NAME_CARGOTECHNICIAN,JOB_NAME_SHAFTMINER,
"----Engineering----","Engineering (Custom)",JOB_NAME_CHIEFENGINEER, JOB_NAME_STATIONENGINEER, JOB_NAME_ATMOSPHERICTECHNICIAN,
"----Science----","Science (Custom)",JOB_NAME_RESEARCHDIRECTOR, JOB_NAME_SCIENTIST, JOB_NAME_ROBOTICIST, JOB_NAME_EXPLORATIONCREW,
"----Medical----","Medical (Custom)",JOB_NAME_CHIEFMEDICALOFFICER, JOB_NAME_MEDICALDOCTOR, JOB_NAME_CHEMIST, JOB_NAME_GENETICIST,
JOB_NAME_VIROLOGIST, JOB_NAME_PARAMEDIC, JOB_NAME_PSYCHIATRIST,
"----Security----","Security (Custom)",JOB_NAME_HEADOFSECURITY, JOB_NAME_WARDEN, JOB_NAME_DETECTIVE, JOB_NAME_SECURITYOFFICER,
JOB_NAME_BRIGPHYSICIAN, JOB_NAME_DEPUTY,
"----MISC----","Unassigned",JOB_NAME_PRISONER
)
>>>>>>> 2fc199e2c9... adds an option menu for card style from agent card forging (#7609)
max_integrity = 200
var/list/colorlist = list()

Expand All @@ -71,13 +132,26 @@
pda_icons += list(
"Transparent" = "pda-clear",
"Syndicate" = "pda-syndi"
<<<<<<< HEAD
)
id_icons += list(
"CentCom" = "centcom",
"ERT" = "ert",
"Syndicate" = "syndicate",
"Clown Operative" = "clown_op",
)
=======
)
valid_jobs += list(
"CentCom (Custom)",
"CentCom",
"ERT",
"VIP",
"King",
"Syndicate",
"Clown Operative"
)
>>>>>>> 2fc199e2c9... adds an option menu for card style from agent card forging (#7609)
to_chat(user, "<span class='warning'>You short out the design locking circuitry, allowing contraband and special designs.</span>")
obj_flags |= EMAGGED
/obj/machinery/pdapainter/update_icon()
Expand Down
31 changes: 29 additions & 2 deletions code/game/objects/items/cards_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,20 @@ update_label("John Doe", "Clowny")
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over the ID, copying its access.</span>")

/obj/item/card/id/syndicate/attack_self(mob/user)
var/valid_jobs = list( // copy-paste from hop card paint machine, but this has more options, and valid to be static.
"----Command----", "Command (Custom)",JOB_NAME_CAPTAIN,
"----Service----", "Service (Custom)", JOB_NAME_ASSISTANT, JOB_NAME_HEADOFPERSONNEL, JOB_NAME_BARTENDER, JOB_NAME_COOK,
JOB_NAME_BOTANIST, JOB_NAME_JANITOR, JOB_NAME_CURATOR,JOB_NAME_CHAPLAIN, JOB_NAME_LAWYER,
JOB_NAME_CLOWN, JOB_NAME_MIME, JOB_NAME_BARBER, JOB_NAME_STAGEMAGICIAN,
"----Cargo----","Cargo (Custom)",JOB_NAME_QUARTERMASTER, JOB_NAME_CARGOTECHNICIAN,JOB_NAME_SHAFTMINER,
"----Engineering----","Engineering (Custom)",JOB_NAME_CHIEFENGINEER, JOB_NAME_STATIONENGINEER, JOB_NAME_ATMOSPHERICTECHNICIAN,
"----Science----","Science (Custom)",JOB_NAME_RESEARCHDIRECTOR, JOB_NAME_SCIENTIST, JOB_NAME_ROBOTICIST, JOB_NAME_EXPLORATIONCREW,
"----Medical----","Medical (Custom)",JOB_NAME_CHIEFMEDICALOFFICER, JOB_NAME_MEDICALDOCTOR, JOB_NAME_CHEMIST, JOB_NAME_GENETICIST,
JOB_NAME_VIROLOGIST, JOB_NAME_PARAMEDIC, JOB_NAME_PSYCHIATRIST,
"----Security----","Security (Custom)",JOB_NAME_HEADOFSECURITY, JOB_NAME_WARDEN, JOB_NAME_DETECTIVE, JOB_NAME_SECURITYOFFICER,
JOB_NAME_BRIGPHYSICIAN, JOB_NAME_DEPUTY,
"----MISC----","Unassigned",JOB_NAME_PRISONER,"CentCom (Custom)","CentCom","ERT",JOB_NAME_VIP,JOB_NAME_KING,"Syndicate","Clown Operative"
)
if(isliving(user) && user.mind)
var/first_use = registered_name ? FALSE : TRUE
if(!(user.mind.special_role || anyone)) //Unless anyone is allowed, only syndies can use the card, to stop metagaming.
Expand All @@ -413,13 +427,26 @@ update_label("John Doe", "Clowny")
var/target_occupation = stripped_input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", assignment ? assignment : "Assistant", MAX_MESSAGE_LEN)
if(!target_occupation)
return
log_id("[key_name(user)] forged agent ID [src] name to [input_name] and occupation to [target_occupation] at [AREACOORD(user)].")

// copy paste from HoP card painting machine
var/target_id_style = "-"
while(target_id_style[1] == "-") // trick. "-" is only non-valid option here.
target_id_style = input(user, "Select an ID skin (Cancel to change nothing)\nCard HUD icon will follow the job you choose.", "Chameleon card shape") as null|anything in valid_jobs
if(!target_id_style)
break

log_id("[key_name(user)] forged agent ID [src] name to [input_name] and occupation to [target_occupation][target_id_style ? " with [target_id_style] card style" : " with non changed [icon_state] shape, [hud_state] hud style"] at [AREACOORD(user)].")
registered_name = input_name
assignment = target_occupation
if(target_id_style)
icon_state = get_cardstyle_by_jobname(target_id_style)
hud_state = get_hud_by_jobname(target_id_style)
var/mob/living/carbon/human/H = user
H.sec_hud_set_ID()
update_label()
forged = TRUE
to_chat(user, "<span class='notice'>You successfully forge the ID card.</span>")
log_game("[key_name(user)] has forged \the [initial(name)] with name \"[registered_name]\" and occupation \"[assignment]\".")
log_game("[key_name(user)] has forged \the [initial(name)] with name \"[registered_name]\" and occupation \"[assignment]\"[target_id_style ? " with [target_id_style] card style" : " with non changed [icon_state] shape, [hud_state] hud style"].")

// First time use automatically sets the account id to the user.
if (first_use && !registered_account)
Expand Down