diff --git a/code/modules/mining/shelter_atoms.dm b/code/modules/mining/shelter_atoms.dm index b2fd378fac..65119e40aa 100644 --- a/code/modules/mining/shelter_atoms.dm +++ b/code/modules/mining/shelter_atoms.dm @@ -15,12 +15,14 @@ w_class = ITEMSIZE_TINY var/template_id = "shelter_alpha" var/datum/map_template/shelter/template + var/datum/map_template/shelter/template_roof var/used = FALSE /obj/item/device/survivalcapsule/proc/get_template() if(template) return template = SSmapping.shelter_templates[template_id] + template_roof = SSmapping.shelter_templates[template.roof] if(!template) throw EXCEPTION("Shelter template ([template_id]) not found!") qdel(src) @@ -46,9 +48,16 @@ var/turf/deploy_location = get_turf(src) var/status = template.check_deploy(deploy_location) + var/turf/above_location = GetAbove(deploy_location) + if(above_location && status == SHELTER_DEPLOY_ALLOWED) + status = template.check_deploy(above_location) + switch(status) + //Not allowed due to /area technical reasons if(SHELTER_DEPLOY_BAD_AREA) src.loc.visible_message("\The [src] will not function in this area.") + + //Anchored objects or no space if(SHELTER_DEPLOY_BAD_TURFS, SHELTER_DEPLOY_ANCHORED_OBJECTS) var/width = template.width var/height = template.height @@ -68,6 +77,8 @@ playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1) log_and_message_admins("[key_name_admin(usr)] activated a bluespace capsule at [get_area(T)]!") + if(above_location && template_roof) + template_roof.load(above_location, centered = TRUE) template.load(deploy_location, centered = TRUE) qdel(src) @@ -87,6 +98,22 @@ name = "survival airlock" block_air_zones = 1 +//Door access setter button +/obj/machinery/button/remote/airlock/survival_pod + name = "shelter privacy control" + desc = "You can secure yourself inside the shelter here." + specialfunctions = 4 // 4 is bolts + var/obj/machinery/door/airlock/voidcraft/survival_pod/door + +/obj/machinery/button/remote/airlock/survival_pod/attack_hand(obj/item/weapon/W, mob/user as mob) + if(..()) return 1 //1 is failure on machines (for whatever reason) + if(!door) + var/turf/dT = get_step(src,dir) + door = locate() in dT + if(door) + door.glass = !door.glass + door.opacity = !door.opacity + //Windows /obj/structure/window/reinforced/survival_pod name = "pod window" @@ -191,6 +218,9 @@ for(var/i in 1 to 5) var/obj/item/weapon/reagent_containers/food/snacks/liquidfood/W = new(src) stock(W) + for(var/i in 1 to 2) + var/obj/item/device/fbp_backup_cell/W = new(src) + stock(W) if(prob(50)) var/obj/item/weapon/storage/pill_bottle/dice/D = new(src) stock(D) diff --git a/code/modules/mining/shelters.dm b/code/modules/mining/shelters.dm index 19ad55f966..5ac1a7f6cd 100644 --- a/code/modules/mining/shelters.dm +++ b/code/modules/mining/shelters.dm @@ -5,6 +5,7 @@ var/whitelisted_turfs var/banned_areas var/banned_objects + var/roof /datum/map_template/shelter/New() . = ..() @@ -38,6 +39,11 @@ sleeping area! Order now, and we'll throw in a TINY FAN, \ absolutely free!" mappath = "maps/submaps/shelters/shelter_1.dmm" + roof = "roof_alpha" + +/datum/map_template/shelter/alpha_roof + shelter_id = "roof_alpha" + mappath = "maps/submaps/shelters/shelter_1_roof.dmm" /datum/map_template/shelter/alpha/New() . = ..() @@ -53,8 +59,14 @@ and a deluxe companion to keep you from getting lonely during \ an ash storm." mappath = "maps/submaps/shelters/shelter_2.dmm" + roof = "roof_beta" + +/datum/map_template/shelter/beta_roof + shelter_id = "roof_beta" + mappath = "maps/submaps/shelters/shelter_2_roof.dmm" /datum/map_template/shelter/beta/New() . = ..() whitelisted_turfs = typecacheof(/turf/simulated/mineral) banned_objects = list() + diff --git a/maps/submaps/shelters/shelter_1.dmm b/maps/submaps/shelters/shelter_1.dmm index 6ca59e7922..8b85eea25e 100644 --- a/maps/submaps/shelters/shelter_1.dmm +++ b/maps/submaps/shelters/shelter_1.dmm @@ -53,6 +53,10 @@ /obj/structure/bed/chair/comfy/black{ dir = 8 }, +/obj/machinery/button/remote/airlock/survival_pod{ + dir = 10; + pixel_y = -24 + }, /turf/simulated/shuttle/floor/voidcraft, /area/survivalpod) "m" = ( diff --git a/maps/submaps/shelters/shelter_1_roof.dmm b/maps/submaps/shelters/shelter_1_roof.dmm new file mode 100644 index 0000000000..df680a8c93 --- /dev/null +++ b/maps/submaps/shelters/shelter_1_roof.dmm @@ -0,0 +1,40 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/simulated/shuttle/floor/voidcraft, +/area/survivalpod) + +(1,1,1) = {" +a +a +a +a +a +"} +(2,1,1) = {" +a +a +a +a +a +"} +(3,1,1) = {" +a +a +a +a +a +"} +(4,1,1) = {" +a +a +a +a +a +"} +(5,1,1) = {" +a +a +a +a +a +"} diff --git a/maps/submaps/shelters/shelter_2.dmm b/maps/submaps/shelters/shelter_2.dmm index 64bdaa72c8..f06fb90420 100644 --- a/maps/submaps/shelters/shelter_2.dmm +++ b/maps/submaps/shelters/shelter_2.dmm @@ -94,7 +94,7 @@ /area/survivalpod) "q" = ( /obj/structure/tubes, -/obj/machinery/holoplant, +/obj/machinery/recharge_station, /turf/simulated/shuttle/floor/voidcraft, /area/survivalpod) "r" = ( @@ -145,6 +145,7 @@ icon_state = "pwindow"; dir = 1 }, +/obj/machinery/holoplant, /turf/simulated/floor/carpet/bcarpet, /area/survivalpod) "w" = ( @@ -189,6 +190,13 @@ /obj/structure/sign/mining, /turf/simulated/shuttle/wall/voidcraft/survival, /area/survivalpod) +"S" = ( +/obj/machinery/button/remote/airlock/survival_pod{ + dir = 10; + pixel_y = -24 + }, +/turf/simulated/floor/carpet/bcarpet, +/area/survivalpod) (1,1,1) = {" a @@ -232,7 +240,7 @@ h n r w -A +S a "} (6,1,1) = {" diff --git a/maps/submaps/shelters/shelter_2_roof.dmm b/maps/submaps/shelters/shelter_2_roof.dmm new file mode 100644 index 0000000000..6c77273458 --- /dev/null +++ b/maps/submaps/shelters/shelter_2_roof.dmm @@ -0,0 +1,68 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/simulated/shuttle/floor/voidcraft, +/area/survivalpod) + +(1,1,1) = {" +a +a +a +a +a +a +a +"} +(2,1,1) = {" +a +a +a +a +a +a +a +"} +(3,1,1) = {" +a +a +a +a +a +a +a +"} +(4,1,1) = {" +a +a +a +a +a +a +a +"} +(5,1,1) = {" +a +a +a +a +a +a +a +"} +(6,1,1) = {" +a +a +a +a +a +a +a +"} +(7,1,1) = {" +a +a +a +a +a +a +a +"}