From 340a3931619f3a80d30183bbb27368a834eae4e4 Mon Sep 17 00:00:00 2001 From: Leshana Date: Wed, 1 Mar 2017 20:45:12 -0500 Subject: [PATCH] Extend Station Blueprints to consider outdoor mining areas as "space" * Allows constructing new rooms out of the asteroid! Previously blueprint couldn't because it wasn't technically "/area/space" * Also moved the list of what area types count as space or protected to variables so its not a list embedded in the middle of a proc... --- code/game/objects/items/blueprints.dm | 38 ++++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 4df7585d8b..0577fee4a7 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -19,6 +19,23 @@ var/const/ROOM_ERR_SPACE = -1 var/const/ROOM_ERR_TOOLARGE = -2 + var/static/list/SPACE_AREA_TYPES = list( + /area/space, + /area/mine + ) + var/static/list/SPECIAL_AREA_TYPES = list( + /area/shuttle, + /area/admin, + /area/arrival, + /area/centcom, + /area/asteroid, + /area/tdome, + /area/syndicate_station, + /area/wizard_station, + /area/prison + // /area/derelict //commented out, all hail derelict-rebuilders! + ) + /obj/item/blueprints/attack_self(mob/M as mob) if (!istype(M,/mob/living/carbon/human)) M << "This stack of blue paper means nothing to you." //monkeys cannot into projecting @@ -79,22 +96,11 @@ move an amendment to the drawing.

return A /obj/item/blueprints/proc/get_area_type(var/area/A = get_area()) - if(istype(A, /area/space)) - return AREA_SPACE - var/list/SPECIALS = list( - /area/shuttle, - /area/admin, - /area/arrival, - /area/centcom, - /area/asteroid, - /area/tdome, - /area/syndicate_station, - /area/wizard_station, - /area/prison - // /area/derelict //commented out, all hail derelict-rebuilders! - ) - for (var/type in SPECIALS) - if ( istype(A,type) ) + for(var/type in SPACE_AREA_TYPES) + if(istype(A, type)) + return AREA_SPACE + for (var/type in SPECIAL_AREA_TYPES) + if(istype(A, type)) return AREA_SPECIAL return AREA_STATION