From bcea1b71ad6535250a0c1e6b15af112aeeb9a7fe Mon Sep 17 00:00:00 2001 From: VerySoft Date: Tue, 20 Jul 2021 07:08:35 -0400 Subject: [PATCH] Allows hiding mobs/areas from observers without completely forbidding Basically for more common usage for place we would prefer people couldn't peek into before people are there ICly, like gateways. --- code/game/objects/effects/landmarks.dm | 9 +++++++++ code/modules/mob/dead/observer/observer.dm | 6 +++++- maps/~map_system/maps.dm | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index d87c5f5bfa3..ce1535601f1 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -117,6 +117,15 @@ else log_error("[type] mapped in but no using_map") +/obj/effect/landmark/hidden_level + delete_me = 1 +/obj/effect/landmark/hidden_level/Initialize() + . = ..() + if(using_map) + using_map.hidden_levels |= z + else + log_error("[type] mapped in but no using_map") + /obj/effect/landmark/virtual_reality name = "virtual_reality" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 885d6df5fec..350eef19675 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -341,6 +341,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/area/A = areas[key] if(A.z in using_map?.secret_levels) areas -= key + if(A.z in using_map?.hidden_levels) + areas -= key return areas @@ -353,7 +355,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/mobz = get_z(mobs[key]) if(mobz in using_map?.secret_levels) mobs -= key - + if(mobz in using_map?.hidden_levels) + mobs -= key + return mobs /mob/observer/dead/verb/dead_tele(areaname as null|anything in jumpable_areas()) diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm index 0fbbca083bc..ce1dedc8015 100644 --- a/maps/~map_system/maps.dm +++ b/maps/~map_system/maps.dm @@ -35,6 +35,7 @@ var/list/all_maps = list() var/static/list/xenoarch_exempt_levels = list() //Z-levels exempt from xenoarch finds and digsites spawning. var/static/list/persist_levels = list() // Z-levels where SSpersistence should persist between rounds. Defaults to station_levels if unset. var/static/list/secret_levels = list() // Z-levels that (non-admin) ghosts can't get to + var/static/list/hidden_levels = list() // Z-levels who's contents are hidden, but not forbidden (gateways) var/static/list/empty_levels = list() // Empty Z-levels that may be used for various things var/static/list/mappable_levels = list()// List of levels where mapping or other similar devices might work fully // End Static Lists