Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: убираем должность новичков, оставляя их альтернативными названиями #723

Closed
wants to merge 4 commits into from
Closed
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
33 changes: 32 additions & 1 deletion modular_ss220/jobs/code/cards_ids.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Для отрисовки ХУД'ов.
GLOBAL_LIST_INIT(Jobs_SS220, list("intern", "cadet", "trainee", "student"))
GLOBAL_LIST_INIT(Jobs_titles_SS220, list("Intern", "Security Cadet", "Trainee Engineer", "Student Scientist"))
GLOBAL_LIST_INIT(Jobs_titles_SS220, Jobs_novice_titles_SS220)
GLOBAL_LIST_INIT(Jobs_novice_titles_SS220, list("Intern", "Security Cadet", "Trainee Engineer", "Student Scientist"))

/proc/get_all_medical_novice_titles()
return list("Intern", "Medical Assistant", "Student Medical Doctor")
Expand Down Expand Up @@ -58,8 +59,38 @@ GLOBAL_LIST_INIT(Jobs_titles_SS220, list("Intern", "Security Cadet", "Trainee En
return data

/obj/machinery/computer/card/ui_act(action, params)
var/is_alt_title_rewrite = FALSE
var/job_alt_tittle
if(action == "assign") // transfer to a new job
if(!modify)
return

job_alt_tittle = params["assign_target"]
if(job_alt_tittle in GLOB.Jobs_novice_titles_SS220)
//for fast find job without check all jobs (!!!for alt_titles job with icon like novice roles!!!)
var/list/job_dict = list(
"Intern" = /datum/job/doctor,
"Security Cadet" = /datum/job/officer,
"Trainee Engineer" = /datum/job/engineer,
"Student Scientist" = /datum/job/scientist,
)
var/job_type = job_dict[job_alt_tittle]
var/datum/job/job
if(!job_type) // gatto
return
job = new job_type

if(length(job.alt_titles) && (job_alt_tittle in job.alt_titles))
params["assign_target"] = job.title
is_alt_title_rewrite = TRUE
qdel(job)

. = ..()

if(is_alt_title_rewrite)
modify.assignment = job_alt_tittle
regenerate_id_name()

switch(action)
if("skin")
if(!modify)
Expand Down
5 changes: 0 additions & 5 deletions modular_ss220/jobs/code/job/engineering_jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@
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
5 changes: 0 additions & 5 deletions modular_ss220/jobs/code/job/medical_jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@
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
5 changes: 0 additions & 5 deletions modular_ss220/jobs/code/job/science_jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,3 @@
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
5 changes: 0 additions & 5 deletions modular_ss220/jobs/code/job/security_jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@
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
Loading