[MIRROR] secret gateway update [MDB IGNORE] (#8747)

* secret gateway update (#62003)

admins are now notified about a secret gateway load failing, also logs this
secret z levels are protected from incorporeal movement
fixes unpowered ruin areas being powered
adds a bunch of new areas for secret gateways, since var edited areas probably arent a good idea its good to have a few presets
adds cordon turfs and areas, ingame they just look like the z level border, they are completely indestructible, you cant pass them, and if you somehow do, the cordon area kills you (idea from goon but the code and sprites are mine)
adds a z level injector mapping trait, injects a z level trait into the z level its placed on, if you want to add something like ash storms or whatever to your map
adds an anti xray z level trait, you can optionally add this with the z level injector to protect your map against any xray or whatever

* secret gateway update

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-10-11 16:16:36 +01:00
committed by GitHub
co-authored by Fikou
parent 93c766257a
commit b365a52a96
18 changed files with 143 additions and 19 deletions
+4 -4
View File
@@ -116,7 +116,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
update_appearance()
if(!T || SSmapping.level_trait(T.z, ZTRAIT_SECRET))
if(!T || is_secret_level(T.z))
var/list/turfs = get_area_turfs(/area/shuttle/arrival)
if(turfs.len)
T = pick(turfs)
@@ -469,7 +469,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
// This is the ghost's follow verb with an argument
/mob/dead/observer/proc/ManualFollow(atom/movable/target)
if (!istype(target) || (SSmapping.level_trait(target.z, ZTRAIT_SECRET) && !client?.holder))
if (!istype(target) || (is_secret_level(target.z) && !client?.holder))
return
var/icon/I = icon(target.icon,target.icon_state,target.dir)
@@ -908,7 +908,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(client && mob_eye && istype(mob_eye))
client.eye = mob_eye
client.perspective = EYE_PERSPECTIVE
if(SSmapping.level_trait(mob_eye.z, ZTRAIT_SECRET) && !client?.holder)
if(is_secret_level(mob_eye.z) && !client?.holder)
sight = null //we dont want ghosts to see through walls in secret areas
RegisterSignal(mob_eye, COMSIG_MOVABLE_Z_CHANGED, .proc/on_observing_z_changed)
if(mob_eye.hud_used)
@@ -921,7 +921,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/proc/on_observing_z_changed(datum/source, turf/old_turf, turf/new_turf)
SIGNAL_HANDLER
if(SSmapping.level_trait(new_turf.z, ZTRAIT_SECRET) && !client?.holder)
if(is_secret_level(new_turf.z) && !client?.holder)
sight = null //we dont want ghosts to see through walls in secret areas
else
sight = initial(sight)
+10 -4
View File
@@ -570,10 +570,12 @@
if(!client)
return
if(stat == DEAD)
if(!SSmapping.level_trait(z, ZTRAIT_SECRET))
sight = (SEE_TURFS|SEE_MOBS|SEE_OBJS)
else
if(SSmapping.level_trait(z, ZTRAIT_NOXRAY))
sight = null
else if(is_secret_level(z))
sight = initial(sight)
else
sight = (SEE_TURFS|SEE_MOBS|SEE_OBJS)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_OBSERVER
return
@@ -616,7 +618,11 @@
if(see_override)
see_invisible = see_override
. = ..()
if(SSmapping.level_trait(z, ZTRAIT_NOXRAY))
sight = null
return ..()
//to recalculate and update the mob's total tint from tinted equipment it's wearing.
+11 -3
View File
@@ -580,10 +580,12 @@
if(!client)
return
if(stat == DEAD)
if(!SSmapping.level_trait(z, ZTRAIT_SECRET))
sight = (SEE_TURFS|SEE_MOBS|SEE_OBJS)
else
if(SSmapping.level_trait(z, ZTRAIT_NOXRAY))
sight = null
else if(is_secret_level(z))
sight = initial(sight)
else
sight = (SEE_TURFS|SEE_MOBS|SEE_OBJS)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_OBSERVER
return
@@ -591,6 +593,8 @@
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
sight = initial(sight)
if(SSmapping.level_trait(z, ZTRAIT_NOXRAY))
sight = null
lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
if(client.eye != src)
@@ -621,6 +625,10 @@
if(see_override)
see_invisible = see_override
if(SSmapping.level_trait(z, ZTRAIT_NOXRAY))
sight = null
sync_lighting_plane_alpha()
/mob/living/silicon/robot/update_stat()
@@ -562,10 +562,12 @@
if(!client)
return
if(stat == DEAD)
if(!SSmapping.level_trait(z, ZTRAIT_SECRET))
sight = (SEE_TURFS|SEE_MOBS|SEE_OBJS)
else
if(SSmapping.level_trait(z, ZTRAIT_NOXRAY))
sight = null
else if(is_secret_level(z))
sight = initial(sight)
else
sight = (SEE_TURFS|SEE_MOBS|SEE_OBJS)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_OBSERVER
return
@@ -573,7 +575,8 @@
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
sight = initial(sight)
if(SSmapping.level_trait(z, ZTRAIT_NOXRAY))
sight = null
if(client.eye != src)
var/atom/A = client.eye
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
+2 -2
View File
@@ -98,7 +98,7 @@
//SKYRAT EDIT ADDITION END
var/mob/living/L = mob //Already checked for isliving earlier
if(L.incorporeal_move) //Move though walls
if(L.incorporeal_move && !is_secret_level(mob.z)) //Move though walls
Process_Incorpmove(direct)
return FALSE
@@ -564,6 +564,6 @@
/mob/abstract_move(atom/destination)
var/turf/new_turf = get_turf(destination)
if(SSmapping.level_trait(new_turf.z, ZTRAIT_SECRET) && !client?.holder)
if(is_secret_level(new_turf.z) && !client?.holder)
return
return ..()