diff --git a/code/modules/mining/shelter_atoms.dm b/code/modules/mining/shelter_atoms.dm index a4fb893cda..3db386b4aa 100644 --- a/code/modules/mining/shelter_atoms.dm +++ b/code/modules/mining/shelter_atoms.dm @@ -15,14 +15,12 @@ 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) @@ -49,10 +47,6 @@ var/turf/deploy_location = get_turf(src) var/status = template.check_deploy(deploy_location) var/turf/above_location = GetAbove(deploy_location) - if(!isopenspace(above_location)) - above_location = null - if(above_location && status == SHELTER_DEPLOY_ALLOWED) - status = template.check_deploy(above_location) switch(status) //Not allowed due to /area technical reasons @@ -79,8 +73,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) + if(above_location) + template.add_roof(above_location) template.load(deploy_location, centered = TRUE) qdel(src) diff --git a/code/modules/mining/shelters.dm b/code/modules/mining/shelters.dm index b68606f914..9e7af0f502 100644 --- a/code/modules/mining/shelters.dm +++ b/code/modules/mining/shelters.dm @@ -5,7 +5,6 @@ var/whitelisted_turfs var/banned_areas var/banned_objects - var/roof /datum/map_template/shelter/New() . = ..() @@ -31,6 +30,12 @@ return SHELTER_DEPLOY_ANCHORED_OBJECTS return SHELTER_DEPLOY_ALLOWED +/datum/map_template/shelter/proc/add_roof(turf/deploy_location) + var/affected = get_affected_turfs(deploy_location, centered=TRUE) + for(var/turf/T in affected) + if(isopenspace(T)) + T.ChangeTurf(/turf/simulated/shuttle/floor/voidcraft) + /datum/map_template/shelter/alpha name = "Shelter Alpha" shelter_id = "shelter_alpha" @@ -39,7 +44,6 @@ 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" @@ -59,7 +63,6 @@ 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" @@ -79,7 +82,6 @@ to no contact, the expense of these shelters have prevented them \ from seeing common use." mappath = "maps/submaps/shelters/shelter_3.dmm" - roof = "roof_beta" /datum/map_template/shelter/gamma/New() . = ..() diff --git a/maps/submaps/shelters/shelter_1_roof.dmm b/maps/submaps/shelters/shelter_1_roof.dmm deleted file mode 100644 index df680a8c93..0000000000 --- a/maps/submaps/shelters/shelter_1_roof.dmm +++ /dev/null @@ -1,40 +0,0 @@ -//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_roof.dmm b/maps/submaps/shelters/shelter_2_roof.dmm deleted file mode 100644 index 6c77273458..0000000000 --- a/maps/submaps/shelters/shelter_2_roof.dmm +++ /dev/null @@ -1,68 +0,0 @@ -//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 -"}