From b4644e802430cd8b4e75aebcc991aa2689832d1e Mon Sep 17 00:00:00 2001 From: Kylerace Date: Mon, 19 Dec 2022 16:48:46 -0800 Subject: [PATCH] fixes holodecks directly changing baseturfs (#72067) ## About The Pull Request i did this with #59355 to fix a bug but it breaks guarantees with baseturfs. now they arent broken. ## Why It's Good For The Game this probably causes bugs under some conditions --- code/modules/holodeck/computer.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index a006c9dba52..bd3e57a879d 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -263,8 +263,10 @@ GLOBAL_LIST_INIT(typecache_holodeck_linked_floorcheck_ok, typecacheof(list(/turf for(var/turf/closed/holo_turf in linked) for(var/baseturf in holo_turf.baseturfs) if(ispath(baseturf, /turf/open/floor/holofloor)) - holo_turf.baseturfs -= baseturf - holo_turf.baseturfs += /turf/open/floor/holofloor/plating + var/list/copy = holo_turf.baseturfs.Copy() + copy -= baseturf + copy += /turf/open/floor/holofloor/plating + holo_turf.baseturfs = baseturfs_string_list(copy, holo_turf) ///finalizes objects in the spawned list /obj/machinery/computer/holodeck/proc/finish_spawn()