Skip to content

Commit

Permalink
Fix Z-Clear not properly removing baseturfs (#9826)
Browse files Browse the repository at this point in the history
* Improve baseturf debugging

* Z-Clear now resets baseturfs

* Shit is fuck 2: electric boogaloo
  • Loading branch information
itsmeow authored Sep 18, 2023
1 parent 43a3cbb commit 5b008e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/__HELPERS/string_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GLOBAL_LIST_EMPTY(string_lists)
return values //baseturf things
// return values
if(length(values) > 10)
stack_trace("The baseturfs list of [baseturf_holder] at [baseturf_holder.x], [baseturf_holder.y], [baseturf_holder.z] is [length(values)], it should never be this long, investigate. I've set baseturfs to a flashing wall as a visual queue")
stack_trace("The baseturfs list of [baseturf_holder] at [baseturf_holder.x], [baseturf_holder.y], [baseturf_holder.z] is [length(values)]. Values: [values.Join(", ")]")
baseturf_holder.ChangeTurf(/turf/closed/indestructible/baseturfs_ded, list(/turf/closed/indestructible/baseturfs_ded), flags = CHANGETURF_FORCEOP)
return string_list(list(/turf/closed/indestructible/baseturfs_ded)) //I want this reported god damn it
return string_list(values)
Expand Down
3 changes: 2 additions & 1 deletion code/controllers/subsystem/zclear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,9 @@ SUBSYSTEM_DEF(zclear)
var/turf/newT
if(istype(T, /turf/open/space))
newT = T
newT.baseturfs = /turf/baseturf_bottom
else
newT = T.ChangeTurf(/turf/open/space, flags = CHANGETURF_IGNORE_AIR | CHANGETURF_DEFER_CHANGE)
newT = T.ChangeTurf(/turf/open/space, /turf/baseturf_bottom, flags = CHANGETURF_IGNORE_AIR | CHANGETURF_DEFER_CHANGE)
var/area/old_area = newT.loc
if(!istype(newT.loc, /area/space))
var/area/newA = GLOB.areas_by_type[/area/space]
Expand Down

0 comments on commit 5b008e1

Please sign in to comment.