Skip to content

Commit

Permalink
HUD, Карты, альт-роли, одежда, должности, внесение в глобал списки
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantornRU committed Oct 7, 2023
1 parent e035bd9 commit a7f5dcc
Show file tree
Hide file tree
Showing 12 changed files with 196 additions and 113 deletions.
7 changes: 7 additions & 0 deletions modular_ss220/jobs/_jobs.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@

#include "code/access.dm"
#include "code/cards_ids.dm"
#include "code/jobs.dm"
#include "code/clothing/engineering_clothing.dm"
#include "code/clothing/medical_clothing.dm"
#include "code/clothing/science_clothing.dm"
#include "code/clothing/security_clothing.dm"
#include "code/job/engineering_jobs.dm"
#include "code/job/medical_jobs.dm"
#include "code/job/science_jobs.dm"
#include "code/job/security_jobs.dm"
92 changes: 11 additions & 81 deletions modular_ss220/jobs/code/cards_ids.dm
Original file line number Diff line number Diff line change
@@ -1,91 +1,27 @@
// !!!!!!!! сделать автоустановку роли новичкам при загрузке

// /proc/get_novice_card_skins()
// return list("cadet", "intern", "student", "trainee")

// get_station_card_skins()
// var/test = "Test1: \n"
// for(var/i in ..())
// test += ", [i]"
// message_admins(test)

// test = "Test2: \n"
// for(var/i in get_novice_card_skins())
// test += ", [i]"
// message_admins(test)

// test = "Test3: \n"
// for(var/i in ..() + get_novice_card_skins())
// test += ", [i]"
// message_admins(test)

// return ..() + get_novice_card_skins()
// Для отрисовки ХУД'ов.
GLOBAL_LIST_INIT(Jobs_SS220, list("intern", "cadet", "trainee", "student"))

/proc/get_all_medical_novice_tittles()
return list("Intern", "Medical Assistant", "Student Medical Doctor")

/proc/get_all_security_novice_tittles()
return list("Cadet")
return list("Security Cadet", "Security Assistant", "Security Graduate")

/proc/get_all_engineering_novice_tittles()
return list("Trainee")
return list("Trainee Engineer", "Engineer Assistant", "Technical Assistant", "Engineer Student", "Technical Student", "Technical Trainee")

/proc/get_all_science_novice_tittles()
return list("Student")
return list("Student Scientist", "Scientist Assistant", "Scientist Pregraduate", "Scientist Graduate", "Scientist Postgraduate")

/proc/get_all_novice_tittles()
return get_all_medical_novice_tittles() + get_all_security_novice_tittles() + get_all_engineering_novice_tittles() + get_all_science_novice_tittles()

// /proc/get_modular_ss220_hud_image(mob/living/carbon/human/H)
// var/image/I
// if(!H.wear_id)
// return
// if(H.wear_id.assignment == "Intern" || H.wear_id.get_ID_assignment() in get_all_novice_tittles())
// I = image('modular_ss220/jobs/icons/hud.dmi', src, "")
// I.appearance_flags = RESET_COLOR | RESET_TRANSFORM

// return I



//var/image/holder = I


// /atom/prepare_huds()
// . = ..()
// var/hud = ID_HUD
// if(hud in hud_possible) // копипаст наследуемого метода
// var/hint = hud_possible[hud]
// switch(hint)
// if(HUD_LIST_LIST)
// hud_list[hud] = list()
// else
// var/image/I = image('modular_ss220/jobs/icons/hud.dmi', src, "")
// I.appearance_flags = RESET_COLOR | RESET_TRANSFORM
// hud_list[ID_HUD] = I //непральна


// /mob/living/carbon/human/sec_hud_set_ID()
// if(!wear_id)
// return ..()

// if()

// //.dmi с худама
// var/image/I = image('modular_ss220/jobs/icons/hud.dmi', src, "")
// I.appearance_flags = RESET_COLOR | RESET_TRANSFORM

// //Устанавливаем ХУДы с .dmi
// var/image/holder = I
// holder.icon_state = "hudunknown"
// holder.icon_state = "hud[ckey(wear_id.get_job_name())]"
// sec_hud_set_security_status()




/proc/get_all_novice_huds()
return list("intern", "cadet", "trainee", "student")
/mob/living/carbon/human/sec_hud_set_ID()
var/image/holder = hud_list[ID_HUD]
holder.icon = 'icons/mob/hud.dmi'
if(wear_id && wear_id.get_job_name() in GLOB.Jobs_SS220)

Check warning on line 22 in modular_ss220/jobs/code/cards_ids.dm

View workflow job for this annotation

GitHub Actions / Run Linters

ambiguous `&&` on left side of an `in`
holder.icon = 'modular_ss220/jobs/icons/hud.dmi'
. = ..()

/obj/item/get_job_name() //Used in secHUD icon generation
var/assignmentName = get_ID_assignment(if_no_id = "Unknown")
Expand All @@ -107,12 +43,6 @@

. = ..()

// /atom/prepare_huds()
// . = ..()
// var/image/img = image('modular_ss220/jobs/icons/hud.dmi', src, "")
// img.appearance_flags = RESET_COLOR | RESET_TRANSFORM
// hud_list[ID_HUD] += img

/obj/item/card/id/medical/intern
name = "Intern ID"
registered_name = "Intern"
Expand Down
26 changes: 26 additions & 0 deletions modular_ss220/jobs/code/clothing/engineering_clothing.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/obj/item/clothing/under/rank/engineer/trainee
name = "engineer trainee jumpsuit"
icon = 'modular_ss220/jobs/icons/clothing/uniforms.dmi'
icon_override = 'modular_ss220/jobs/icons/clothing/mob/uniform.dmi'
//lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi'
//righthand_file = 'icons/mob/inhands/clothing_righthand.dmi'
icon_state = "trainee_s"
item_color = "trainee"
sprite_sheets = null

/obj/item/clothing/under/rank/engineer/trainee/skirt
name = "engineer trainee jumpskirt"
icon_state = "traineef_s"
item_color = "traineef"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS

/obj/item/clothing/under/rank/engineer/trainee/assistant
name = "engineer assistant jumpsuit"
icon_state = "eng_ass_s"
item_color = "eng_ass"

/obj/item/clothing/under/rank/engineer/trainee/assistant/skirt
name = "engineer assistant jumpskirt"
icon_state = "eng_ass_f_s"
item_color = "eng_ass_f"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
7 changes: 3 additions & 4 deletions modular_ss220/jobs/code/clothing/medical_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
icon_override = 'modular_ss220/jobs/icons/clothing/mob/uniform.dmi'
//lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi'
//righthand_file = 'icons/mob/inhands/clothing_righthand.dmi'
sprite_sheets = null //если не сработает icon_override, то использовать: (и снизу тоже у зеленки)
// sprite_sheets = list(
// "Human" = 'modular_ss220/jobs/icons/clothing/mob/uniform.dmi',
// )
sprite_sheets = null

name = "intern jumpsuit"
icon_state = "intern_s"
Expand Down Expand Up @@ -36,6 +33,7 @@
icon_override = 'modular_ss220/jobs/icons/clothing/mob/uniform.dmi'
icon_state = "scrubsgreen"
item_color = "scrubsgreen"
sprite_sheets = null

/obj/item/clothing/head/surgery/green/light
name = "light green surgical cap"
Expand All @@ -44,3 +42,4 @@
icon_override = 'modular_ss220/jobs/icons/clothing/mob/head.dmi'
icon_state = "surgcap_green"
item_color = "surgcap_green"
sprite_sheets = null
26 changes: 26 additions & 0 deletions modular_ss220/jobs/code/clothing/science_clothing.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/obj/item/clothing/under/rank/scientist/student
name = "scientist student jumpsuit"
icon = 'modular_ss220/jobs/icons/clothing/uniforms.dmi'
icon_override = 'modular_ss220/jobs/icons/clothing/mob/uniform.dmi'
//lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi'
//righthand_file = 'icons/mob/inhands/clothing_righthand.dmi'
icon_state = "student_s"
item_color = "student"
sprite_sheets = null

/obj/item/clothing/under/rank/scientist/student/skirt
name = "scientist student jumpskirt"
icon_state = "studentf_s"
item_color = "studentf"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS

/obj/item/clothing/under/rank/scientist/student/assistant
name = "scientist assistant jumpsuit"
icon_state = "sci_ass_s"
item_color = "sci_ass"

/obj/item/clothing/under/rank/scientist/student/assistant/skirt
name = "scientist assistant jumpskirt"
icon_state = "sci_ass_f_s"
item_color = "sci_ass_f"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
26 changes: 26 additions & 0 deletions modular_ss220/jobs/code/clothing/security_clothing.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/obj/item/clothing/under/rank/security/cadet
name = "security cadet jumpsuit"
icon = 'modular_ss220/jobs/icons/clothing/uniforms.dmi'
icon_override = 'modular_ss220/jobs/icons/clothing/mob/uniform.dmi'
//lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi'
//righthand_file = 'icons/mob/inhands/clothing_righthand.dmi'
icon_state = "cadet_s"
item_color = "cadet"
sprite_sheets = null

/obj/item/clothing/under/rank/security/cadet/skirt
name = "security cadet jumpskirt"
icon_state = "cadetf_s"
item_color = "cadetf"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS

/obj/item/clothing/under/rank/security/cadet/assistant
name = "security assistant jumpsuit"
icon_state = "sec_ass_s"
item_color = "sec_ass"

/obj/item/clothing/under/rank/security/cadet/assistant/skirt
name = "security assistant jumpskirt"
icon_state = "sec_ass_f_s"
item_color = "sec_ass_f"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
32 changes: 32 additions & 0 deletions modular_ss220/jobs/code/job/engineering_jobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/datum/job/engineer/New()
. = ..()
alt_titles |= get_all_engineering_novice_tittles()

/datum/station_department/engineering/New()
. = ..()
department_roles |= get_all_engineering_novice_tittles()

/datum/outfit/job/engineer/pre_equip(mob/living/carbon/human/H, visualsOnly)
. = ..()
if(H.mind && H.mind.role_alt_title)
if(H.mind.role_alt_title in get_all_engineering_novice_tittles())
uniform = /obj/item/clothing/under/rank/engineer/trainee
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/engineer/trainee/skirt
id = /obj/item/card/id/engineering/trainee
gloves = /obj/item/clothing/gloves/color/orange

switch(H.mind.role_alt_title)
if("Engineer Assistant")
uniform = /obj/item/clothing/under/rank/engineer/trainee/assistant
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/engineer/trainee/assistant/skirt
if("Technical Assistant")
uniform = /obj/item/clothing/under/rank/engineer/trainee/assistant
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/engineer/trainee/assistant/skirt
head = /obj/item/clothing/head/soft/orange
if("Technical Student", "Technical Trainee")
head = /obj/item/clothing/head/soft/orange
if("Engineer Student")
head = /obj/item/clothing/head/beret/eng
31 changes: 3 additions & 28 deletions modular_ss220/jobs/code/job/medical_jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@
. = ..()
department_roles |= get_all_medical_novice_tittles()

/datum/nttc_configuration/New()
. = ..()
var/list/job_radio_dict = list()

for(var/i in get_all_medical_novice_tittles())
job_radio_dict.Add(list("[i]" = "medradio"))
for(var/i in get_all_security_novice_tittles())
job_radio_dict.Add(list("[i]" = "secradio"))
for(var/i in get_all_engineering_novice_tittles())
job_radio_dict.Add(list("[i]" = "engradio"))
for(var/i in get_all_science_novice_tittles())
job_radio_dict.Add(list("[i]" = "scirradio"))

all_jobs |= job_radio_dict

/datum/outfit/job/doctor/pre_equip(mob/living/carbon/human/H, visualsOnly)
. = ..()
if(H.mind && H.mind.role_alt_title)
Expand All @@ -29,29 +14,19 @@
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/medical/intern/skirt
id = /obj/item/card/id/medical/intern
//l_pocket = /obj/item/paper/deltainfo
l_hand = /obj/item/storage/firstaid/o2
mask = /obj/item/clothing/mask/surgical
gloves = /obj/item/clothing/gloves/color/latex
glasses = /obj/item/clothing/glasses/hud/security/sunglasses // !!!! ДЛЯ ТЕСТА

switch(H.mind.role_alt_title)
if("Intern")
uniform = /obj/item/clothing/under/rank/medical/intern
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/medical/intern/skirt
if("Student Medical Doctor")
head = /obj/item/clothing/head/surgery/green/light
uniform = /obj/item/clothing/under/rank/medical/scrubs/green/light
if("Medical Assistant")
uniform = /obj/item/clothing/under/rank/medical/intern/assistant
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/medical/intern/assistant/skirt



// "student scientist" = "Учёный-практикант",
// "Scientist Assistant" = "Научный Ассистент",
// "Scientist Pregraduate" = "Учёный-бакалавр",
// "Scientist Graduate" = "Научный выпускник",
// "Scientist Postgraduate" = "Учёный-аспирант",
if("Student Medical Doctor")
head = /obj/item/clothing/head/surgery/green/light
uniform = /obj/item/clothing/under/rank/medical/scrubs/green/light
22 changes: 22 additions & 0 deletions modular_ss220/jobs/code/job/science_jobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/datum/job/scientist/New()
. = ..()
alt_titles |= get_all_science_novice_tittles()

/datum/station_department/science/New()
. = ..()
department_roles |= get_all_science_novice_tittles()

/datum/outfit/job/scientist/pre_equip(mob/living/carbon/human/H, visualsOnly)
. = ..()
if(H.mind && H.mind.role_alt_title)
if(H.mind.role_alt_title in get_all_science_novice_tittles())
uniform = /obj/item/clothing/under/rank/scientist/student
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/scientist/student/skirt
id = /obj/item/card/id/research/student

switch(H.mind.role_alt_title)
if("Scientist Assistant")
uniform = /obj/item/clothing/under/rank/scientist/student/assistant
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/scientist/student/assistant/skirt
26 changes: 26 additions & 0 deletions modular_ss220/jobs/code/job/security_jobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/datum/job/officer/New()
. = ..()
alt_titles = get_all_security_novice_tittles() // =, а не |=, т.к. отсутствуют альт. названия

/datum/station_department/security/New()
. = ..()
department_roles |= get_all_security_novice_tittles()

/datum/outfit/job/officer/pre_equip(mob/living/carbon/human/H, visualsOnly)
. = ..()
if(H.mind && H.mind.role_alt_title)
if(H.mind.role_alt_title in get_all_security_novice_tittles())
uniform = /obj/item/clothing/under/rank/security/cadet
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/security/cadet/skirt
head = /obj/item/clothing/head/soft/sec
id = /obj/item/card/id/security/cadet
l_pocket = /obj/item/reagent_containers/spray/pepper
//box = /obj/item/storage/box/survival_security/cadet
switch(H.mind.role_alt_title)
if("Security Assistant")
uniform = /obj/item/clothing/under/rank/security/cadet/assistant
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/security/cadet/assistant/skirt
if("Security Graduate")
head = /obj/item/clothing/head/beret/sec
14 changes: 14 additions & 0 deletions modular_ss220/jobs/code/jobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/nttc_configuration/New()
. = ..()
var/list/job_radio_dict = list()

for(var/i in get_all_medical_novice_tittles())
job_radio_dict.Add(list("[i]" = "medradio"))
for(var/i in get_all_security_novice_tittles())
job_radio_dict.Add(list("[i]" = "secradio"))
for(var/i in get_all_engineering_novice_tittles())
job_radio_dict.Add(list("[i]" = "engradio"))
for(var/i in get_all_science_novice_tittles())
job_radio_dict.Add(list("[i]" = "scirradio"))

all_jobs |= job_radio_dict
Binary file modified modular_ss220/jobs/icons/card.dmi
Binary file not shown.

0 comments on commit a7f5dcc

Please sign in to comment.