Maploading cleans up empty areas (#96451)

## About The Pull Request
Adds a check that, when loading a map file, deletes any areas which no
longer contain any turfs. A similar check exists in the proc for
manually adding/extending areas. This is important because it is assumed
that when accessing an initialized unique area eg from areas_by_type,
that it will have turfs.
## Why It's Good For The Game
fixbug
## Changelog
Not player facing
This commit is contained in:
FlufflesTheDog
2026-06-12 22:35:23 +02:00
committed by GitHub
parent 6666e36b84
commit 3d4f97ad56
+2
View File
@@ -933,6 +933,8 @@ GLOBAL_LIST_EMPTY(map_model_default)
old_area.turfs_to_uncontain_by_zlevel[crds.z] += crds
area_instance.turfs_by_zlevel[crds.z] += crds
area_instance.contents.Add(crds)
if(!isnull(old_area) && !old_area.has_contained_turfs())
qdel(old_area)
if(GLOB.use_preloader)
world.preloader_load(area_instance)