diff --git a/_maps/RandomRuins/SpaceRuins/derelict7.dmm b/_maps/RandomRuins/SpaceRuins/derelict7.dmm index 87d3a2b1cd1..0d46aa78026 100644 --- a/_maps/RandomRuins/SpaceRuins/derelict7.dmm +++ b/_maps/RandomRuins/SpaceRuins/derelict7.dmm @@ -275,7 +275,7 @@ /obj/effect/turf_decal/trimline/neutral/warning{ dir = 1 }, -/obj/item/computer_hardware/hard_drive/portable/ordnance, +/obj/item/computer_disk/ordnance, /turf/open/floor/iron/dark/side/airless{ dir = 1 }, diff --git a/_maps/RandomZLevels/SnowCabin.dmm b/_maps/RandomZLevels/SnowCabin.dmm index 1914bd589e5..72d391c43d5 100644 --- a/_maps/RandomZLevels/SnowCabin.dmm +++ b/_maps/RandomZLevels/SnowCabin.dmm @@ -3852,7 +3852,7 @@ "vD" = ( /obj/effect/turf_decal/weather/snow, /obj/item/modular_computer/tablet/pda/syndicate{ - loaded_cartridge = /obj/item/computer_hardware/hard_drive/portable/virus/clown; + inserted_disk = /obj/item/computer_disk/virus/clown; desc = "A portable microcomputer by Thinktronic Systems, LTD."; name = "soviet tablet" }, @@ -3999,7 +3999,7 @@ "yR" = ( /obj/structure/table/reinforced, /obj/item/modular_computer/tablet/pda/syndicate{ - loaded_cartridge = /obj/item/computer_hardware/hard_drive/portable/virus/mime; + inserted_disk = /obj/item/computer_disk/virus/mime; desc = "A portable microcomputer by Thinktronic Systems, LTD."; name = "soviet tablet" }, diff --git a/_maps/RandomZLevels/moonoutpost19.dmm b/_maps/RandomZLevels/moonoutpost19.dmm index bc32182a685..42b21b79495 100644 --- a/_maps/RandomZLevels/moonoutpost19.dmm +++ b/_maps/RandomZLevels/moonoutpost19.dmm @@ -6005,8 +6005,8 @@ /area/awaymission/moonoutpost19/hive) "CG" = ( /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance, +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance, /obj/machinery/firealarm/directional/north, /turf/open/floor/iron/cafeteria{ dir = 5 diff --git a/_maps/RandomZLevels/undergroundoutpost45.dmm b/_maps/RandomZLevels/undergroundoutpost45.dmm index 29c63d47c63..248f269f9a2 100644 --- a/_maps/RandomZLevels/undergroundoutpost45.dmm +++ b/_maps/RandomZLevels/undergroundoutpost45.dmm @@ -12240,8 +12240,8 @@ /area/awaymission/undergroundoutpost45/caves) "Yk" = ( /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance, +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance, /obj/effect/decal/cleanable/dirt, /turf/open/floor/iron/cafeteria{ dir = 5; diff --git a/_maps/map_files/Blueshift/BlueShift_middle.dmm b/_maps/map_files/Blueshift/BlueShift_middle.dmm index 576bcee7354..5a228e3f18c 100644 --- a/_maps/map_files/Blueshift/BlueShift_middle.dmm +++ b/_maps/map_files/Blueshift/BlueShift_middle.dmm @@ -10031,12 +10031,12 @@ /area/station/maintenance/aux_eva) "cIv" = ( /obj/structure/table/reinforced, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/atmos, -/obj/item/computer_hardware/hard_drive/portable/atmos, -/obj/item/computer_hardware/hard_drive/portable/atmos, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/atmos, +/obj/item/computer_disk/atmos, +/obj/item/computer_disk/atmos, /obj/item/reagent_containers/pill/patch/aiuri, /obj/effect/turf_decal/tile/neutral{ dir = 4 @@ -53866,9 +53866,9 @@ dir = 10 }, /obj/structure/table/wood, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, /obj/item/coin/gold, /obj/item/reagent_containers/cup/glass/drinkingglass/shotglass{ pixel_x = -4; diff --git a/_maps/map_files/Blueshift/BlueShift_upper.dmm b/_maps/map_files/Blueshift/BlueShift_upper.dmm index 1bd5b37dcf6..8956d4ce719 100644 --- a/_maps/map_files/Blueshift/BlueShift_upper.dmm +++ b/_maps/map_files/Blueshift/BlueShift_upper.dmm @@ -23858,19 +23858,19 @@ }, /obj/effect/turf_decal/bot, /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -5; pixel_y = 8 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = 7; pixel_y = 2 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -8; pixel_y = -3 }, -/obj/item/computer_hardware/hard_drive/portable, +/obj/item/computer_disk, /obj/machinery/door/firedoor/border_only{ dir = 4 }, @@ -33276,12 +33276,12 @@ /obj/effect/turf_decal/siding/purple{ dir = 4 }, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance{ pixel_x = 3; pixel_y = 3 }, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance{ pixel_x = -3; pixel_y = -3 }, @@ -37104,9 +37104,9 @@ /area/station/hallway/primary/upper) "muq" = ( /obj/structure/table/glass, -/obj/item/computer_hardware/hard_drive/portable/medical, -/obj/item/computer_hardware/hard_drive/portable/medical, -/obj/item/computer_hardware/hard_drive/portable/chemistry, +/obj/item/computer_disk/medical, +/obj/item/computer_disk/medical, +/obj/item/computer_disk/chemistry, /obj/machinery/light_switch/directional/north, /obj/machinery/light/directional/north, /turf/open/floor/iron/white, diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index f2ccebc5bf1..ff108076f27 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -39700,11 +39700,11 @@ /area/station/security/holding_cell) "jCf" = ( /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = 7; pixel_y = 2 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -2 }, /obj/machinery/light_switch/directional/east{ @@ -55924,7 +55924,7 @@ pixel_x = 4; pixel_y = 1 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_y = 4 }, /obj/effect/turf_decal/tile/neutral/anticorner/contrasted{ @@ -55932,12 +55932,12 @@ }, /obj/machinery/power/apc/auto_name/directional/north, /obj/structure/cable, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -2; pixel_y = 2 }, -/obj/item/computer_hardware/hard_drive/portable, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk, +/obj/item/computer_disk/ordnance{ pixel_x = -4; pixel_y = -1 }, @@ -60365,15 +60365,15 @@ /turf/open/floor/iron/dark, /area/station/engineering/atmos) "oIL" = ( -/obj/item/computer_hardware/hard_drive/portable/atmos, -/obj/item/computer_hardware/hard_drive/portable/atmos, -/obj/item/computer_hardware/hard_drive/portable/atmos, +/obj/item/computer_disk/atmos, +/obj/item/computer_disk/atmos, +/obj/item/computer_disk/atmos, /obj/effect/turf_decal/tile/neutral/fourcorners, /obj/machinery/airalarm/directional/south, /obj/effect/turf_decal/bot, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/engineering, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/engineering, /obj/structure/rack, /turf/open/floor/iron/dark, /area/station/command/heads_quarters/ce) @@ -67372,13 +67372,13 @@ "qtq" = ( /obj/effect/turf_decal/tile/blue/opposingcorners, /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable/chemistry{ +/obj/item/computer_disk/chemistry{ pixel_y = 4 }, -/obj/item/computer_hardware/hard_drive/portable/medical{ +/obj/item/computer_disk/medical{ pixel_x = 3 }, -/obj/item/computer_hardware/hard_drive/portable/medical{ +/obj/item/computer_disk/medical{ pixel_x = -3 }, /obj/item/toy/figure/cmo, @@ -95071,9 +95071,9 @@ /area/station/engineering/atmos/project) "xhJ" = ( /obj/structure/table/reinforced, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, /obj/item/gps/mining, /obj/effect/turf_decal/tile/neutral/fourcorners, /obj/item/paper_bin/carbon, @@ -96394,13 +96394,13 @@ /area/station/science/xenobiology) "xzq" = ( /obj/structure/table/reinforced, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance{ pixel_x = 3 }, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance{ pixel_x = -2 }, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance{ pixel_y = 2 }, /obj/item/toy/figure/rd, diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index 24c049276b2..706848faa9a 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -9672,10 +9672,10 @@ /area/station/security/checkpoint/supply) "cQs" = ( /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -2 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = 2; pixel_y = 8 }, @@ -13444,9 +13444,9 @@ }, /obj/structure/table, /obj/item/coin/silver, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, /obj/item/clipboard, /turf/open/floor/iron, /area/station/command/heads_quarters/qm) @@ -44773,9 +44773,9 @@ /area/station/tcommsat/server) "nLd" = ( /obj/structure/table/glass, -/obj/item/computer_hardware/hard_drive/portable/medical, -/obj/item/computer_hardware/hard_drive/portable/medical, -/obj/item/computer_hardware/hard_drive/portable/chemistry, +/obj/item/computer_disk/medical, +/obj/item/computer_disk/medical, +/obj/item/computer_disk/chemistry, /obj/machinery/status_display/evac/directional/north, /obj/effect/turf_decal/tile/blue/full, /turf/open/floor/iron/dark, @@ -65187,9 +65187,9 @@ /area/station/maintenance/department/medical/central) "udQ" = ( /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance, +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance, /turf/open/floor/iron/white/corner{ dir = 1 }, @@ -70274,14 +70274,14 @@ /area/station/medical/chemistry) "vIg" = ( /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = 7; pixel_y = 2 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -2 }, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance{ pixel_x = -5; pixel_y = 6 }, @@ -70942,10 +70942,10 @@ /area/station/medical/storage) "vTi" = ( /obj/structure/table/reinforced, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/atmos, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/atmos, /obj/structure/disposalpipe/segment{ dir = 4 }, diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm index 2e25421bc3d..6e3a05163c2 100644 --- a/_maps/map_files/KiloStation/KiloStation.dmm +++ b/_maps/map_files/KiloStation/KiloStation.dmm @@ -7063,7 +7063,7 @@ pixel_y = -6; req_access = list("engineering") }, -/obj/item/computer_hardware/hard_drive/portable/atmos{ +/obj/item/computer_disk/atmos{ pixel_x = 10; pixel_y = -4 }, @@ -7071,11 +7071,11 @@ pixel_x = 8; pixel_y = 6 }, -/obj/item/computer_hardware/hard_drive/portable/engineering{ +/obj/item/computer_disk/engineering{ pixel_x = 10; pixel_y = -8 }, -/obj/item/computer_hardware/hard_drive/portable/engineering{ +/obj/item/computer_disk/engineering{ pixel_x = 10; pixel_y = -8 }, @@ -21012,10 +21012,10 @@ /obj/effect/turf_decal/tile/blue{ dir = 1 }, -/obj/item/computer_hardware/hard_drive/portable/medical, -/obj/item/computer_hardware/hard_drive/portable/medical, -/obj/item/computer_hardware/hard_drive/portable/medical, -/obj/item/computer_hardware/hard_drive/portable/chemistry, +/obj/item/computer_disk/medical, +/obj/item/computer_disk/medical, +/obj/item/computer_disk/medical, +/obj/item/computer_disk/chemistry, /obj/item/clothing/neck/stethoscope{ pixel_y = 5 }, @@ -26507,20 +26507,20 @@ /turf/open/floor/iron/dark, /area/station/maintenance/port/fore) "hCY" = ( -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -5; pixel_y = 8 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = 7; pixel_y = 2 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -8; pixel_y = -3 }, /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance{ pixel_x = 2; pixel_y = 1 }, @@ -40232,9 +40232,9 @@ "ltQ" = ( /obj/structure/table, /obj/item/clipboard, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance, +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance, /obj/item/circuitboard/aicore{ pixel_y = 5 }, @@ -48718,9 +48718,9 @@ /obj/structure/table, /obj/item/clipboard, /obj/item/folder/yellow, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, /obj/item/pen/fountain, /obj/item/stamp{ pixel_x = 8; diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index a51b34767ec..a3577629c0a 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -9924,10 +9924,10 @@ /obj/item/clipboard, /obj/item/paper/monitorkey, /obj/effect/turf_decal/tile/neutral/half/contrasted, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/atmos, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/atmos, /turf/open/floor/iron, /area/station/command/heads_quarters/ce) "dJT" = ( @@ -23809,9 +23809,9 @@ /obj/effect/turf_decal/siding{ dir = 4 }, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance, +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance, /turf/open/floor/iron/dark, /area/station/command/heads_quarters/rd) "iHf" = ( @@ -31608,9 +31608,9 @@ pixel_x = -10; pixel_y = 9 }, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, /turf/open/floor/wood, /area/station/command/heads_quarters/qm) "lnH" = ( @@ -40432,11 +40432,11 @@ /area/station/medical/chemistry) "ote" = ( /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -8; pixel_y = -3 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -5; pixel_y = 8 }, @@ -40444,7 +40444,7 @@ dir = 9 }, /obj/machinery/airalarm/directional/west, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance{ pixel_x = 1 }, /turf/open/floor/iron/white, @@ -49686,9 +49686,9 @@ pixel_x = -7; pixel_y = 8 }, -/obj/item/computer_hardware/hard_drive/portable/chemistry, -/obj/item/computer_hardware/hard_drive/portable/medical, -/obj/item/computer_hardware/hard_drive/portable/medical, +/obj/item/computer_disk/chemistry, +/obj/item/computer_disk/medical, +/obj/item/computer_disk/medical, /turf/open/floor/iron/white, /area/station/command/heads_quarters/cmo) "rHn" = ( @@ -56517,11 +56517,11 @@ /obj/item/radio/intercom/directional/east, /obj/structure/table, /obj/effect/turf_decal/bot, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = 7; pixel_y = 2 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -5; pixel_y = 8 }, diff --git a/_maps/map_files/VoidRaptor/VoidRaptor.dmm b/_maps/map_files/VoidRaptor/VoidRaptor.dmm index 4aef22a66c3..6023635afcb 100644 --- a/_maps/map_files/VoidRaptor/VoidRaptor.dmm +++ b/_maps/map_files/VoidRaptor/VoidRaptor.dmm @@ -4411,13 +4411,13 @@ }, /obj/item/clipboard, /obj/structure/table/reinforced/rglass, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance{ pixel_x = -2 }, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance{ pixel_x = 3 }, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk/ordnance{ pixel_y = 2 }, /turf/open/floor/wood/large, @@ -5444,11 +5444,11 @@ pixel_x = -2; pixel_y = 3 }, -/obj/item/computer_hardware/hard_drive/portable/engineering{ +/obj/item/computer_disk/engineering{ pixel_y = 5; pixel_x = 13 }, -/obj/item/computer_hardware/hard_drive/portable/engineering{ +/obj/item/computer_disk/engineering{ pixel_y = 2; pixel_x = 13 }, @@ -22489,18 +22489,18 @@ /turf/open/floor/iron/dark/smooth_edge, /area/station/hallway/secondary/command) "gHr" = ( -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_y = 4 }, /obj/effect/turf_decal/tile/neutral/anticorner/contrasted{ dir = 1 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -2; pixel_y = 2 }, -/obj/item/computer_hardware/hard_drive/portable, -/obj/item/computer_hardware/hard_drive/portable/ordnance{ +/obj/item/computer_disk, +/obj/item/computer_disk/ordnance{ pixel_x = -4; pixel_y = -1 }, @@ -26627,11 +26627,11 @@ /area/station/service/chapel) "hTg" = ( /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = 7; pixel_y = 2 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -2 }, /obj/effect/turf_decal/trimline/purple/filled/line{ @@ -54334,11 +54334,11 @@ pixel_x = 2; pixel_y = 12 }, -/obj/item/computer_hardware/hard_drive/portable/atmos{ +/obj/item/computer_disk/atmos{ pixel_x = -11; pixel_y = 6 }, -/obj/item/computer_hardware/hard_drive/portable/atmos{ +/obj/item/computer_disk/atmos{ pixel_x = -11; pixel_y = 3 }, @@ -85050,13 +85050,13 @@ name = "medbay camera"; network = list("ss13","medbay") }, -/obj/item/computer_hardware/hard_drive/portable/medical{ +/obj/item/computer_disk/medical{ pixel_x = -3 }, -/obj/item/computer_hardware/hard_drive/portable/medical{ +/obj/item/computer_disk/medical{ pixel_x = 3 }, -/obj/item/computer_hardware/hard_drive/portable/chemistry{ +/obj/item/computer_disk/chemistry{ pixel_y = 4 }, /obj/effect/turf_decal/bot, diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index d370bd1c4ed..3a5013dd6c8 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -11036,9 +11036,9 @@ /area/centcom/syndicate_mothership/expansion_bioterrorism) "FO" = ( /obj/structure/table/reinforced, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, /obj/item/gps/mining, /obj/effect/turf_decal/stripes/line{ dir = 6 diff --git a/_maps/map_files/tramstation/tramstation.dmm b/_maps/map_files/tramstation/tramstation.dmm index c51f180f185..6d76b8a5597 100644 --- a/_maps/map_files/tramstation/tramstation.dmm +++ b/_maps/map_files/tramstation/tramstation.dmm @@ -14932,9 +14932,9 @@ /area/station/maintenance/tram/mid) "foD" = ( /obj/structure/table/glass, -/obj/item/computer_hardware/hard_drive/portable/chemistry, -/obj/item/computer_hardware/hard_drive/portable/medical, -/obj/item/computer_hardware/hard_drive/portable/medical, +/obj/item/computer_disk/chemistry, +/obj/item/computer_disk/medical, +/obj/item/computer_disk/medical, /obj/effect/turf_decal/tile/blue/fourcorners, /turf/open/floor/iron/dark, /area/station/command/heads_quarters/cmo) @@ -16748,9 +16748,9 @@ /area/station/security/prison/mess) "fZz" = ( /obj/structure/table/reinforced, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance, -/obj/item/computer_hardware/hard_drive/portable/ordnance, +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance, +/obj/item/computer_disk/ordnance, /obj/effect/landmark/event_spawn, /obj/structure/window/reinforced/spawner, /turf/open/floor/iron/cafeteria{ @@ -19996,8 +19996,8 @@ dir = 5 }, /obj/item/clipboard, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, -/obj/item/computer_hardware/hard_drive/portable/quartermaster, +/obj/item/computer_disk/quartermaster, +/obj/item/computer_disk/quartermaster, /turf/open/floor/carpet, /area/station/command/heads_quarters/qm) "hhI" = ( @@ -24614,10 +24614,10 @@ /area/station/cargo/miningdock) "iSX" = ( /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -2 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = 7; pixel_y = 2 }, @@ -49890,11 +49890,11 @@ /area/station/security/processing) "rLy" = ( /obj/structure/table, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = -4; pixel_y = -3 }, -/obj/item/computer_hardware/hard_drive/portable{ +/obj/item/computer_disk{ pixel_x = 2; pixel_y = 8 }, @@ -52345,10 +52345,10 @@ dir = 1 }, /obj/structure/window/reinforced/spawner/west, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/engineering, -/obj/item/computer_hardware/hard_drive/portable/atmos, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/engineering, +/obj/item/computer_disk/atmos, /turf/open/floor/iron, /area/station/command/heads_quarters/ce) "sGu" = ( diff --git a/code/__DEFINES/dcs/signals/signals_datum.dm b/code/__DEFINES/dcs/signals/signals_datum.dm index 9ad0da53ff1..7439ef7a815 100644 --- a/code/__DEFINES/dcs/signals/signals_datum.dm +++ b/code/__DEFINES/dcs/signals/signals_datum.dm @@ -43,11 +43,11 @@ #define COMSIG_GASMIX_REACTED "comsig_gasmix_reacted" // Modular computer's file signals. Tells the program datum something is going on. -/// From /obj/item/computer_hardware/hard_drive/proc/store_file: () +/// From /obj/item/modular_computer/proc/store_file: () #define COMSIG_MODULAR_COMPUTER_FILE_ADDING "comsig_modular_computer_file_adding" -/// From /obj/item/computer_hardware/hard_drive/proc/store_file: () +/// From /obj/item/modular_computer/proc/store_file: () #define COMSIG_MODULAR_COMPUTER_FILE_ADDED "comsig_modular_computer_file_adding" -/// From /obj/item/computer_hardware/hard_drive/proc/remove_file: () +/// From /obj/item/modular_computer/proc/remove_file: () #define COMSIG_MODULAR_COMPUTER_FILE_DELETING "comsig_modular_computer_file_deleting" -/// From /obj/item/computer_hardware/hard_drive/proc/store_file: () +/// From /obj/item/modular_computer/proc/store_file: () #define COMSIG_MODULAR_COMPUTER_FILE_DELETED "comsig_modular_computer_file_adding" diff --git a/code/__DEFINES/modular_computer.dm b/code/__DEFINES/modular_computer.dm index 0d57f2ed98d..25e40f5b019 100644 --- a/code/__DEFINES/modular_computer.dm +++ b/code/__DEFINES/modular_computer.dm @@ -1,8 +1,6 @@ //Modular computer/NTNet defines //Modular computer part defines -#define MC_HDD "HDD" -#define MC_SDD "SDD" #define MC_CARD "CARD" #define MC_CARD2 "CARD2" #define MC_CELL "CELL" diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index 6d43d5d1caa..349a44d1e6e 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -234,13 +234,13 @@ /datum/objective_item/steal/hdd_extraction name = "the source code for Project Goon from the master R&D server mainframe" - targetitem = /obj/item/computer_hardware/hard_drive/cluster/hdd_theft + targetitem = /obj/item/computer_disk/hdd_theft difficulty = 10 excludefromjob = list(JOB_RESEARCH_DIRECTOR, JOB_SCIENTIST, JOB_ROBOTICIST, JOB_GENETICIST) exists_on_map = TRUE -/obj/item/computer_hardware/hard_drive/cluster/hdd_theft/add_stealing_item_objective() - ADD_STEAL_ITEM(src, /obj/item/computer_hardware/hard_drive/cluster/hdd_theft) +/obj/item/computer_disk/hdd_theft/add_stealing_item_objective() + ADD_STEAL_ITEM(src, /obj/item/computer_disk/hdd_theft) /datum/objective_item/steal/hdd_extraction/New() special_equipment += /obj/item/paper/guides/antag/hdd_extraction diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 87bb6e7ed7f..73164cfa63e 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -335,11 +335,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/camera/xray, 0) var/info = "" var/obj/item/modular_computer/tablet/computer = attacking_item - var/obj/item/computer_hardware/hard_drive/hdd = computer.all_components[MC_HDD] - if(hdd) - for(var/datum/computer_file/program/notepad/notepad_app in hdd.stored_files) - info = notepad_app.written_note - break + for(var/datum/computer_file/program/notepad/notepad_app in computer.stored_files) + info = notepad_app.written_note + break itemname = computer.name itemname = sanitize(itemname) diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm index 4f576ed9f16..f86e4821ac4 100644 --- a/code/game/machinery/telecomms/computers/message.dm +++ b/code/game/machinery/telecomms/computers/message.dm @@ -394,11 +394,9 @@ // Get out list of viable tablets var/list/viewable_tablets = list() for (var/obj/item/modular_computer/tablet in GLOB.TabletMessengers) - var/obj/item/computer_hardware/hard_drive/hdd = tablet.all_components[MC_HDD] - if(hdd) - var/datum/computer_file/program/messenger/message_app = locate() in hdd.stored_files - if(message_app.invisible) - continue + var/datum/computer_file/program/messenger/message_app = locate() in tablet.stored_files + if(message_app.invisible) + continue if(!tablet.saved_identification) continue viewable_tablets += tablet diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm index f578f5e7ece..34be237f2eb 100644 --- a/code/game/machinery/telecomms/machines/message_server.dm +++ b/code/game/machinery/telecomms/machines/message_server.dm @@ -182,8 +182,7 @@ return for (var/obj/item/modular_computer/comp in data["targets"]) if(!QDELETED(comp)) - var/obj/item/computer_hardware/hard_drive/drive = comp.all_components[MC_HDD] - for(var/datum/computer_file/program/messenger/app in drive.stored_files) + for(var/datum/computer_file/program/messenger/app in comp.stored_files) if(!QDELETED(app)) app.receive_message(src) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 39d6507905d..30306962b03 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -77,7 +77,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \ new/datum/stack_recipe("tram wall girders (anchored)", /obj/structure/girder/tram, 2, time = 40, one_per_turf = TRUE, on_solid_ground = FALSE, on_tram = TRUE, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75), \ null, \ new/datum/stack_recipe("computer frame", /obj/structure/frame/computer, 5, time = 25, one_per_turf = TRUE, on_solid_ground = TRUE), \ - new/datum/stack_recipe("modular console", /obj/machinery/modular_computer/console/buildable, 10, time = 25, one_per_turf = TRUE, on_solid_ground = TRUE), \ + new/datum/stack_recipe("modular console", /obj/machinery/modular_computer/console, 10, time = 25, one_per_turf = TRUE, on_solid_ground = TRUE), \ new/datum/stack_recipe("machine frame", /obj/structure/frame/machine, 5, time = 25, one_per_turf = TRUE, on_solid_ground = TRUE), \ null, \ new /datum/stack_recipe_list("airlock assemblies", list( \ diff --git a/code/game/objects/items/storage/boxes/security_boxes.dm b/code/game/objects/items/storage/boxes/security_boxes.dm index 442180bc17b..e3748b01b1f 100644 --- a/code/game/objects/items/storage/boxes/security_boxes.dm +++ b/code/game/objects/items/storage/boxes/security_boxes.dm @@ -147,7 +147,7 @@ /obj/item/storage/box/seccarts/PopulateContents() for(var/i in 1 to 6) - new /obj/item/computer_hardware/hard_drive/portable/security(src) + new /obj/item/computer_disk/security(src) /obj/item/storage/box/firingpins name = "box of standard firing pins" diff --git a/code/game/objects/items/storage/uplink_kits.dm b/code/game/objects/items/storage/uplink_kits.dm index 208de7b450a..a3e7ae17492 100644 --- a/code/game/objects/items/storage/uplink_kits.dm +++ b/code/game/objects/items/storage/uplink_kits.dm @@ -129,7 +129,7 @@ /obj/item/storage/backpack/duffelbag/syndie/sabotage new /obj/item/camera_bug(src) new /obj/item/sbeacondrop/powersink(src) - new /obj/item/computer_hardware/hard_drive/portable/virus/deto(src) + new /obj/item/computer_disk/virus/detomatix(src) new /obj/item/storage/toolbox/syndicate(src) new /obj/item/pizzabox/bomb(src) new /obj/item/storage/box/syndie_kit/emp(src) diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm index 3c9cb9bc958..1cf9a3236d7 100644 --- a/code/game/objects/items/theft_tools.dm +++ b/code/game/objects/items/theft_tools.dm @@ -126,20 +126,13 @@ Succeed and you will receive a coveted green highlight on your record for this assignment. Fail us and red's the last colour you'll ever see.
\ Do not disappoint us.
" -/obj/item/computer_hardware/hard_drive/cluster - name = "cluster hard disk drive" - desc = "A large storage cluster consisting of multiple HDDs for usage in dedicated storage systems." - power_usage = 500 - max_capacity = 2048 - icon_state = "harddisk" - w_class = WEIGHT_CLASS_NORMAL - -/obj/item/computer_hardware/hard_drive/cluster/hdd_theft +/obj/item/computer_disk/hdd_theft name = "r&d server hard disk drive" desc = "For some reason, people really seem to want to steal this. The source code on this drive is probably used for something awful!" icon = 'icons/obj/nuke_tools.dmi' icon_state = "something_awful" max_capacity = 512 + w_class = WEIGHT_CLASS_NORMAL resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF // STEALING SUPERMATTER diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index 397b4bd3678..ce8861937e4 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -7,7 +7,7 @@ ..() new /obj/item/storage/bag/garment/engineering_chief (src) - new /obj/item/computer_hardware/hard_drive/portable/command/ce(src) + new /obj/item/computer_disk/command/ce(src) new /obj/item/radio/headset/heads/ce(src) new /obj/item/megaphone/command(src) new /obj/item/holosign_creator/atmos(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index 0925483fe41..7149b4ec622 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -78,7 +78,7 @@ new /obj/item/clothing/suit/bio_suit/cmo(src) new /obj/item/clothing/head/bio_hood/cmo(src) new /obj/item/storage/bag/garment/chief_medical(src) - new /obj/item/computer_hardware/hard_drive/portable/command/cmo(src) + new /obj/item/computer_disk/command/cmo(src) new /obj/item/radio/headset/heads/cmo(src) new /obj/item/megaphone/command(src) new /obj/item/defibrillator/compact/loaded(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm index 8634f16b6f9..674529967fd 100755 --- a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm @@ -9,7 +9,7 @@ new /obj/item/clothing/suit/bio_suit/scientist(src) new /obj/item/clothing/head/bio_hood/scientist(src) new /obj/item/storage/bag/garment/research_director(src) - new /obj/item/computer_hardware/hard_drive/portable/command/rd(src) + new /obj/item/computer_disk/command/rd(src) new /obj/item/radio/headset/heads/rd(src) new /obj/item/megaphone/command(src) new /obj/item/storage/lockbox/medal/sci(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 2401669d61c..3f40cb0c9cb 100755 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -12,7 +12,7 @@ new /obj/item/clothing/neck/petcollar(src) new /obj/item/pet_carrier(src) new /obj/item/storage/bag/garment/captain(src) - new /obj/item/computer_hardware/hard_drive/portable/command/captain(src) + new /obj/item/computer_disk/command/captain(src) new /obj/item/storage/box/silver_ids(src) new /obj/item/radio/headset/heads/captain/alt(src) new /obj/item/radio/headset/heads/captain(src) @@ -31,7 +31,7 @@ ..() new /obj/item/storage/bag/garment/hop(src) new /obj/item/storage/lockbox/medal/service(src) - new /obj/item/computer_hardware/hard_drive/portable/command/hop(src) + new /obj/item/computer_disk/command/hop(src) new /obj/item/radio/headset/heads/hop(src) new /obj/item/storage/box/ids(src) new /obj/item/storage/box/ids(src) @@ -53,7 +53,7 @@ /obj/structure/closet/secure_closet/hos/PopulateContents() ..() - new /obj/item/computer_hardware/hard_drive/portable/command/hos(src) + new /obj/item/computer_disk/command/hos(src) new /obj/item/radio/headset/heads/hos(src) new /obj/item/storage/bag/garment/hos(src) new /obj/item/storage/lockbox/medal/sec(src) diff --git a/code/modules/cargo/exports/parts.dm b/code/modules/cargo/exports/parts.dm index 8a2688ee669..dcf20dd219a 100644 --- a/code/modules/cargo/exports/parts.dm +++ b/code/modules/cargo/exports/parts.dm @@ -55,64 +55,6 @@ export_types = list(/obj/item/computer_hardware/battery) include_subtypes = TRUE -//Data Disks - -/datum/export/modular_part/portabledrive/advanced - cost = CARGO_CRATE_VALUE * 0.4 - unit_name = "advanced data disk" - export_types = list(/obj/item/computer_hardware/hard_drive/portable/advanced) - include_subtypes = FALSE - -/datum/export/modular_part/portabledrive/super - cost = CARGO_CRATE_VALUE * 0.6 - unit_name = "super data disk" - export_types = list(/obj/item/computer_hardware/hard_drive/portable/super) - include_subtypes = FALSE - -/datum/export/modular_part/portabledrive/standard - cost = CARGO_CRATE_VALUE * 0.2 - unit_name = "data disk" - export_types = list(/obj/item/computer_hardware/hard_drive/portable) - include_subtypes = TRUE - -//Hard Drives - -/datum/export/modular_part/harddrive/advanced - cost = CARGO_CRATE_VALUE * 0.6 - unit_name = "advanced hard disk drive" - export_types = list(/obj/item/computer_hardware/hard_drive/advanced) - include_subtypes = FALSE - -/datum/export/modular_part/harddrive/super - cost = CARGO_CRATE_VALUE * 0.8 - unit_name = "super hard disk drive" - export_types = list(/obj/item/computer_hardware/hard_drive/super) - include_subtypes = FALSE - -/datum/export/modular_part/harddrive/cluster - cost = CARGO_CRATE_VALUE * 1 - unit_name = "cluster hard disk drive" - export_types = list(/obj/item/computer_hardware/hard_drive/cluster) - include_subtypes = FALSE - -/datum/export/modular_part/harddrive/small - cost = CARGO_CRATE_VALUE * 0.2 - unit_name = "solid state drive" - export_types = list(/obj/item/computer_hardware/hard_drive/small) - include_subtypes = FALSE - -/datum/export/modular_part/harddrive/micro - cost = CARGO_CRATE_VALUE * 0.1 - unit_name = "micro solid state drive" - export_types = list(/obj/item/computer_hardware/hard_drive/micro) - include_subtypes = FALSE - -/datum/export/modular_part/harddrive/standard - cost = CARGO_CRATE_VALUE * 0.4 - unit_name = "hard disk drive" - export_types = list(/obj/item/computer_hardware/hard_drive) - include_subtypes = TRUE - //Miscellaneous Parts /datum/export/modular_part/idcard @@ -126,3 +68,22 @@ unit_name = "miscellaneous computer part" export_types = list(/obj/item/computer_hardware) include_subtypes = TRUE + +//Data Disks +/datum/export/modular_part/portabledrive/advanced + cost = CARGO_CRATE_VALUE * 0.4 + unit_name = "advanced data disk" + export_types = list(/obj/item/computer_disk/advanced) + include_subtypes = FALSE + +/datum/export/modular_part/portabledrive/super + cost = CARGO_CRATE_VALUE * 0.6 + unit_name = "super data disk" + export_types = list(/obj/item/computer_disk/super) + include_subtypes = FALSE + +/datum/export/modular_part/portabledrive/standard + cost = CARGO_CRATE_VALUE * 0.2 + unit_name = "data disk" + export_types = list(/obj/item/computer_disk) + include_subtypes = TRUE diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index aca44fae489..22dfc72cc6e 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -171,13 +171,14 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real to_chat(user, span_notice("You replace the headlamp bulbs.")) return - if(istype(W, /obj/item/computer_hardware/hard_drive/portable)) //Allows borgs to install new programs with human help + if(istype(W, /obj/item/computer_disk)) //Allows borgs to install new programs with human help if(!modularInterface) stack_trace("Cyborg [src] ( [type] ) was somehow missing their integrated tablet. Please make a bug report.") create_modularInterface() - var/obj/item/computer_hardware/hard_drive/portable/floppy = W - if(modularInterface.install_component(floppy, user)) - return + var/obj/item/computer_disk/floppy = W + floppy.forceMove(modularInterface) + modularInterface.inserted_disk = floppy + return if(W.force && W.damtype != STAMINA && stat != DEAD) //only sparks if real damage is dealt. spark_system.start() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index f01f285e472..de4e0bec40c 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -82,23 +82,24 @@ /mob/living/silicon/proc/create_modularInterface() if(!modularInterface) modularInterface = new /obj/item/modular_computer/tablet/integrated(src) + if(isAI(src)) + modularInterface.saved_job = "AI" + if(ispAI(src)) + modularInterface.saved_job = "pAI Messenger" + modularInterface.layer = ABOVE_HUD_PLANE SET_PLANE_EXPLICIT(modularInterface, ABOVE_HUD_PLANE, src) modularInterface.saved_identification = real_name || name - if(iscyborg(src)) + +/mob/living/silicon/robot/create_modularInterface() + if(!modularInterface) + modularInterface = new /obj/item/modular_computer/tablet/integrated/cyborg(src) modularInterface.saved_job = "Cyborg" - modularInterface.install_component(new /obj/item/computer_hardware/hard_drive/small/robot) - if(isAI(src)) - modularInterface.saved_job = "AI" - modularInterface.install_component(new /obj/item/computer_hardware/hard_drive/small/ai) - if(ispAI(src)) - modularInterface.saved_job = "pAI Messenger" - modularInterface.install_component(new /obj/item/computer_hardware/hard_drive/small/ai) + return ..() /mob/living/silicon/robot/model/syndicate/create_modularInterface() if(!modularInterface) modularInterface = new /obj/item/modular_computer/tablet/integrated/syndicate(src) - modularInterface.saved_identification = real_name modularInterface.saved_job = "Cyborg" return ..() diff --git a/code/modules/mob_spawn/mob_spawn.dm b/code/modules/mob_spawn/mob_spawn.dm index bec24f7d19a..a2a239c34fa 100644 --- a/code/modules/mob_spawn/mob_spawn.dm +++ b/code/modules/mob_spawn/mob_spawn.dm @@ -294,8 +294,7 @@ // We don't want corpse PDAs to show up in the messenger list. var/obj/item/modular_computer/tablet/pda/messenger = locate() in spawned_human if(messenger) - var/obj/item/computer_hardware/hard_drive/hdd = messenger.all_components[MC_HDD] - var/datum/computer_file/program/messenger/message_app = locate() in hdd.stored_files + var/datum/computer_file/program/messenger/message_app = locate() in messenger.stored_files if(message_app) message_app.invisible = TRUE // Or on crew monitors diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index b8ac4256c73..4e21972cd87 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -14,6 +14,25 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar armor = list(MELEE = 0, BULLET = 20, LASER = 20, ENERGY = 100, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0) light_system = MOVABLE_LIGHT_DIRECTIONAL + ///The disk in this PDA. If set, this will be inserted on Initialize. + var/obj/item/computer_disk/inserted_disk + + ///The amount of storage space the computer starts with. + var/max_capacity = 128 + ///The amount of storage space we've got filled + var/used_capacity = 0 + ///List of stored files on this drive. DO NOT MODIFY DIRECTLY! + var/list/datum/computer_file/stored_files = list() + + ///Non-static list of programs the computer should recieve on Initialize. + var/list/datum/computer_file/starting_programs = list() + ///Static list of default programs that come with ALL computers, here so computers don't have to repeat this. + var/static/list/datum/computer_file/default_programs = list( + /datum/computer_file/program/computerconfig, + /datum/computer_file/program/ntnetdownload, + /datum/computer_file/program/filemanager, + ) + ///Flag of the type of device the modular computer is, deciding what types of apps it can run. var/hardware_flag = NONE // Options: PROGRAM_ALL | PROGRAM_CONSOLE | PROGRAM_LAPTOP | PROGRAM_TABLET @@ -73,7 +92,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar ///The program currently active on the tablet. var/datum/computer_file/program/active_program ///Idle programs on background. They still receive process calls but can't be interacted with. - var/list/idle_threads + var/list/idle_threads = list() /// Amount of programs that can be ran at once var/max_idle_programs = 2 @@ -105,32 +124,42 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar physical = src set_light_color(comp_light_color) set_light_range(comp_light_luminosity) - idle_threads = list() if(looping_sound) soundloop = new(src, enabled) UpdateDisplay() if(has_light) add_item_action(/datum/action/item_action/toggle_computer_light) + if(inserted_disk) + inserted_disk = new inserted_disk(src) update_appearance() register_context() init_network_id(NETWORK_TABLETS) Add_Messenger() + install_default_programs() + +/obj/item/modular_computer/proc/install_default_programs() + SHOULD_CALL_PARENT(FALSE) + for(var/programs in default_programs + starting_programs) + var/datum/computer_file/program/program_type = new programs + store_file(program_type) /obj/item/modular_computer/Destroy() + STOP_PROCESSING(SSobj, src) wipe_program(forced = TRUE) for(var/datum/computer_file/program/idle as anything in idle_threads) idle.kill_program(TRUE) - idle_threads?.Cut() - STOP_PROCESSING(SSobj, src) for(var/port in all_components) var/obj/item/computer_hardware/component = all_components[port] qdel(component) all_components?.Cut() //Some components will actually try and interact with this, so let's do it later QDEL_NULL(soundloop) + QDEL_LIST(stored_files) Remove_Messenger() + if(istype(inserted_disk)) + QDEL_NULL(inserted_disk) if(istype(inserted_pai)) QDEL_NULL(inserted_pai) @@ -317,8 +346,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar return FALSE obj_flags |= EMAGGED //Mostly for consistancy purposes; the programs will do their own emag handling var/newemag = FALSE - var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD] - for(var/datum/computer_file/program/app in drive.stored_files) + for(var/datum/computer_file/program/app in stored_files) if(!istype(app)) continue if(app.run_emag()) @@ -342,6 +370,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar if(long_ranged) . += "It is upgraded with an experimental long-ranged network capabilities, picking up NTNet frequencies while further away." + . += span_notice("It has [max_capacity] GQ of storage capacity.") var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD] var/obj/item/computer_hardware/card_slot/card_slot2 = all_components[MC_CARD2] @@ -361,11 +390,11 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar /obj/item/modular_computer/examine_more(mob/user) . = ..() - var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD] - if(hdd) - for(var/datum/computer_file/app_examine as anything in hdd.stored_files) - if(app_examine.on_examine(src, user)) - . += app_examine.on_examine(src, user) + . += "Storage capacity: [used_capacity]/[max_capacity]GQ" + + for(var/datum/computer_file/app_examine as anything in stored_files) + if(app_examine.on_examine(src, user)) + . += app_examine.on_examine(src, user) if(Adjacent(user)) . += span_notice("Paper level: [stored_paper] / [max_paper].") @@ -383,7 +412,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar context[SCREENTIP_CONTEXT_ALT_LMB] = "Remove pAI" . = CONTEXTUAL_SCREENTIP_SET - if(all_components[MC_SDD]) + if(inserted_disk) context[SCREENTIP_CONTEXT_CTRL_SHIFT_LMB] = "Remove SSD" . = CONTEXTUAL_SCREENTIP_SET @@ -421,13 +450,11 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar . = ..() if(.) return - - var/obj/item/computer_hardware/hard_drive/ssd = all_components[MC_SDD] - if(!ssd) + if(!inserted_disk) return - if(uninstall_component(ssd, usr)) - user.put_in_hands(ssd) - playsound(src, 'sound/machines/card_slide.ogg', 50) + user.put_in_hands(inserted_disk) + inserted_disk = null + playsound(src, 'sound/machines/card_slide.ogg', 50) /obj/item/modular_computer/proc/turn_on(mob/user, open_ui = TRUE) var/issynth = issilicon(user) // Robots and AIs get different activation messages. @@ -654,7 +681,6 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar kill_program(forced = TRUE) for(var/datum/computer_file/program/P in idle_threads) P.kill_program(forced = TRUE) - idle_threads.Remove(P) if(looping_sound) soundloop.stop() if(physical && loud) @@ -726,11 +752,9 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar return // Check if any Applications need it - var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD] - if(hdd) - for(var/datum/computer_file/item_holding_app as anything in hdd.stored_files) - if(item_holding_app.try_insert(attacking_item, user)) - return + for(var/datum/computer_file/item_holding_app as anything in stored_files) + if(item_holding_app.try_insert(attacking_item, user)) + return if(istype(attacking_item, /obj/item/paper)) if(stored_paper >= max_paper) @@ -766,6 +790,14 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar if(H.try_insert(attacking_item, user)) return + // Insert a data disk + if(istype(attacking_item, /obj/item/computer_disk)) + if(!user.transferItemToLoc(attacking_item, src)) + return + inserted_disk = attacking_item + playsound(src, 'sound/machines/card_slide.ogg', 50) + return + // Insert new hardware if(istype(attacking_item, /obj/item/computer_hardware)) if(install_component(attacking_item, user)) diff --git a/code/modules/modular_computers/computers/item/computer_damage.dm b/code/modules/modular_computers/computers/item/computer_damage.dm index 3550a71664e..ea77e263e5d 100644 --- a/code/modules/modular_computers/computers/item/computer_damage.dm +++ b/code/modules/modular_computers/computers/item/computer_damage.dm @@ -12,9 +12,9 @@ if(prob(component_probability)) H.take_damage(round(damage_amount*0.5), damage_type, damage_flag, 0) - /obj/item/modular_computer/deconstruct(disassembled = TRUE) break_apart() + return ..() /obj/item/modular_computer/proc/break_apart() if(!(flags_1 & NODECONSTRUCT_1)) @@ -30,4 +30,3 @@ if(prob(25)) H.take_damage(rand(10,30), BRUTE, 0, 0) relay_qdel() - qdel(src) diff --git a/code/modules/modular_computers/computers/item/computer_files.dm b/code/modules/modular_computers/computers/item/computer_files.dm new file mode 100644 index 00000000000..0f04fa5006b --- /dev/null +++ b/code/modules/modular_computers/computers/item/computer_files.dm @@ -0,0 +1,89 @@ +/** + * store_file + * + * Adds an already initialized file to the computer, checking if one already exists. + * Returns TRUE if successfully stored, FALSE otherwise. + */ +/obj/item/modular_computer/proc/store_file(datum/computer_file/file_storing) + if(!file_storing || !istype(file_storing)) + return FALSE + if(!can_store_file(file_storing)) + return FALSE + + // This file is already stored. Don't store it again. + if(file_storing in stored_files) + return FALSE + + SEND_SIGNAL(file_storing, COMSIG_MODULAR_COMPUTER_FILE_ADDING) + file_storing.computer = src + stored_files.Add(file_storing) + used_capacity += file_storing.size + SEND_SIGNAL(file_storing, COMSIG_MODULAR_COMPUTER_FILE_ADDED) + return TRUE + +/** + * remove_file + * + * Removes a given file from the computer, if possible. + * Properly checking if the file even exists and is in the computer. + * Returns TRUE if successfully completed, FALSE otherwise + */ +/obj/item/modular_computer/proc/remove_file(datum/computer_file/file_removing) + if(!file_removing || !istype(file_removing)) + return FALSE + if(!(file_removing in stored_files)) + return FALSE + if(istype(file_removing, /datum/computer_file/program)) + var/datum/computer_file/program/program_file = file_removing + if(program_file.program_state != PROGRAM_STATE_KILLED) + program_file.kill_program(TRUE) + if(program_file.program_state == PROGRAM_STATE_ACTIVE) + active_program = null + + SEND_SIGNAL(file_removing, COMSIG_MODULAR_COMPUTER_FILE_DELETING) + stored_files.Remove(file_removing) + used_capacity -= file_removing.size + SEND_SIGNAL(file_removing, COMSIG_MODULAR_COMPUTER_FILE_DELETED) + return TRUE + +/** + * can_store_file + * + * Checks if a computer can store a file, as computers can only store unique files. + * returns TRUE if possible, FALSE otherwise. + */ +/obj/item/modular_computer/proc/can_store_file(datum/computer_file/file) + if(!file || !istype(file)) + return FALSE + if(file in stored_files) + return FALSE + if(find_file_by_name(file.filename)) + return FALSE + // In the unlikely event someone manages to create that many files. + // BYOND is acting weird with numbers above 999 in loops (infinite loop prevention) + if(stored_files.len >= 999) + return FALSE + if((used_capacity + file.size) > max_capacity) + return FALSE + + return TRUE + +/** + * find_file_by_name + * + * Will check all applications in a tablet for files and, if they have \ + * the same filename (disregarding extension), will return it. + * If a computer disk is passed instead, it will check the disk over the computer. + */ +/obj/item/modular_computer/proc/find_file_by_name(filename, obj/item/computer_disk/target_disk) + if(!filename) + return null + if(target_disk) + for(var/datum/computer_file/file as anything in target_disk.stored_files) + if(file.filename == filename) + return file + else + for(var/datum/computer_file/file as anything in stored_files) + if(file.filename == filename) + return file + return null diff --git a/code/modules/modular_computers/computers/item/computer_power.dm b/code/modules/modular_computers/computers/item/computer_power.dm index e5b6238019f..db15f14c5dc 100644 --- a/code/modules/modular_computers/computers/item/computer_power.dm +++ b/code/modules/modular_computers/computers/item/computer_power.dm @@ -34,9 +34,8 @@ if(enabled) // Shut down the computer if(active_program) active_program.event_powerfailure(0) - for(var/I in idle_threads) - var/datum/computer_file/program/PRG = I - PRG.event_powerfailure(1) + for(var/datum/computer_file/program/programs as anything in idle_threads) + programs.event_powerfailure(background = TRUE) shutdown_computer(0) // Handles power-related things, such as battery interaction, recharging, shutdown when it's discharged diff --git a/code/modules/modular_computers/computers/item/computer_ui.dm b/code/modules/modular_computers/computers/item/computer_ui.dm index 093d49cd9cb..5ea800b7bc8 100644 --- a/code/modules/modular_computers/computers/item/computer_ui.dm +++ b/code/modules/modular_computers/computers/item/computer_ui.dm @@ -33,13 +33,6 @@ active_program.ui_interact(user) return - // We are still here, that means there is no program loaded. Load the BIOS/ROM/OS/whatever you want to call it. - // This screen simply lists available programs and user may select them. - var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD] - if(!hard_drive || !hard_drive.stored_files || !hard_drive.stored_files.len) - to_chat(user, span_danger("\The [src] beeps three times, it's screen displaying a \"DISK ERROR\" warning.")) - return // No HDD, No HDD files list or no stored files. Something is very broken. - if(honkvirus_amount > 0) // EXTRA annoying, huh! honkvirus_amount-- playsound(src, 'sound/items/bikehorn.ogg', 30, TRUE) @@ -55,7 +48,7 @@ . = ..() var/list/data = list() - data["show_imprint"] = istype(src, /obj/item/modular_computer/tablet/) + data["show_imprint"] = istype(src, /obj/item/modular_computer/tablet) return data @@ -83,12 +76,10 @@ IDJob = cardholder.current_job, ) - var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD] - data["removable_media"] = list() - if(all_components[MC_SDD]) + if(inserted_disk) data["removable_media"] += "Eject Disk" - var/datum/computer_file/program/ai_restorer/airestore_app = locate() in hard_drive.stored_files + var/datum/computer_file/program/ai_restorer/airestore_app = locate() in stored_files if(airestore_app?.stored_card) data["removable_media"] += "intelliCard" var/obj/item/computer_hardware/card_slot/secondarycardholder = all_components[MC_CARD2] @@ -96,7 +87,7 @@ data["removable_media"] += "secondary RFID card" data["programs"] = list() - for(var/datum/computer_file/program/P in hard_drive.stored_files) + for(var/datum/computer_file/program/P in stored_files) var/running = FALSE if(P in idle_threads) running = TRUE @@ -122,7 +113,6 @@ if(.) return - var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD] switch(action) if("PC_exit") kill_program() @@ -147,8 +137,7 @@ var/prog = params["name"] var/datum/computer_file/program/P = null var/mob/user = usr - if(hard_drive) - P = hard_drive.find_file_by_name(prog) + P = find_file_by_name(prog) if(!istype(P) || P.program_state == PROGRAM_STATE_KILLED) return @@ -157,7 +146,7 @@ to_chat(user, span_notice("Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.")) if("PC_runprogram") - open_program(usr, hard_drive.find_file_by_name(params["name"])) + open_program(usr, find_file_by_name(params["name"])) if("PC_toggle_light") return toggle_flashlight() @@ -179,14 +168,13 @@ var/mob/user = usr switch(param) if("Eject Disk") - var/obj/item/computer_hardware/hard_drive/portable/portable_drive = all_components[MC_SDD] - if(!portable_drive) + if(!inserted_disk) return - if(uninstall_component(portable_drive, usr)) - user.put_in_hands(portable_drive) - playsound(src, 'sound/machines/card_slide.ogg', 50) + user.put_in_hands(inserted_disk) + inserted_disk = null + playsound(src, 'sound/machines/card_slide.ogg', 50) if("intelliCard") - var/datum/computer_file/program/ai_restorer/airestore_app = locate() in hard_drive.stored_files + var/datum/computer_file/program/ai_restorer/airestore_app = locate() in stored_files if(!airestore_app) return if(airestore_app.try_eject(user)) diff --git a/code/modules/modular_computers/computers/item/disks/computer_disk.dm b/code/modules/modular_computers/computers/item/disks/computer_disk.dm new file mode 100644 index 00000000000..81e4171481c --- /dev/null +++ b/code/modules/modular_computers/computers/item/disks/computer_disk.dm @@ -0,0 +1,56 @@ +/obj/item/computer_disk + name = "data disk" + desc = "Removable disk used to store data." + icon = 'icons/obj/module.dmi' + icon_state = "datadisk6" + w_class = WEIGHT_CLASS_TINY + ///The amount of storage space is on the disk + var/max_capacity = 16 + ///The amount of storage space we've got filled + var/used_capacity = 0 + ///List of stored files on this drive. DO NOT MODIFY DIRECTLY! + var/list/datum/computer_file/stored_files = list() + + ///List of all programs that the disk should start with. + var/list/datum/computer_file/starting_programs = list() + +/obj/item/computer_disk/Initialize(mapload) + . = ..() + for(var/programs in starting_programs) + var/datum/computer_file/program/program_type = new programs + add_file(program_type) + +/** + * add_file + * + * Attempts to add an already existing file to the computer disk, then adds that capacity to the used capicity. + */ +/obj/item/computer_disk/proc/add_file(datum/computer_file/file) + if((file.size + used_capacity) > max_capacity) + return FALSE + stored_files.Add(file) + used_capacity += file.size + return TRUE + +/** + * remove_file + * + * Removes an app from the stored_files list, then removes their size from the capacity. + */ +/obj/item/computer_disk/proc/remove_file(datum/computer_file/file) + if(!(file in stored_files)) + return FALSE + stored_files.Remove(file) + used_capacity -= file.size + return TRUE + +/obj/item/computer_disk/advanced + name = "advanced data disk" + icon_state = "datadisk5" + max_capacity = 64 + +/obj/item/computer_disk/super + name = "super data disk" + desc = "Removable disk used to store large amounts of data." + icon_state = "datadisk3" + max_capacity = 256 diff --git a/code/modules/modular_computers/computers/item/disks/role_disks.dm b/code/modules/modular_computers/computers/item/disks/role_disks.dm new file mode 100644 index 00000000000..97e06a3d86c --- /dev/null +++ b/code/modules/modular_computers/computers/item/disks/role_disks.dm @@ -0,0 +1,145 @@ +/** + * Command + */ +/obj/item/computer_disk/command + icon_state = "datadisk7" + max_capacity = 32 + ///Static list of programss ALL command tablets have. + var/static/list/datum/computer_file/command_programs = list( + /datum/computer_file/program/crew_manifest, + /datum/computer_file/program/science, + /datum/computer_file/program/status, + ) + +/obj/item/computer_disk/command/Initialize(mapload) + . = ..() + for(var/programs in command_programs) + var/datum/computer_file/program/program_type = new programs + add_file(program_type) + +/obj/item/computer_disk/command/captain + name = "captain data disk" + desc = "Removable disk used to download essential Captain tablet apps." + icon_state = "datadisk10" + starting_programs = list( + /datum/computer_file/program/records/security, + /datum/computer_file/program/records/medical, + /datum/computer_file/program/phys_scanner/all, + ) + +/obj/item/computer_disk/command/cmo + name = "chief medical officer data disk" + desc = "Removable disk used to download essential CMO tablet apps." + starting_programs = list( + /datum/computer_file/program/phys_scanner/all, + /datum/computer_file/program/records/medical, + ) + +/obj/item/computer_disk/command/rd + name = "research director data disk" + desc = "Removable disk used to download essential RD tablet apps." + starting_programs = list( + /datum/computer_file/program/phys_scanner/chemistry, + /datum/computer_file/program/signal_commander, + ) + +/obj/item/computer_disk/command/hos + name = "head of security data disk" + desc = "Removable disk used to download essential HoS tablet apps." + icon_state = "datadisk9" + starting_programs = list( + /datum/computer_file/program/records/security, + ) + +/obj/item/computer_disk/command/hop + name = "head of personnel data disk" + desc = "Removable disk used to download essential HoP tablet apps." + starting_programs = list( + /datum/computer_file/program/records/security, + /datum/computer_file/program/job_management, + ) + +/obj/item/computer_disk/command/ce + name = "chief engineer data disk" + desc = "Removable disk used to download essential CE tablet apps." + starting_programs = list( + /datum/computer_file/program/supermatter_monitor, + /datum/computer_file/program/atmosscan, + /datum/computer_file/program/alarm_monitor, + ) + +/** + * Security + */ +/obj/item/computer_disk/security + name = "security officer data disk" + desc = "Removable disk used to download security-related tablet apps." + icon_state = "datadisk9" + starting_programs = list( + /datum/computer_file/program/records/security, + /datum/computer_file/program/crew_manifest, + ) + +/** + * Medical + */ +/obj/item/computer_disk/medical + name = "medical doctor data disk" + desc = "Removable disk used to download medical-related tablet apps." + icon_state = "datadisk7" + starting_programs = list( + /datum/computer_file/program/phys_scanner/medical, + /datum/computer_file/program/records/medical, + ) + +/obj/item/computer_disk/chemistry + name = "chemistry data disk" + desc = "Removable disk used to download chemistry-related tablet apps." + icon_state = "datadisk5" + starting_programs = list( + /datum/computer_file/program/phys_scanner/chemistry, + ) + +/** + * Supply + */ +/obj/item/computer_disk/quartermaster + name = "cargo data disk" + desc = "Removable disk used to download cargo-related tablet apps." + icon_state = "cargodisk" + starting_programs = list( + /datum/computer_file/program/shipping, + /datum/computer_file/program/budgetorders, + ) + +/** + * Science + */ +/obj/item/computer_disk/ordnance + name = "ordnance data disk" + desc = "Removable disk used to download ordnance-related tablet apps." + icon_state = "datadisk5" + starting_programs = list( + /datum/computer_file/program/signal_commander, + /datum/computer_file/program/scipaper_program, + ) + +/** + * Engineering + */ +/obj/item/computer_disk/engineering + name = "station engineer data disk" + desc = "Removable disk used to download engineering-related tablet apps." + icon_state = "datadisk6" + starting_programs = list( + /datum/computer_file/program/supermatter_monitor, + ) + +/obj/item/computer_disk/atmos + name = "atmospheric technician data disk" + desc = "Removable disk used to download atmos-related tablet apps." + icon_state = "datadisk6" + starting_programs = list( + /datum/computer_file/program/atmosscan, + /datum/computer_file/program/alarm_monitor, + ) diff --git a/code/modules/modular_computers/computers/item/disks/virus_disk.dm b/code/modules/modular_computers/computers/item/disks/virus_disk.dm new file mode 100644 index 00000000000..fdf0922d2d0 --- /dev/null +++ b/code/modules/modular_computers/computers/item/disks/virus_disk.dm @@ -0,0 +1,157 @@ +/** + * Virus disk + * Can't hold apps, instead does unique actions. + */ +/obj/item/computer_disk/virus + name = "\improper generic virus disk" + icon_state = "virusdisk" + max_capacity = 0 + ///How many charges the virus has left + var/charges = 5 + +/obj/item/computer_disk/virus/proc/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user) + if(charges <= 0) + to_chat(user, span_notice("ERROR: Out of charges.")) + return FALSE + if(!target) + to_chat(user, span_notice("ERROR: Could not find device.")) + return FALSE + return TRUE + +/** + * Clown virus + * Makes people's PDA honk + * Can also be used on open panel airlocks to make them honk on opening. + */ +/obj/item/computer_disk/virus/clown + name = "\improper H.O.N.K. disk" + +/obj/item/computer_disk/virus/clown/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user) + . = ..() + if(!.) + return FALSE + + user.show_message(span_notice("Success!")) + charges-- + target.honkvirus_amount = rand(15, 25) + return TRUE + +/** + * Mime virus + * Makes PDA's silent, removing their ringtone. + */ +/obj/item/computer_disk/virus/mime + name = "\improper sound of silence disk" + +/obj/item/computer_disk/virus/mime/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user) + . = ..() + if(!.) + return FALSE + + var/datum/computer_file/program/messenger/app = locate() in target.stored_files + if(!app) + return FALSE + user.show_message(span_notice("Success!")) + charges-- + app.ringer_status = FALSE + app.ringtone = "" + +/** + * Detomatix virus + * Sends a false message, and blows the PDA up if the target responds to it (or opens their messenger before a timer) + */ +/obj/item/computer_disk/virus/detomatix + name = "\improper D.E.T.O.M.A.T.attacking_item.X. disk" + charges = 6 + +/obj/item/computer_disk/virus/detomatix/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user) + . = ..() + if(!.) + return FALSE + + var/difficulty = target.get_detomatix_difficulty() + if(SEND_SIGNAL(target, COMSIG_TABLET_CHECK_DETONATE) & COMPONENT_TABLET_NO_DETONATE || prob(difficulty * 15)) + user.show_message(span_danger("ERROR: Target could not be bombed."), MSG_VISUAL) + charges-- + return + + var/original_host = source + var/fakename = sanitize_name(tgui_input_text(user, "Enter a name for the rigged message.", "Forge Message", max_length = MAX_NAME_LEN), allow_numbers = TRUE) + if(!fakename || source != original_host || !user.canUseTopic(source, be_close = TRUE)) + return + var/fakejob = sanitize_name(tgui_input_text(user, "Enter a job for the rigged message.", "Forge Message", max_length = MAX_NAME_LEN), allow_numbers = TRUE) + if(!fakejob || source != original_host || !user.canUseTopic(source, be_close = TRUE)) + return + + var/datum/computer_file/program/messenger/app = locate() in source.stored_files + if(!app || charges <= 0 || !app.send_message(user, list(target), rigged = REF(user), fake_name = fakename, fake_job = fakejob)) + return FALSE + charges-- + user.show_message(span_notice("Success!")) + var/reference = REF(src) + ADD_TRAIT(target, TRAIT_PDA_CAN_EXPLODE, reference) + ADD_TRAIT(target, TRAIT_PDA_MESSAGE_MENU_RIGGED, reference) + addtimer(TRAIT_CALLBACK_REMOVE(target, TRAIT_PDA_MESSAGE_MENU_RIGGED, reference), 10 SECONDS) + return TRUE + +/** + * Frame cartridge + * Creates and opens a false uplink on someone's PDA + * Can be loaded with TC to show up on the false uplink. + */ +/obj/item/computer_disk/virus/frame + name = "\improper F.R.A.M.E. disk" + + ///How many telecrystals the uplink should have + var/telecrystals = 0 + ///How much progression should be shown in the uplink, set on purchase of the item. + var/current_progression = 0 + +/obj/item/computer_disk/virus/frame/attackby(obj/item/attacking_item, mob/user, params) + . = ..() + if(!istype(attacking_item, /obj/item/stack/telecrystal)) + return + if(!charges) + to_chat(user, span_notice("[src] is out of charges, it's refusing to accept [attacking_item].")) + return + var/obj/item/stack/telecrystal/telecrystal_stack = attacking_item + telecrystals += telecrystal_stack.amount + to_chat(user, span_notice("You slot [telecrystal_stack] into [src]. The next time it's used, it will also give telecrystals.")) + telecrystal_stack.use(telecrystal_stack.amount) + + +/obj/item/computer_disk/virus/frame/send_virus(obj/item/modular_computer/tablet/target, mob/living/user) + . = ..() + if(!.) + return FALSE + + charges-- + var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]" + to_chat(user, span_notice("Success! The unlock code to the target is: [lock_code]")) + var/datum/component/uplink/hidden_uplink = target.GetComponent(/datum/component/uplink) + if(!hidden_uplink) + var/datum/mind/target_mind + var/list/backup_players = list() + for(var/datum/mind/player as anything in get_crewmember_minds()) + if(player.assigned_role?.title == target.saved_job) + backup_players += player + if(player.name == target.saved_identification) + target_mind = player + break + if(!target_mind) + if(!length(backup_players)) + target_mind = user.mind + else + target_mind = pick(backup_players) + hidden_uplink = target.AddComponent(/datum/component/uplink, target_mind, enabled = TRUE, starting_tc = telecrystals, has_progression = TRUE) + hidden_uplink.uplink_handler.has_objectives = TRUE + hidden_uplink.uplink_handler.owner = target_mind + hidden_uplink.uplink_handler.can_take_objectives = FALSE + hidden_uplink.uplink_handler.progression_points = min(SStraitor.current_global_progression, current_progression) + hidden_uplink.uplink_handler.generate_objectives() + SStraitor.register_uplink_handler(hidden_uplink.uplink_handler) + else + hidden_uplink.add_telecrystals(telecrystals) + telecrystals = 0 + hidden_uplink.locked = FALSE + hidden_uplink.active = TRUE diff --git a/code/modules/modular_computers/computers/item/laptop_presets.dm b/code/modules/modular_computers/computers/item/laptop_presets.dm index 5b6b0c66b2d..097b62af72b 100644 --- a/code/modules/modular_computers/computers/item/laptop_presets.dm +++ b/code/modules/modular_computers/computers/item/laptop_presets.dm @@ -1,16 +1,9 @@ /obj/item/modular_computer/laptop/preset/Initialize(mapload) . = ..() install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer)) - install_component(new /obj/item/computer_hardware/hard_drive) - install_programs() - -/obj/item/modular_computer/laptop/preset/proc/install_programs() - return - /obj/item/modular_computer/laptop/preset/civilian desc = "A low-end laptop often used for personal recreation." - -/obj/item/modular_computer/laptop/preset/civilian/install_programs() - var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD] - hard_drive.store_file(new/datum/computer_file/program/chatclient()) + starting_programs = list( + /datum/computer_file/program/chatclient, + ) diff --git a/code/modules/modular_computers/computers/item/role_tablet_presets.dm b/code/modules/modular_computers/computers/item/role_tablet_presets.dm index 22163a343d1..130192e5342 100644 --- a/code/modules/modular_computers/computers/item/role_tablet_presets.dm +++ b/code/modules/modular_computers/computers/item/role_tablet_presets.dm @@ -5,7 +5,7 @@ /obj/item/modular_computer/tablet/pda/heads greyscale_config = /datum/greyscale_config/tablet/head greyscale_colors = "#67A364#a92323" - default_applications = list( + starting_programs = list( /datum/computer_file/program/crew_manifest, /datum/computer_file/program/status, /datum/computer_file/program/science, @@ -26,17 +26,14 @@ /obj/item/modular_computer/tablet/pda/heads/captain/Initialize(mapload) . = ..() RegisterSignal(src, COMSIG_TABLET_CHECK_DETONATE, .proc/tab_no_detonate) - var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD] - if(!drive) - return - for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files) + for(var/datum/computer_file/program/messenger/messenger_app in stored_files) messenger_app.spam_mode = TRUE /obj/item/modular_computer/tablet/pda/heads/hop name = "head of personnel PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head greyscale_colors = "#374f7e#a52f29#a52f29" - default_applications = list( + starting_programs = list( /datum/computer_file/program/crew_manifest, /datum/computer_file/program/status, /datum/computer_file/program/science, @@ -50,7 +47,7 @@ name = "head of security PDA" greyscale_config = /datum/greyscale_config/tablet/head greyscale_colors = "#EA3232#0000CC" - default_applications = list( + starting_programs = list( /datum/computer_file/program/crew_manifest, /datum/computer_file/program/status, /datum/computer_file/program/science, @@ -63,7 +60,7 @@ name = "chief engineer PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head greyscale_colors = "#D99A2E#69DBF3#FAFAFA" - default_applications = list( + starting_programs = list( /datum/computer_file/program/crew_manifest, /datum/computer_file/program/status, /datum/computer_file/program/science, @@ -78,7 +75,7 @@ name = "chief medical officer PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head greyscale_colors = "#FAFAFA#000099#3F96CC" - default_applications = list( + starting_programs = list( /datum/computer_file/program/crew_manifest, /datum/computer_file/program/status, /datum/computer_file/program/science, @@ -93,7 +90,7 @@ greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head greyscale_colors = "#FAFAFA#000099#B347BC" inserted_item = /obj/item/pen/fountain - default_applications = list( + starting_programs = list( /datum/computer_file/program/crew_manifest, /datum/computer_file/program/status, /datum/computer_file/program/science, @@ -102,13 +99,14 @@ /datum/computer_file/program/phys_scanner/chemistry, /datum/computer_file/program/signal_commander, ) + /obj/item/modular_computer/tablet/pda/heads/quartermaster name = "quartermaster PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_thick greyscale_colors = "#D6B328#6506CA#927444" inserted_item = /obj/item/pen/survival stored_paper = 20 - default_applications = list( + starting_programs = list( /datum/computer_file/program/crew_manifest, /datum/computer_file/program/status, /datum/computer_file/program/science, @@ -125,7 +123,7 @@ /obj/item/modular_computer/tablet/pda/security name = "security PDA" greyscale_colors = "#EA3232#0000cc" - default_applications = list( + starting_programs = list( /datum/computer_file/program/records/security, /datum/computer_file/program/crew_manifest, /datum/computer_file/program/robocontrol, @@ -134,7 +132,7 @@ /obj/item/modular_computer/tablet/pda/detective name = "detective PDA" greyscale_colors = "#805A2F#990202" - default_applications = list( + starting_programs = list( /datum/computer_file/program/records/security, /datum/computer_file/program/crew_manifest, /datum/computer_file/program/robocontrol, @@ -145,7 +143,7 @@ name = "warden PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_split greyscale_colors = "#EA3232#0000CC#363636" - default_applications = list( + starting_programs = list( /datum/computer_file/program/records/security, /datum/computer_file/program/crew_manifest, /datum/computer_file/program/robocontrol, @@ -159,17 +157,19 @@ name = "engineering PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_thick greyscale_colors = "#D99A2E#69DBF3#E3DF3D" - default_applications = list( + starting_programs = list( /datum/computer_file/program/supermatter_monitor, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /obj/item/modular_computer/tablet/pda/atmos name = "atmospherics PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_thick greyscale_colors = "#EEDC43#00E5DA#727272" - default_applications = list( + starting_programs = list( /datum/computer_file/program/atmosscan, /datum/computer_file/program/alarm_monitor, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /** @@ -180,26 +180,29 @@ name = "scientist PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_thick greyscale_colors = "#FAFAFA#000099#B347BC" - default_applications = list( + starting_programs = list( /datum/computer_file/program/atmosscan, /datum/computer_file/program/signal_commander, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /obj/item/modular_computer/tablet/pda/roboticist name = "roboticist PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_split greyscale_colors = "#484848#0099CC#D94927" - default_applications = list( + starting_programs = list( /datum/computer_file/program/robocontrol, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /obj/item/modular_computer/tablet/pda/geneticist name = "geneticist PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_split greyscale_colors = "#FAFAFA#000099#0097CA" - default_applications = list( + starting_programs = list( /datum/computer_file/program/phys_scanner/medical, /datum/computer_file/program/records/medical, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /** @@ -210,36 +213,40 @@ name = "medical PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_thick greyscale_colors = "#FAFAFA#000099#3F96CC" - default_applications = list( + starting_programs = list( /datum/computer_file/program/phys_scanner/medical, /datum/computer_file/program/records/medical, /datum/computer_file/program/robocontrol, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /obj/item/modular_computer/tablet/pda/medical/paramedic name = "paramedic PDA" - default_applications = list( + starting_programs = list( /datum/computer_file/program/phys_scanner/medical, /datum/computer_file/program/records/medical, /datum/computer_file/program/radar/lifeline, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /obj/item/modular_computer/tablet/pda/viro name = "virology PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_split greyscale_colors = "#FAFAFA#355FAC#57C451" - default_applications = list( + starting_programs = list( /datum/computer_file/program/phys_scanner/medical, /datum/computer_file/program/records/medical, /datum/computer_file/program/robocontrol, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /obj/item/modular_computer/tablet/pda/chemist name = "chemist PDA" greyscale_config = /datum/greyscale_config/tablet/stripe_thick greyscale_colors = "#FAFAFA#355FAC#EA6400" - default_applications = list( + starting_programs = list( /datum/computer_file/program/phys_scanner/chemistry, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /** @@ -250,10 +257,11 @@ name = "cargo technician PDA" greyscale_colors = "#D6B328#6506CA" stored_paper = 20 - default_applications = list( + starting_programs = list( /datum/computer_file/program/shipping, /datum/computer_file/program/budgetorders, /datum/computer_file/program/robocontrol, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /obj/item/modular_computer/tablet/pda/shaftminer @@ -268,8 +276,9 @@ /obj/item/modular_computer/tablet/pda/janitor name = "janitor PDA" greyscale_colors = "#933ea8#235AB2" - default_applications = list( + starting_programs = list( /datum/computer_file/program/radar/custodial_locator, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /obj/item/modular_computer/tablet/pda/chaplain @@ -281,16 +290,14 @@ name = "lawyer PDA" greyscale_colors = "#4C76C8#FFE243" inserted_item = /obj/item/pen/fountain - default_applications = list( + starting_programs = list( /datum/computer_file/program/records/security, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /obj/item/modular_computer/tablet/pda/lawyer/Initialize(mapload) . = ..() - var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD] - if(!drive) - return - for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files) + for(var/datum/computer_file/program/messenger/messenger_app in stored_files) messenger_app.spam_mode = TRUE /obj/item/modular_computer/tablet/pda/botanist @@ -308,7 +315,7 @@ /obj/item/modular_computer/tablet/pda/clown name = "clown PDA" - loaded_cartridge = /obj/item/computer_hardware/hard_drive/portable/virus/clown + inserted_disk = /obj/item/computer_disk/virus/clown icon_state = "pda-clown" greyscale_config = null greyscale_colors = null @@ -325,7 +332,7 @@ /obj/item/modular_computer/tablet/pda/clown/proc/AfterSlip(mob/living/carbon/human/M) if (istype(M) && (M.real_name != saved_identification)) - var/obj/item/computer_hardware/hard_drive/portable/virus/clown/cart = all_components[MC_SDD] + var/obj/item/computer_disk/virus/clown/cart = inserted_disk if(istype(cart) && cart.charges < 5) cart.charges++ playsound(src,'sound/machines/ping.ogg',30,TRUE) @@ -335,20 +342,17 @@ /obj/item/modular_computer/tablet/pda/mime name = "mime PDA" - loaded_cartridge = /obj/item/computer_hardware/hard_drive/portable/virus/mime + inserted_disk = /obj/item/computer_disk/virus/mime greyscale_config = /datum/greyscale_config/tablet/mime greyscale_colors = "#FAFAFA#EA3232" inserted_item = /obj/item/toy/crayon/mime /obj/item/modular_computer/tablet/pda/mime/Initialize(mapload) . = ..() - var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD] - - if(hdd) - for(var/datum/computer_file/program/messenger/msg in hdd.stored_files) - msg.mime_mode = TRUE - msg.allow_emojis = TRUE - msg.ringer_status = FALSE + for(var/datum/computer_file/program/messenger/msg in stored_files) + msg.mime_mode = TRUE + msg.allow_emojis = TRUE + msg.ringer_status = FALSE /obj/item/modular_computer/tablet/pda/curator name = "curator PDA" @@ -358,18 +362,16 @@ icon_state = "pda-library" inserted_item = /obj/item/pen/fountain long_ranged = TRUE - default_applications = list( + starting_programs = list( /datum/computer_file/program/newscaster, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /obj/item/modular_computer/tablet/pda/curator/Initialize(mapload) . = ..() - var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD] - - if(hdd) - for(var/datum/computer_file/program/messenger/msg in hdd.stored_files) - msg.allow_emojis = TRUE - msg.ringer_status = FALSE + for(var/datum/computer_file/program/messenger/msg in stored_files) + msg.allow_emojis = TRUE + msg.ringer_status = FALSE /** * No Department @@ -377,8 +379,9 @@ /obj/item/modular_computer/tablet/pda/assistant name = "assistant PDA" - default_applications = list( + starting_programs = list( /datum/computer_file/program/bounty_board, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for all crew ) /** @@ -394,11 +397,9 @@ /obj/item/modular_computer/tablet/pda/syndicate/Initialize(mapload) . = ..() - var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD] - - if(hdd) - for(var/datum/computer_file/program/messenger/msg in hdd.stored_files) - msg.invisible = TRUE + var/datum/computer_file/program/messenger/msg = locate() in stored_files + if(msg) + msg.invisible = TRUE /obj/item/modular_computer/tablet/pda/clear name = "clear PDA" diff --git a/code/modules/modular_computers/computers/item/tablet.dm b/code/modules/modular_computers/computers/item/tablet.dm index 7ac26dc18d9..f70fc439498 100644 --- a/code/modules/modular_computers/computers/item/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet.dm @@ -37,6 +37,16 @@ /obj/item/clothing/mask/cigarette, ) +/obj/item/modular_computer/tablet/Initialize(mapload) + . = ..() + if(inserted_item) + inserted_item = new inserted_item(src) + +/obj/item/modular_computer/tablet/Destroy() + if(istype(inserted_item)) + QDEL_NULL(inserted_item) + return ..() + /obj/item/modular_computer/tablet/update_icon_state() if(has_variants && !bypass_state) if(!finish_color) @@ -108,10 +118,8 @@ /obj/item/modular_computer/tablet/proc/get_detomatix_difficulty() var/detomatix_difficulty - var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD] - if(hdd) - for(var/datum/computer_file/program/downloaded_apps as anything in hdd.stored_files) - detomatix_difficulty += downloaded_apps.detomatix_resistance + for(var/datum/computer_file/program/downloaded_apps as anything in stored_files) + detomatix_difficulty += downloaded_apps.detomatix_resistance return detomatix_difficulty @@ -153,7 +161,7 @@ if(T) T.hotspot_expose(700,125) - if(istype(all_components[MC_SDD], /obj/item/computer_hardware/hard_drive/portable/virus/deto)) + if(istype(inserted_disk, /obj/item/computer_disk/virus/detomatix)) explosion(src, devastation_range = -1, heavy_impact_range = 1, light_impact_range = 3, flash_range = 4) else explosion(src, devastation_range = -1, heavy_impact_range = -1, light_impact_range = 2, flash_range = 3) @@ -176,12 +184,7 @@ if(!new_ringtone || new_ringtone == MESSENGER_RINGTONE_DEFAULT) return - var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD] - - if(!drive) - return - - for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files) + for(var/datum/computer_file/program/messenger/messenger_app in stored_files) messenger_app.ringtone = new_ringtone @@ -226,12 +229,26 @@ has_light = FALSE //tablet light button actually enables/disables the borg lamp comp_light_luminosity = 0 has_variants = FALSE - ///Ref to the silicon we're installed in. Set by the silicon itself during its creation. - var/mob/living/silicon/silicon_owner + inserted_item = null + starting_programs = list( + /datum/computer_file/program/messenger, + ) + ///Ref to the RoboTact app. Important enough to borgs to deserve a ref. var/datum/computer_file/program/robotact/robotact ///IC log that borgs can view in their personal management app var/list/borglog = list() + ///Ref to the silicon we're installed in. Set by the silicon itself during its creation. + var/mob/living/silicon/silicon_owner + +/obj/item/modular_computer/tablet/integrated/cyborg + starting_programs = list( + /datum/computer_file/program/computerconfig, + /datum/computer_file/program/filemanager, + /datum/computer_file/program/robotact, + /datum/computer_file/program/crew_manifest, // SKYRAT EDIT ADDITION - Manifests for borgs + /datum/computer_file/program/messenger, // SKYRAT EDIT ADDITION - Messenger for borgs + ) /obj/item/modular_computer/tablet/integrated/Initialize(mapload) . = ..() @@ -239,9 +256,14 @@ silicon_owner = loc if(!istype(silicon_owner)) silicon_owner = null - stack_trace("[type] initialized outside of a borg, deleting.") + stack_trace("[type] initialized outside of a silicon, deleting.") return INITIALIZE_HINT_QDEL +/obj/item/modular_computer/tablet/integrated/install_default_programs() + for(var/programs in starting_programs) + var/datum/computer_file/program/program_type = new programs + store_file(program_type) + /obj/item/modular_computer/tablet/integrated/Destroy() silicon_owner = null return ..() @@ -279,22 +301,21 @@ * RoboTact is supposed to be undeletable, so these will create runtime messages. */ /obj/item/modular_computer/tablet/integrated/proc/get_robotact() - if(!silicon_owner) - return null - if(!robotact) - var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD] - robotact = hard_drive.find_file_by_name("robotact") - if(!robotact) - stack_trace("Cyborg [silicon_owner] ( [silicon_owner.type] ) was somehow missing their self-manage app in their tablet. A new copy has been created.") - robotact = new(hard_drive) - if(!hard_drive.store_file(robotact)) - qdel(robotact) - robotact = null - CRASH("Cyborg [silicon_owner]'s tablet hard drive rejected recieving a new copy of the self-manage app. To fix, check the hard drive's space remaining. Please make a bug report about this.") - return robotact + if(robotact) + return robotact + robotact = find_file_by_name("robotact") + if(robotact) + return robotact + stack_trace("Cyborg [silicon_owner] ( [silicon_owner.type] ) was somehow missing their self-manage app in their tablet. A new copy has been created.") + robotact = new(src) + if(store_file(robotact)) + return robotact + qdel(robotact) + robotact = null + CRASH("Cyborg [silicon_owner]'s tablet hard drive rejected recieving a new copy of the self-manage app. To fix, check the hard drive's space remaining. Please make a bug report about this.") //Makes the light settings reflect the borg's headlamp settings -/obj/item/modular_computer/tablet/integrated/ui_data(mob/user) +/obj/item/modular_computer/tablet/integrated/cyborg/ui_data(mob/user) . = ..() .["has_light"] = TRUE if(iscyborg(silicon_owner)) @@ -346,25 +367,29 @@ greyscale_config = /datum/greyscale_config/tablet greyscale_colors = "#999875#a92323" + max_capacity = 64 bypass_state = TRUE allow_chunky = TRUE - ///All applications this tablet has pre-installed - var/list/default_applications = list() - ///The pre-installed cartridge that comes with the tablet - var/loaded_cartridge + ///Static list of default PDA apps to install on Initialize. + var/static/list/datum/computer_file/pda_programs = list( + /datum/computer_file/program/messenger, + /datum/computer_file/program/nt_pay, + /datum/computer_file/program/notepad, + ) + +/obj/item/modular_computer/tablet/pda/install_default_programs() + for(var/programs as anything in (default_programs + pda_programs + starting_programs)) + var/datum/computer_file/program/program_type = new programs + store_file(program_type) /obj/item/modular_computer/tablet/pda/update_overlays() . = ..() - var/init_icon = initial(icon) var/obj/item/computer_hardware/card_slot/card = all_components[MC_CARD] - if(!init_icon) - return - if(card) - if(card.stored_card) - . += mutable_appearance(init_icon, "id_overlay") + if(card?.stored_card) + . += mutable_appearance(initial(icon), "id_overlay") if(light_on) - . += mutable_appearance(init_icon, "light_overlay") + . += mutable_appearance(initial(icon), "light_overlay") /obj/item/modular_computer/tablet/pda/attack_ai(mob/user) to_chat(user, span_notice("It doesn't feel right to snoop around like that...")) @@ -372,18 +397,5 @@ /obj/item/modular_computer/tablet/pda/Initialize(mapload) . = ..() - install_component(new /obj/item/computer_hardware/hard_drive/small) install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer)) install_component(new /obj/item/computer_hardware/card_slot) - - if(!isnull(default_applications)) - var/obj/item/computer_hardware/hard_drive/small/hard_drive = find_hardware_by_name("solid state drive") - for(var/datum/computer_file/program/default_programs as anything in default_applications) - hard_drive.store_file(new default_programs) - - if(loaded_cartridge) - var/obj/item/computer_hardware/hard_drive/portable/disk = new loaded_cartridge(src) - install_component(disk) - - if(inserted_item) - inserted_item = new inserted_item(src) diff --git a/code/modules/modular_computers/computers/item/tablet_presets.dm b/code/modules/modular_computers/computers/item/tablet_presets.dm index 16afe6da778..88bacfeb714 100644 --- a/code/modules/modular_computers/computers/item/tablet_presets.dm +++ b/code/modules/modular_computers/computers/item/tablet_presets.dm @@ -1,5 +1,10 @@ /// Given to Nuke Ops members. +/obj/item/modular_computer/tablet/nukeops + starting_programs = list( + /datum/computer_file/program/ntnetdownload/syndicate, + /datum/computer_file/program/radar/fission360, + ) + /obj/item/modular_computer/tablet/nukeops/Initialize(mapload) . = ..() install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer)) - install_component(new /obj/item/computer_hardware/hard_drive/small/nukeops) diff --git a/code/modules/modular_computers/computers/machinery/console_presets.dm b/code/modules/modular_computers/computers/machinery/console_presets.dm index 59e5945d0ab..48c00983c4d 100644 --- a/code/modules/modular_computers/computers/machinery/console_presets.dm +++ b/code/modules/modular_computers/computers/machinery/console_presets.dm @@ -2,6 +2,8 @@ // Can be changed to give devices specific hardware var/_has_second_id_slot = FALSE var/_has_battery = FALSE + ///List of programs the computer starts with, given on Initialize. + var/list/datum/computer_file/starting_programs = list() /obj/machinery/modular_computer/console/preset/Initialize(mapload) . = ..() @@ -13,23 +15,20 @@ cpu.install_component(new /obj/item/computer_hardware/card_slot/secondary) if(_has_battery) cpu.install_component(new /obj/item/computer_hardware/battery(cpu, /obj/item/stock_parts/cell/computer/super)) - install_programs() - -// Override in child types to install preset-specific programs. -/obj/machinery/modular_computer/console/preset/proc/install_programs() - return + for(var/programs in starting_programs) + var/datum/computer_file/program/program_type = new programs + cpu.store_file(program_type) // ===== ENGINEERING CONSOLE ===== /obj/machinery/modular_computer/console/preset/engineering console_department = "Engineering" name = "engineering console" desc = "A stationary computer. This one comes preloaded with engineering programs." - -/obj/machinery/modular_computer/console/preset/engineering/install_programs() - var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] - hard_drive.store_file(new/datum/computer_file/program/power_monitor()) - hard_drive.store_file(new/datum/computer_file/program/alarm_monitor()) - hard_drive.store_file(new/datum/computer_file/program/supermatter_monitor()) + starting_programs = list( + /datum/computer_file/program/power_monitor, + /datum/computer_file/program/alarm_monitor, + /datum/computer_file/program/supermatter_monitor, + ) // ===== RESEARCH CONSOLE ===== /obj/machinery/modular_computer/console/preset/research @@ -37,14 +36,13 @@ name = "research director's console" desc = "A stationary computer. This one comes preloaded with research programs." _has_second_id_slot = TRUE - -/obj/machinery/modular_computer/console/preset/research/install_programs() - var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] - hard_drive.store_file(new/datum/computer_file/program/ntnetmonitor()) - hard_drive.store_file(new/datum/computer_file/program/chatclient()) - hard_drive.store_file(new/datum/computer_file/program/ai_restorer()) - hard_drive.store_file(new/datum/computer_file/program/robocontrol()) - hard_drive.store_file(new/datum/computer_file/program/scipaper_program()) + starting_programs = list( + /datum/computer_file/program/ntnetmonitor, + /datum/computer_file/program/chatclient, + /datum/computer_file/program/ai_restorer, + /datum/computer_file/program/robocontrol, + /datum/computer_file/program/scipaper_program, + ) // ===== COMMAND CONSOLE ===== /obj/machinery/modular_computer/console/preset/command @@ -52,12 +50,10 @@ name = "command console" desc = "A stationary computer. This one comes preloaded with command programs." _has_second_id_slot = TRUE - -/obj/machinery/modular_computer/console/preset/command/install_programs() - var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] - hard_drive.store_file(new/datum/computer_file/program/chatclient()) - hard_drive.store_file(new/datum/computer_file/program/card_mod()) - + starting_programs = list( + /datum/computer_file/program/chatclient, + /datum/computer_file/program/card_mod, + ) // ===== IDENTIFICATION CONSOLE ===== /obj/machinery/modular_computer/console/preset/id @@ -65,59 +61,51 @@ name = "identification console" desc = "A stationary computer. This one comes preloaded with identification modification programs." _has_second_id_slot = TRUE - -/obj/machinery/modular_computer/console/preset/id/install_programs() - var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] - hard_drive.store_file(new/datum/computer_file/program/chatclient()) - hard_drive.store_file(new/datum/computer_file/program/card_mod()) - hard_drive.store_file(new/datum/computer_file/program/job_management()) - hard_drive.store_file(new/datum/computer_file/program/crew_manifest()) + starting_programs = list( + /datum/computer_file/program/chatclient, + /datum/computer_file/program/card_mod, + /datum/computer_file/program/job_management, + /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() +/obj/machinery/modular_computer/console/preset/id/centcom/Initialize(mapload) + . = ..() + var/datum/computer_file/program/card_mod/card_mod_centcom = cpu.find_file_by_name("plexagonidwriter") 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" name = "civilian console" desc = "A stationary computer. This one comes preloaded with generic programs." - -/obj/machinery/modular_computer/console/preset/civilian/install_programs() - var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] - hard_drive.store_file(new/datum/computer_file/program/chatclient()) - hard_drive.store_file(new/datum/computer_file/program/arcade()) + starting_programs = list( + /datum/computer_file/program/chatclient, + /datum/computer_file/program/arcade, + ) // curator /obj/machinery/modular_computer/console/preset/curator console_department = "Civilian" name = "curator console" desc = "A stationary computer. This one comes preloaded with art programs." - -/obj/machinery/modular_computer/console/preset/curator/install_programs() - var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] - hard_drive.store_file(new/datum/computer_file/program/portrait_printer()) + starting_programs = list( + /datum/computer_file/program/portrait_printer, + ) // ===== CARGO CHAT CONSOLES ===== /obj/machinery/modular_computer/console/preset/cargochat name = "cargo chatroom console" desc = "A stationary computer. This one comes preloaded with a chatroom for your cargo requests." - ///chat client installed on this computer, just helpful for linking all the computers - var/datum/computer_file/program/chatclient/chatprogram + starting_programs = list( + /datum/computer_file/program/chatclient, + ) -/obj/machinery/modular_computer/console/preset/cargochat/install_programs() - var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] - chatprogram = new - chatprogram.computer = cpu - hard_drive.store_file(chatprogram) +/obj/machinery/modular_computer/console/preset/cargochat/Initialize(mapload) + . = ..() + var/datum/computer_file/program/chatclient/chatprogram = cpu.find_file_by_name("ntnrc_client") chatprogram.username = "[lowertext(console_department)]_department" chatprogram.program_state = PROGRAM_STATE_ACTIVE cpu.active_program = chatprogram @@ -128,16 +116,9 @@ name = "department chatroom console" desc = "A stationary computer. This one comes preloaded with a chatroom for incoming cargo requests. You may moderate it from this computer." -/obj/machinery/modular_computer/console/preset/cargochat/cargo/install_programs() - var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] - - //adding chat, setting it as the active window immediately - chatprogram = new - chatprogram.computer = cpu - hard_drive.store_file(chatprogram) - chatprogram.program_state = PROGRAM_STATE_ACTIVE - cpu.active_program = chatprogram - +/obj/machinery/modular_computer/console/preset/cargochat/cargo/Initialize(mapload) + . = ..() + var/datum/computer_file/program/chatclient/chatprogram = cpu.find_file_by_name("ntnrc_client") //setting up chat chatprogram.username = "cargo_requests_operator" var/datum/ntnet_conversation/cargochat = new @@ -149,12 +130,14 @@ /obj/machinery/modular_computer/console/preset/cargochat/cargo/LateInitialize() . = ..() + var/datum/computer_file/program/chatclient/chatprogram = cpu.find_file_by_name("ntnrc_client") var/datum/ntnet_conversation/cargochat = SSnetworks.station_network.get_chat_channel_by_id(chatprogram.active_channel) for(var/obj/machinery/modular_computer/console/preset/cargochat/cargochat_console in GLOB.machines) if(cargochat_console == src) continue - cargochat_console.chatprogram.active_channel = chatprogram.active_channel - cargochat.add_client(cargochat_console.chatprogram, silent = TRUE) + var/datum/computer_file/program/chatclient/other_chatprograms = cargochat_console.cpu.find_file_by_name("ntnrc_client") + other_chatprograms.active_channel = chatprogram.active_channel + cargochat.add_client(chatprogram, silent = TRUE) /obj/machinery/modular_computer/console/preset/cargochat/service console_department = "Service" diff --git a/code/modules/modular_computers/computers/machinery/modular_console.dm b/code/modules/modular_computers/computers/machinery/modular_console.dm index 92315814cc4..eb5930313b2 100644 --- a/code/modules/modular_computers/computers/machinery/modular_console.dm +++ b/code/modules/modular_computers/computers/machinery/modular_console.dm @@ -18,20 +18,12 @@ ///Used in New() to set network tag according to our area. var/console_department = "" -/obj/machinery/modular_computer/console/buildable/Initialize(mapload) - . = ..() - // User-built consoles start as empty frames. - var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] - qdel(hard_drive) - /obj/machinery/modular_computer/console/Initialize(mapload) . = ..() var/obj/item/computer_hardware/battery/battery_module = cpu.all_components[MC_CELL] if(battery_module) qdel(battery_module) - cpu.install_component(new /obj/item/computer_hardware/hard_drive/super) // Consoles generally have better HDDs due to lower space limitations - if(cpu) cpu.screen_on = TRUE update_appearance() diff --git a/code/modules/modular_computers/documentation.md b/code/modules/modular_computers/documentation.md index 88d059da7a6..7e0cd7dbca1 100644 --- a/code/modules/modular_computers/documentation.md +++ b/code/modules/modular_computers/documentation.md @@ -56,21 +56,3 @@ This is how the base program is setup. the rest is mostly tgui stuff. I'll use t /// for an example. var/ui_header = "downloader_finished.gif" ``` - -## Preinstalls - -Now. for pre-installing stuff. - -Primarily done for consoles, there's an install_programs() proc in the console presets file in the machines folder. - -for example, the command console one. - -```DM -/obj/machinery/modular_computer/console/preset/command/install_programs() - cpu.hard_drive.store_file(new/datum/computer_file/program/chatclient()) - cpu.hard_drive.store_file(new/datum/computer_file/program/card_mod()) -``` -Basically, you want to do cpu.hard_drive.store_file(new/*program path here*()) and put it in the subtype's install_programs(). -Probably pretty self explanatory, but just in case. - -Will probably be expanded when new features come around or I get asked to mention something. diff --git a/code/modules/modular_computers/file_system/computer_file.dm b/code/modules/modular_computers/file_system/computer_file.dm index 3bfd92076c4..e711693a6e6 100644 --- a/code/modules/modular_computers/file_system/computer_file.dm +++ b/code/modules/modular_computers/file_system/computer_file.dm @@ -11,8 +11,6 @@ var/uid ///Static ID to ensure all IDs are unique. var/static/file_uid = 0 - ///The hard drive that has this computer file stored. - var/obj/item/computer_hardware/hard_drive/holder ///The modular computer hosting the file. var/obj/item/modular_computer/computer @@ -21,15 +19,9 @@ uid = file_uid++ /datum/computer_file/Destroy(force) - if(!holder) - return ..() - - holder.remove_file(src) - // holder.holder is the computer that has drive installed. If we are Destroy()ing program that's currently running kill it. - if(computer && computer.active_program == src) - computer.kill_program(forced = TRUE) - holder = null - computer = null + if(computer) + computer.remove_file(src) + computer = null return ..() // Returns independent copy of this file. diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index 624d245bc26..317ec5dba40 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -198,6 +198,8 @@ /datum/computer_file/program/proc/kill_program(forced = FALSE) SHOULD_CALL_PARENT(TRUE) program_state = PROGRAM_STATE_KILLED + if(src in computer.idle_threads) + computer.idle_threads.Remove(src) if(requires_ntnet) var/obj/item/card/id/ID var/obj/item/computer_hardware/card_slot/card_holder = computer.all_components[MC_CARD] diff --git a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm index 88a5a90aeae..c9e77a39aa7 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm @@ -28,9 +28,7 @@ computer.visible_message(span_notice("\The [computer]'s screen brightly flashes and loud electrical buzzing is heard.")) computer.enabled = FALSE computer.update_appearance() - var/obj/item/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD] var/obj/item/computer_hardware/battery/battery_module = computer.all_components[MC_CELL] - qdel(hard_drive) computer.take_damage(25, BRUTE, 0, 0) if(battery_module && prob(25)) qdel(battery_module) diff --git a/code/modules/modular_computers/file_system/programs/budgetordering.dm b/code/modules/modular_computers/file_system/programs/budgetordering.dm index 8da222bac87..003cb2b357d 100644 --- a/code/modules/modular_computers/file_system/programs/budgetordering.dm +++ b/code/modules/modular_computers/file_system/programs/budgetordering.dm @@ -284,10 +284,10 @@ . = TRUE //SKYRAT EDIT START if("gun_window") - var/datum/component/armament/cargo_gun/gun_comp = holder.holder.GetComponent(/datum/component/armament/cargo_gun) + var/datum/component/armament/cargo_gun/gun_comp = computer.GetComponent(/datum/component/armament/cargo_gun) if(!gun_comp) - holder.holder.AddComponent(/datum/component/armament/cargo_gun, subtypesof(/datum/armament_entry/cargo_gun), 0) - gun_comp = holder.holder.GetComponent(/datum/component/armament/cargo_gun) + computer.AddComponent(/datum/component/armament/cargo_gun, subtypesof(/datum/armament_entry/cargo_gun), 0) + gun_comp = computer.GetComponent(/datum/component/armament/cargo_gun) gun_comp.parent_prog ||= src gun_comp.ui_interact(usr) . = TRUE diff --git a/code/modules/modular_computers/file_system/programs/configurator.dm b/code/modules/modular_computers/file_system/programs/configurator.dm index f49f4efcf3c..eaa00800883 100644 --- a/code/modules/modular_computers/file_system/programs/configurator.dm +++ b/code/modules/modular_computers/file_system/programs/configurator.dm @@ -19,13 +19,12 @@ if(!computer) return 0 - var/obj/item/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD] var/obj/item/computer_hardware/battery/battery_module = computer.all_components[MC_CELL] var/list/data = get_header_data() - data["disk_size"] = hard_drive.max_capacity - data["disk_used"] = hard_drive.used_capacity + data["disk_size"] = computer.max_capacity + data["disk_used"] = computer.used_capacity data["power_usage"] = computer.last_power_usage data["battery_exists"] = battery_module ? 1 : 0 if(battery_module?.battery) diff --git a/code/modules/modular_computers/file_system/programs/file_browser.dm b/code/modules/modular_computers/file_system/programs/file_browser.dm index 60a9536543b..c6ff9bc8c8b 100644 --- a/code/modules/modular_computers/file_system/programs/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/file_browser.dm @@ -18,30 +18,23 @@ if(.) return - var/obj/item/computer_hardware/hard_drive/HDD = computer.all_components[MC_HDD] - var/obj/item/computer_hardware/hard_drive/RHDD = computer.all_components[MC_SDD] - switch(action) if("PRG_deletefile") - if(!HDD) - return - var/datum/computer_file/file = HDD.find_file_by_name(params["name"]) + var/datum/computer_file/file = computer.find_file_by_name(params["name"]) if(!file || file.undeletable) return - HDD.remove_file(file) + computer.remove_file(file) return TRUE if("PRG_usbdeletefile") - if(!RHDD) + if(!computer.inserted_disk) return - var/datum/computer_file/file = RHDD.find_file_by_name(params["name"]) + var/datum/computer_file/file = computer.find_file_by_name(params["name"], computer.inserted_disk) if(!file || file.undeletable) return - RHDD.remove_file(file) + computer.inserted_disk.remove_file(file) return TRUE if("PRG_renamefile") - if(!HDD) - return - var/datum/computer_file/file = HDD.find_file_by_name(params["name"]) + var/datum/computer_file/file = computer.find_file_by_name(params["name"]) if(!file) return var/newname = reject_bad_name(params["new_name"]) @@ -51,9 +44,9 @@ file.filename = newname return TRUE if("PRG_usbrenamefile") - if(!RHDD) + if(!computer.inserted_disk) return - var/datum/computer_file/file = RHDD.find_file_by_name(params["name"]) + var/datum/computer_file/file = computer.find_file_by_name(params["name"], computer.inserted_disk) if(!file) return var/newname = reject_bad_name(params["new_name"]) @@ -63,43 +56,38 @@ file.filename = newname return TRUE if("PRG_copytousb") - if(!HDD || !RHDD) + if(!computer.inserted_disk) return - var/datum/computer_file/F = HDD.find_file_by_name(params["name"]) + var/datum/computer_file/F = computer.find_file_by_name(params["name"]) if(!F) return var/datum/computer_file/C = F.clone(FALSE) - RHDD.store_file(C) + computer.inserted_disk.add_file(C) return TRUE if("PRG_copyfromusb") - if(!HDD || !RHDD) + if(!computer.inserted_disk) return - var/datum/computer_file/F = RHDD.find_file_by_name(params["name"]) + var/datum/computer_file/F = computer.find_file_by_name(params["name"], computer.inserted_disk) if(!F || !istype(F)) return var/datum/computer_file/C = F.clone(FALSE) - HDD.store_file(C) + computer.store_file(C) return TRUE if("PRG_togglesilence") - if(!HDD) - return - var/datum/computer_file/program/binary = HDD.find_file_by_name(params["name"]) + var/datum/computer_file/program/binary = computer.find_file_by_name(params["name"]) if(!binary || !istype(binary)) return binary.alert_silenced = !binary.alert_silenced /datum/computer_file/program/filemanager/ui_data(mob/user) var/list/data = get_header_data() - - var/obj/item/computer_hardware/hard_drive/HDD = computer.all_components[MC_HDD] - var/obj/item/computer_hardware/hard_drive/portable/RHDD = computer.all_components[MC_SDD] if(error) data["error"] = error - if(!computer || !HDD) + if(!computer) data["error"] = "I/O ERROR: Unable to access hard drive." else var/list/files = list() - for(var/datum/computer_file/F in HDD.stored_files) + for(var/datum/computer_file/F as anything in computer.stored_files) var/noisy = FALSE var/silenced = FALSE var/datum/computer_file/program/binary = F @@ -112,18 +100,18 @@ "size" = F.size, "undeletable" = F.undeletable, "alert_able" = noisy, - "alert_silenced" = silenced + "alert_silenced" = silenced, )) data["files"] = files - if(RHDD) + if(computer.inserted_disk) data["usbconnected"] = TRUE var/list/usbfiles = list() - for(var/datum/computer_file/F in RHDD.stored_files) + for(var/datum/computer_file/F as anything in computer.inserted_disk.stored_files) usbfiles += list(list( "name" = F.filename, "type" = F.filetype, "size" = F.size, - "undeletable" = F.undeletable + "undeletable" = F.undeletable, )) data["usbfiles"] = usbfiles diff --git a/code/modules/modular_computers/file_system/programs/frontier.dm b/code/modules/modular_computers/file_system/programs/frontier.dm index 7076986421b..ea04562c980 100644 --- a/code/modules/modular_computers/file_system/programs/frontier.dm +++ b/code/modules/modular_computers/file_system/programs/frontier.dm @@ -27,7 +27,7 @@ linked_techweb = SSresearch.science_tech /datum/computer_file/program/scipaper_program/proc/recheck_file_presence() - if(selected_file in holder.stored_files) + if(selected_file in computer.stored_files) return FALSE UnregisterSignal(selected_file, COMSIG_MODULAR_COMPUTER_FILE_DELETED) selected_file = null @@ -84,7 +84,7 @@ data["allowedTiers"] = list() data["allowedPartners"] = list() // Both the file and experiment list are assoc lists. ID as value, display name as keys. - for(var/datum/computer_file/data/ordnance/ordnance_file in holder.stored_files) + for(var/datum/computer_file/data/ordnance/ordnance_file in computer.stored_files) data["fileList"] += list(ordnance_file.filename = ordnance_file.uid) if(selected_file) for (var/possible_experiment in selected_file.possible_experiments) @@ -180,7 +180,7 @@ if(selected_file) UnregisterSignal(selected_file, COMSIG_MODULAR_COMPUTER_FILE_DELETED) paper_to_be.set_experiment() // Clears the paper info. - for(var/datum/computer_file/data/ordnance/ordnance_data in holder.stored_files) + for(var/datum/computer_file/data/ordnance/ordnance_data in computer.stored_files) if(ordnance_data.uid == params["selected_uid"]) selected_file = ordnance_data RegisterSignal(selected_file, COMSIG_MODULAR_COMPUTER_FILE_DELETED, .proc/recheck_file_presence) diff --git a/code/modules/modular_computers/file_system/programs/ntdownloader.dm b/code/modules/modular_computers/file_system/programs/ntdownloader.dm index 5b9481c8b2d..2fb9cc289ea 100644 --- a/code/modules/modular_computers/file_system/programs/ntdownloader.dm +++ b/code/modules/modular_computers/file_system/programs/ntdownloader.dm @@ -53,9 +53,7 @@ if(PRG.available_on_syndinet && !emagged) return FALSE - var/obj/item/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD] - - if(!computer || !hard_drive || !hard_drive.can_store_file(PRG)) + if(!computer || !computer.can_store_file(PRG)) return FALSE ui_header = "downloader_running.gif" @@ -84,8 +82,7 @@ if(!downloaded_file) return generate_network_log("Completed download of file [hacked_download ? "**ENCRYPTED**" : "[downloaded_file.filename].[downloaded_file.filetype]"].") - var/obj/item/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD] - if(!computer || !hard_drive || !hard_drive.store_file(downloaded_file)) + if(!computer || !computer.store_file(downloaded_file)) // The download failed downloaderror = "I/O ERROR - Unable to save file. Check whether you have enough free space on your hard drive and whether your hard drive is properly connected. If the issue persists contact your system administrator for assistance." downloaded_file = null @@ -146,29 +143,27 @@ data["downloadspeed"] = download_netspeed data["downloadcompletion"] = round(download_completion, 0.1) - var/obj/item/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD] - data["disk_size"] = hard_drive.max_capacity - data["disk_used"] = hard_drive.used_capacity + data["disk_size"] = computer.max_capacity + data["disk_used"] = computer.used_capacity data["emagged"] = emagged var/list/repo = antag_repo | main_repo var/list/program_categories = list() - for(var/I in repo) - var/datum/computer_file/program/P = I - if(!(P.category in program_categories)) - program_categories.Add(P.category) + for(var/datum/computer_file/program/programs as anything in repo) + if(!(programs.category in program_categories)) + program_categories.Add(programs.category) data["programs"] += list(list( - "icon" = P.program_icon, - "filename" = P.filename, - "filedesc" = P.filedesc, - "fileinfo" = P.extended_desc, - "category" = P.category, - "installed" = !!hard_drive.find_file_by_name(P.filename), - "compatible" = check_compatibility(P), - "size" = P.size, - "access" = emagged && P.available_on_syndinet ? TRUE : P.can_run(user,transfer = 1, access = access), - "verifiedsource" = P.available_on_ntnet, + "icon" = programs.program_icon, + "filename" = programs.filename, + "filedesc" = programs.filedesc, + "fileinfo" = programs.extended_desc, + "category" = programs.category, + "installed" = !!computer.find_file_by_name(programs.filename), + "compatible" = check_compatibility(programs), + "size" = programs.size, + "access" = emagged && programs.available_on_syndinet ? TRUE : programs.can_run(user,transfer = 1, access = access), + "verifiedsource" = programs.available_on_ntnet, )) data["categories"] = show_categories & program_categories diff --git a/code/modules/modular_computers/file_system/programs/ntmessenger.dm b/code/modules/modular_computers/file_system/programs/ntmessenger.dm index cb69aa38fbe..243db6373f6 100644 --- a/code/modules/modular_computers/file_system/programs/ntmessenger.dm +++ b/code/modules/modular_computers/file_system/programs/ntmessenger.dm @@ -44,8 +44,6 @@ /// The path for the current loaded image in rsc var/photo_path - /// Whether or not this app is loaded on a silicon's tablet. - var/is_silicon = FALSE /// Whether or not we're in a mime PDA. var/mime_mode = FALSE /// Whether this app can send messages to all. @@ -84,10 +82,7 @@ sortmode = /proc/cmp_pdaname_asc for(var/obj/item/modular_computer/P in sort_list(GLOB.TabletMessengers, sortmode)) - var/obj/item/computer_hardware/hard_drive/drive = P.all_components[MC_HDD] - if(!drive) - continue - for(var/datum/computer_file/program/messenger/app in drive.stored_files) + for(var/datum/computer_file/program/messenger/app in P.stored_files) if(!P.saved_identification || !P.saved_job || app.invisible || app.monitor_hidden) continue dictionary += P @@ -179,17 +174,15 @@ to_chat(usr, span_notice("ERROR: User no longer exists.")) return - var/obj/item/computer_hardware/hard_drive/drive = target.all_components[MC_HDD] - - for(var/datum/computer_file/program/messenger/app in drive.stored_files) + for(var/datum/computer_file/program/messenger/app in computer.stored_files) if(!app.sending_and_receiving && !sending_virus) to_chat(usr, span_notice("ERROR: Device has receiving disabled.")) return if(sending_virus) - var/obj/item/computer_hardware/hard_drive/portable/virus/disk = computer.all_components[MC_SDD] + var/obj/item/computer_disk/virus/disk = computer.inserted_disk if(istype(disk)) - disk.send_virus(target, usr) + disk.send_virus(src, target, usr) return UI_UPDATE send_message(usr, list(target)) @@ -204,24 +197,29 @@ sending_virus = !sending_virus return UI_UPDATE +/datum/computer_file/program/messenger/ui_static_data(mob/user) + var/list/data = ..() + + data["owner"] = computer.saved_identification + data["ringer_status"] = ringer_status + data["sending_and_receiving"] = sending_and_receiving + data["sortByJob"] = sort_by_job + data["isSilicon"] = issilicon(user) + data["viewing_messages"] = viewing_messages + + return data /datum/computer_file/program/messenger/ui_data(mob/user) var/list/data = get_header_data() - data["owner"] = computer.saved_identification data["messages"] = messages - data["ringer_status"] = ringer_status - data["sending_and_receiving"] = sending_and_receiving data["messengers"] = ScrubMessengerList() - data["viewing_messages"] = viewing_messages - data["sortByJob"] = sort_by_job - data["isSilicon"] = is_silicon data["photo"] = photo_path data["canSpam"] = spam_mode - var/obj/item/computer_hardware/hard_drive/portable/virus/disk = computer.all_components[MC_SDD] - if(disk) - data["virus_attach"] = istype(disk, /obj/item/computer_hardware/hard_drive/portable/virus) + var/obj/item/computer_disk/virus/disk = computer.inserted_disk + if(disk && istype(disk)) + data["virus_attach"] = TRUE data["sending_virus"] = sending_virus return data @@ -366,11 +364,11 @@ messages += list(message_data) var/mob/living/L = null - if(holder.holder.loc && isliving(holder.holder.loc)) - L = holder.holder.loc + if(computer.loc && isliving(computer.loc)) + L = computer.loc //Maybe they are a pAI! else - L = get(holder.holder, /mob/living/silicon) + L = get(computer, /mob/living/silicon) if(L && (L.stat == CONSCIOUS || L.stat == SOFT_CRIT)) var/reply = "(Reply)" diff --git a/code/modules/modular_computers/file_system/programs/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/ntnrc_client.dm index 5860ee9b6e3..cb7c4d21c93 100644 --- a/code/modules/modular_computers/file_system/programs/ntnrc_client.dm +++ b/code/modules/modular_computers/file_system/programs/ntnrc_client.dm @@ -124,15 +124,11 @@ logfile.stored_text = "[logfile.stored_text][logstring]\[BR\]" logfile.stored_text = "[logfile.stored_text]\[b\]Logfile dump completed.\[/b\]" logfile.calculate_size() - var/obj/item/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD] - if(!computer || !hard_drive || !hard_drive.store_file(logfile)) + if(!computer || !computer.store_file(logfile)) if(!computer) // This program shouldn't even be runnable without computer. CRASH("Var computer is null!") - if(!hard_drive) - computer.visible_message(span_warning("\The [computer] shows an \"I/O Error - Hard drive connection error\" warning.")) - else // In 99.9% cases this will mean our HDD is full - computer.visible_message(span_warning("\The [computer] shows an \"I/O Error - Hard drive may be full. Please free some space and try again. Required space: [logfile.size]GQ\" warning.")) + computer.visible_message(span_warning("\The [computer] shows an \"I/O Error - Hard drive may be full. Please free some space and try again. Required space: [logfile.size]GQ\" warning.")) return TRUE if("PRG_renamechannel") if(!authed) diff --git a/code/modules/modular_computers/file_system/programs/wirecarp.dm b/code/modules/modular_computers/file_system/programs/wirecarp.dm index 24f63cf7258..f16519de19c 100644 --- a/code/modules/modular_computers/file_system/programs/wirecarp.dm +++ b/code/modules/modular_computers/file_system/programs/wirecarp.dm @@ -52,16 +52,11 @@ if("toggle_mass_pda") if(!SSnetworks.station_network) return - var/mob/user = ui.user var/obj/item/modular_computer/target_tablet = locate(params["ref"]) in GLOB.TabletMessengers if(!istype(target_tablet)) return - var/obj/item/computer_hardware/hard_drive/drive = target_tablet.all_components[MC_HDD] - if(!drive) - to_chat(user, span_boldnotice("Target tablet somehow is lacking a hard drive.")) - return - for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files) + for(var/datum/computer_file/program/messenger/messenger_app in computer.stored_files) messenger_app.spam_mode = !messenger_app.spam_mode /datum/computer_file/program/ntnetmonitor/ui_data(mob/user) @@ -91,10 +86,7 @@ for(var/obj/item/modular_computer/messenger in GetViewableDevices()) var/list/tablet_data = list() if(messenger.saved_identification) - var/obj/item/computer_hardware/hard_drive/drive = messenger.all_components[MC_HDD] - if(!drive) - continue - for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files) + for(var/datum/computer_file/program/messenger/messenger_app in computer.stored_files) tablet_data["enabled_spam"] += messenger_app.spam_mode tablet_data["name"] += messenger.saved_identification diff --git a/code/modules/modular_computers/hardware/hard_drive.dm b/code/modules/modular_computers/hardware/hard_drive.dm deleted file mode 100644 index 16cf1cdc042..00000000000 --- a/code/modules/modular_computers/hardware/hard_drive.dm +++ /dev/null @@ -1,241 +0,0 @@ -/obj/item/computer_hardware/hard_drive - name = "hard disk drive" - desc = "A small HDD, for use in basic computers where power efficiency is desired." - power_usage = 25 - icon_state = "harddisk_mini" - critical = 1 - w_class = WEIGHT_CLASS_TINY - device_type = MC_HDD - var/max_capacity = 128 - var/used_capacity = 0 - var/list/stored_files = list() // List of stored files on this drive. DO NOT MODIFY DIRECTLY! - var/default_installs = TRUE // install the default progs - -/obj/item/computer_hardware/hard_drive/Initialize(mapload) - . = ..() - - if(default_installs) - install_default_programs() - -/obj/item/computer_hardware/hard_drive/Destroy() - QDEL_LIST(stored_files) - return ..() - -/obj/item/computer_hardware/hard_drive/on_install(obj/item/modular_computer/install_into, mob/living/user) - . = ..() - // whoever tried to set the ref to the computer in new, is it okay if i could come to your house someday, yeah? - for(var/datum/computer_file/file as anything in stored_files) - file.computer = holder - -/obj/item/computer_hardware/hard_drive/on_remove(obj/item/modular_computer/remove_from, mob/user) - remove_from.shutdown_computer() - for(var/datum/computer_file/program in stored_files) - program.computer = null - return ..() - -/obj/item/computer_hardware/hard_drive/proc/install_default_programs() - store_file(new /datum/computer_file/program/computerconfig) // Computer configuration utility, allows hardware control and displays more info than status bar - store_file(new /datum/computer_file/program/ntnetdownload) // NTNet Downloader Utility, allows users to download more software from NTNet repository - store_file(new /datum/computer_file/program/filemanager) // File manager, allows text editor functions and basic file manipulation. - -/obj/item/computer_hardware/hard_drive/examine(user) - . = ..() - . += span_notice("It has [max_capacity] GQ of storage capacity.") - -/obj/item/computer_hardware/hard_drive/diagnostics(mob/user) - ..() - // 999 is a byond limit that is in place. It's unlikely someone will reach that many files anyway, since you would sooner run out of space. - to_chat(user, "NT-NFS File Table Status: [stored_files.len]/999") - to_chat(user, "Storage capacity: [used_capacity]/[max_capacity]GQ") - -// Use this proc to add file to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks. -/obj/item/computer_hardware/hard_drive/proc/store_file(datum/computer_file/F) - if(!F || !istype(F)) - return FALSE - - if(!can_store_file(F)) - return FALSE - - if(!check_functionality()) - return FALSE - - if(!stored_files) - return FALSE - - // This file is already stored. Don't store it again. - if(F in stored_files) - return FALSE - - SEND_SIGNAL(F, COMSIG_MODULAR_COMPUTER_FILE_ADDING) - - F.holder = src - F.computer = holder - stored_files.Add(F) - recalculate_size() - - SEND_SIGNAL(F, COMSIG_MODULAR_COMPUTER_FILE_ADDED) - return TRUE - -// Use this proc to remove file from the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks. -/obj/item/computer_hardware/hard_drive/proc/remove_file(datum/computer_file/F) - if(!F || !istype(F)) - return FALSE - - if(!stored_files) - return FALSE - - if(!check_functionality()) - return FALSE - - if(F in stored_files) - if(istype(F, /datum/computer_file/program)) - var/datum/computer_file/program/program_file = F - if(program_file.program_state != PROGRAM_STATE_KILLED) - program_file.kill_program(TRUE) - SEND_SIGNAL(F, COMSIG_MODULAR_COMPUTER_FILE_DELETING) - stored_files -= F - recalculate_size() - SEND_SIGNAL(F, COMSIG_MODULAR_COMPUTER_FILE_DELETED) - return TRUE - else - return FALSE - -// Loops through all stored files and recalculates used_capacity of this drive -/obj/item/computer_hardware/hard_drive/proc/recalculate_size() - var/total_size = 0 - for(var/datum/computer_file/F in stored_files) - total_size += F.size - - used_capacity = total_size - -// Checks whether file can be stored on the hard drive. We can only store unique files, so this checks whether we wouldn't get a duplicity by adding a file. -/obj/item/computer_hardware/hard_drive/proc/can_store_file(datum/computer_file/F) - if(!F || !istype(F)) - return FALSE - - if(F in stored_files) - return FALSE - - var/name = F.filename + "." + F.filetype - for(var/datum/computer_file/file in stored_files) - if((file.filename + "." + file.filetype) == name) - return FALSE - - // In the unlikely event someone manages to create that many files. - // BYOND is acting weird with numbers above 999 in loops (infinite loop prevention) - if(stored_files.len >= 999) - return FALSE - if((used_capacity + F.size) > max_capacity) - return FALSE - else - return TRUE - - -// Tries to find the file by filename. Returns null on failure -/obj/item/computer_hardware/hard_drive/proc/find_file_by_name(filename) - if(!check_functionality()) - return null - - if(!filename) - return null - - if(!stored_files) - return null - - for(var/datum/computer_file/F as anything in stored_files) - if(F.filename == filename) - return F - return null - -/obj/item/computer_hardware/hard_drive/advanced - name = "advanced hard disk drive" - desc = "A hybrid HDD, for use in higher grade computers where balance between power efficiency and capacity is desired." - max_capacity = 256 - power_usage = 50 // Hybrid, medium capacity and medium power storage - icon_state = "harddisk_mini" - w_class = WEIGHT_CLASS_SMALL - -/obj/item/computer_hardware/hard_drive/super - name = "super hard disk drive" - desc = "A high capacity HDD, for use in cluster storage solutions where capacity is more important than power efficiency." - max_capacity = 512 - power_usage = 100 // High-capacity but uses lots of power, shortening battery life. Best used with APC link. - icon_state = "harddisk_mini" - w_class = WEIGHT_CLASS_SMALL - -/obj/item/computer_hardware/hard_drive/cluster - name = "cluster hard disk drive" - desc = "A large storage cluster consisting of multiple HDDs for usage in dedicated storage systems." - power_usage = 500 - max_capacity = 2048 - icon_state = "harddisk" - w_class = WEIGHT_CLASS_NORMAL - -// For tablets, etc. - highly power efficient. -/obj/item/computer_hardware/hard_drive/small - name = "solid state drive" - desc = "An efficient SSD for portable devices." - power_usage = 10 - max_capacity = 64 - icon_state = "ssd_mini" - w_class = WEIGHT_CLASS_TINY - custom_price = PAYCHECK_CREW * 2 - -/obj/item/computer_hardware/hard_drive/small/install_default_programs() - . = ..() - - store_file(new /datum/computer_file/program/messenger) - store_file(new /datum/computer_file/program/nt_pay) - store_file(new /datum/computer_file/program/notepad) - store_file(new /datum/computer_file/program/crew_manifest) // SKYRAT EDIT ADD - -// For borg integrated tablets. No downloader. -/obj/item/computer_hardware/hard_drive/small/ai/install_default_programs() - var/datum/computer_file/program/messenger/messenger = new - messenger.is_silicon = TRUE - store_file(messenger) - -/obj/item/computer_hardware/hard_drive/small/robot/install_default_programs() - store_file(new /datum/computer_file/program/computerconfig) // Computer configuration utility, allows hardware control and displays more info than status bar - store_file(new /datum/computer_file/program/filemanager) // File manager, allows text editor functions and basic file manipulation. - store_file(new /datum/computer_file/program/robotact) - store_file(new /datum/computer_file/program/crew_manifest) // SKYRAT EDIT ADDITION - Manifests for cyborgs - /* SKYRAT EDIT ADDITION Start- Returns Messenger to borgs */ - var/datum/computer_file/program/messenger/messenger = new - messenger.is_silicon = TRUE - store_file(messenger) - /* SKYRAT EDIT ADDITION End- Returns Messenger to borgs */ - -// Syndicate variant - very slight better -/obj/item/computer_hardware/hard_drive/portable/syndicate - desc = "An efficient SSD for portable devices developed by a rival organisation." - power_usage = 8 - max_capacity = 70 - device_type = MC_HDD // SKYRAT EDIT - var/datum/opposing_force/opfor_data // Syndicate hard drive has the user's data baked directly into it on creation //SKYRAT EDIT - OPFOR, NOT TRAITOR - -/obj/item/computer_hardware/hard_drive/portable/syndicate/install_default_programs() - . = ..() - store_file(new/datum/computer_file/program/computerconfig(src)) - store_file(new/datum/computer_file/program/ntnetdownload/syndicate(src)) - store_file(new/datum/computer_file/program/filemanager(src)) - store_file(new/datum/computer_file/program/radar/fission360(src)) - -/// For tablets given to nuke ops -/obj/item/computer_hardware/hard_drive/small/nukeops - power_usage = 8 - max_capacity = 70 - -/obj/item/computer_hardware/hard_drive/small/nukeops/install_default_programs() - store_file(new/datum/computer_file/program/computerconfig) - store_file(new/datum/computer_file/program/ntnetdownload/syndicate) // Syndicate version; automatic access to syndicate apps and no NT apps - store_file(new/datum/computer_file/program/filemanager) - store_file(new/datum/computer_file/program/radar/fission360) //I am legitimately afraid if I don't do this, Ops players will think they just don't get a pinpointer anymore. - -/obj/item/computer_hardware/hard_drive/micro - name = "micro solid state drive" - desc = "A highly efficient SSD chip for portable devices." - power_usage = 2 - max_capacity = 32 - icon_state = "ssd_micro" - w_class = WEIGHT_CLASS_TINY diff --git a/code/modules/modular_computers/hardware/portable_disk.dm b/code/modules/modular_computers/hardware/portable_disk.dm deleted file mode 100644 index ae99bacf377..00000000000 --- a/code/modules/modular_computers/hardware/portable_disk.dm +++ /dev/null @@ -1,28 +0,0 @@ -/obj/item/computer_hardware/hard_drive/portable - name = "data disk" - desc = "Removable disk used to store data." - power_usage = 10 - icon_state = "datadisk6" - w_class = WEIGHT_CLASS_TINY - critical = FALSE - max_capacity = 16 - device_type = MC_SDD - -/obj/item/computer_hardware/hard_drive/portable/on_remove(obj/item/modular_computer/remove_from, mob/user) - return //this is a floppy disk, let's not shut the computer down when it gets pulled out. - -/obj/item/computer_hardware/hard_drive/portable/install_default_programs() - return // Empty by default - -/obj/item/computer_hardware/hard_drive/portable/advanced - name = "advanced data disk" - power_usage = 20 - icon_state = "datadisk5" - max_capacity = 64 - -/obj/item/computer_hardware/hard_drive/portable/super - name = "super data disk" - desc = "Removable disk used to store large amounts of data." - power_usage = 40 - icon_state = "datadisk3" - max_capacity = 256 diff --git a/code/modules/modular_computers/hardware/program_disks.dm b/code/modules/modular_computers/hardware/program_disks.dm deleted file mode 100644 index 3949373cbb3..00000000000 --- a/code/modules/modular_computers/hardware/program_disks.dm +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Command - */ -/obj/item/computer_hardware/hard_drive/portable/command - icon_state = "datadisk7" - max_capacity = 32 - - -/obj/item/computer_hardware/hard_drive/portable/command/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/crew_manifest) - store_file(new /datum/computer_file/program/science) - store_file(new /datum/computer_file/program/status) - -/obj/item/computer_hardware/hard_drive/portable/command/captain - name = "captain data disk" - desc = "Removable disk used to download essential Captain tablet apps." - icon_state = "datadisk10" - -/obj/item/computer_hardware/hard_drive/portable/command/captain/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/records/security) - store_file(new /datum/computer_file/program/records/medical) - store_file(new /datum/computer_file/program/phys_scanner/all) - -/obj/item/computer_hardware/hard_drive/portable/command/cmo - name = "chief medical officer data disk" - desc = "Removable disk used to download essential CMO tablet apps." - -/obj/item/computer_hardware/hard_drive/portable/command/cmo/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/phys_scanner/all) - store_file(new /datum/computer_file/program/records/medical) - -/obj/item/computer_hardware/hard_drive/portable/command/rd - name = "research director data disk" - desc = "Removable disk used to download essential RD tablet apps." - -/obj/item/computer_hardware/hard_drive/portable/command/rd/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/signal_commander) - store_file(new /datum/computer_file/program/phys_scanner/chemistry) - -/obj/item/computer_hardware/hard_drive/portable/command/hos - name = "head of security data disk" - desc = "Removable disk used to download essential HoS tablet apps." - icon_state = "datadisk9" - -/obj/item/computer_hardware/hard_drive/portable/command/hos/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/records/security) - -/obj/item/computer_hardware/hard_drive/portable/command/hop - name = "head of personnel data disk" - desc = "Removable disk used to download essential HoP tablet apps." - -/obj/item/computer_hardware/hard_drive/portable/command/hop/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/records/security) - store_file(new /datum/computer_file/program/job_management) - -/obj/item/computer_hardware/hard_drive/portable/command/ce - name = "chief engineer data disk" - desc = "Removable disk used to download essential CE tablet apps." - -/obj/item/computer_hardware/hard_drive/portable/command/ce/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/supermatter_monitor) - store_file(new /datum/computer_file/program/atmosscan) - store_file(new /datum/computer_file/program/alarm_monitor) - -/** - * Security - */ -/obj/item/computer_hardware/hard_drive/portable/security - name = "security officer data disk" - desc = "Removable disk used to download security-related tablet apps." - icon_state = "datadisk9" - -/obj/item/computer_hardware/hard_drive/portable/security/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/records/security) - store_file(new /datum/computer_file/program/crew_manifest) - -/** - * Medical - */ -/obj/item/computer_hardware/hard_drive/portable/medical - name = "medical doctor data disk" - desc = "Removable disk used to download medical-related tablet apps." - icon_state = "datadisk7" - -/obj/item/computer_hardware/hard_drive/portable/medical/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/phys_scanner/medical) - store_file(new /datum/computer_file/program/records/medical) - -/obj/item/computer_hardware/hard_drive/portable/chemistry - name = "chemistry data disk" - desc = "Removable disk used to download chemistry-related tablet apps." - icon_state = "datadisk5" - -/obj/item/computer_hardware/hard_drive/portable/chemistry/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/phys_scanner/chemistry) - -/** - * Supply - */ -/obj/item/computer_hardware/hard_drive/portable/quartermaster - name = "cargo data disk" - desc = "Removable disk used to download cargo-related tablet apps." - icon_state = "cargodisk" - -/obj/item/computer_hardware/hard_drive/portable/quartermaster/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/shipping) - store_file(new /datum/computer_file/program/budgetorders) - -/** - * Science - */ -/obj/item/computer_hardware/hard_drive/portable/ordnance - name = "ordnance data disk" - desc = "Removable disk used to download ordnance-related tablet apps." - icon_state = "datadisk5" - -/obj/item/computer_hardware/hard_drive/portable/ordnance/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/signal_commander) - store_file(new /datum/computer_file/program/scipaper_program) - -/** - * Engineering - */ -/obj/item/computer_hardware/hard_drive/portable/engineering - name = "station engineer data disk" - desc = "Removable disk used to download engineering-related tablet apps." - icon_state = "datadisk6" - -/obj/item/computer_hardware/hard_drive/portable/engineering/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/supermatter_monitor) - -/obj/item/computer_hardware/hard_drive/portable/atmos - name = "atmospheric technician data disk" - desc = "Removable disk used to download atmos-related tablet apps." - icon_state = "datadisk6" - - -/obj/item/computer_hardware/hard_drive/portable/atmos/install_default_programs() - . = ..() - store_file(new /datum/computer_file/program/atmosscan) - store_file(new /datum/computer_file/program/alarm_monitor) diff --git a/code/modules/modular_computers/hardware/virus_disk.dm b/code/modules/modular_computers/hardware/virus_disk.dm deleted file mode 100644 index d51744c2a58..00000000000 --- a/code/modules/modular_computers/hardware/virus_disk.dm +++ /dev/null @@ -1,134 +0,0 @@ -/obj/item/computer_hardware/hard_drive/portable/virus - name = "\improper generic virus disk" - icon_state = "virusdisk" - var/charges = 5 - -/obj/item/computer_hardware/hard_drive/portable/virus/proc/send_virus(obj/item/modular_computer/tablet/target, mob/living/user) - return - -/obj/item/computer_hardware/hard_drive/portable/virus/clown - name = "\improper H.O.N.K. disk" - -/obj/item/computer_hardware/hard_drive/portable/virus/clown/send_virus(obj/item/modular_computer/tablet/target, mob/living/user) - if(charges <= 0) - to_chat(user, span_notice("ERROR: Out of charges.")) - return - - if(target) - user.show_message(span_notice("Success!")) - charges-- - target.honkvirus_amount = rand(15, 25) - else - to_chat(user, span_notice("ERROR: Could not find device.")) - -/obj/item/computer_hardware/hard_drive/portable/virus/mime - name = "\improper sound of silence disk" - -/obj/item/computer_hardware/hard_drive/portable/virus/mime/send_virus(obj/item/modular_computer/tablet/target, mob/living/user) - if(charges <= 0) - to_chat(user, span_notice("ERROR: Out of charges.")) - return - - if(target) - user.show_message(span_notice("Success!")) - charges-- - - var/obj/item/computer_hardware/hard_drive/drive = target.all_components[MC_HDD] - - for(var/datum/computer_file/program/messenger/app in drive.stored_files) - app.ringer_status = FALSE - app.ringtone = "" - else - to_chat(user, span_notice("ERROR: Could not find device.")) - -/obj/item/computer_hardware/hard_drive/portable/virus/deto - name = "\improper D.E.T.O.M.A.T.I.X. disk" - charges = 6 - -/obj/item/computer_hardware/hard_drive/portable/virus/deto/send_virus(obj/item/modular_computer/tablet/target, mob/living/user) - if(charges <= 0) - to_chat(user, span_notice("ERROR: Out of charges.")) - return - - var/difficulty = target.get_detomatix_difficulty() - if(SEND_SIGNAL(target, COMSIG_TABLET_CHECK_DETONATE) & COMPONENT_TABLET_NO_DETONATE || prob(difficulty * 15)) - user.show_message(span_danger("ERROR: Target could not be bombed."), MSG_VISUAL) - charges-- - return - - var/original_host = holder - var/fakename = sanitize_name(tgui_input_text(user, "Enter a name for the rigged message.", "Forge Message", max_length = MAX_NAME_LEN), allow_numbers = TRUE) - if(!fakename || holder != original_host || !user.canUseTopic(holder, be_close = TRUE)) - return - var/fakejob = sanitize_name(tgui_input_text(user, "Enter a job for the rigged message.", "Forge Message", max_length = MAX_NAME_LEN), allow_numbers = TRUE) - if(!fakejob || holder != original_host || !user.canUseTopic(holder, be_close = TRUE)) - return - - var/obj/item/computer_hardware/hard_drive/drive = holder.all_components[MC_HDD] - - for(var/datum/computer_file/program/messenger/app in drive.stored_files) - if(charges > 0 && app.send_message(user, list(target), rigged = REF(user), fake_name = fakename, fake_job = fakejob)) - charges-- - user.show_message(span_notice("Success!")) - var/reference = REF(src) - ADD_TRAIT(target, TRAIT_PDA_CAN_EXPLODE, reference) - ADD_TRAIT(target, TRAIT_PDA_MESSAGE_MENU_RIGGED, reference) - addtimer(TRAIT_CALLBACK_REMOVE(target, TRAIT_PDA_MESSAGE_MENU_RIGGED, reference), 10 SECONDS) - -/obj/item/computer_hardware/hard_drive/portable/virus/frame - name = "\improper F.R.A.M.E. disk" - - var/telecrystals = 0 - var/current_progression = 0 - -/obj/item/computer_hardware/hard_drive/portable/virus/frame/send_virus(obj/item/modular_computer/tablet/target, mob/living/user) - if(charges <= 0) - to_chat(user, span_notice("ERROR: Out of charges.")) - return - - if(target) - charges-- - var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]" - to_chat(user, span_notice("Success! The unlock code to the target is: [lock_code]")) - var/datum/component/uplink/hidden_uplink = target.GetComponent(/datum/component/uplink) - if(!hidden_uplink) - var/datum/mind/target_mind - var/list/backup_players = list() - for(var/datum/mind/player as anything in get_crewmember_minds()) - if(player.assigned_role?.title == target.saved_job) - backup_players += player - if(player.name == target.saved_identification) - target_mind = player - break - if(!target_mind) - if(!length(backup_players)) - target_mind = user.mind - else - target_mind = pick(backup_players) - hidden_uplink = target.AddComponent(/datum/component/uplink, target_mind, enabled = TRUE, starting_tc = telecrystals, has_progression = TRUE) - hidden_uplink.uplink_handler.has_objectives = TRUE - hidden_uplink.uplink_handler.owner = target_mind - hidden_uplink.uplink_handler.can_take_objectives = FALSE - hidden_uplink.uplink_handler.progression_points = min(SStraitor.current_global_progression, current_progression) - hidden_uplink.uplink_handler.generate_objectives() - SStraitor.register_uplink_handler(hidden_uplink.uplink_handler) - else - hidden_uplink.add_telecrystals(telecrystals) - telecrystals = 0 - hidden_uplink.locked = FALSE - hidden_uplink.active = TRUE - else - to_chat(user, span_notice("ERROR: Could not find device.")) - -/obj/item/computer_hardware/hard_drive/portable/virus/frame/attackby(obj/item/I, mob/user, params) - . = ..() - if(istype(I, /obj/item/stack/telecrystal)) - if(!charges) - to_chat(user, span_notice("[src] is out of charges, it's refusing to accept [I].")) - return - var/obj/item/stack/telecrystal/telecrystalStack = I - telecrystals += telecrystalStack.amount - to_chat(user, span_notice("You slot [telecrystalStack] into [src]. The next time it's used, it will also give telecrystals.")) - telecrystalStack.use(telecrystalStack.amount) - - diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index 438c8c5de86..8b7ecfc7c8d 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -20,7 +20,6 @@ // Device loadout var/dev_battery = 1 // 1: Default, 2: Upgraded, 3: Advanced - var/dev_disk = 1 // 1: Default, 2: Upgraded, 3: Advanced var/dev_card = 0 // 0: None, 1: Standard // Removes all traces of old order and allows you to begin configuration from scratch. @@ -34,7 +33,6 @@ qdel(fabricated_tablet) fabricated_tablet = null dev_battery = 1 - dev_disk = 1 dev_card = 0 // Recalculates the price and optionally even fabricates the device. @@ -60,18 +58,6 @@ if(fabricate) battery_module.try_insert(new /obj/item/stock_parts/cell/computer/super) total_price += 499 - switch(dev_disk) - if(1) // Basic(128GQ) - if(fabricate) - fabricated_laptop.install_component(new /obj/item/computer_hardware/hard_drive) - if(2) // Upgraded(256GQ) - if(fabricate) - fabricated_laptop.install_component(new /obj/item/computer_hardware/hard_drive/advanced) - total_price += 99 - if(3) // Advanced(512GQ) - if(fabricate) - fabricated_laptop.install_component(new /obj/item/computer_hardware/hard_drive/super) - total_price += 299 if(dev_card) total_price += 199 if(fabricate) @@ -98,18 +84,6 @@ if(fabricate) battery_module.try_insert(new /obj/item/stock_parts/cell/computer) total_price += 499 - switch(dev_disk) - if(1) // Basic(32GQ) - if(fabricate) - fabricated_tablet.install_component(new /obj/item/computer_hardware/hard_drive/micro) - if(2) // Upgraded(64GQ) - if(fabricate) - fabricated_tablet.install_component(new /obj/item/computer_hardware/hard_drive/small) - total_price += 99 - if(3) // Advanced(128GQ) - if(fabricate) - fabricated_tablet.install_component(new /obj/item/computer_hardware/hard_drive) - total_price += 299 if(dev_card) total_price += 199 if(fabricate) @@ -151,10 +125,6 @@ dev_battery = text2num(params["battery"]) fabricate_and_recalc_price(FALSE) return TRUE - if("hw_disk") - dev_disk = text2num(params["disk"]) - fabricate_and_recalc_price(FALSE) - return TRUE if("hw_card") dev_card = text2num(params["card"]) fabricate_and_recalc_price(FALSE) @@ -216,7 +186,6 @@ if(state == 1) data["devtype"] = devtype data["hw_battery"] = dev_battery - data["hw_disk"] = dev_disk data["hw_card"] = dev_card if(state == 1 || state == 2) data["totalprice"] = total_price diff --git a/code/modules/research/designs/computer_part_designs.dm b/code/modules/research/designs/computer_part_designs.dm index 4bb3b219e45..e02f2728846 100644 --- a/code/modules/research/designs/computer_part_designs.dm +++ b/code/modules/research/designs/computer_part_designs.dm @@ -1,107 +1,6 @@ //////////////////////////////////////// ///////////Computer Parts/////////////// //////////////////////////////////////// - -/datum/design/disk/normal - name = "Hard Disk Drive" - id = "hdd_basic" - build_type = PROTOLATHE | AWAY_LATHE - materials = list(/datum/material/iron = 400, /datum/material/glass = 100) - build_path = /obj/item/computer_hardware/hard_drive - category = list( - RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING - -/datum/design/disk/advanced - name = "Advanced Hard Disk Drive" - id = "hdd_advanced" - build_type = PROTOLATHE | AWAY_LATHE - materials = list(/datum/material/iron = 800, /datum/material/glass = 200) - build_path = /obj/item/computer_hardware/hard_drive/advanced - category = list( - RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING - -/datum/design/disk/super - name = "Super Hard Disk Drive" - id = "hdd_super" - build_type = PROTOLATHE | AWAY_LATHE - materials = list(/datum/material/iron = 1600, /datum/material/glass = 400) - build_path = /obj/item/computer_hardware/hard_drive/super - category = list( - RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING - -/datum/design/disk/cluster - name = "Cluster Hard Disk Drive" - id = "hdd_cluster" - build_type = PROTOLATHE | AWAY_LATHE - materials = list(/datum/material/iron = 3200, /datum/material/glass = 800) - build_path = /obj/item/computer_hardware/hard_drive/cluster - category = list( - RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING - -/datum/design/disk/small - name = "Solid State Drive" - id = "ssd_small" - build_type = PROTOLATHE | AWAY_LATHE - materials = list(/datum/material/iron = 800, /datum/material/glass = 200) - build_path = /obj/item/computer_hardware/hard_drive/small - category = list( - RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING - -/datum/design/disk/micro - name = "Micro Solid State Drive" - id = "ssd_micro" - build_type = PROTOLATHE | AWAY_LATHE - materials = list(/datum/material/iron = 400, /datum/material/glass = 100) - build_path = /obj/item/computer_hardware/hard_drive/micro - category = list( - RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING - -// Data disks -/datum/design/portabledrive/basic - name = "Data Disk" - id = "portadrive_basic" - build_type = IMPRINTER | AWAY_IMPRINTER - materials = list(/datum/material/glass = 800) - build_path = /obj/item/computer_hardware/hard_drive/portable - category = list( - RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING - -/datum/design/portabledrive/advanced - name = "Advanced Data Disk" - id = "portadrive_advanced" - build_type = IMPRINTER | AWAY_IMPRINTER - materials = list(/datum/material/glass = 1600) - build_path = /obj/item/computer_hardware/hard_drive/portable/advanced - category = list( - RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING - -/datum/design/portabledrive/super - name = "Super Data Disk" - id = "portadrive_super" - build_type = IMPRINTER | AWAY_IMPRINTER - materials = list(/datum/material/glass = 3200) - build_path = /obj/item/computer_hardware/hard_drive/portable/super - category = list( - RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING - // Card slot /datum/design/cardslot name = "ID Card Slot" @@ -180,3 +79,37 @@ RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS ) departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING + +// Data disks +/datum/design/portabledrive/basic + name = "Data Disk" + id = "portadrive_basic" + build_type = IMPRINTER | AWAY_IMPRINTER + materials = list(/datum/material/glass = 800) + build_path = /obj/item/computer_disk + category = list( + RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS + ) + departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design/portabledrive/advanced + name = "Advanced Data Disk" + id = "portadrive_advanced" + build_type = IMPRINTER | AWAY_IMPRINTER + materials = list(/datum/material/glass = 1600) + build_path = /obj/item/computer_disk/advanced + category = list( + RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS + ) + departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design/portabledrive/super + name = "Super Data Disk" + id = "portadrive_super" + build_type = IMPRINTER | AWAY_IMPRINTER + materials = list(/datum/material/glass = 3200) + build_path = /obj/item/computer_disk/super + category = list( + RND_CATEGORY_MODULAR_COMPUTERS + RND_SUBCATEGORY_MODULAR_COMPUTERS_PARTS + ) + departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING diff --git a/code/modules/research/ordnance/doppler_array.dm b/code/modules/research/ordnance/doppler_array.dm index 6f164f517c3..5cbd7f27c1d 100644 --- a/code/modules/research/ordnance/doppler_array.dm +++ b/code/modules/research/ordnance/doppler_array.dm @@ -15,7 +15,7 @@ /// List of all explosion records in the form of /datum/data/tachyon_record var/list/records = list() /// Reference to a disk we are going to print to. - var/obj/item/computer_hardware/hard_drive/portable/inserted_disk + var/obj/item/computer_disk/inserted_disk // Lighting system to better communicate the directions. light_system = MOVABLE_LIGHT_DIRECTIONAL @@ -49,8 +49,8 @@ . += span_notice("It is currently facing [dir2text(dir)]") /obj/machinery/doppler_array/attackby(obj/item/item, mob/user, params) - if(istype(item, /obj/item/computer_hardware/hard_drive/portable)) - var/obj/item/computer_hardware/hard_drive/portable/disk = item + if(istype(item, /obj/item/computer_disk)) + var/obj/item/computer_disk/disk = item eject_disk(user) if(user.transferItemToLoc(disk, src)) inserted_disk = disk @@ -86,7 +86,7 @@ record_data.explosion_record = record record_data.possible_experiments = apply_experiments(record) - if(inserted_disk.store_file(record_data)) + if(inserted_disk.add_file(record_data)) playsound(src, 'sound/machines/ping.ogg', 25) else playsound(src, 'sound/machines/terminal_error.ogg', 25) @@ -218,7 +218,7 @@ /obj/machinery/doppler_array/Exited(atom/movable/gone, direction) if(gone == inserted_disk) inserted_disk = null - . = ..() + return ..() /obj/machinery/doppler_array/powered() if(panel_open) diff --git a/code/modules/research/ordnance/tank_compressor.dm b/code/modules/research/ordnance/tank_compressor.dm index ca41611d984..11050bdc604 100644 --- a/code/modules/research/ordnance/tank_compressor.dm +++ b/code/modules/research/ordnance/tank_compressor.dm @@ -19,7 +19,7 @@ var/record_number = 1 var/obj/item/tank/inserted_tank /// Reference to a disk we are going to print to. - var/obj/item/computer_hardware/hard_drive/portable/inserted_disk + var/obj/item/computer_disk/inserted_disk pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY @@ -61,8 +61,8 @@ RegisterSignal(inserted_tank, COMSIG_PARENT_QDELETING, .proc/tank_destruction) update_appearance() return - if(istype(item, /obj/item/computer_hardware/hard_drive/portable)) - var/obj/item/computer_hardware/hard_drive/portable/attacking_disk = item + if(istype(item, /obj/item/computer_disk)) + var/obj/item/computer_disk/attacking_disk = item eject_disk(user) if(user.transferItemToLoc(attacking_disk, src)) inserted_disk = attacking_disk @@ -201,7 +201,7 @@ record_data.gas_record = record record_data.possible_experiments = apply_experiments(record) - if(inserted_disk.store_file(record_data)) + if(inserted_disk.add_file(record_data)) playsound(src, 'sound/machines/ping.ogg', 25) else playsound(src, 'sound/machines/terminal_error.ogg', 25) @@ -239,7 +239,7 @@ UnregisterSignal(inserted_tank, COMSIG_PARENT_QDELETING) inserted_tank = null update_appearance() - . = ..() + return ..() /obj/machinery/atmospherics/components/binary/tank_compressor/on_deconstruction() eject_tank() diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index e2cec97f666..be044e954da 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -176,7 +176,7 @@ /obj/machinery/rnd/server/master max_integrity = 1800 //takes roughly ~15s longer to break then full deconstruction. circuit = null - var/obj/item/computer_hardware/hard_drive/cluster/hdd_theft/source_code_hdd + var/obj/item/computer_disk/hdd_theft/source_code_hdd var/deconstruction_state = HDD_PANEL_CLOSED var/front_panel_screws = 4 var/hdd_wires = 6 @@ -231,7 +231,7 @@ return TRUE /obj/machinery/rnd/server/master/attackby(obj/item/attacking_item, mob/user, params) - if(istype(attacking_item, /obj/item/computer_hardware/hard_drive/cluster/hdd_theft)) + if(istype(attacking_item, /obj/item/computer_disk/hdd_theft)) switch(deconstruction_state) if(HDD_PANEL_CLOSED) balloon_alert(user, "you can't find a place to insert it!") diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index a48172f9d76..32265e24c85 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -1191,15 +1191,9 @@ "bat_normal", "bat_super", "cardslot", - "hdd_advanced", - "hdd_basic", - "hdd_cluster", - "hdd_super", "portadrive_advanced", "portadrive_basic", "portadrive_super", - "ssd_micro", - "ssd_small", ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000) //they are really shitty diff --git a/code/modules/uplink/uplink_items/device_tools.dm b/code/modules/uplink/uplink_items/device_tools.dm index 4584bb6c6bb..d6cea88e96e 100644 --- a/code/modules/uplink/uplink_items/device_tools.dm +++ b/code/modules/uplink/uplink_items/device_tools.dm @@ -115,14 +115,14 @@ when used cause the targeted tablet to become a new uplink with zero TCs, and immediately become unlocked. \ You will receive the unlock code upon activating the virus, and the new uplink may be charged with \ telecrystals normally." - item = /obj/item/computer_hardware/hard_drive/portable/virus/frame + item = /obj/item/computer_disk/virus/frame cost = 4 restricted = TRUE purchasable_from = ~(UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS) /datum/uplink_item/device_tools/frame/spawn_item(spawn_path, mob/user, datum/uplink_handler/uplink_handler, atom/movable/source) . = ..() - var/obj/item/computer_hardware/hard_drive/portable/virus/frame/target = . + var/obj/item/computer_disk/virus/frame/target = . if(!target) return target.current_progression = uplink_handler.progression_points diff --git a/code/modules/uplink/uplink_items/explosive.dm b/code/modules/uplink/uplink_items/explosive.dm index cd02c1390a8..d7a02acf33f 100644 --- a/code/modules/uplink/uplink_items/explosive.dm +++ b/code/modules/uplink/uplink_items/explosive.dm @@ -50,7 +50,7 @@ detonate tablets of crewmembers who have their message feature enabled. \ The concussive effect from the explosion will knock the recipient out for a short period, and deafen them for longer." progression_minimum = 30 MINUTES - item = /obj/item/computer_hardware/hard_drive/portable/virus/deto + item = /obj/item/computer_disk/virus/detomatix cost = 6 restricted = TRUE diff --git a/code/modules/vending/assist.dm b/code/modules/vending/assist.dm index f4694ca83cd..1ab98d6a4b5 100644 --- a/code/modules/vending/assist.dm +++ b/code/modules/vending/assist.dm @@ -8,7 +8,7 @@ /obj/item/assembly/igniter = 3, /obj/item/assembly/prox_sensor = 5, /obj/item/assembly/signaler = 4, - /obj/item/computer_hardware/hard_drive/portable/ordnance = 4, + /obj/item/computer_disk/ordnance = 4, /obj/item/stock_parts/capacitor = 3, /obj/item/stock_parts/manipulator = 3, /obj/item/stock_parts/matter_bin = 3, diff --git a/code/modules/vending/cartridge.dm b/code/modules/vending/cartridge.dm index 2df30a57523..82ddbcbd663 100644 --- a/code/modules/vending/cartridge.dm +++ b/code/modules/vending/cartridge.dm @@ -7,12 +7,12 @@ icon_deny = "cart-deny" panel_type = "panel6" products = list( - /obj/item/computer_hardware/hard_drive/portable/medical = 10, - /obj/item/computer_hardware/hard_drive/portable/engineering = 10, - /obj/item/computer_hardware/hard_drive/portable/security = 10, - /obj/item/computer_hardware/hard_drive/portable/ordnance = 10, - /obj/item/computer_hardware/hard_drive/portable/quartermaster = 10, - /obj/item/computer_hardware/hard_drive/portable/command/captain = 3, + /obj/item/computer_disk/medical = 10, + /obj/item/computer_disk/engineering = 10, + /obj/item/computer_disk/security = 10, + /obj/item/computer_disk/ordnance = 10, + /obj/item/computer_disk/quartermaster = 10, + /obj/item/computer_disk/command/captain = 3, /obj/item/modular_computer/tablet/pda/heads = 10, ) refill_canister = /obj/item/vending_refill/cart diff --git a/code/modules/vending/modularpc.dm b/code/modules/vending/modularpc.dm index 99660dda905..cffb3cdb3a0 100644 --- a/code/modules/vending/modularpc.dm +++ b/code/modules/vending/modularpc.dm @@ -8,9 +8,7 @@ product_ads = "Get your gamer gear!;The best GPUs for all of your space-crypto needs!;The most robust cooling!;The finest RGB in space!" vend_reply = "Game on!" products = list( - /obj/item/computer_hardware/hard_drive = 4, - /obj/item/computer_hardware/hard_drive/portable = 8, - /obj/item/computer_hardware/hard_drive/small = 4, + /obj/item/computer_disk = 8, /obj/item/computer_hardware/battery = 8, /obj/item/modular_computer/laptop = 4, /obj/item/modular_computer/tablet = 4, diff --git a/modular_skyrat/modules/contractor/code/datums/contractor_tablet.dm b/modular_skyrat/modules/contractor/code/datums/contractor_tablet.dm index 8aecc126615..fa90be9b415 100644 --- a/modular_skyrat/modules/contractor/code/datums/contractor_tablet.dm +++ b/modular_skyrat/modules/contractor/code/datums/contractor_tablet.dm @@ -28,15 +28,18 @@ return var/mob/living/user = usr - var/obj/item/computer_hardware/hard_drive/portable/syndicate/hard_drive = computer.all_components[MC_HDD] + var/obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink/uplink_computer = computer + + if(!istype(uplink_computer)) + return switch(action) if("PRG_contract-accept") var/contract_id = text2num(params["contract_id"]) // Set as the active contract - hard_drive.opfor_data.contractor_hub.assigned_contracts[contract_id].status = CONTRACT_STATUS_ACTIVE - hard_drive.opfor_data.contractor_hub.current_contract = hard_drive.opfor_data.contractor_hub.assigned_contracts[contract_id] + uplink_computer.opfor_data.contractor_hub.assigned_contracts[contract_id].status = CONTRACT_STATUS_ACTIVE + uplink_computer.opfor_data.contractor_hub.current_contract = uplink_computer.opfor_data.contractor_hub.assigned_contracts[contract_id] program_icon_state = "single_contract" return TRUE @@ -59,16 +62,16 @@ if (!assigned) opfor_data.contractor_hub.create_contracts(opfor_data.mind_reference) - hard_drive.opfor_data = opfor_data + uplink_computer.opfor_data = opfor_data program_icon_state = "contracts" assigned = TRUE return TRUE if("PRG_call_extraction") - if (hard_drive.opfor_data.contractor_hub.current_contract.status != CONTRACT_STATUS_EXTRACTING) - if (hard_drive.opfor_data.contractor_hub.current_contract.handle_extraction(user)) + if (uplink_computer.opfor_data.contractor_hub.current_contract.status != CONTRACT_STATUS_EXTRACTING) + if (uplink_computer.opfor_data.contractor_hub.current_contract.handle_extraction(user)) user.playsound_local(user, 'sound/effects/confirmdropoff.ogg', 100, TRUE) - hard_drive.opfor_data.contractor_hub.current_contract.status = CONTRACT_STATUS_EXTRACTING + uplink_computer.opfor_data.contractor_hub.current_contract.status = CONTRACT_STATUS_EXTRACTING program_icon_state = "extracted" else @@ -80,18 +83,18 @@ return TRUE if("PRG_contract_abort") - var/contract_id = hard_drive.opfor_data.contractor_hub.current_contract.id + var/contract_id = uplink_computer.opfor_data.contractor_hub.current_contract.id - hard_drive.opfor_data.contractor_hub.current_contract = null - hard_drive.opfor_data.contractor_hub.assigned_contracts[contract_id].status = CONTRACT_STATUS_ABORTED + uplink_computer.opfor_data.contractor_hub.current_contract = null + uplink_computer.opfor_data.contractor_hub.assigned_contracts[contract_id].status = CONTRACT_STATUS_ABORTED program_icon_state = "contracts" return TRUE if("PRG_redeem_TC") - if (hard_drive.opfor_data.contractor_hub.contract_TC_to_redeem) + if (uplink_computer.opfor_data.contractor_hub.contract_TC_to_redeem) var/obj/item/stack/telecrystal/crystals = new /obj/item/stack/telecrystal(get_turf(user), - hard_drive.opfor_data.contractor_hub.contract_TC_to_redeem) + uplink_computer.opfor_data.contractor_hub.contract_TC_to_redeem) if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.put_in_hands(crystals)) @@ -99,8 +102,8 @@ else to_chat(user, span_notice("Your payment materializes onto the floor.")) - hard_drive.opfor_data.contractor_hub.contract_paid_out += hard_drive.opfor_data.contractor_hub.contract_TC_to_redeem - hard_drive.opfor_data.contractor_hub.contract_TC_to_redeem = 0 + uplink_computer.opfor_data.contractor_hub.contract_paid_out += uplink_computer.opfor_data.contractor_hub.contract_TC_to_redeem + uplink_computer.opfor_data.contractor_hub.contract_TC_to_redeem = 0 return TRUE else user.playsound_local(user, 'sound/machines/uplinkerror.ogg', 50) @@ -115,24 +118,24 @@ info_screen = !info_screen return TRUE if ("buy_hub") - if (hard_drive.opfor_data.mind_reference.current == user) + if (uplink_computer.opfor_data.mind_reference.current == user) var/item = params["item"] - for (var/datum/contractor_item/hub_item in hard_drive.opfor_data.contractor_hub.hub_items) + for (var/datum/contractor_item/hub_item in uplink_computer.opfor_data.contractor_hub.hub_items) if (hub_item.name == item) - hub_item.handle_purchase(hard_drive.opfor_data.contractor_hub, user) + hub_item.handle_purchase(uplink_computer.opfor_data.contractor_hub, user) else error = "Invalid user... You weren't recognised as the user of this system." /datum/computer_file/program/contract_uplink/ui_data(mob/user) var/list/data = list() - var/obj/item/computer_hardware/hard_drive/portable/syndicate/hard_drive = computer.all_components[MC_HDD] var/screen_to_be = null + var/obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink/uplink_computer = computer data["first_load"] = first_load - if (hard_drive && hard_drive.opfor_data != null) - var/datum/opposing_force/opfor_data = hard_drive.opfor_data + if (uplink_computer?.opfor_data) + var/datum/opposing_force/opfor_data = uplink_computer.opfor_data data += get_header_data() if (opfor_data.contractor_hub.current_contract) diff --git a/modular_skyrat/modules/contractor/code/items/tablet.dm b/modular_skyrat/modules/contractor/code/items/tablet.dm index f1acba339de..5e0c24ca8a5 100644 --- a/modular_skyrat/modules/contractor/code/items/tablet.dm +++ b/modular_skyrat/modules/contractor/code/items/tablet.dm @@ -1,18 +1,26 @@ +/obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink + starting_programs = list( + /datum/computer_file/program/contract_uplink, + /datum/computer_file/program/crew_manifest, + ) + device_theme = "syndicate" + + /// Contractor uplink system board has the user's data baked directly into it on creation + var/datum/opposing_force/opfor_data + /obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink/Initialize(mapload) . = ..() - var/obj/item/computer_hardware/hard_drive/portable/syndicate/hard_drive = new - var/datum/computer_file/program/contract_uplink/uplink = new + var/datum/computer_file/program/contract_uplink/uplink = locate() in stored_files active_program = uplink uplink.program_state = PROGRAM_STATE_ACTIVE - uplink.computer = src - - hard_drive.store_file(uplink) - hard_drive.store_file(new /datum/computer_file/program/crew_manifest) install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer)) - install_component(hard_drive) install_component(new /obj/item/computer_hardware/card_slot) +/obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink/Destroy() + opfor_data = null + return ..() + /obj/item/modular_computer/tablet/syndicate_contract_uplink/UpdateDisplay() return diff --git a/modular_skyrat/modules/cryosleep/code/cryopod.dm b/modular_skyrat/modules/cryosleep/code/cryopod.dm index fa28b7bae0d..453aa644195 100644 --- a/modular_skyrat/modules/cryosleep/code/cryopod.dm +++ b/modular_skyrat/modules/cryosleep/code/cryopod.dm @@ -357,10 +357,8 @@ GLOBAL_LIST_EMPTY(valid_cryopods) if(control_computer) if(istype(item_content, /obj/item/modular_computer)) var/obj/item/modular_computer/computer = item_content - var/obj/item/computer_hardware/hard_drive/hdd = computer.all_components[MC_HDD] - if(hdd) - for(var/datum/computer_file/program/messenger/message_app in hdd.stored_files) - message_app.invisible = TRUE + for(var/datum/computer_file/program/messenger/message_app in computer.stored_files) + message_app.invisible = TRUE item_content.dropped(mob_occupant) mob_occupant.transferItemToLoc(item_content, control_computer, force = TRUE, silent = TRUE) control_computer.frozen_item += item_content diff --git a/modular_skyrat/modules/lorecaster/code/archive_viewer.dm b/modular_skyrat/modules/lorecaster/code/archive_viewer.dm index e16df2f0570..6df146525a3 100644 --- a/modular_skyrat/modules/lorecaster/code/archive_viewer.dm +++ b/modular_skyrat/modules/lorecaster/code/archive_viewer.dm @@ -67,7 +67,8 @@ return compiled_stories -/obj/machinery/modular_computer/console/preset/curator/install_programs() - . = ..() - var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] - hard_drive.store_file(new/datum/computer_file/program/news_archive()) +/obj/machinery/modular_computer/console/preset/curator + starting_programs = list( + /datum/computer_file/program/portrait_printer, + /datum/computer_file/program/news_archive, + ) diff --git a/modular_skyrat/modules/mapping/code/laptop_presets.dm b/modular_skyrat/modules/mapping/code/laptop_presets.dm index 69fc250f92f..cae376e66a2 100644 --- a/modular_skyrat/modules/mapping/code/laptop_presets.dm +++ b/modular_skyrat/modules/mapping/code/laptop_presets.dm @@ -1,8 +1,6 @@ /obj/item/modular_computer/laptop/preset/syndicate desc = "A SYNDIX operating system laptop, modified through open source to be compatible with NTOS programs. The miracle of software!" device_theme = "syndicate" - - -/obj/item/modular_computer/laptop/preset/syndicate/install_programs() - var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD] - hard_drive.store_file(new/datum/computer_file/program/ntnetdownload()) + starting_programs = list( + /datum/computer_file/program/ntnetdownload, + ) diff --git a/modular_skyrat/modules/nanotrasen_rep/code/nanotrasen_consultant.dm b/modular_skyrat/modules/nanotrasen_rep/code/nanotrasen_consultant.dm index 66be6aa6f9f..92922961a2d 100644 --- a/modular_skyrat/modules/nanotrasen_rep/code/nanotrasen_consultant.dm +++ b/modular_skyrat/modules/nanotrasen_rep/code/nanotrasen_consultant.dm @@ -107,7 +107,7 @@ /obj/item/modular_computer/tablet/pda/nanotrasen_consultant name = "nanotrasen consultant's PDA" - loaded_cartridge = /obj/item/computer_hardware/hard_drive/portable/command/captain + inserted_disk = /obj/item/computer_disk/command/captain inserted_item = /obj/item/pen/fountain/captain greyscale_colors = "#017941#0060b8" @@ -141,7 +141,7 @@ new /obj/item/pet_carrier(src) new /obj/item/clothing/shoes/sneakers/brown(src) new /obj/item/clothing/suit/armor/vest(src) - new /obj/item/computer_hardware/hard_drive/portable/command/captain(src) + new /obj/item/computer_disk/command/captain(src) new /obj/item/radio/headset/heads/nanotrasen_consultant/alt(src) new /obj/item/radio/headset/heads/nanotrasen_consultant(src) new /obj/item/clothing/glasses/sunglasses/gar/giga(src) diff --git a/tgstation.dme b/tgstation.dme index 2b59d6466be..fad26e6a7e2 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3935,6 +3935,7 @@ #include "code\modules\modular_computers\computers\item\computer.dm" #include "code\modules\modular_computers\computers\item\computer_components.dm" #include "code\modules\modular_computers\computers\item\computer_damage.dm" +#include "code\modules\modular_computers\computers\item\computer_files.dm" #include "code\modules\modular_computers\computers\item\computer_power.dm" #include "code\modules\modular_computers\computers\item\computer_ui.dm" #include "code\modules\modular_computers\computers\item\laptop.dm" @@ -3943,6 +3944,9 @@ #include "code\modules\modular_computers\computers\item\role_tablet_presets.dm" #include "code\modules\modular_computers\computers\item\tablet.dm" #include "code\modules\modular_computers\computers\item\tablet_presets.dm" +#include "code\modules\modular_computers\computers\item\disks\computer_disk.dm" +#include "code\modules\modular_computers\computers\item\disks\role_disks.dm" +#include "code\modules\modular_computers\computers\item\disks\virus_disk.dm" #include "code\modules\modular_computers\computers\machinery\console_presets.dm" #include "code\modules\modular_computers\computers\machinery\modular_computer.dm" #include "code\modules\modular_computers\computers\machinery\modular_console.dm" @@ -3989,10 +3993,6 @@ #include "code\modules\modular_computers\hardware\_hardware.dm" #include "code\modules\modular_computers\hardware\battery_module.dm" #include "code\modules\modular_computers\hardware\card_slot.dm" -#include "code\modules\modular_computers\hardware\hard_drive.dm" -#include "code\modules\modular_computers\hardware\portable_disk.dm" -#include "code\modules\modular_computers\hardware\program_disks.dm" -#include "code\modules\modular_computers\hardware\virus_disk.dm" #include "code\modules\modular_computers\NTNet\NTNRC\conversation.dm" #include "code\modules\movespeed\_movespeed_modifier.dm" #include "code\modules\movespeed\modifiers\components.dm" diff --git a/tools/UpdatePaths/Scripts/70678_data_disks.txt b/tools/UpdatePaths/Scripts/70678_data_disks.txt new file mode 100644 index 00000000000..d72e3bb496e --- /dev/null +++ b/tools/UpdatePaths/Scripts/70678_data_disks.txt @@ -0,0 +1,4 @@ +/obj/item/computer_hardware/hard_drive/portable/virus/@SUBTYPES : /obj/item/computer_disk/virus/@SUBTYPES {@OLD} +/obj/item/computer_hardware/hard_drive/portable/@SUBTYPES : /obj/item/computer_disk/@SUBTYPES {@OLD} +/obj/item/computer_hardware/hard_drive/cluster/hdd_theft : /obj/item/computer_disk/hdd_theft +/obj/item/computer_hardware/hard_drive/cluster : @DELETE