From a35d3fddc3e7cead0115bdc9f2f6b862a5de37c8 Mon Sep 17 00:00:00 2001 From: Wildkins Date: Sat, 3 Dec 2022 08:06:53 -0500 Subject: [PATCH] Fix map reader not mapload initializing areas (#15221) --- code/modules/maps/reader.dm | 11 ++++++----- html/changelogs/johnwildkins-readerfix.yml | 7 +++++++ 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 html/changelogs/johnwildkins-readerfix.yml diff --git a/code/modules/maps/reader.dm b/code/modules/maps/reader.dm index 2bec5a61246..b4b9a49245d 100644 --- a/code/modules/maps/reader.dm +++ b/code/modules/maps/reader.dm @@ -296,6 +296,11 @@ var/global/dmm_suite/preloader/_preloader = new //Instanciation //////////////// + //since we've switched off autoinitialisation, record atoms to initialise later + var/list/atoms_to_initialise = list() + //turn off base new Initialization until the whole thing is loaded + SSatoms.map_loader_begin() + //The next part of the code assumes there's ALWAYS an /area AND a /turf on a given tile var/turf/crds = locate(xcrd,ycrd,zcrd) @@ -309,6 +314,7 @@ var/global/dmm_suite/preloader/_preloader = new _preloader.setup(attr)//preloader for assigning set variables on atom creation if(!instance) instance = new atype(null) + atoms_to_initialise += instance if(crds) instance.contents += crds @@ -321,11 +327,6 @@ var/global/dmm_suite/preloader/_preloader = new while(!ispath(members[first_turf_index], /turf)) //find first /turf object in members first_turf_index++ - //turn off base new Initialization until the whole thing is loaded - SSatoms.map_loader_begin() - //since we've switched off autoinitialisation, record atoms to initialise later - var/list/atoms_to_initialise = list() - //instanciate the first /turf var/turf/T if(members[first_turf_index] != /turf/template_noop) diff --git a/html/changelogs/johnwildkins-readerfix.yml b/html/changelogs/johnwildkins-readerfix.yml new file mode 100644 index 00000000000..961a5a313ef --- /dev/null +++ b/html/changelogs/johnwildkins-readerfix.yml @@ -0,0 +1,7 @@ +author: JohnWildkins + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +changes: + - backend: "Map reader will now properly mapload initialize /area atoms for away site areas."