diff --git a/_maps/map_files/cyberiad/z2.dmm b/_maps/map_files/cyberiad/z2.dmm index a073bf4338c..bb812b44229 100644 --- a/_maps/map_files/cyberiad/z2.dmm +++ b/_maps/map_files/cyberiad/z2.dmm @@ -1654,7 +1654,7 @@ "FP" = (/obj/machinery/computer/rdservercontrol{badmin = 1; name = "Master R&D Server Controller"},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) "FQ" = (/obj/machinery/r_n_d/server/centcom,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) "FR" = (/obj/structure/table,/obj/item/weapon/card/id/silver{pixel_x = -3; pixel_y = -3},/obj/item/weapon/card/id/captains_spare,/obj/item/weapon/card/id/fluff/lifetime{pixel_x = 3; pixel_y = 3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) -"FS" = (/obj/structure/table,/obj/item/weapon/card/id/centcom,/obj/item/weapon/card/id{pixel_x = 3; pixel_y = 3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) +"FS" = (/obj/structure/table,/obj/item/weapon/card/id/centcom{pixel_x = -3; pixel_y = -3},/obj/item/weapon/card/id{pixel_x = 0; pixel_y = 0},/obj/item/weapon/card/id/admin{pixel_x = 3; pixel_y = 3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) "FT" = (/turf/unsimulated/floor{dir = 8; icon_state = "wood"},/turf/unsimulated/wall{dir = 2; icon = 'icons/turf/shuttle.dmi'; icon_state = "window5"; name = "window"; opacity = 0; tag = "icon-window5"},/area/admin) "FU" = (/obj/structure/stool/bed/chair/comfy/black,/turf/unsimulated/floor{dir = 8; icon_state = "wood"},/area/admin) "FV" = (/obj/machinery/computer/card,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index c6cd633398b..2b840e6759c 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -140,7 +140,7 @@ if(last_char_group == 1) t_out = copytext(t_out,1,length(t_out)) //removes the last character (in this case a space) - for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai")) //prevents these common metagamey names + for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai","plating")) //prevents these common metagamey names if(cmptext(t_out,bad_name)) return //(not case sensitive) return t_out diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 22edeb3702c..168212d725c 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -252,7 +252,13 @@ /proc/get_all_syndicate_access() return list(access_syndicate, access_syndicate_leader, access_vox) - + +/proc/get_all_misc_access() + return list(access_salvage_captain) + +/proc/get_absolutely_all_accesses() + return (get_all_accesses() | get_all_centcom_access() | get_all_syndicate_access() | get_all_misc_access()) + /proc/get_region_accesses(var/code) switch(code) if(0) diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index 2d8f789e2c9..de8ae87ae53 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -6,7 +6,7 @@ spawn_positions = 1 supervisors = "the captain" selection_color = "#ffeeaa" - idtype = /obj/item/weapon/card/id/silver + idtype = /obj/item/weapon/card/id/ce req_admin_notify = 1 access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, @@ -49,6 +49,7 @@ spawn_positions = 5 supervisors = "the chief engineer" selection_color = "#fff5cc" + idtype = /obj/item/weapon/card/id/engineering access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics) minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction) alt_titles = list("Maintenance Technician","Engine Technician","Electrician") @@ -83,6 +84,7 @@ spawn_positions = 2 supervisors = "the chief engineer" selection_color = "#fff5cc" + idtype = /obj/item/weapon/card/id/engineering access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics) minimal_access = list(access_eva, access_atmospherics, access_maint_tunnels, access_external_airlocks, access_emergency_storage, access_construction) alt_titles = list("Atmospheric Technician") @@ -113,6 +115,7 @@ spawn_positions = 1 supervisors = "the chief engineer" selection_color = "#fff5cc" + idtype = /obj/item/weapon/card/id/engineering access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_mechanic, access_external_airlocks) minimal_access = list(access_maint_tunnels, access_emergency_storage, access_mechanic, access_external_airlocks) diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 0945ba7cad0..3c38eb19042 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -6,7 +6,7 @@ spawn_positions = 1 supervisors = "the captain" selection_color = "#ffddf0" - idtype = /obj/item/weapon/card/id/silver + idtype = /obj/item/weapon/card/id/cmo req_admin_notify = 1 access = list(access_medical, access_morgue, access_genetics, access_heads, access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, @@ -46,6 +46,7 @@ spawn_positions = 3 supervisors = "the chief medical officer" selection_color = "#ffeef0" + idtype = /obj/item/weapon/card/id/medical access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_mineral_storeroom) minimal_access = list(access_medical, access_morgue, access_surgery, access_maint_tunnels) alt_titles = list("Surgeon","Nurse","Coroner") @@ -108,6 +109,7 @@ spawn_positions = 2 supervisors = "the chief medical officer" selection_color = "#ffeef0" + idtype = /obj/item/weapon/card/id/medical access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_mineral_storeroom) minimal_access = list(access_medical, access_chemistry, access_maint_tunnels, access_mineral_storeroom) alt_titles = list("Pharmacist","Pharmacologist") @@ -139,6 +141,7 @@ spawn_positions = 2 supervisors = "the chief medical officer and the research director" selection_color = "#ffeef0" + idtype = /obj/item/weapon/card/id/medical access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_research, access_mineral_storeroom) minimal_access = list(access_medical, access_morgue, access_genetics, access_research, access_maint_tunnels) minimal_player_age = 3 @@ -167,6 +170,7 @@ spawn_positions = 1 supervisors = "the chief medical officer" selection_color = "#ffeef0" + idtype = /obj/item/weapon/card/id/medical access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics) minimal_access = list(access_medical, access_virology, access_maint_tunnels) alt_titles = list("Pathologist","Microbiologist") @@ -199,6 +203,7 @@ spawn_positions = 1 supervisors = "the chief medical officer" selection_color = "#ffeef0" + idtype = /obj/item/weapon/card/id/medical access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_psychiatrist) minimal_access = list(access_medical, access_psychiatrist, access_maint_tunnels) alt_titles = list("Psychologist","Therapist") @@ -238,6 +243,7 @@ spawn_positions = 1 supervisors = "the chief medical officer" selection_color = "#ffeef0" + idtype = /obj/item/weapon/card/id/medical access = list(access_paramedic, access_medical, access_sec_doors, access_maint_tunnels, access_external_airlocks, access_morgue) minimal_access=list(access_paramedic, access_medical, access_sec_doors, access_maint_tunnels, access_external_airlocks, access_morgue) minimal_player_age = 3 diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index f51ad1c838d..6c720ef04a3 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -8,6 +8,7 @@ selection_color = "#ffddff" idtype = /obj/item/weapon/card/id/silver req_admin_notify = 1 + idtype = /obj/item/weapon/card/id/rd access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, access_tox_storage, access_tech_storage, access_teleporter, access_sec_doors, access_research, access_robotics, access_xenobiology, access_ai_upload, @@ -50,6 +51,7 @@ spawn_positions = 6 supervisors = "the research director" selection_color = "#ffeeff" + idtype = /obj/item/weapon/card/id/research access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch, access_mineral_storeroom) minimal_access = list(access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch, access_maint_tunnels, access_mineral_storeroom) alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobiologist", "Chemical Researcher") @@ -85,6 +87,7 @@ spawn_positions = 2 supervisors = "the research director" selection_color = "#ffeeff" + idtype = /obj/item/weapon/card/id/research access = list(access_robotics, access_tox, access_tox_storage, access_tech_storage, access_morgue, access_research, access_mineral_storeroom) //As a job that handles so many corpses, it makes sense for them to have morgue access. minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research, access_maint_tunnels, access_mineral_storeroom) //As a job that handles so many corpses, it makes sense for them to have morgue access. alt_titles = list("Biomechanical Engineer","Mechatronic Engineer") diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index d741bcb234b..2bf5b7d156c 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -6,7 +6,7 @@ spawn_positions = 1 supervisors = "the captain" selection_color = "#ffdddd" - idtype = /obj/item/weapon/card/id/silver + idtype = /obj/item/weapon/card/id/hos req_admin_notify = 1 access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_forensics_lockers, access_pilot, access_morgue, access_maint_tunnels, access_all_personal_lockers, @@ -58,6 +58,7 @@ spawn_positions = 1 supervisors = "the head of security" selection_color = "#ffeeee" + idtype = /obj/item/weapon/card/id/security access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue, access_weapons) minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_weapons) minimal_player_age = 21 @@ -104,7 +105,7 @@ supervisors = "the head of security" selection_color = "#ffeeee" alt_titles = list("Forensic Technician") - + idtype = /obj/item/weapon/card/id/security access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons) minimal_access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons) alt_titles = list("Forensic Technician") @@ -162,6 +163,7 @@ spawn_positions = 5 supervisors = "the head of security" selection_color = "#ffeeee" + idtype = /obj/item/weapon/card/id/security access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_weapons) minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_weapons) minimal_player_age = 14 @@ -202,6 +204,7 @@ spawn_positions = 1 supervisors = "the head of security" selection_color = "#ffeeee" + idtype = /obj/item/weapon/card/id/security access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics) minimal_access = list(access_medical, access_morgue, access_surgery, access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels) @@ -239,6 +242,7 @@ spawn_positions = 1 supervisors = "the head of security" selection_color = "#ffeeee" + idtype = /obj/item/weapon/card/id/security access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_weapons, access_pilot, access_external_airlocks) minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_weapons, access_pilot, access_external_airlocks) minimal_player_age = 7 diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index 1f1c4735a31..645b4171405 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -102,7 +102,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) spawn_positions = 1 supervisors = "the command staff" selection_color = "#ddddff" - idtype = /obj/item/weapon/card/id + idtype = /obj/item/weapon/card/id/silver req_admin_notify = 1 minimal_player_age = 21 access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers, @@ -148,7 +148,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) spawn_positions = 1 supervisors = "the nanotrasen representative" selection_color = "#ddddff" - idtype = /obj/item/weapon/card/id + idtype = /obj/item/weapon/card/id/silver req_admin_notify = 1 minimal_player_age = 21 access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers, @@ -195,7 +195,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) spawn_positions = 1 supervisors = "the Nanotrasen Supreme Court" selection_color = "#ddddff" - idtype = /obj/item/weapon/card/id + idtype = /obj/item/weapon/card/id/silver req_admin_notify = 1 minimal_player_age = 30 access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers, diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index 3e55831efe3..87f83439980 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -112,6 +112,7 @@ spawn_positions = 1 supervisors = "the head of personnel" selection_color = "#dddddd" + idtype = /obj/item/weapon/card/id/supply access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom) minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom) @@ -144,6 +145,7 @@ spawn_positions = 2 supervisors = "the quartermaster" selection_color = "#dddddd" + idtype = /obj/item/weapon/card/id/supply access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom) minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting, access_mineral_storeroom) @@ -174,6 +176,7 @@ spawn_positions = 3 supervisors = "the quartermaster" selection_color = "#dddddd" + idtype = /obj/item/weapon/card/id/supply access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom) minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting, access_maint_tunnels, access_mineral_storeroom) alt_titles = list("Spelunker") @@ -214,6 +217,7 @@ spawn_positions = 1 supervisors = "the head of personnel" selection_color = "#dddddd" + idtype = /obj/item/weapon/card/id/clown access = list(access_clown, access_theatre, access_maint_tunnels) minimal_access = list(access_clown, access_theatre, access_maint_tunnels) @@ -253,6 +257,7 @@ spawn_positions = 1 supervisors = "the head of personnel" selection_color = "#dddddd" + idtype = /obj/item/weapon/card/id/mime access = list(access_mime, access_theatre, access_maint_tunnels) minimal_access = list(access_mime, access_theatre, access_maint_tunnels) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 3ddb72d13ab..62629ca59ec 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -1,4 +1,6 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 +//Keeps track of the time for the ID console. Having it as a global variable prevents people from dismantling/reassembling it to +//increase the slots of many jobs. +var/time_last_changed_position = 0 /obj/machinery/computer/card name = "Identification Computer" @@ -6,32 +8,86 @@ icon_keyboard = "id_key" icon_screen = "id" req_access = list(access_change_ids) - circuit = "/obj/item/weapon/circuitboard/card" + circuit = /obj/item/weapon/circuitboard/card + light_color = LIGHT_COLOR_LIGHTBLUE var/obj/item/weapon/card/id/scan = null var/obj/item/weapon/card/id/modify = null var/mode = 0.0 var/printing = null + + //Cooldown for closing positions in seconds + //if set to -1: No cooldown... probably a bad idea + //if set to 0: Not able to close "original" positions. You can only close positions that you have opened before + var/change_position_cooldown = 60 + //Jobs you cannot open new positions for + var/list/blacklisted = list( + /datum/job/ai, + /datum/job/cyborg, + /datum/job/captain, + /datum/job/hop, + /datum/job/hos, + /datum/job/chief_engineer, + /datum/job/rd, + /datum/job/cmo, + /datum/job/judge, + /datum/job/blueshield, + /datum/job/nanotrasenrep, + /datum/job/pilot, + /datum/job/brigdoc, + /datum/job/mechanic, + /datum/job/barber, + /datum/job/chaplain, + /datum/job/civilian + ) - light_color = LIGHT_COLOR_LIGHTBLUE + //The scaling factor of max total positions in relation to the total amount of people on board the station in % + var/max_relative_positions = 30 //30%: Seems reasonable, limit of 6 @ 20 players - proc/is_centcom() - return istype(src, /obj/machinery/computer/card/centcom) + //This is used to keep track of opened positions for jobs to allow instant closing + //Assoc array: "JobName" = (int) + var/list/opened_positions = list(); - proc/is_authenticated() - return scan ? check_access(scan) : 0 +/obj/machinery/computer/card/proc/is_centcom() + return istype(src, /obj/machinery/computer/card/centcom) - proc/get_target_rank() - return modify && modify.assignment ? modify.assignment : "Unassigned" +/obj/machinery/computer/card/proc/is_authenticated() + return scan ? check_access(scan) : 0 - proc/format_jobs(list/jobs) - var/list/formatted = list() - for(var/job in jobs) - formatted.Add(list(list( - "display_name" = replacetext(job, " ", " "), - "target_rank" = get_target_rank(), - "job" = job))) +/obj/machinery/computer/card/proc/get_target_rank() + return modify && modify.assignment ? modify.assignment : "Unassigned" - return formatted +/obj/machinery/computer/card/proc/format_jobs(list/jobs) + var/list/formatted = list() + for(var/job in jobs) + formatted.Add(list(list( + "display_name" = replacetext(job, " ", " "), + "target_rank" = get_target_rank(), + "job" = job))) + + return formatted + +/obj/machinery/computer/card/proc/format_job_slots() + var/list/formatted = list() + for(var/datum/job/job in job_master.occupations) + if(job_blacklisted(job)) + continue + formatted.Add(list(list( + "title" = job.title, + "current_positions" = job.current_positions, + "total_positions" = job.total_positions, + "can_open" = can_open_job(job), + "can_close" = can_close_job(job)))) + + return formatted + +/obj/machinery/computer/card/proc/format_card_skins(list/card_skins) + var/list/formatted = list() + for(var/skin in card_skins) + formatted.Add(list(list( + "display_name" = get_skin_desc(skin), + "skin" = skin))) + + return formatted /obj/machinery/computer/card/verb/eject_id() set category = null @@ -71,11 +127,38 @@ nanomanager.update_uis(src) attack_hand(user) + +//Check if you can't open a new position for a certain job +/obj/machinery/computer/card/proc/job_blacklisted(datum/job/job) + return (job.type in blacklisted) + +//Logic check for Topic() if you can open the job +/obj/machinery/computer/card/proc/can_open_job(datum/job/job) + if(job) + if(!job_blacklisted(job)) + if((job.total_positions <= player_list.len * (max_relative_positions / 100))) + var/delta = (world.time / 10) - time_last_changed_position + if((change_position_cooldown < delta) || (opened_positions[job.title] < 0)) + return 1 + return -2 + return -1 + return 0 + +//Logic check for Topic() if you can close the job +/obj/machinery/computer/card/proc/can_close_job(datum/job/job) + if(job) + if(!job_blacklisted(job)) + if(job.total_positions > job.current_positions) + var/delta = (world.time / 10) - time_last_changed_position + if((change_position_cooldown < delta) || (opened_positions[job.title] > 0)) + return 1 + return -2 + return -1 + return 0 /obj/machinery/computer/card/attack_ai(var/mob/user as mob) return attack_hand(user) - /obj/machinery/computer/card/attack_hand(mob/user as mob) if(..()) return @@ -112,16 +195,30 @@ data["civilian_jobs"] = format_jobs(civilian_positions) data["special_jobs"] = format_jobs(whitelisted_positions) data["centcom_jobs"] = format_jobs(get_all_centcom_jobs()) + data["card_skins"] = format_card_skins(get_station_card_skins()) + + data["job_slots"] = format_job_slots() + + var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - time_last_changed_position), 1) + var/mins = round(time_to_wait / 60) + var/seconds = time_to_wait - (60*mins) + data["cooldown_mins"] = mins + data["cooldown_secs"] = (seconds < 10) ? "0[seconds]" : seconds + + if(modify) + data["current_skin"] = modify.icon_state if (modify && is_centcom()) var/list/all_centcom_access = list() for(var/access in get_all_centcom_access()) all_centcom_access.Add(list(list( - "desc" = replacetext(get_centcom_access_desc(access), " ", " "), + "desc" = replacetext(get_centcom_access_desc(access), " ", " "), "ref" = access, "allowed" = (access in modify.access) ? 1 : 0))) data["all_centcom_access"] = all_centcom_access + data["all_centcom_skins"] = format_card_skins(get_centcom_card_skins()) + else if (modify) var/list/regions = list() for(var/i = 1; i <= 7; i++) @@ -129,7 +226,7 @@ for(var/access in get_region_accesses(i)) if (get_access_desc(access)) accesses.Add(list(list( - "desc" = replacetext(get_access_desc(access), " ", " "), + "desc" = replacetext(get_access_desc(access), " ", " "), "ref" = access, "allowed" = (access in modify.access) ? 1 : 0))) @@ -141,7 +238,7 @@ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) - ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 600, 700) + ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 775, 700) ui.set_initial_data(data) ui.open() @@ -195,6 +292,11 @@ modify.access -= access_type if(!access_allowed) modify.access += access_type + + if("skin") + var/skin = href_list["skin_target"] + if(is_authenticated() && modify && ((skin in get_station_card_skins()) || ((skin in get_centcom_card_skins()) && is_centcom()))) + modify.icon_state = href_list["skin_target"] if ("assign") if (is_authenticated() && modify) @@ -257,13 +359,13 @@ nanomanager.update_uis(src) var/obj/item/weapon/paper/P = new(loc) - if (mode) + if (mode == 2) P.name = text("crew manifest ([])", worldtime2text()) P.info = {"

Crew Manifest


[data_core ? data_core.get_manifest(0) : ""] "} - else if (modify) + else if (modify && !mode) P.name = "access report" P.info = {"

Access Report

Prepared By: [scan.registered_name ? scan.registered_name : "Unknown"]
@@ -284,6 +386,37 @@ modify.access = list() callHook("terminate_employee", list(modify)) + + if("make_job_available") + // MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS + if(is_authenticated()) + var/edit_job_target = href_list["job"] + var/datum/job/j = job_master.GetJob(edit_job_target) + if(!j) + return 0 + if(can_open_job(j) != 1) + return 0 + if(opened_positions[edit_job_target] >= 0) + time_last_changed_position = world.time / 10 + j.total_positions++ + opened_positions[edit_job_target]++ + nanomanager.update_uis(src) + + if("make_job_unavailable") + // MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS + if(is_authenticated()) + var/edit_job_target = href_list["job"] + var/datum/job/j = job_master.GetJob(edit_job_target) + if(!j) + return 0 + if(can_close_job(j) != 1) + return 0 + //Allow instant closing without cooldown if a position has been opened before + if(opened_positions[edit_job_target] <= 0) + time_last_changed_position = world.time / 10 + j.total_positions-- + opened_positions[edit_job_target]-- + nanomanager.update_uis(src) if (modify) modify.name = text("[modify.registered_name]'s ID Card ([modify.assignment])") diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm index 623336050aa..3be065b3d02 100644 --- a/code/game/machinery/guestpass.dm +++ b/code/game/machinery/guestpass.dm @@ -22,18 +22,10 @@ usr << "This pass expires at [worldtime2text(expiration_time)]." else usr << "It expired at [worldtime2text(expiration_time)]." - -/obj/item/weapon/card/id/guest/read() - if (world.time > expiration_time) - usr << "This pass expired at [worldtime2text(expiration_time)]." - else - usr << "This pass expires at [worldtime2text(expiration_time)]." - usr << "It grants access to following areas:" for (var/A in temp_access) usr << "[get_access_desc(A)]." usr << "Issuing reason: [reason]." - return ///////////////////////////////////////////// //Guest pass terminal//////////////////////// diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index db8945d9063..6322947feae 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -96,7 +96,7 @@ //alt titles are handled a bit weirdly in order to unobtrusively integrate into existing ID system var/assignment = null //can be alt title or the actual job var/rank = null //actual job - var/dorm = 0 // determines if this ID has claimed a dorm already + var/dorm = 0 // determines if this ID has claimed a dorm already var/datum/data/record/active1 = null var/sex @@ -105,36 +105,22 @@ var/icon/front var/icon/side var/dat - var/stamped=0 + var/stamped = 0 /obj/item/weapon/card/id/New() ..() spawn(30) - updatedat() + if(ishuman(loc)) + var/mob/living/carbon/human/H = loc + SetOwnerInfo(H) -/obj/item/weapon/card/id/proc/updatedat() - if(istype(loc, /mob/living/carbon/human)) - blood_type = loc:dna:b_type - dna_hash = loc:dna:unique_enzymes - fingerprint_hash = md5(loc:dna:uni_identity) - dat = ("
") - dat +=text("Name: []
", registered_name) - dat +=text("Sex: []
\n", sex) - dat +=text("Age: []
\n", age) - dat +=text("Rank: []
\n", assignment) - dat +=text("Fingerprint: []
\n", fingerprint_hash) - dat +=text("Blood Type: []
\n", blood_type) - dat +=text("DNA Hash: []

\n", dna_hash) - dat +="
Photo:
\ -
" - -/obj/item/weapon/card/id/examine() +/obj/item/weapon/card/id/examine(mob/user) set src in oview(1) if(in_range(usr, src)) show(usr) usr << desc else - usr << "It is too far away." + usr << "It is too far away." /obj/item/weapon/card/id/proc/show(mob/user as mob) if(!front) @@ -147,16 +133,39 @@ popup.set_content(dat) popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state)) popup.open() - return /obj/item/weapon/card/id/attack_self(mob/user as mob) - for(var/mob/O in viewers(user, null)) - O.show_message(text("[] shows you: \icon[] []. The assignment on the card: []", user, src, src.name, src.assignment), 1) + user.visible_message("[user] shows you: \icon[src] [src.name]. The assignment on the card: [src.assignment]",\ + "You flash your ID card: \icon[src] [src.name]. The assignment on the card: [src.assignment]") if(mining_points) user << "There's [mining_points] mining equipment redemption points loaded onto this card." src.add_fingerprint(user) return + +/obj/item/weapon/card/id/proc/UpdateName() + name = "[src.registered_name]'s ID Card ([src.assignment])" + +/obj/item/weapon/card/id/proc/SetOwnerInfo(var/mob/living/carbon/human/H) + if(!H || !H.dna) + return + + sex = capitalize(H.gender) + age = H.age + blood_type = H.dna.b_type + dna_hash = H.dna.unique_enzymes + fingerprint_hash = md5(H.dna.uni_identity) + + dat = ("
") + dat += text("Name: []
", registered_name) + dat += text("Sex: []
\n", sex) + dat += text("Age: []
\n", age) + dat += text("Rank: []
\n", assignment) + dat += text("Fingerprint: []
\n", fingerprint_hash) + dat += text("Blood Type: []
\n", blood_type) + dat += text("DNA Hash: []

\n", dna_hash) + dat +="
Photo:
\ +
" /obj/item/weapon/card/id/GetAccess() return access @@ -187,19 +196,6 @@ else usr << "This ID has already been stamped!" - -/obj/item/weapon/card/id/verb/read() - set name = "Read ID Card" - set category = "Object" - set src in usr - - usr << text("\icon[] []: The current assignment on the card is [].", src, src.name, src.assignment) - usr << "The blood type on the card is [blood_type]." - usr << "The DNA hash on the card is [dna_hash]." - usr << "The fingerprint hash on the card is [fingerprint_hash]." - return - - /obj/item/weapon/card/id/silver name = "identification card" desc = "A silver card which shows honour and dedication." @@ -214,93 +210,19 @@ /obj/item/weapon/card/id/syndicate name = "agent card" - access = list(access_maint_tunnels, access_syndicate) + access = list(access_maint_tunnels, access_syndicate, access_external_airlocks) origin_tech = "syndicate=3" - var/registered_user=null - -/obj/item/weapon/card/id/syndicate/New(mob/user as mob) -// ..() - Intentionally does not call parent, doesn't need to - if(!isnull(user) && iscarbon(user)) // Runtime prevention on laggy starts or where users log out because of lag at round start. Also stops the ID from inheriting anything but a mob name - registered_name = ishuman(user) ? user.real_name : user.name - else - registered_name = "Agent Card" - assignment = "Agent" - name = "[registered_name]'s ID Card ([assignment])" + var/registered_user = null /obj/item/weapon/card/id/syndicate/afterattack(var/obj/item/weapon/O as obj, mob/user as mob, proximity) - if(!proximity) return + if(!proximity) + return if(istype(O, /obj/item/weapon/card/id)) var/obj/item/weapon/card/id/I = O - src.access |= I.access if(istype(user, /mob/living) && user.mind) if(user.mind.special_role) - usr << "\blue The card's microscanners activate as you pass it over the ID, copying its access." - -/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob) - if(!src.registered_name) - //Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak - var t = reject_bad_name(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)) - if(!t) //Same as mob/new_player/prefrences.dm - alert("Invalid name.") - return - src.registered_name = t - - var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Civilian"),1,MAX_MESSAGE_LEN)) - if(!u) - alert("Invalid assignment.") - src.registered_name = "" - return - src.assignment = u - src.name = "[src.registered_name]'s ID Card ([src.assignment])" - registered_user = user - var/s = input(user, "Would you like to update this card's details with your own?\nNote: This will take a picture of how you currently look, so put any items in your hand down first (other than this ID), and it will assume your age, and gender.", "Agent card update choice", "No") in list("Yes","No") - if(s == "Yes") - src.setupdat() - spawn(0) - src.updatedat() - user << "\blue You successfully forge the ID card." - - else if(!registered_user || registered_user == user) - - if(!registered_user) registered_user = user // - - switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show")) - if("Rename") - var t = sanitize(copytext(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name),1,26)) - if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm - alert("Invalid name.") - return - src.registered_name = t - - var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Civilian"),1,MAX_MESSAGE_LEN)) - if(!u) - alert("Invalid assignment.") - src.registered_name = "" - return - src.assignment = u - src.name = "[src.registered_name]'s ID Card ([src.assignment])" - var/s = input(user, "Would you like to update this card's details with your own?\nNote: This will take a picture of how you currently look, so put any items in your hand down first (other than this ID), and it will assume your age, and gender.", "Agent card update choice", "No") in list("Yes","No") - if(s == "Yes") - src.setupdat() - spawn(0) - src.updatedat() - user << "\blue You successfully forge the ID card." - return - if("Show") - ..() - else - ..() - -/obj/item/weapon/card/id/syndicate/proc/setupdat() //fake initilization, taken mostly from job_controller.dm - if(istype(src.loc, /mob/living/carbon/human)) //just adopt the syndie stuff, it would be annoying to ask them to set all of this, and the use would be limited - var/mob/living/carbon/human/H = loc - src.sex = capitalize(H.gender) - src.rank = src.assignment - src.age = H.age - src.photo = fake_id_photo(H) - var/icon/photoside = fake_id_photo(H,1) - front = new(photo) - side = new(photoside) + usr << "The card's microscanners activate as you pass it over \the [I], copying its access." + src.access |= I.access //Don't copy access if user isn't an antag -- to prevent metagaming /obj/item/weapon/card/id/syndicate/proc/fake_id_photo(var/mob/living/carbon/human/H, var/side=0)//get_id_photo wouldn't work correctly if(!istype(H)) @@ -324,12 +246,179 @@ faked = getFlatIcon(H) H.dir = storedDir - return faked + return faked + +/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob) + if(!src.registered_name) + var t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name)) + if(!t) + user << "Invalid name." + return + src.registered_name = t + + var u = sanitize(stripped_input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than maintenance.", "Agent Card Job Assignment", "Agent", MAX_MESSAGE_LEN)) + if(!u) + user << "Invalid assignment." + src.registered_name = "" + return + src.assignment = u + src.name = "[src.registered_name]'s ID Card ([src.assignment])" + user << "You successfully forge the ID card." + registered_user = user + else if(!registered_user || registered_user == user) + if(!registered_user) + registered_user = user + + switch(alert(user,"Would you like to display \the [src] or edit it?","Choose","Show","Edit")) + if("Show") + return ..() + if("Edit") + switch(input(user,"What would you like to edit on \the [src]?") in list("Name","Photo","Appearance","Sex","Age","Occupation","Money Account","Blood Type","DNA Hash","Fingerprint Hash","Reset Card")) + if("Name") + var/new_name = reject_bad_name(input(user,"What name would you like to put on this card?","Agent Card Name", ishuman(user) ? user.real_name : user.name)) + if(!Adjacent(user)) + return + src.registered_name = new_name + UpdateName() + user << "Name changed to [new_name]." + + if("Photo") + if(!Adjacent(user)) + return + photo = fake_id_photo(user) + var/icon/photoside = fake_id_photo(user,1) + front = new(photo) + side = new(photoside) + if(photo && photoside) + user << "Photo changed." + + if("Appearance") + var/list/appearances = list( + "data", + "id", + "gold", + "silver", + "centcom", + "centcom_old", + "security", + "medical", + "HoS", + "research", + "engineering", + "CMO", + "RD", + "CE", + "clown", + "mime", + "prisoner", + "syndie", + "deathsquad", + "commander", + "ERT_leader", + "ERT_security", + "ERT_engineering", + "ERT_medical", + "ERT_janitorial", + ) + var/choice = input(user, "Select the appearance for this card.", "Agent Card Appearance") in appearances + if(!Adjacent(user)) + return + if(!choice) + return + src.icon_state = choice + usr << "Appearance changed to [choice]." + + if("Sex") + var/new_sex = sanitize(stripped_input(user,"What sex would you like to put on this card?","Agent Card Sex", ishuman(user) ? capitalize(user.gender) : "Male", MAX_MESSAGE_LEN)) + if(!Adjacent(user)) + return + src.sex = new_sex + user << "Sex changed to [new_sex]." + + if("Age") + var/new_age = sanitize(stripped_input(user,"What age would you like to put on this card?","Agent Card Age","21", MAX_MESSAGE_LEN)) + if(!Adjacent(user)) + return + src.age = new_age + user << "Age changed to [new_age]." + + if("Occupation") + var/new_job = sanitize(stripped_input(user,"What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN)) + if(!Adjacent(user)) + return + src.assignment = new_job + user << "Occupation changed to [new_job]." + UpdateName() + + if("Money Account") + var/new_account = input(user,"What money account would you like to link to this card?","Agent Card Account",12345) as num + if(!Adjacent(user)) + return + associated_account_number = new_account + user << "Linked money account changed to [new_account]." + + if("Blood Type") + var/default = "\[UNSET\]" + if(ishuman(user)) + var/mob/living/carbon/human/H = user + if(H.dna) + default = H.dna.b_type + + var/new_blood_type = sanitize(input(user,"What blood type would you like to be written on this card?","Agent Card Blood Type",default) as text) + if(!Adjacent(user)) + return + src.blood_type = new_blood_type + user << "Blood type changed to [new_blood_type]." + + if("DNA Hash") + var/default = "\[UNSET\]" + if(ishuman(user)) + var/mob/living/carbon/human/H = user + if(H.dna) + default = H.dna.unique_enzymes + + var/new_dna_hash = sanitize(input(user,"What DNA hash would you like to be written on this card?","Agent Card DNA Hash",default) as text) + if(!Adjacent(user)) + return + src.dna_hash = new_dna_hash + user << "DNA hash changed to [new_dna_hash]." + + if("Fingerprint Hash") + var/default = "\[UNSET\]" + if(ishuman(user)) + var/mob/living/carbon/human/H = user + if(H.dna) + default = md5(H.dna.uni_identity) + + var/new_fingerprint_hash = sanitize(input(user,"What fingerprint hash would you like to be written on this card?","Agent Card Fingerprint Hash",default) as text) + if(!Adjacent(user)) + return + src.fingerprint_hash = new_fingerprint_hash + user << "Fingerprint hash changed to [new_fingerprint_hash]." + + if("Reset Card") + name = initial(name) + registered_name = initial(registered_name) + icon_state = initial(icon_state) + sex = initial(sex) + age = initial(age) + assignment = initial(assignment) + associated_account_number = initial(associated_account_number) + blood_type = initial(blood_type) + dna_hash = initial(dna_hash) + fingerprint_hash = initial(fingerprint_hash) + access = initial(access) + registered_user = null + + user << "All information has been deleted from \the [src]." + else + ..() /obj/item/weapon/card/id/syndicate_command name = "syndicate ID card" desc = "An ID straight from the Syndicate." registered_name = "Syndicate" + icon_state = "syndie" assignment = "Syndicate Overlord" access = list(access_syndicate, access_external_airlocks) @@ -340,10 +429,22 @@ item_state = "gold_id" registered_name = "Captain" assignment = "Captain" - New() - var/datum/job/captain/J = new/datum/job/captain - access = J.get_access() - ..() + +/obj/item/weapon/card/id/captains_spare/New() + var/datum/job/captain/J = new/datum/job/captain + access = J.get_access() + ..() + +/obj/item/weapon/card/id/admin + name = "admin ID card" + icon_state = "admin" + item_state = "gold_id" + registered_name = "Admin" + assignment = "Testing Shit" + +/obj/item/weapon/card/id/admin/New() + access = get_absolutely_all_accesses() + ..() /obj/item/weapon/card/id/centcom name = "central command ID card" @@ -351,14 +452,15 @@ icon_state = "centcom" registered_name = "Central Command" assignment = "General" - New() - access = get_all_centcom_access() - ..() + +/obj/item/weapon/card/id/centcom/New() + access = get_all_centcom_access() + ..() /obj/item/weapon/card/id/prisoner name = "prisoner ID card" desc = "You are a number, you are not a free man." - icon_state = "orange" + icon_state = "prisoner" item_state = "orange-id" assignment = "Prisoner" registered_name = "Scum" @@ -403,6 +505,100 @@ desc = "Finders, keepers." access = list(access_salvage_captain) +/obj/item/weapon/card/id/medical + name = "Medical ID" + registered_name = "Medic" + icon_state = "medical" + access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_mineral_storeroom) + +/obj/item/weapon/card/id/security + name = "Security ID" + registered_name = "Officer" + icon_state = "security" + access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_weapons) + +/obj/item/weapon/card/id/research + name = "Research ID" + registered_name = "Scientist" + icon_state = "research" + access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch, access_mineral_storeroom) + +/obj/item/weapon/card/id/supply + name = "Supply ID" + registered_name = "Cargonian" + icon_state = "cargo" + access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom) + +/obj/item/weapon/card/id/engineering + name = "Engineering ID" + registered_name = "Engineer" + icon_state = "engineering" + access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics) + +/obj/item/weapon/card/id/hos + name = "Head of Security ID" + registered_name = "HoS" + icon_state = "HoS" + access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, + access_forensics_lockers, access_pilot, access_morgue, access_maint_tunnels, access_all_personal_lockers, + access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting, + access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_weapons) + +/obj/item/weapon/card/id/cmo + name = "Chief Medical Officer ID" + registered_name = "CMO" + icon_state = "CMO" + access = list(access_medical, access_morgue, access_genetics, access_heads, + access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, + access_keycard_auth, access_sec_doors, access_psychiatrist, access_paramedic, access_mineral_storeroom) + +/obj/item/weapon/card/id/rd + name = "Research Director ID" + registered_name = "RD" + icon_state = "RD" + access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, + access_tox_storage, access_tech_storage, access_teleporter, access_sec_doors, + access_research, access_robotics, access_xenobiology, access_ai_upload, + access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_minisat, access_mineral_storeroom) + +/obj/item/weapon/card/id/ce + name = "Chief Engineer ID" + registered_name = "CE" + icon_state = "CE" + access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, + access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, + access_heads, access_construction, access_sec_doors, + access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_minisat, access_mechanic, access_mineral_storeroom) + +/obj/item/weapon/card/id/clown + name = "Pink ID" + registered_name = "HONK!" + icon_state = "clown" + desc = "Even looking at the card strikes you with deep fear." + access = list(access_clown, access_theatre, access_maint_tunnels) + +/obj/item/weapon/card/id/mime + name = "Black and White ID" + registered_name = "..." + icon_state = "mime" + desc = "..." + access = list(access_mime, access_theatre, access_maint_tunnels) + +/obj/item/weapon/card/id/thunderdome/red + name = "Thunderdome Red ID" + registered_name = "Red Team Fighter" + assignment = "Red Team Fighter" + icon_state = "TDred" + desc = "This ID card is given to those who fought inside the thunderdome for the Red Team. Not many have lived to see one of those, even fewer lived to keep it." + +/obj/item/weapon/card/id/thunderdome/green + name = "Thunderdome Green ID" + registered_name = "Green Team Fighter" + assignment = "Green Team Fighter" + icon_state = "TDgreen" + desc = "This ID card is given to those who fought inside the thunderdome for the Green Team. Not many have lived to see one of those, even fewer lived to keep it." + +// Decals /obj/item/weapon/id_decal name = "identification card decal" desc = "A modification kit to make your ID cards look snazzy.." @@ -429,7 +625,7 @@ /obj/item/weapon/id_decal/prisoner name = "prisoner ID card decal" decal_desc = "You are a number, you are not a free man." - decal_icon_state = "orange" + decal_icon_state = "prisoner" decal_item_state = "orange-id" /obj/item/weapon/id_decal/centcom @@ -443,3 +639,47 @@ decal_desc = "It's a card with a magnetic strip attached to some circuitry." decal_icon_state = "emag" override_name = 1 + +/proc/get_station_card_skins() + return list("data","id","gold","silver","security","medical","research","engineering","HoS","CMO","RD","CE","clown","mime","prisoner") + +/proc/get_centcom_card_skins() + return list("centcom","centcom_old","ERT_leader","ERT_empty","ERT_security","ERT_engineering","ERT_medical","ERT_janitorial","deathsquad","commander","syndie","TDred","TDgreen") + +/proc/get_all_card_skins() + return get_station_card_skins() + get_centcom_card_skins() + +/proc/get_skin_desc(skin) + switch(skin) + if("id") + return "Standard" + if("HoS") + return "Head of Security" + if("CMO") + return "Chief Medical Officer" + if("RD") + return "Research Director" + if("CE") + return "Chief Engineer" + if("centcom_old") + return "Centcom Old" + if("ERT_leader") + return "ERT Leader" + if("ERT_empty") + return "ERT Default" + if("ERT_security") + return "ERT Security" + if("ERT_engineering") + return "ERT Engineering" + if("ERT_medical") + return "ERT Medical" + if("ERT_janitorial") + return "ERT Janitorial" + if("syndie") + return "Syndicate" + if("TDred") + return "Thunderdome Red" + if("TDgreen") + return "Thunderdome Green" + else + return capitalize(skin) \ No newline at end of file diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 39e5e672553..03efff51ffe 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -260,7 +260,7 @@ var/send_emergency_team W.assignment = "Emergency Response Team Member" W.registered_name = M.real_name W.name = "[M.real_name]'s ID Card (Emergency Response Team Engineer)" - W.icon_state = "centcom" + W.icon_state = "ERT_engineering" W.access = get_centcom_access(W.assignment) M.equip_to_slot_or_del(W, slot_wear_id) @@ -284,7 +284,7 @@ var/send_emergency_team W.assignment = "Emergency Response Team Member" W.registered_name = M.real_name W.name = "[M.real_name]'s ID Card (Emergency Response Team Officer)" - W.icon_state = "centcom" + W.icon_state = "ERT_security" W.access = get_centcom_access(W.assignment) M.equip_to_slot_or_del(W, slot_wear_id) @@ -306,7 +306,7 @@ var/send_emergency_team W.assignment = "Emergency Response Team Member" W.registered_name = M.real_name W.name = "[M.real_name]'s ID Card (Emergency Response Team Medic)" - W.icon_state = "centcom" + W.icon_state = "ERT_medical" W.access = get_centcom_access(W.assignment) M.equip_to_slot_or_del(W, slot_wear_id) @@ -328,7 +328,7 @@ var/send_emergency_team W.assignment = "Emergency Response Team Leader" W.registered_name = M.real_name W.name = "[M.real_name]'s ID Card (Emergency Response Team Leader)" - W.icon_state = "centcom" + W.icon_state = "ERT_leader" W.access = get_centcom_access(W.assignment) M.equip_to_slot_or_del(W, slot_wear_id) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 096eb0128b0..18729e36a79 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -605,11 +605,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that "blue wizard", "red wizard", "marisa wizard", - "emergency response team", + "emergency response team member", + "emergency response team leader", "nanotrasen officer", "nanotrasen captain", "singuloth knight" - ) var/dostrip = input("Do you want to strip [M] before equipping them? (0=no, 1=yes)", "STRIPTEASE") as null|anything in list(0,1) if(isnull(dostrip)) @@ -820,6 +820,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/obj/item/weapon/card/id/syndicate/W = new(M) W.name = "[M.real_name]'s ID Card (Dark Lord)" + W.icon_state = "syndie" W.access = get_all_accesses() W.assignment = "Dark Lord" W.registered_name = M.real_name @@ -837,7 +838,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/obj/item/weapon/storage/secure/briefcase/sec_briefcase = new(M) for(var/obj/item/briefcase_item in sec_briefcase) - del(briefcase_item) + qdel(briefcase_item) for(var/i=3, i>0, i--) sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000 sec_briefcase.contents += new /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow @@ -855,6 +856,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/obj/item/weapon/card/id/syndicate/W = new(M) W.name = "[M.real_name]'s ID Card (Reaper)" + W.icon_state = "syndie" W.access = get_all_accesses() W.assignment = "Reaper" W.registered_name = M.real_name @@ -889,7 +891,6 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that W.registered_name = M.real_name M.equip_if_possible(W, slot_wear_id) - if("nanotrasen captain") M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/captain(M), slot_w_uniform) M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes) @@ -925,7 +926,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card (Emergency Response Team - Member)" - W.icon_state = "centcom" + W.icon_state = "ERT_empty" W.assignment = "Emergency Response Team Member" W.access = get_centcom_access(W.assignment) W.registered_name = M.real_name @@ -947,7 +948,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card (Emergency Response Team - Leader)" - W.icon_state = "centcom" + W.icon_state = "ERT_leader" W.assignment = "Emergency Response Team Leader" W.access = get_centcom_access(W.assignment) W.registered_name = M.real_name @@ -982,7 +983,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card" - W.icon_state = "centcom" + W.icon_state = "commander" W.assignment = "Special Operations Officer" W.access = get_centcom_access(W.assignment) W.registered_name = M.real_name @@ -1015,7 +1016,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card (Special Operations Officer)" - W.icon_state = "centcom" + W.icon_state = "commander" W.assignment = "Special Operations Officer" W.access = get_centcom_access(W.assignment) W.registered_name = M.real_name @@ -1037,7 +1038,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card (Singuloth Knight)" - W.icon_state = "centcom" + W.icon_state = "syndie" W.access = get_all_accesses() W.access += get_all_centcom_access() W.assignment = "Singuloth Knight" @@ -1092,7 +1093,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform) var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card (Admiral)" - W.icon_state = "centcom" + W.icon_state = "commander" W.access = get_all_accesses() W.access += get_all_centcom_access() W.assignment = "Admiral" diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 92a883faf1c..347f461dca8 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -167,7 +167,7 @@ var/global/sent_strike_team = 0 var/obj/item/weapon/card/id/W = new(src) W.name = "[real_name]'s ID Card" - W.icon_state = "centcom" + W.icon_state = "deathsquad" W.assignment = "Death Commando" W.access = get_centcom_access(W.assignment) W.registered_name = real_name diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 270c3d8c4f1..f9ea83e4ba9 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -169,7 +169,7 @@ var/global/sent_syndicate_strike_team = 0 var/obj/item/weapon/card/id/syndicate/W = new(src) //Untrackable by AI W.name = "[real_name]'s ID Card" - W.icon_state = "id" + W.icon_state = "syndie" W.access = get_all_accesses()//They get full station access because obviously the syndicate has HAAAX, and can make special IDs for their most elite members. W.assignment = "Syndicate Commando" W.access = get_syndicate_access(W.assignment) diff --git a/icons/obj/card.dmi b/icons/obj/card.dmi index d304ba2e277..54dd291702e 100644 Binary files a/icons/obj/card.dmi and b/icons/obj/card.dmi differ diff --git a/nano/templates/identification_computer.tmpl b/nano/templates/identification_computer.tmpl index b12f3ab444e..f6739383633 100644 --- a/nano/templates/identification_computer.tmpl +++ b/nano/templates/identification_computer.tmpl @@ -1,24 +1,57 @@ {{if data.printing}} -
The computer is currently busy.
-
-
Printing...
-
-

- Thank you for your patience! -

+
The computer is currently busy.
+
+
Printing...
+
+

+ Thank you for your patience! +

{{else}} - {{:helper.link('Access Modification', 'home', {'choice' : 'mode', 'mode_target' : 0}, !data.mode ? 'disabled' : null)}} - {{:helper.link('Crew Manifest', 'folder-open', {'choice' : 'mode', 'mode_target' : 1}, data.mode ? 'disabled' : null)}} - {{:helper.link('Print', 'print', {'choice' : 'print'}, (data.mode || data.has_modify) ? null : 'disabled')}} + {{:helper.link('Access Modification', 'home', {'choice' : 'mode', 'mode_target' : 0}, !data.mode ? 'disabled' : null)}} + {{:helper.link('Job Management', 'gear', {'choice' : 'mode', 'mode_target' : 1}, data.mode == 1 ? 'disabled' : null)}} + {{:helper.link('Crew Manifest', 'folder-open', {'choice' : 'mode', 'mode_target' : 2}, data.mode == 2 ? 'disabled' : null)}} + {{:helper.link('Print', 'print', {'choice' : 'print'}, (data.mode == 2 || data.has_modify && !data.mode) ? null : 'disabled')}} - {{if data.mode}} + {{if data.mode == 1}} +
+

Job Management

+
-

Crew Manifest

+
+ Authorized Identity: +
+
+ {{:helper.link(data.scan_name, 'eject', {'choice' : 'scan'})}} +
+
+ Cooldown: +
+
+ {{if data.cooldown_mins > 0 || data.cooldown_mins == 0 && data.cooldown_secs > 0}} + Next change in: {{:data.cooldown_mins}}:{{:data.cooldown_secs}} + {{else}} + Ready! + {{/if}} +
-
- {{:data.manifest}} -
- {{else}} +
+
+ {{for data.job_slots}} +
+ {{:value.title}}: {{:value.current_positions}}/{{:value.total_positions}} + {{:helper.link('-', null, {'choice' : 'make_job_unavailable', 'job' : value.title}, value.can_close == 1 && data.authenticated ? null : 'disabled')}} + {{:helper.link('+', null, {'choice' : 'make_job_available', 'job' : value.title}, value.can_open == 1 && data.authenticated ? null : 'disabled')}} +
+ {{/for}} +
+ {{else data.mode == 2}} +
+

Crew Manifest

+
+
+ {{:data.manifest}} +
+ {{else}}

Access Modification

@@ -204,18 +237,22 @@

Central Command

-
+
{{for data.all_centcom_access}} -
{{:helper.link(value.desc, '', {'choice' : 'access', 'access_target' : value.ref, 'allowed' : value.allowed}, null, value.allowed ? 'selected' : null)}} -
{{/for}} +
+
Card Skin
+ {{for data.all_centcom_skins}} + {{:helper.link(value.display_name, '', {'choice' : 'skin', 'skin_target' : value.skin}, null,(data.current_skin == value.skin) ? 'selected' : null )}} + {{/for}} +
{{else}}

{{:data.station_name}}

-
+
{{for data.regions}}
{{:value.name}}
@@ -226,6 +263,12 @@ {{/for}}
{{/for}} +
+
Card Skin
+ {{for data.card_skins}} + {{:helper.link(value.display_name, '', {'choice' : 'skin', 'skin_target' : value.skin}, null,(data.current_skin == value.skin) ? 'selected' : null )}} + {{/for}} +
{{/if}} {{/if}}