From 9d751674ab809288c18038bceae38e10d211a99e Mon Sep 17 00:00:00 2001 From: PhantornRU Date: Sun, 12 Nov 2023 19:51:14 +1000 Subject: [PATCH 1/5] =?UTF-8?q?FEAT:=20=D0=A0=D0=BE=D0=BB=D0=B8=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=B8=D1=87=D0=BA=D0=BE=D0=B2=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=B2=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=81=D0=BE=D0=BB=D1=8C=20=D0=93=D0=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/jobs/code/job/engineering_jobs.dm | 5 +++++ modular_ss220/jobs/code/job/medical_jobs.dm | 5 +++++ modular_ss220/jobs/code/job/science_jobs.dm | 5 +++++ modular_ss220/jobs/code/job/security_jobs.dm | 5 +++++ modular_ss220/jobs/code/jobs.dm | 17 +++++++++++++++++ 5 files changed, 37 insertions(+) diff --git a/modular_ss220/jobs/code/job/engineering_jobs.dm b/modular_ss220/jobs/code/job/engineering_jobs.dm index b50807bc4cb8..b85993753b84 100644 --- a/modular_ss220/jobs/code/job/engineering_jobs.dm +++ b/modular_ss220/jobs/code/job/engineering_jobs.dm @@ -30,3 +30,8 @@ head = /obj/item/clothing/head/soft/orange if("Engineer Student") head = /obj/item/clothing/head/beret/eng + +// Identification jobs for console +/datum/job/engineer/trainee + title = "Trainee Engineer" + hidden_from_job_prefs = TRUE diff --git a/modular_ss220/jobs/code/job/medical_jobs.dm b/modular_ss220/jobs/code/job/medical_jobs.dm index 8d098a8b4cbc..1e60c36be628 100644 --- a/modular_ss220/jobs/code/job/medical_jobs.dm +++ b/modular_ss220/jobs/code/job/medical_jobs.dm @@ -30,3 +30,8 @@ if("Student Medical Doctor") head = /obj/item/clothing/head/surgery/green/light uniform = /obj/item/clothing/under/rank/medical/scrubs/green/light + +// Identification jobs for console +/datum/job/doctor/intern + title = "Intern" + hidden_from_job_prefs = TRUE diff --git a/modular_ss220/jobs/code/job/science_jobs.dm b/modular_ss220/jobs/code/job/science_jobs.dm index 2b51cb306222..cca908645841 100644 --- a/modular_ss220/jobs/code/job/science_jobs.dm +++ b/modular_ss220/jobs/code/job/science_jobs.dm @@ -20,3 +20,8 @@ uniform = /obj/item/clothing/under/rank/scientist/student/assistant if(H.gender == FEMALE) uniform = /obj/item/clothing/under/rank/scientist/student/assistant/skirt + +// Identification jobs for console +/datum/job/scientist/student + title = "Student Scientist" + hidden_from_job_prefs = TRUE diff --git a/modular_ss220/jobs/code/job/security_jobs.dm b/modular_ss220/jobs/code/job/security_jobs.dm index ca6d70161673..3651ac26e446 100644 --- a/modular_ss220/jobs/code/job/security_jobs.dm +++ b/modular_ss220/jobs/code/job/security_jobs.dm @@ -24,3 +24,8 @@ uniform = /obj/item/clothing/under/rank/security/cadet/assistant/skirt if("Security Graduate") head = /obj/item/clothing/head/beret/sec + +// Identification jobs for console +/datum/job/officer/cadet + title = "Security Cadet" + hidden_from_job_prefs = TRUE diff --git a/modular_ss220/jobs/code/jobs.dm b/modular_ss220/jobs/code/jobs.dm index 7c0ef38ead8f..a70eb08e95be 100644 --- a/modular_ss220/jobs/code/jobs.dm +++ b/modular_ss220/jobs/code/jobs.dm @@ -12,3 +12,20 @@ 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 From b665dc190ba1b6bc57b4debae58d31539027bec4 Mon Sep 17 00:00:00 2001 From: PhantornRU Date: Sun, 12 Nov 2023 21:35:34 +1000 Subject: [PATCH 2/5] =?UTF-8?q?=D0=A1=D0=BA=D0=B8=D0=BD=D1=8B=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=BA=D0=B0=D1=80=D1=82=20=D0=B2=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=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 From 593f16b9c28bd0da3bfea25d6e18d9010e41cb9f Mon Sep 17 00:00:00 2001 From: PhantornRU Date: Mon, 13 Nov 2023 22:21:03 +1000 Subject: [PATCH 3/5] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/jobs/code/cards_ids.dm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/modular_ss220/jobs/code/cards_ids.dm b/modular_ss220/jobs/code/cards_ids.dm index b7dc37e086e1..825a606c645d 100644 --- a/modular_ss220/jobs/code/cards_ids.dm +++ b/modular_ss220/jobs/code/cards_ids.dm @@ -46,18 +46,13 @@ 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")) + if(mode == IDCOMPUTER_SCREEN_TRANSFER) // JOB TRANSFER + if(modify && scan && !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 From 03e9a497bbf458b0633dea59865592790b0fd1fc Mon Sep 17 00:00:00 2001 From: PhantornRU Date: Mon, 13 Nov 2023 22:57:53 +1000 Subject: [PATCH 4/5] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20retu?= =?UTF-8?q?rn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/jobs/code/cards_ids.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modular_ss220/jobs/code/cards_ids.dm b/modular_ss220/jobs/code/cards_ids.dm index 825a606c645d..0baffc79a7c2 100644 --- a/modular_ss220/jobs/code/cards_ids.dm +++ b/modular_ss220/jobs/code/cards_ids.dm @@ -57,9 +57,7 @@ GLOBAL_LIST_INIT(Jobs_SS220, list("intern", "cadet", "trainee", "student")) return data /obj/machinery/computer/card/ui_act(action, params) - if(!..()) - return FALSE - . = TRUE + . = ..() switch(action) if("skin") From aef201889cc236053eeb8e76e669ff890752c950 Mon Sep 17 00:00:00 2001 From: PhantornRU <41479614+PhantornRU@users.noreply.github.com> Date: Wed, 15 Nov 2023 17:32:13 +1000 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com> --- modular_ss220/jobs/code/cards_ids.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modular_ss220/jobs/code/cards_ids.dm b/modular_ss220/jobs/code/cards_ids.dm index 0baffc79a7c2..f64355e69a37 100644 --- a/modular_ss220/jobs/code/cards_ids.dm +++ b/modular_ss220/jobs/code/cards_ids.dm @@ -49,9 +49,9 @@ GLOBAL_LIST_INIT(Jobs_SS220, list("intern", "cadet", "trainee", "student")) if(mode == IDCOMPUTER_SCREEN_TRANSFER) // JOB TRANSFER if(modify && scan && !target_dept) data["jobs_engineering"] |= "Trainee Engineer" - data["jobs_medical"] |= "Intern" - data["jobs_science"] |= "Student Scientist" - data["jobs_security"] |= "Security Cadet" + 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 @@ -64,10 +64,11 @@ GLOBAL_LIST_INIT(Jobs_SS220, list("intern", "cadet", "trainee", "student")) 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 + if(!skin || !(skin in GLOB.Jobs_SS220)) + return FALSE + + modify.icon_state = skin + return TRUE /obj/item/card/id/medical/intern name = "Intern ID"