Skip to content

Commit

Permalink
Revert "[TWEAK] - Multi-Z space turfs (#3128)"
Browse files Browse the repository at this point in the history
This reverts commit 8e88d22.
  • Loading branch information
LordNest committed Jan 19, 2025
1 parent eac5720 commit bec74b6
Show file tree
Hide file tree
Showing 2 changed files with 30,708 additions and 30,735 deletions.
58 changes: 0 additions & 58 deletions maps/sierra/sierra_turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,61 +22,3 @@

/turf/simulated/floor/shuttle_ceiling/sierra/air
initial_gas = list("oxygen" = MOLES_O2STANDARD, "nitrogen" = MOLES_N2STANDARD)

/*
* Z-mimic space turf part
*/

/proc/GetBelowZlevels(z)
RETURN_TYPE(/list)
. = list()
for(var/level = z, HasBelow(level), level--)
. |= level - 1

/proc/GetAboveZlevels(z)
RETURN_TYPE(/list)
. = list()
for(var/level = z, HasAbove(level), level++)
. |= level + 1

/turf/space/Initialize()
. = ..()
update_starlight()

set_extension(src, /datum/extension/support_lattice)

if (z_eventually_space)
appearance = SSskybox.space_appearance_cache[(((x + y) ^ ~(x * y) + z) % 25) + 1]

if(!HasBelow(z))
return
var/turf/below = GetBelow(src)

if(istype(below, /turf/space))
return
var/area/A = below.loc

if(!below.density && (A.area_flags & AREA_FLAG_EXTERNAL))
return

return INITIALIZE_HINT_LATELOAD // oh no! we need to switch to being a different kind of turf!

// Turfs for the non-bottom layers of multi-z space areas
/turf/space/open
icon_state = ""
z_flags = ZM_MIMIC_DEFAULTS | ZM_MIMIC_OVERWRITE | ZM_MIMIC_NO_AO
z_eventually_space = 0


/turf/space/open/Initialize()
for (var/level in GetBelowZlevels(z))
var/turf/below = locate(x, y, level)
if (!istype(below, /turf/space))
z_eventually_space = FALSE
break
if (below.z_eventually_space != 0)
z_eventually_space = below.z_eventually_space
break
if (!z_eventually_space == 0)
z_eventually_space = TRUE
return ..()
Loading

0 comments on commit bec74b6

Please sign in to comment.