Skip to content

Commit

Permalink
Иконка накладывается поверх через хардкод, но не берется из доп. .dmi
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantornRU committed Oct 7, 2023
1 parent c00678c commit e035bd9
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 52 deletions.
13 changes: 2 additions & 11 deletions modular_ss220/jobs/_jobs.dme
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
#include "_jobs.dm"

#include "code/clothing/medical_clothing.dm"
#include "code/job/medical_jobs.dm"
#include "code/access.dm"
#include "code/cards_ids.dm"
// BEGIN_INTERNALS
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
// END_FILE_DIR
// BEGIN_PREFERENCES
// END_PREFERENCES
// BEGIN_INCLUDE
// END_INCLUDE
#include "code/clothing/medical_clothing.dm"
#include "code/job/medical_jobs.dm"
128 changes: 108 additions & 20 deletions modular_ss220/jobs/code/cards_ids.dm
Original file line number Diff line number Diff line change
@@ -1,23 +1,111 @@
/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()
// !!!!!!!! сделать автоустановку роли новичкам при загрузке

// /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()

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

/proc/get_all_security_novice_tittles()
return list("Cadet")

/proc/get_all_engineering_novice_tittles()
return list("Trainee")

/proc/get_all_science_novice_tittles()
return list("Student")

/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")

/obj/item/get_job_name() //Used in secHUD icon generation
var/assignmentName = get_ID_assignment(if_no_id = "Unknown")
var/rankName = get_ID_rank(if_no_id = "Unknown")

var/novmed = get_all_medical_novice_tittles()
var/novsec = get_all_security_novice_tittles()
var/noveng = get_all_engineering_novice_tittles()
var/novrnd = get_all_science_novice_tittles()

if((assignmentName in novmed) || (rankName in novmed))
return "intern"
if((assignmentName in novsec) || (rankName in novsec))
return "cadet"
if((assignmentName in noveng) || (rankName in noveng))
return "trainee"
if((assignmentName in novrnd) || (rankName in novrnd))
return "student"

. = ..()

// /atom/prepare_huds()
// . = ..()
Expand Down
10 changes: 9 additions & 1 deletion modular_ss220/jobs/code/clothing/medical_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@
item_color = "med_ass_f"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS

/obj/item/clothing/under/rank/medical/scrubs/lightgreen
/obj/item/clothing/under/rank/medical/scrubs/green/light
name = "light green medical scrubs"
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in light green."
icon = 'modular_ss220/jobs/icons/clothing/uniforms.dmi'
icon_override = 'modular_ss220/jobs/icons/clothing/mob/uniform.dmi'
icon_state = "scrubsgreen"
item_color = "scrubsgreen"

/obj/item/clothing/head/surgery/green/light
name = "light green surgical cap"
desc = "A cap surgeons wear during operations. Keeps their hair from tickling your internal organs. This one is light green."
icon = 'modular_ss220/jobs/icons/clothing/hats.dmi'
icon_override = 'modular_ss220/jobs/icons/clothing/mob/head.dmi'
icon_state = "surgcap_green"
item_color = "surgcap_green"
46 changes: 26 additions & 20 deletions modular_ss220/jobs/code/job/medical_jobs.dm
Original file line number Diff line number Diff line change
@@ -1,47 +1,53 @@
/datum/job/doctor/New()
. = ..()
alt_titles |= list("Intern", "Medical Assistant", "Student Medical Doctor")
alt_titles |= get_all_medical_novice_tittles()

/datum/station_department/medical/New()
. = ..()
department_roles |= list("Intern", "Medical Assistant", "Student Medical Doctor")
department_roles |= get_all_medical_novice_tittles()

/datum/nttc_configuration/New()
. = ..()
all_jobs |= list(
"Intern" = "medradio",
"Medical Assistant" = "medradio",
"Student Medical Doctor" = "medradio",
)
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)
var/is_novice = FALSE
if(H.mind.role_alt_title in get_all_medical_novice_tittles())
uniform = /obj/item/clothing/under/rank/medical/intern
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")
is_novice = TRUE
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")
is_novice = TRUE
//head = /obj/item/clothing/head/surgery/lightgreen
//uniform = /obj/item/clothing/under/rank/medical/lightgreen
head = /obj/item/clothing/head/surgery/green/light
uniform = /obj/item/clothing/under/rank/medical/scrubs/green/light
if("Medical Assistant")
is_novice = TRUE
uniform = /obj/item/clothing/under/rank/medical/intern/assistant
if(H.gender == FEMALE)
uniform = /obj/item/clothing/under/rank/medical/intern/assistant/skirt

if(is_novice)
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 // !!!! ДЛЯ ТЕСТА


// "student scientist" = "Учёный-практикант",
Expand Down
Binary file added modular_ss220/jobs/icons/clothing/hats.dmi
Binary file not shown.
Binary file added modular_ss220/jobs/icons/clothing/mob/head.dmi
Binary file not shown.
Binary file modified modular_ss220/jobs/icons/hud.dmi
Binary file not shown.

0 comments on commit e035bd9

Please sign in to comment.