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
This commit is contained in:
Fikou
2021-10-10 20:20:22 +01:00
committed by GitHub
parent 1516a72893
commit 4663f9afce
18 changed files with 143 additions and 19 deletions
+3
View File
@@ -53,6 +53,9 @@ require only minor tweaks.
/// boolean - does this z prevent phasing
#define ZTRAIT_NOPHASE "No Phase"
/// boolean - does this z prevent xray/meson/thermal vision
#define ZTRAIT_NOXRAY "No X-Ray"
// number - bombcap is multiplied by this before being applied to bombs
#define ZTRAIT_BOMBCAP_MULTIPLIER "Bombcap Multiplier"
+2
View File
@@ -10,3 +10,5 @@
#define is_reserved_level(z) SSmapping.level_trait(z, ZTRAIT_RESERVED)
#define is_away_level(z) SSmapping.level_trait(z, ZTRAIT_AWAY)
#define is_secret_level(z) SSmapping.level_trait(z, ZTRAIT_SECRET)
+9
View File
@@ -45,6 +45,15 @@ SUBSYSTEM_DEF(weather)
eligible_zlevels["[z]"][W] = probability
return ..()
/datum/controller/subsystem/weather/proc/update_z_level(datum/space_level/level)
var/z = level.z_value
for(var/datum/weather/weather as anything in subtypesof(/datum/weather))
var/probability = initial(weather.probability)
var/target_trait = initial(weather.target_trait)
if(probability && level.traits[target_trait])
LAZYINITLIST(eligible_zlevels["[z]"])
eligible_zlevels["[z]"][weather] = probability
/datum/controller/subsystem/weather/proc/run_weather(datum/weather/weather_datum_type, z_levels)
if (istext(weather_datum_type))
for (var/V in subtypesof(/datum/weather))
+20
View File
@@ -29,3 +29,23 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30"
/area/awaymission/secret
area_flags = UNIQUE_AREA|NOTELEPORT|HIDDEN_AREA|NO_ALERTS
/area/awaymission/secret/unpowered
always_unpowered = TRUE
/area/awaymission/secret/unpowered/outdoors
outdoors = TRUE
/area/awaymission/secret/unpowered/no_grav
has_gravity = FALSE
/area/awaymission/secret/fullbright
static_lighting = FALSE
base_lighting_alpha = 255
/area/awaymission/secret/powered
requires_power = FALSE
/area/awaymission/secret/powered/fullbright
static_lighting = FALSE
base_lighting_alpha = 255
+1 -1
View File
@@ -12,7 +12,7 @@
/area/ruin/unpowered
always_unpowered = FALSE
always_unpowered = TRUE
/area/ruin/unpowered/no_grav
has_gravity = FALSE
+1 -1
View File
@@ -172,7 +172,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
stashed_group.display_turf(newTurf)
else
SSair.remove_from_active(src) //Clean up wall excitement, and refresh excited groups
if(ispath(path,/turf/closed))
if(ispath(path,/turf/closed) || ispath(path,/turf/cordon))
flags |= CHANGETURF_RECALC_ADJACENT
return ..()
+56
View File
@@ -0,0 +1,56 @@
/turf/cordon
name = "cordon"
icon = 'icons/turf/walls.dmi'
icon_state = "cordon"
invisibility = INVISIBILITY_ABSTRACT
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
explosion_block = INFINITY
rad_insulation = RAD_FULL_INSULATION
opacity = TRUE
density = TRUE
blocks_air = TRUE
always_lit = TRUE
bullet_bounce_sound = null
/turf/cordon/AfterChange()
. = ..()
SSair.high_pressure_delta -= src
/turf/cordon/attack_ghost(mob/dead/observer/user)
return FALSE
/turf/cordon/rust_heretic_act()
return FALSE
/turf/cordon/acid_act(acidpwr, acid_volume, acid_id)
return FALSE
/turf/cordon/Melt()
to_be_destroyed = FALSE
return src
/turf/cordon/singularity_act()
return FALSE
/turf/cordon/ScrapeAway(amount, flags)
return src // :devilcat:
/turf/cordon/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit)
return BULLET_ACT_HIT
/turf/cordon/Adjacent(atom/neighbor, atom/target, atom/movable/mover)
return FALSE
/area/cordon
name = "CORDON"
icon_state = "cordon"
static_lighting = FALSE
base_lighting_alpha = 255
area_flags = UNIQUE_AREA|NOTELEPORT|HIDDEN_AREA|NO_ALERTS
requires_power = FALSE
/area/cordon/Entered(atom/movable/arrived, area/old_area)
. = ..()
for(var/mob/living/enterer as anything in arrived.get_all_contents_type(/mob/living))
to_chat(enterer, span_userdanger("This was a bad idea..."))
enterer.dust(TRUE, FALSE, TRUE)
+2
View File
@@ -14,6 +14,8 @@ GLOBAL_LIST_INIT(potentialConfigRandomZlevels, generateConfigMapList(directory =
var/loaded = load_new_z_level(map, "Away Mission", config_gateway)
to_chat(world, span_boldannounce("Away mission [loaded ? "loaded" : "aborted due to errors"]."))
if(!loaded)
message_admins("Away mission [map] loading failed due to errors.")
log_admin("Away mission [map] loading failed due to errors.")
createRandomZlevel(config_gateway)
/obj/effect/landmark/awaystart
+14
View File
@@ -521,3 +521,17 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
var/turf/component_target = get_turf(src)
component_target.AddComponent(/datum/component/trapdoor, starts_open = FALSE)
qdel(src)
/obj/effect/mapping_helpers/ztrait_injector
name = "ztrait injector"
icon_state = "ztrait"
/// List of traits to add to this.
var/list/traits_to_add = list()
/obj/effect/mapping_helpers/ztrait_injector/Initialize()
. = ..()
var/datum/space_level/level = SSmapping.z_list[z]
if(!level || !length(traits_to_add))
return
level.traits |= traits_to_add
SSweather.update_z_level(level) //in case of someone adding a weather for the level, we want SSweather to update for that
+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)
@@ -462,7 +462,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)
@@ -901,7 +901,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)
@@ -914,7 +914,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
@@ -534,10 +534,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
@@ -580,7 +582,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
@@ -574,10 +574,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
@@ -585,6 +587,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)
@@ -615,6 +619,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
@@ -91,7 +91,7 @@
return FALSE
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
@@ -552,6 +552,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 ..()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

+1
View File
@@ -2027,6 +2027,7 @@
#include "code\modules\atmospherics\machinery\portable\scrubber.dm"
#include "code\modules\awaymissions\away_props.dm"
#include "code\modules\awaymissions\bluespaceartillery.dm"
#include "code\modules\awaymissions\cordon.dm"
#include "code\modules\awaymissions\corpse.dm"
#include "code\modules\awaymissions\exile.dm"
#include "code\modules\awaymissions\gateway.dm"