mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Abstract away stuff that acts on baseturfs directly into their own procs, and kills some dead code related to baseturfs + tests (#72117)
Adds some new procs relating to baseturfs that replaces some code that reads and sets them directly. Moves them to their own file. **To reviewers: Any proc in baseturfs.dm that is snake_case is mine, anything else is just moved**. Adds tests for the existing procs of baseturfs. I'm going to be doing some optimizations to baseturfs that change the actual representation of baseturfs, and so I'm prepping these to be implementation agnostic. Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
co-authored by
LemonInTheDark
parent
5e69584692
commit
45dcc6e72b
@@ -261,12 +261,7 @@ GLOBAL_LIST_INIT(typecache_holodeck_linked_floorcheck_ok, typecacheof(list(/turf
|
||||
//makes sure that any time a holoturf is inside a baseturf list (e.g. if someone put a wall over it) its set to the OFFLINE turf
|
||||
//so that you cant bring turfs from previous programs into other ones (like putting the plasma burn turf into lounge for example)
|
||||
for(var/turf/closed/holo_turf in linked)
|
||||
for(var/baseturf in holo_turf.baseturfs)
|
||||
if(ispath(baseturf, /turf/open/floor/holofloor))
|
||||
var/list/copy = holo_turf.baseturfs.Copy()
|
||||
copy -= baseturf
|
||||
copy += /turf/open/floor/holofloor/plating
|
||||
holo_turf.baseturfs = baseturfs_string_list(copy, holo_turf)
|
||||
holo_turf.replace_baseturf(/turf/open/floor/holofloor, /turf/open/floor/holofloor/plating)
|
||||
|
||||
///finalizes objects in the spawned list
|
||||
/obj/machinery/computer/holodeck/proc/finish_spawn()
|
||||
|
||||
Reference in New Issue
Block a user