mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user