[MDB IGNORE] Implements an automatic nearstation area tiler (#90660)

## About The Pull Request

Space turfs will now assign the nearspace area to themselves whenever
they're replaced, or lattice or catwalks are placed ontop of them. This
fixes lighting missing from player-created space structures until they
create a custom area, and resolves a similar issue with shuttle
ceilings. To track this we had ceilings spawn the "shit be fucked"
marker whenever they were created outside of nearspace, which is now
gone.
Shuttles bypass this autotiler for non-space areas, because they'd
replace it anyways.

**This does not work on mapload to cut down on init times**, mappers
still have to place nearstation areas on their maps where they place
some sort of a structure in space. They do not have to do this for
shuttle landing areas now, however.

Closes #84597

## Why It's Good For The Game

Shit be fucked markers created by ceilings are a god awful solution
because we have player-controlled shuttles with custom positioning, so
every time you moved a shuttle to a bottom level of any multiz map, you
get a bunch of them on your shuttle's roof.

## Changelog
🆑
fix: Fixed "shit be fucked" errors and missing lighting on shuttle
ceilings docked to bottom z levels of multiz maps
/🆑
This commit is contained in:
SmArtKar
2025-04-21 02:54:09 +02:00
committed by GitHub
parent e1173044bd
commit b626509622
12 changed files with 238 additions and 232 deletions
+8 -1
View File
@@ -20,10 +20,17 @@
/obj/structure/lattice/Initialize(mapload)
. = ..()
if(length(give_turf_traits))
if (length(give_turf_traits))
give_turf_traits = string_list(give_turf_traits)
AddElement(/datum/element/give_turf_traits, give_turf_traits)
AddElement(/datum/element/footstep_override, footstep = FOOTSTEP_CATWALK)
// We check for objects in non-nearspace space in both linters and tests, so we can ignore these checks on mapload for performance
if (mapload || !isspaceturf(loc))
return
var/area/new_turf_area = get_area(loc)
if (istype(new_turf_area, /area/space) && !istype(new_turf_area, /area/space/nearstation))
set_turf_to_area(loc, GLOB.areas_by_type[/area/space/nearstation])
/datum/armor/structure_lattice
melee = 50