diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 8e328c9400e..bcab64f3afb 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -115,7 +115,7 @@ playsound(loc, sound, 15, 1, -3) else playsound(loc, 'sound/machines/click.ogg', 15, 1, -3) - density = 1 + density = !istype(src, /obj/structure/closet/bluespace) return TRUE /obj/structure/closet/proc/toggle(mob/user) @@ -422,4 +422,44 @@ user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1) /obj/structure/closet/AllowDrop() - return TRUE \ No newline at end of file + return TRUE + +/obj/structure/closet/bluespace + name = "bluespace closet" + desc = "A storage unit that moves and stores through the fourth dimension." + density = 0 + icon_state = "bluespace" + icon_closed = "bluespace" + icon_opened = "bluespaceopen" + storage_capacity = 60 + var/list/materials = list(MAT_METAL = 5000, MAT_PLASMA = 2500, MAT_TITANIUM = 500, MAT_BLUESPACE = 500) + +/obj/structure/closet/bluespace/CheckExit(atom/movable/AM) + IsAlone(AM, loc) + return TRUE + +/obj/structure/closet/bluespace/proc/IsAlone(atom/movable/AM, atom/location) + var/trans = FALSE + for(var/atom/A in location) + if(A.density && A != src && A != AM) + trans = TRUE + icon_opened = trans ? "bluespaceopentrans" : "bluespaceopen" + icon_closed = trans ? "bluespacetrans" : "bluespace" + icon_state = opened ? icon_opened : icon_closed + return TRUE + +/obj/structure/closet/bluespace/Crossed(atom/movable/AM) + if(AM.density) + icon_state = opened ? "bluespaceopentrans" : "bluespacetrans" + return + +/obj/structure/closet/bluespace/Move(NewLoc, direct) // Allows for "phasing" throug objects but doesn't allow you to stuff your EOC homebois in one of these and push them through walls. + var/turf/T = get_turf(NewLoc) + if(istype(T, /turf/simulated/wall) && T.density) + return + for(var/atom/A in T.contents) + if(A.density && istype(A, /obj/machinery/door)) + return + IsAlone(src, NewLoc) + forceMove(NewLoc) + return \ No newline at end of file diff --git a/code/modules/research/designs/equipment_designs.dm b/code/modules/research/designs/equipment_designs.dm index d0e06906f6b..cd853f421bd 100644 --- a/code/modules/research/designs/equipment_designs.dm +++ b/code/modules/research/designs/equipment_designs.dm @@ -269,3 +269,13 @@ build_type = PROTOLATHE materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 5000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) category = list("Equipment") + +/datum/design/bluespacecloset + name = "Bluespace Closet" + desc = "A storage unit that moves and stores through the fourth dimension." + id = "bluespace_closet" + req_tech = list("engineering" = 4, "programming" = 5, "bluespace" = 5, "magnets" = 4, "plasmatech" = 3) + build_path = /obj/structure/closet/bluespace + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_PLASMA = 2500, MAT_TITANIUM = 500, MAT_BLUESPACE = 500) + category = list("Equipment") \ No newline at end of file diff --git a/icons/obj/closet.dmi b/icons/obj/closet.dmi index de22e917ddc..6848a521a1c 100644 Binary files a/icons/obj/closet.dmi and b/icons/obj/closet.dmi differ