Adds an option to generate typecaches as zebras. (#63710)

About The Pull Request

Adds an argument to typecache generation that allows specifying the whether to include/exclude types in the input list.
Also adds another argument to specify whether to remove falsey values after the typecache is generated.
Why It's Good For The Game

Might make zaps slightly faster???
Honestly I just thought it would be a good way to condense some whitelist/blacklist typecache sets.
This commit is contained in:
TemporalOroboros
2022-02-06 17:23:38 -08:00
committed by GitHub
parent 45607b1a21
commit 6be8e0feee
43 changed files with 536 additions and 356 deletions
+6 -7
View File
@@ -206,13 +206,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/auxiliary_base, 32)
to_chat(user, span_warning("This station is not equipped with an auxiliary base. Please contact your Nanotrasen contractor."))
return
if(!no_restrictions)
var/static/list/disallowed_turf_types = typecacheof(list(
/turf/closed,
/turf/open/lava,
/turf/open/indestructible,
)) - typecacheof(list(
/turf/closed/mineral,
))
var/static/list/disallowed_turf_types = zebra_typecacheof(list(
/turf/closed = TRUE,
/turf/open/lava = TRUE,
/turf/open/indestructible = TRUE,
/turf/closed/mineral = FALSE,
))
if(!is_mining_level(T.z))
return BAD_ZLEVEL