Skip to content

Commit

Permalink
Скины для карт в консоли
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantornRU committed Nov 12, 2023
1 parent 9d75167 commit b665dc1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
33 changes: 33 additions & 0 deletions modular_ss220/jobs/code/cards_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 0 additions & 17 deletions modular_ss220/jobs/code/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b665dc1

Please sign in to comment.