mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-11 07:58:57 +01:00
af0312c7d4
Fixes https://github.com/Aurorastation/Aurora.3/issues/18504 Fixes https://github.com/Aurorastation/Aurora.3/issues/21064 Fixes https://github.com/Aurorastation/Aurora.3/issues/21267 Fixes https://github.com/Aurorastation/Aurora.3/issues/21455 Fixes https://github.com/Aurorastation/Aurora.3/issues/21535 Miscellaneous bugfixes, code cleanup, etc. Smaller batches this time. changes: - spellcheck: "Renames 'gibber' to 'autobutcher'." - code_imp: "Cleans up a lot of old autobutcher code." - code_imp: "Simplifies and unifies a lot of circuit board naming code." - code_imp: "Updates various code comments to DMDocs format." - balance: "Slightly increased damage of beating someone with a ladder." - bugfix: "Fixes foreign speech displaying the translated versions in langchat for non-fluent listeners." - bugfix: "Fixes whispered speech langchat; whispers are now correctly italicized." - bugfix: "Fixes shouted speech langchat; shouts are now correctly biggified." - bugfix: "Adds missing Omni Gas Mixer, Gas Meter options from RFD-P." - bugfix: "Adds missing circuit boards for bioballistic delivery system, lysis-isolation centrifuge, and autobutcher to allow for construction and deconstruction." - bugfix: "Fixes empty algae chips bag having description set for its name." - bugfix: "Adds fallback_specific_heat values to several reagents that were missing them." - bugfix: "Fixes antimateriel projectiles being erroneously damage-capped when hitting walls." - bugfix: "Fixes laser beam effects not using the base colors of their beam VFX." - qol: "Added helpful feedback hint to move closer when someone speaks aloud within 4 tiles while you're in vacuum (as features go, this one felt more like a bug to experience)." - qol: "Updated various examine hints." --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com>
57 lines
1.4 KiB
Plaintext
57 lines
1.4 KiB
Plaintext
GLOBAL_LIST_EMPTY(connected_z_cache)
|
|
|
|
/// If the height is more than 1, we mark all contained levels as connected.
|
|
/obj/effect/landmark/map_data/New(turf/loc, _height)
|
|
..()
|
|
if(!istype(loc)) // Using loc.z is safer when using the maploader and New.
|
|
return
|
|
if(_height)
|
|
height = _height
|
|
|
|
/obj/effect/landmark/map_data/Initialize()
|
|
..()
|
|
return INITIALIZE_HINT_QDEL
|
|
|
|
/proc/GetConnectedZlevels(z)
|
|
. = list(z)
|
|
for(var/level = z, SSmapping.multiz_levels[level][Z_LEVEL_DOWN], level--)
|
|
. |= level-1
|
|
for(var/level = z, SSmapping.multiz_levels[level][Z_LEVEL_UP], level++)
|
|
. |= level+1
|
|
|
|
/proc/AreConnectedZLevels(var/zA, var/zB)
|
|
if (zA == zB)
|
|
return TRUE
|
|
|
|
if(zA == 0 || zB == 0)
|
|
return FALSE
|
|
|
|
if (length(GLOB.connected_z_cache) >= zA && GLOB.connected_z_cache[zA])
|
|
return (length(GLOB.connected_z_cache[zA]) >= zB && GLOB.connected_z_cache[zA][zB])
|
|
|
|
var/list/levels = GetConnectedZlevels(zA)
|
|
var/list/new_entry = new(max(levels))
|
|
for (var/entry in levels)
|
|
new_entry[entry] = TRUE
|
|
|
|
if (GLOB.connected_z_cache.len < zA)
|
|
GLOB.connected_z_cache.len = zA
|
|
|
|
GLOB.connected_z_cache[zA] = new_entry
|
|
|
|
return (length(GLOB.connected_z_cache[zA]) >= zB && GLOB.connected_z_cache[zA][zB])
|
|
|
|
/proc/get_zstep(atom/ref, dir)
|
|
if (!isloc(ref))
|
|
CRASH("Expected atom.")
|
|
if (!ref.z)
|
|
ref = get_turf(ref)
|
|
var/turf/T = get_turf(ref)
|
|
switch (dir)
|
|
if (UP)
|
|
. = GET_TURF_ABOVE(T)
|
|
if (DOWN)
|
|
. = GET_TURF_BELOW(T)
|
|
else
|
|
. = get_step(ref, dir)
|