From 58efb84b204fc0f9546d3b276d2dc78c787327f4 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 6 Jul 2025 14:12:42 -0500 Subject: [PATCH] Fix `map_export` including projectiles in saved maps (#91878) ## About The Pull Request The map export verb was including fired projectiles from guns/lasers/magic/etc. if a map was saved at the exact time the projectile was on the screen. This is bad because when the map is loaded, the projectile is just stationary and doesn't disappear. ## Why It's Good For The Game Mapping consistency. ## Changelog :cl: fix: Fix map export including projectiles in saved maps /:cl: --- code/modules/admin/verbs/map_export.dm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/modules/admin/verbs/map_export.dm b/code/modules/admin/verbs/map_export.dm index 12ffc42813f..eea48ae8b2b 100644 --- a/code/modules/admin/verbs/map_export.dm +++ b/code/modules/admin/verbs/map_export.dm @@ -202,19 +202,20 @@ GLOBAL_LIST_INIT(save_file_chars, list( maxz, save_flag = ALL, shuttle_area_flag = SAVE_SHUTTLEAREA_DONTCARE, - list/obj_blacklist = typecacheof(/obj/effect), + list/obj_blacklist, ) var/width = maxx - minx var/height = maxy - miny var/depth = maxz - minz - if(!islist(obj_blacklist)) + if(obj_blacklist && !islist(obj_blacklist)) CRASH("Non-list being used as object blacklist for map writing") - // we want to keep crayon writings, blood splatters, cobwebs, etc. - obj_blacklist -= typecacheof(/obj/effect/decal) - obj_blacklist -= typecacheof(/obj/effect/turf_decal) - obj_blacklist -= typecacheof(/obj/effect/landmark) // most landmarks get deleted except for latejoin arrivals shuttle + // we want to keep decals from crayon writings, blood splatters, cobwebs, etc. + // most landmarks get deleted except for latejoin arrivals shuttle + var/static/list/default_blacklist = typecacheof(list(/obj/effect, /obj/projectile)) - typecacheof(list(/obj/effect/decal, /obj/effect/turf_decal, /obj/effect/landmark)) + if(!obj_blacklist) + obj_blacklist = default_blacklist //Step 0: Calculate the amount of letters we need (26 ^ n > turf count) var/turfs_needed = width * height