From b665dc190ba1b6bc57b4debae58d31539027bec4 Mon Sep 17 00:00:00 2001 From: PhantornRU Date: Sun, 12 Nov 2023 21:35:34 +1000 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BA=D0=B8=D0=BD=D1=8B=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=BA=D0=B0=D1=80=D1=82=20=D0=B2=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=81=D0=BE=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/jobs/code/cards_ids.dm | 33 ++++++++++++++++++++++++++++ modular_ss220/jobs/code/jobs.dm | 17 -------------- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/modular_ss220/jobs/code/cards_ids.dm b/modular_ss220/jobs/code/cards_ids.dm index 5ad4386a8f14..b7dc37e086e1 100644 --- a/modular_ss220/jobs/code/cards_ids.dm +++ b/modular_ss220/jobs/code/cards_ids.dm @@ -43,6 +43,39 @@ GLOBAL_LIST_INIT(Jobs_SS220, list("intern", "cadet", "trainee", "student")) . = ..() +/obj/machinery/computer/card/ui_data(mob/user) + var/list/data = ..() + + switch(mode) + if(IDCOMPUTER_SCREEN_TRANSFER) // JOB TRANSFER + if(modify) + if(!scan) + return data + + if(!target_dept) + data["jobs_engineering"] |= "Trainee Engineer" + data["jobs_medical"] |= "Intern" + data["jobs_science"] |= "Student Scientist" + data["jobs_security"] |= "Security Cadet" + data["card_skins"] |= format_card_skins(GLOB.Jobs_SS220) // + format_card_skins(list("intern", "cadet", "trainee", "student")) + + return data + +/obj/machinery/computer/card/ui_act(action, params) + if(!..()) + return FALSE + . = TRUE + + switch(action) + if("skin") + if(!modify) + return FALSE + var/skin = params["skin_target"] + var/skin_list = GLOB.Jobs_SS220 + if(skin in skin_list) + modify.icon_state = skin + return + /obj/item/card/id/medical/intern name = "Intern ID" registered_name = "Intern" diff --git a/modular_ss220/jobs/code/jobs.dm b/modular_ss220/jobs/code/jobs.dm index a70eb08e95be..7c0ef38ead8f 100644 --- a/modular_ss220/jobs/code/jobs.dm +++ b/modular_ss220/jobs/code/jobs.dm @@ -12,20 +12,3 @@ job_radio_dict.Add(list("[i]" = "scirradio")) all_jobs |= job_radio_dict - -/obj/machinery/computer/card/ui_data(mob/user) - var/list/data = ..() - - switch(mode) - if(IDCOMPUTER_SCREEN_TRANSFER) // JOB TRANSFER - if(modify) - if(!scan) - return data - - if(!target_dept) - data["jobs_engineering"] |= "Trainee Engineer" - data["jobs_medical"] |= "Intern" - data["jobs_science"] |= "Student Scientist" - data["jobs_security"] |= "Security Cadet" - - return data