From a419afacc7ecd15a4eefb7a47f7ae389b4d66ade Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Mon, 18 Mar 2024 23:29:07 -0400 Subject: [PATCH] [MIRROR] Brings the captain's safe off the wall, safes now save their contents (#1487) * Brings the captain's safe off the wall, safes now save their contents (#81762) ## About The Pull Request I originally was gonna make the captain's spare ID safe float in the air if the wall under it was taken down, but it looked poor and was going against the vision for wall items (and go against the wallening) so my alternative proposition is this, taking the safe off the wall. It's now a golden safe (like the one in the vault) but is interacted the exact same, it's now just a thing on the floor rather than being on a wall. I'm not a spriter so I didn't give it a custom icon but if anyone wants to they can feel free to add one, just a golden version of the regular safe felt kinda eh. I also added a wallframe version of the secure safe for when it is taken down. It will conserve its contents and be permanently locked until put back up. This doesn't apply to the new captain safe since it isn't a wall item. ## Why It's Good For The Game Closes https://github.com/tgstation/tgstation/issues/80588 Prevents people from cheesing the spare and/or it being too easy to destroy. ## Changelog :cl: fix: The captain's safe is no longer on the wall, therefore cannot be cheesed by breaking the wall it sits on. fix: Tearing down a wall that a safe is on now drops the safe with its contents, rather than dropping the contents onto the floor. The safe's contents cannot be interacted with while it's not on a wall. /:cl: * Brings the captain's safe off the wall, safes now save their contents * Void and Blueshift --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: SomeRandomOwl <2568378+SomeRandomOwl@users.noreply.github.com> --- _maps/map_files/Birdshot/birdshot.dmm | 14 +---- .../map_files/Deltastation/DeltaStation2.dmm | 5 +- .../map_files/IceBoxStation/IceBoxStation.dmm | 9 ++-- _maps/map_files/MetaStation/MetaStation.dmm | 21 +++----- _maps/map_files/NSVBlueshift/Blueshift.dmm | 14 +++-- _maps/map_files/NorthStar/north_star.dmm | 4 +- _maps/map_files/VoidRaptor/VoidRaptor.dmm | 8 +-- _maps/map_files/tramstation/tramstation.dmm | 29 ++++++---- code/game/objects/structures/safe.dm | 4 +- code/game/objects/structures/secure_safe.dm | 50 +++++++++++++++--- icons/obj/structures.dmi | Bin 211056 -> 211058 bytes 11 files changed, 93 insertions(+), 65 deletions(-) diff --git a/_maps/map_files/Birdshot/birdshot.dmm b/_maps/map_files/Birdshot/birdshot.dmm index 49deea1fe47..0dfc9df9dcf 100644 --- a/_maps/map_files/Birdshot/birdshot.dmm +++ b/_maps/map_files/Birdshot/birdshot.dmm @@ -18008,10 +18008,8 @@ /area/station/hallway/primary/fore) "gBT" = ( /obj/structure/window/reinforced/spawner/directional/east, +/obj/structure/secure_safe/caps_spare, /obj/structure/table/glass, -/obj/item/folder/blue{ - pixel_y = 2 - }, /turf/open/floor/glass/reinforced, /area/station/command/bridge) "gCe" = ( @@ -35084,15 +35082,6 @@ /area/station/maintenance/central/lesser) "mxa" = ( /obj/structure/window/reinforced/spawner/directional/east, -/obj/structure/table/glass, -/obj/item/paper_bin{ - pixel_x = -2; - pixel_y = 8 - }, -/obj/item/pen{ - pixel_x = -1; - pixel_y = 8 - }, /turf/open/floor/glass/reinforced, /area/station/command/bridge) "mxe" = ( @@ -40627,7 +40616,6 @@ /area/station/hallway/primary/central/fore) "owZ" = ( /obj/item/kirbyplants/organic/applebush, -/obj/structure/secure_safe/caps_spare/directional/west, /turf/open/floor/iron/dark/smooth_large, /area/station/command/bridge) "oxb" = ( diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 30e548835e8..89a583c1147 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -10252,7 +10252,6 @@ "cxu" = ( /obj/structure/table/reinforced, /obj/item/storage/medkit/regular, -/obj/structure/secure_safe/caps_spare/directional/west, /obj/effect/turf_decal/tile/blue{ dir = 1 }, @@ -47062,7 +47061,7 @@ /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, /obj/structure/table/wood, /obj/structure/window/reinforced/spawner/directional/east, -/obj/item/flashlight/lamp, +/obj/machinery/computer/security/wooden_tv, /turf/open/floor/iron/grimy, /area/station/command/bridge) "lGE" = ( @@ -66326,8 +66325,8 @@ "qBY" = ( /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, +/obj/structure/secure_safe/caps_spare, /obj/structure/table/wood, -/obj/machinery/computer/security/wooden_tv, /turf/open/floor/iron/grimy, /area/station/command/bridge) "qCb" = ( diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index 6637caabd3e..1d8adb907f5 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -17960,11 +17960,8 @@ /turf/open/floor/iron/showroomfloor, /area/station/engineering/atmos) "fwQ" = ( +/obj/structure/secure_safe/caps_spare, /obj/structure/table/reinforced, -/obj/structure/secure_safe/caps_spare/directional/east, -/obj/item/papercutter{ - pixel_x = 7 - }, /turf/open/floor/iron, /area/station/command/bridge) "fwS" = ( @@ -237775,7 +237772,7 @@ utR uEQ lET grA -cEv +fwQ nOH gxU gZq @@ -240344,8 +240341,8 @@ nfk utR tmQ qnV -fwQ kBr +cEv lhv iGH bGm diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 7ac2807b480..ca0ddb432cb 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -38614,10 +38614,7 @@ /turf/open/floor/iron/dark, /area/station/engineering/atmos) "nOq" = ( -/obj/machinery/holopad/secure{ - pixel_x = 9; - pixel_y = -9 - }, +/obj/machinery/holopad/secure, /turf/open/floor/carpet, /area/station/command/heads_quarters/captain/private) "nOv" = ( @@ -47699,10 +47696,7 @@ /turf/open/floor/iron, /area/station/cargo/sorting) "raJ" = ( -/obj/machinery/computer/security/wooden_tv{ - pixel_x = 1; - pixel_y = 6 - }, +/obj/structure/secure_safe/caps_spare, /obj/structure/table/glass, /turf/open/floor/iron/dark, /area/station/command/bridge) @@ -55714,13 +55708,11 @@ /area/station/maintenance/port) "tTL" = ( /obj/structure/table/glass, -/obj/item/folder/blue{ - pixel_y = 2 - }, -/obj/item/folder/blue{ - pixel_y = 2 - }, /obj/structure/window/reinforced/spawner/directional/east, +/obj/machinery/computer/security/wooden_tv{ + pixel_x = 1; + pixel_y = 6 + }, /turf/open/floor/iron/dark, /area/station/command/bridge) "tTP" = ( @@ -57213,7 +57205,6 @@ pixel_y = -3 }, /obj/structure/table/glass, -/obj/structure/secure_safe/caps_spare/directional/west, /obj/effect/turf_decal/tile/green/half/contrasted{ dir = 8 }, diff --git a/_maps/map_files/NSVBlueshift/Blueshift.dmm b/_maps/map_files/NSVBlueshift/Blueshift.dmm index 27d29fdd5f1..60270acd14b 100644 --- a/_maps/map_files/NSVBlueshift/Blueshift.dmm +++ b/_maps/map_files/NSVBlueshift/Blueshift.dmm @@ -9212,10 +9212,6 @@ /area/station/ai_monitored/turret_protected/aisat_interior) "bOx" = ( /obj/item/radio/intercom/directional/south, -/obj/structure/secure_safe/caps_spare{ - pixel_x = 5; - pixel_y = -37 - }, /obj/structure/cable, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, @@ -49672,6 +49668,14 @@ /obj/effect/turf_decal/bot, /turf/open/floor/iron, /area/station/engineering/break_room) +"jAf" = ( +/obj/structure/secure_safe/caps_spare{ + base_icon_state = "floorsafe"; + icon_state = "floorsafe"; + pixel_x = -1 + }, +/turf/open/floor/iron, +/area/station/command/bridge) "jAj" = ( /obj/structure/cable/layer1, /obj/structure/disposalpipe/segment{ @@ -224533,7 +224537,7 @@ bbG bwg gij bMO -tVq +jAf kJQ qDo jiu diff --git a/_maps/map_files/NorthStar/north_star.dmm b/_maps/map_files/NorthStar/north_star.dmm index 56964860df6..4dfd1ad8819 100644 --- a/_maps/map_files/NorthStar/north_star.dmm +++ b/_maps/map_files/NorthStar/north_star.dmm @@ -11477,8 +11477,9 @@ /turf/open/floor/iron/white, /area/station/science/lobby) "cRe" = ( -/obj/structure/reagent_dispensers/water_cooler, /obj/machinery/status_display/ai/directional/north, +/obj/structure/secure_safe/caps_spare, +/obj/structure/table/reinforced, /turf/open/floor/iron/dark, /area/station/command/bridge) "cRs" = ( @@ -91625,7 +91626,6 @@ /turf/open/floor/pod/light, /area/station/maintenance/floor2/port/fore) "xzS" = ( -/obj/structure/secure_safe/caps_spare/directional/south, /obj/effect/turf_decal/tile/purple/fourcorners, /turf/open/floor/iron/dark, /area/station/command/bridge) diff --git a/_maps/map_files/VoidRaptor/VoidRaptor.dmm b/_maps/map_files/VoidRaptor/VoidRaptor.dmm index f0f06657a82..25f40d7115f 100644 --- a/_maps/map_files/VoidRaptor/VoidRaptor.dmm +++ b/_maps/map_files/VoidRaptor/VoidRaptor.dmm @@ -7185,9 +7185,6 @@ /turf/closed/wall, /area/station/maintenance/port/greater) "chg" = ( -/obj/structure/secure_safe/caps_spare{ - pixel_x = -24 - }, /obj/structure/table/reinforced/rglass, /obj/item/storage/photo_album, /obj/item/camera{ @@ -15252,6 +15249,11 @@ "esP" = ( /obj/structure/window/reinforced/spawner/directional/south, /obj/effect/turf_decal/tile/dark_blue/anticorner, +/obj/structure/secure_safe/caps_spare{ + base_icon_state = "floorsafe"; + icon_state = "floorsafe"; + pixel_y = 5 + }, /turf/open/floor/iron/dark/smooth_large, /area/station/command/bridge) "etd" = ( diff --git a/_maps/map_files/tramstation/tramstation.dmm b/_maps/map_files/tramstation/tramstation.dmm index 12ce31d8f33..20a43b3f14a 100644 --- a/_maps/map_files/tramstation/tramstation.dmm +++ b/_maps/map_files/tramstation/tramstation.dmm @@ -35117,6 +35117,7 @@ /area/station/engineering/atmos) "lrZ" = ( /obj/structure/table/glass, +/obj/structure/secure_safe/caps_spare, /turf/open/floor/glass, /area/station/command/meeting_room) "lse" = ( @@ -43742,6 +43743,10 @@ }, /turf/open/floor/iron, /area/station/ai_monitored/security/armory) +"ouQ" = ( +/obj/effect/turf_decal/siding/wood/corner, +/turf/open/floor/wood, +/area/station/command/meeting_room) "ouW" = ( /obj/structure/table/wood, /obj/item/storage/photo_album/library, @@ -46135,6 +46140,11 @@ }, /turf/open/floor/iron, /area/station/hallway/secondary/service) +"ptq" = ( +/obj/effect/turf_decal/siding/wood/corner, +/obj/structure/disposalpipe/segment, +/turf/open/floor/wood, +/area/station/command/meeting_room) "pts" = ( /obj/machinery/power/smes{ capacity = 9e+006; @@ -46973,6 +46983,11 @@ }, /turf/open/floor/carpet, /area/station/cargo/miningdock) +"pGr" = ( +/obj/machinery/disposal/bin, +/obj/structure/disposalpipe/trunk, +/turf/open/floor/wood, +/area/station/command/meeting_room) "pGy" = ( /obj/effect/turf_decal/trimline/neutral/filled/line{ dir = 8 @@ -48423,7 +48438,6 @@ /area/station/medical/chemistry) "qgy" = ( /obj/structure/table/reinforced, -/obj/structure/secure_safe/caps_spare/directional/east, /obj/machinery/cell_charger{ pixel_y = 4 }, @@ -64145,10 +64159,6 @@ /area/station/hallway/secondary/entry) "vxv" = ( /obj/effect/turf_decal/siding/wood, -/obj/machinery/disposal/bin, -/obj/structure/disposalpipe/trunk{ - dir = 8 - }, /obj/machinery/light/warm/directional/north, /turf/open/floor/wood, /area/station/command/meeting_room) @@ -68020,9 +68030,6 @@ /obj/effect/turf_decal/siding/wood{ dir = 6 }, -/obj/structure/disposalpipe/segment{ - dir = 9 - }, /turf/open/floor/wood, /area/station/command/meeting_room) "wWh" = ( @@ -154914,8 +154921,8 @@ eOh pJJ fWM qyZ -joF -kSZ +pGr +ptq lmG hHI gIG @@ -155171,7 +155178,7 @@ phB qdY xNj qyZ -kSZ +ouQ wWe imr iue diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 9c1a8f1c4f3..e0217ad9f58 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -41,6 +41,7 @@ FLOOR SAFES /obj/structure/safe/Initialize(mapload) . = ..() + update_appearance(UPDATE_ICON) // Combination generation for(var/iterating in 1 to number_of_tumblers) tumblers.Add(rand(0, 99)) @@ -57,7 +58,8 @@ FLOOR SAFES inserting_item.forceMove(src) /obj/structure/safe/update_icon_state() - icon_state = "[initial(icon_state)][open ? "-open" : null]" + //uses the same icon as the captain's spare safe (therefore lockable storage) so keep it in line with that + icon_state = "[initial(icon_state)][open ? null : "_locked"]" return ..() /obj/structure/safe/attackby(obj/item/attacking_item, mob/user, params) diff --git a/code/game/objects/structures/secure_safe.dm b/code/game/objects/structures/secure_safe.dm index 43027090e5b..c4d5d29f8eb 100644 --- a/code/game/objects/structures/secure_safe.dm +++ b/code/game/objects/structures/secure_safe.dm @@ -1,3 +1,25 @@ +/obj/item/wallframe/secure_safe + name = "secure safe frame" + desc = "A locked safe. It being unpowered prevents any access until placed back onto a wall." + icon = 'icons/obj/storage/storage.dmi' + icon_state = "wall_safe" + base_icon_state = "wall_safe" + result_path = /obj/structure/secure_safe + pixel_shift = 32 + +/obj/item/wallframe/secure_safe/Initialize(mapload) + . = ..() + create_storage( + max_specific_storage = WEIGHT_CLASS_GIGANTIC, + max_total_storage = 20, + ) + atom_storage.locked = STORAGE_FULLY_LOCKED + +/obj/item/wallframe/secure_safe/after_attach(obj/attached_to) + . = ..() + for(var/obj/item in contents) + item.forceMove(attached_to) + /** * Wall safes * Holds items and uses the lockable storage component @@ -18,8 +40,17 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/secure_safe, 32) . = ..() //this will create the storage for us. AddComponent(/datum/component/lockable_storage) - find_and_hang_on_wall() - PopulateContents() + if(!density) + find_and_hang_on_wall() + if(mapload) + PopulateContents() + +/obj/structure/secure_safe/deconstruct(disassembled) + if(!density) //if we're a wall item, we'll drop a wall frame. + var/obj/item/wallframe/secure_safe/new_safe = new(get_turf(src)) + for(var/obj/item in contents) + item.forceMove(new_safe) + return ..() /obj/structure/secure_safe/proc/PopulateContents() new /obj/item/paper(src) @@ -42,12 +73,16 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/secure_safe, 32) desc = "In case of emergency, do not break glass. All Captains and Acting Captains are provided with codes to access this safe. \ It is made out of the same material as the station's Black Box and is designed to resist all conventional weaponry. \ There appears to be a small amount of surface corrosion. It doesn't look like it could withstand much of an explosion.\ - It remains quite flush against the wall, and there only seems to be enough room to fit something as slim as an ID card." + Due to the expensive material, it was made incredibly small to cut corners, leaving only enough room to fit something as slim as an ID card." + icon = 'icons/obj/structures.dmi' + icon_state = "safe" + base_icon_state = "safe" armor_type = /datum/armor/safe_caps_spare max_integrity = 300 - color = "#ffdd33" - -MAPPING_DIRECTIONAL_HELPERS(/obj/structure/secure_safe/caps_spare, 32) + density = TRUE + anchored_tabletop_offset = 4 + custom_materials = list(/datum/material/gold = SMALL_MATERIAL_AMOUNT) + material_flags = MATERIAL_EFFECTS | MATERIAL_COLOR /datum/armor/safe_caps_spare melee = 100 @@ -60,6 +95,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/secure_safe/caps_spare, 32) /obj/structure/secure_safe/caps_spare/Initialize(mapload) . = ..() + var/matrix/small_safe_transformation = new + small_safe_transformation.Scale(0.6) + transform = small_safe_transformation atom_storage.set_holdable(/obj/item/card/id) AddComponent(/datum/component/lockable_storage, \ lock_code = SSid_access.spare_id_safe_code, \ diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi index 50861b248d5308cae77931a70e2daf98516454fd..85367e1c47b570a2512ed4d6542520610275638a 100644 GIT binary patch delta 1091 zcmV-J1ibt3@C@?s43H!N#IYr<0e|7b`f3ME+kqPWb{p%xOlkERpo?N0yVAHNG;v?) zE!hUAx$EOe#e2VF!CbtdkcY<<_3TmRDDhleNpfU<-qo6tp>Z8Cy3T&jnN($_xz)}iq zWkjuvsFe}5GNM*S)XIoj8I#Zg2!E)R5wwJMj(XrV+J&CbZteHjYry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