diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 2267f7a1344..d6c55c321ca 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -4480,7 +4480,7 @@ /turf/open/floor/iron, /area/maintenance/port/fore) "aoh" = ( -/obj/machinery/computer/card{ +/obj/machinery/modular_computer/console/preset/id{ dir = 4 }, /obj/machinery/light{ @@ -54939,7 +54939,7 @@ /turf/open/floor/iron, /area/maintenance/port/aft) "dPV" = ( -/obj/machinery/computer/card{ +/obj/machinery/modular_computer/console/preset/id{ dir = 4 }, /obj/machinery/camera{ @@ -66648,7 +66648,7 @@ /turf/open/floor/iron, /area/cargo/storage) "gDO" = ( -/obj/machinery/computer/card{ +/obj/machinery/modular_computer/console/preset/id{ dir = 1 }, /obj/structure/cable, @@ -66790,7 +66790,7 @@ /turf/open/floor/iron, /area/engineering/atmos) "gGK" = ( -/obj/machinery/computer/card/minor/rd{ +/obj/machinery/modular_computer/console/preset/id{ dir = 8 }, /obj/machinery/status_display/ai{ @@ -73124,7 +73124,7 @@ }, /area/engineering/atmos) "iXe" = ( -/obj/machinery/computer/card/minor/cmo{ +/obj/machinery/modular_computer/console/preset/id{ dir = 8 }, /obj/machinery/status_display/ai{ @@ -73829,7 +73829,7 @@ /turf/open/floor/iron, /area/hallway/primary/starboard) "jpd" = ( -/obj/machinery/computer/card{ +/obj/machinery/modular_computer/console/preset/id{ dir = 4 }, /obj/machinery/keycard_auth{ @@ -75478,7 +75478,7 @@ /turf/open/floor/iron/dark, /area/service/chapel/office) "jQW" = ( -/obj/machinery/computer/card/minor/ce{ +/obj/machinery/modular_computer/console/preset/id{ dir = 4 }, /obj/machinery/status_display/evac{ @@ -79325,7 +79325,7 @@ /turf/open/floor/iron/white, /area/medical/psychology) "lrZ" = ( -/obj/machinery/computer/card/minor/hos{ +/obj/machinery/modular_computer/console/preset/id{ dir = 8 }, /obj/effect/turf_decal/tile/neutral{ @@ -86683,7 +86683,7 @@ /turf/closed/wall/r_wall, /area/engineering/gravity_generator) "nTB" = ( -/obj/machinery/computer/card, +/obj/machinery/modular_computer/console/preset/id, /obj/effect/turf_decal/tile/blue{ dir = 1 }, diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index 72a7a2033f2..c5447951ff9 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -22022,7 +22022,7 @@ /turf/open/floor/iron/white, /area/science/xenobiology) "bVm" = ( -/obj/machinery/computer/card/minor/hos, +/obj/machinery/modular_computer/console/preset/id, /turf/open/floor/carpet, /area/command/heads_quarters/hos) "bVy" = ( @@ -27783,7 +27783,7 @@ /turf/open/floor/iron, /area/engineering/main) "dmG" = ( -/obj/machinery/computer/card/minor/cmo, +/obj/machinery/modular_computer/console/preset/id, /obj/effect/turf_decal/tile/blue{ dir = 1 }, @@ -36299,7 +36299,7 @@ /turf/open/floor/plating, /area/engineering/storage/tech) "jEL" = ( -/obj/machinery/computer/card, +/obj/machinery/modular_computer/console/preset/id, /obj/machinery/light{ dir = 1 }, @@ -51484,7 +51484,7 @@ /turf/open/floor/engine, /area/science/mixing/chamber) "uta" = ( -/obj/machinery/computer/card/minor/ce{ +/obj/machinery/modular_computer/console/preset/id{ dir = 4 }, /obj/machinery/requests_console{ @@ -53632,7 +53632,7 @@ /turf/open/floor/plating, /area/maintenance/disposal) "vRS" = ( -/obj/machinery/computer/card{ +/obj/machinery/modular_computer/console/preset/id{ dir = 1 }, /obj/effect/turf_decal/tile/blue{ @@ -55746,7 +55746,7 @@ /turf/open/floor/iron, /area/hallway/primary/port) "xpu" = ( -/obj/machinery/computer/card{ +/obj/machinery/modular_computer/console/preset/id{ dir = 8 }, /turf/open/floor/wood, @@ -56364,7 +56364,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 5 }, -/obj/machinery/computer/card/minor/rd{ +/obj/machinery/modular_computer/console/preset/id{ dir = 8 }, /turf/open/floor/iron, diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm index c1fb350ce9f..42155478cad 100644 --- a/_maps/map_files/KiloStation/KiloStation.dmm +++ b/_maps/map_files/KiloStation/KiloStation.dmm @@ -62324,7 +62324,7 @@ /turf/open/floor/iron, /area/cargo/storage) "hJV" = ( -/obj/machinery/computer/card/minor/cmo{ +/obj/machinery/modular_computer/console/preset/id{ dir = 8 }, /obj/effect/turf_decal/bot, @@ -72894,7 +72894,7 @@ /turf/open/floor/iron/dark, /area/service/bar) "nEA" = ( -/obj/machinery/computer/card{ +/obj/machinery/modular_computer/console/preset/id{ dir = 8 }, /obj/effect/turf_decal/tile/neutral{ @@ -74109,7 +74109,7 @@ /turf/open/floor/iron/dark, /area/command/heads_quarters/ce) "ohM" = ( -/obj/machinery/computer/card/minor/rd{ +/obj/machinery/modular_computer/console/preset/id{ dir = 8 }, /obj/effect/turf_decal/bot, @@ -76868,7 +76868,7 @@ /turf/closed/wall/r_wall, /area/maintenance/disposal/incinerator) "pIq" = ( -/obj/machinery/computer/card/minor/hos{ +/obj/machinery/modular_computer/console/preset/id{ dir = 1 }, /turf/open/floor/wood, @@ -89281,7 +89281,7 @@ /turf/open/floor/iron/dark, /area/security/office) "wIl" = ( -/obj/machinery/computer/card/minor/ce, +/obj/machinery/modular_computer/console/preset/id, /obj/effect/turf_decal/bot, /obj/machinery/computer/security/telescreen/ce{ pixel_y = 28 @@ -89524,7 +89524,7 @@ /turf/closed/wall/r_wall, /area/engineering/main) "wQe" = ( -/obj/machinery/computer/card{ +/obj/machinery/modular_computer/console/preset/id{ dir = 1 }, /obj/effect/turf_decal/tile/neutral{ diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 95377cf2e89..4e3f3a3ff20 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -12428,7 +12428,7 @@ /turf/open/floor/iron, /area/security/checkpoint/customs) "bda" = ( -/obj/machinery/computer/card, +/obj/machinery/modular_computer/console/preset/id, /obj/machinery/light{ dir = 1 }, @@ -25100,7 +25100,7 @@ /turf/open/floor/iron/dark, /area/engineering/gravity_generator) "cvg" = ( -/obj/machinery/computer/card/minor/hos{ +/obj/machinery/modular_computer/console/preset/id{ dir = 8 }, /turf/open/floor/iron/dark, @@ -32699,7 +32699,7 @@ /turf/open/floor/iron/dark, /area/engineering/atmos) "eae" = ( -/obj/machinery/computer/card{ +/obj/machinery/modular_computer/console/preset/id{ dir = 4 }, /turf/open/floor/wood, @@ -42748,7 +42748,7 @@ /turf/open/floor/wood, /area/command/heads_quarters/captain/private) "icI" = ( -/obj/machinery/computer/card{ +/obj/machinery/modular_computer/console/preset/id{ dir = 8 }, /obj/machinery/light/small{ @@ -52788,7 +52788,7 @@ /turf/open/floor/iron/dark, /area/science/genetics) "mng" = ( -/obj/machinery/computer/card/minor/cmo{ +/obj/machinery/modular_computer/console/preset/id{ dir = 4 }, /obj/machinery/requests_console{ @@ -52932,7 +52932,7 @@ /turf/open/floor/iron/white, /area/medical/treatment_center) "mpf" = ( -/obj/machinery/computer/card/minor/rd{ +/obj/machinery/modular_computer/console/preset/id{ dir = 4 }, /obj/effect/turf_decal/tile/neutral{ @@ -57710,7 +57710,7 @@ /turf/open/floor/iron, /area/science/xenobiology) "opF" = ( -/obj/machinery/computer/card, +/obj/machinery/modular_computer/console/preset/id, /obj/effect/turf_decal/tile/green{ dir = 1 }, @@ -59608,7 +59608,7 @@ name = "Chief Engineer RC"; pixel_y = 32 }, -/obj/machinery/computer/card/minor/ce, +/obj/machinery/modular_computer/console/preset/id, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index e42104539f0..d8498ff9497 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -3968,7 +3968,7 @@ /turf/open/floor/iron/grimy, /area/centcom/ferry) "om" = ( -/obj/machinery/computer/card/centcom, +/obj/machinery/modular_computer/console/preset/id/centcom, /turf/open/floor/iron/grimy, /area/centcom/ferry) "on" = ( @@ -5726,7 +5726,7 @@ /turf/open/floor/iron/grimy, /area/centcom/ferry) "ry" = ( -/obj/machinery/computer/card/centcom, +/obj/machinery/modular_computer/console/preset/id/centcom, /obj/machinery/computer/security/telescreen{ desc = "Used for watching the RD's goons and the AI's satellite from the safety of his office."; name = "Research Monitor"; @@ -7168,7 +7168,7 @@ /turf/open/floor/iron/dark, /area/centcom/control) "ux" = ( -/obj/machinery/computer/card/centcom{ +/obj/machinery/modular_computer/console/preset/id/centcom{ dir = 1 }, /obj/machinery/button/door/indestructible{ @@ -8335,7 +8335,7 @@ /turf/open/floor/iron/dark, /area/centcom/control) "xn" = ( -/obj/machinery/computer/card/centcom{ +/obj/machinery/modular_computer/console/preset/id/centcom{ dir = 8 }, /obj/effect/turf_decal/tile/neutral{ @@ -9800,7 +9800,7 @@ /turf/open/floor/iron/dark, /area/centcom/ferry) "Bv" = ( -/obj/machinery/computer/card/centcom{ +/obj/machinery/modular_computer/console/preset/id/centcom{ dir = 1 }, /turf/open/floor/iron/grimy, diff --git a/_maps/shuttles/emergency_cere.dmm b/_maps/shuttles/emergency_cere.dmm index bd8904b8ebd..3729ea062a7 100644 --- a/_maps/shuttles/emergency_cere.dmm +++ b/_maps/shuttles/emergency_cere.dmm @@ -69,7 +69,7 @@ /turf/open/floor/iron/dark, /area/shuttle/escape) "ai" = ( -/obj/machinery/computer/card, +/obj/machinery/modular_computer/console/preset/id, /turf/open/floor/iron/dark, /area/shuttle/escape) "aj" = ( diff --git a/code/modules/modular_computers/computers/machinery/console_presets.dm b/code/modules/modular_computers/computers/machinery/console_presets.dm index 12b2f6d25a5..b1fa926b699 100644 --- a/code/modules/modular_computers/computers/machinery/console_presets.dm +++ b/code/modules/modular_computers/computers/machinery/console_presets.dm @@ -84,6 +84,18 @@ hard_drive.store_file(new/datum/computer_file/program/job_management()) hard_drive.store_file(new/datum/computer_file/program/crew_manifest()) +/obj/machinery/modular_computer/console/preset/id/centcom + desc = "A stationary computer. This one comes preloaded with CentCom identification modification programs." + +/obj/machinery/modular_computer/console/preset/id/centcom/install_programs() + var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] + var/datum/computer_file/program/card_mod/card_mod_centcom = new /datum/computer_file/program/card_mod() + card_mod_centcom.is_centcom = TRUE + hard_drive.store_file(new /datum/computer_file/program/chatclient()) + hard_drive.store_file(card_mod_centcom) + hard_drive.store_file(new /datum/computer_file/program/job_management()) + hard_drive.store_file(new /datum/computer_file/program/crew_manifest()) + // ===== CIVILIAN CONSOLE ===== /obj/machinery/modular_computer/console/preset/civilian console_department = "Civilian" diff --git a/code/modules/modular_computers/file_system/programs/card.dm b/code/modules/modular_computers/file_system/programs/card.dm index c97bac6473a..e9c8fd9110d 100644 --- a/code/modules/modular_computers/file_system/programs/card.dm +++ b/code/modules/modular_computers/file_system/programs/card.dm @@ -192,6 +192,12 @@ target_id_card.update_label() playsound(computer, "terminal_type", 50, FALSE) return TRUE + if("PRG_age") + if(!computer || !authenticated || !target_id_card) + return + target_id_card.registered_age = params["id_age"] + playsound(computer, "terminal_type", 50, FALSE) + return TRUE if("PRG_assign") if(!computer || !authenticated || !target_id_card) return @@ -275,14 +281,19 @@ if(isnull(region)) return - var/list/region_accesses = get_region_accesses(region) - target_id_card.access |= region_accesses + if(is_centcom) + target_id_card.access |= get_all_centcom_access() + message_admins("[ADMIN_LOOKUPFLW(user)] just added CentCom Access to an ID card [ADMIN_VV(target_id_card)] [(target_id_card.registered_name) ? "belonging to [target_id_card.registered_name]." : "with no registered name."]") + LOG_ID_ACCESS_CHANGE(user, target_id_card, "added CentCom access") + else + var/list/region_accesses = get_region_accesses(region) + target_id_card.access |= region_accesses - for(var/logged_access in ACCESS_ALERT_ADMINS) - if(logged_access in region_accesses) - message_admins("[ADMIN_LOOKUPFLW(user)] just added [get_region_accesses_name(region)] region access to an ID card [ADMIN_VV(target_id_card)] [(target_id_card.registered_name) ? "belonging to [target_id_card.registered_name]." : "with no registered name."]") + for(var/logged_access in ACCESS_ALERT_ADMINS) + if(logged_access in region_accesses) + message_admins("[ADMIN_LOOKUPFLW(user)] just added [get_region_accesses_name(region)] region access to an ID card [ADMIN_VV(target_id_card)] [(target_id_card.registered_name) ? "belonging to [target_id_card.registered_name]." : "with no registered name."]") - LOG_ID_ACCESS_CHANGE(user, target_id_card, "added [get_region_accesses_name(region)] region access") + LOG_ID_ACCESS_CHANGE(user, target_id_card, "added [get_region_accesses_name(region)] region access") playsound(computer, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) @@ -293,6 +304,8 @@ var/region = text2num(params["region"]) if(isnull(region)) return + if(is_centcom) + target_id_card.access -= get_all_centcom_access() target_id_card.access -= get_region_accesses(region) playsound(computer, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE) return TRUE @@ -333,23 +346,38 @@ data["jobs"][department] = department_jobs var/list/regions = list() - for(var/i in 1 to 7) - if((minor || target_dept) && !(i in region_access)) - continue - + if(is_centcom) var/list/accesses = list() - for(var/access in get_region_accesses(i)) - if (get_access_desc(access)) + for(var/access in get_all_centcom_access()) + if (get_centcom_access_desc(access)) accesses += list(list( - "desc" = replacetext(get_access_desc(access), " ", " "), + "desc" = replacetext(get_centcom_access_desc(access), " ", " "), "ref" = access, )) regions += list(list( - "name" = get_region_accesses_name(i), - "regid" = i, + "name" = "CentCom", + "regid" = 0, "accesses" = accesses )) + else + for(var/i in 1 to 7) + if((minor || target_dept) && !(i in region_access)) + continue + + var/list/accesses = list() + for(var/access in get_region_accesses(i)) + if (get_access_desc(access)) + accesses += list(list( + "desc" = replacetext(get_access_desc(access), " ", " "), + "ref" = access, + )) + + regions += list(list( + "name" = get_region_accesses_name(i), + "regid" = i, + "accesses" = accesses + )) data["regions"] = regions @@ -383,6 +411,7 @@ data["id_rank"] = id_card.assignment ? id_card.assignment : "Unassigned" data["id_owner"] = id_card.registered_name ? id_card.registered_name : "-----" data["access_on_card"] = id_card.access + data["id_age"] = id_card.registered_age return data diff --git a/tgui/packages/tgui/interfaces/NtosCard.js b/tgui/packages/tgui/interfaces/NtosCard.js index a7dbc4cead9..1f254d1e885 100644 --- a/tgui/packages/tgui/interfaces/NtosCard.js +++ b/tgui/packages/tgui/interfaces/NtosCard.js @@ -1,12 +1,12 @@ import { useBackend, useLocalState } from '../backend'; -import { Box, Button, Flex, Input, NoticeBox, Section, Tabs } from '../components'; +import { Box, Button, Flex, Input, NoticeBox, NumberInput, Section, Tabs } from '../components'; import { NtosWindow } from '../layouts'; import { AccessList } from './common/AccessList'; export const NtosCard = (props, context) => { return ( @@ -30,6 +30,7 @@ export const NtosCardContent = (props, context) => { have_printer, have_id_slot, id_name, + id_age, } = data; const [ selectedDepartment, @@ -48,12 +49,23 @@ export const NtosCardContent = (props, context) => {
act('PRG_edit', { - name: value, - })} /> + <> + act('PRG_edit', { + name: value, + })} /> + { act('PRG_age', { + id_age: value, + }); + }} /> + ) : (id_owner || 'No Card Inserted')} buttons={(