From 4e0db5664b5ff7f32608ba7e855643a067de4457 Mon Sep 17 00:00:00 2001 From: AnturK Date: Mon, 22 Feb 2016 19:04:06 +0100 Subject: [PATCH] Adds /turf/template_noop and /area/template_noop to dmm reader --- .../admin/verbs/map_template_loadverb.dm | 5 ++-- code/modules/awaymissions/maploader/reader.dm | 28 ++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm index 5c536fff54f..aaedea23577 100644 --- a/code/modules/admin/verbs/map_template_loadverb.dm +++ b/code/modules/admin/verbs/map_template_loadverb.dm @@ -2,13 +2,14 @@ set category = "Debug" set name = "Map template - Place" - var/datum/map_template/template var/turf/T = get_turf(mob) if(!T) return - + var/map = input(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in map_templates + if(!map) + return template = map_templates[map] var/list/preview = list() diff --git a/code/modules/awaymissions/maploader/reader.dm b/code/modules/awaymissions/maploader/reader.dm index f43073fd5a7..732f7c36251 100644 --- a/code/modules/awaymissions/maploader/reader.dm +++ b/code/modules/awaymissions/maploader/reader.dm @@ -174,17 +174,17 @@ var/global/dmm_suite/preloader/_preloader = new //first instance the /area and remove it from the members list index = members.len - var/atom/instance - _preloader.setup(members_attributes[index])//preloader for assigning set variables on atom creation + if(members[index] != /area/template_noop) + var/atom/instance + _preloader.setup(members_attributes[index])//preloader for assigning set variables on atom creation - instance = locate(members[index]) - var/turf/crds = locate(xcrd,ycrd,zcrd) - if(crds) - instance.contents.Add(crds) - - if(use_preloader && instance) - _preloader.load(instance) + instance = locate(members[index]) + var/turf/crds = locate(xcrd,ycrd,zcrd) + if(crds) + instance.contents.Add(crds) + if(use_preloader && instance) + _preloader.load(instance) members.Remove(members[index]) //then instance the /turf and, if multiple tiles are presents, simulates the DMM underlays piling effect @@ -194,7 +194,9 @@ var/global/dmm_suite/preloader/_preloader = new first_turf_index++ //instanciate the first /turf - var/turf/T = instance_atom(members[first_turf_index],members_attributes[first_turf_index],xcrd,ycrd,zcrd) + var/turf/T + if(members[first_turf_index] != /turf/template_noop) + T = instance_atom(members[first_turf_index],members_attributes[first_turf_index],xcrd,ycrd,zcrd) if(T) //if others /turf are presents, simulates the underlays piling effect @@ -350,3 +352,9 @@ var/global/dmm_suite/preloader/_preloader = new for(var/attribute in attributes) what.vars[attribute] = attributes[attribute] use_preloader = FALSE + +/area/template_noop + name = "Area Passthrough" + +/turf/template_noop + name = "Turf Passthrough" \ No newline at end of file