From e6c827d9ac29376c343e079b2873b02c8c2af2bc Mon Sep 17 00:00:00 2001 From: VerySoft Date: Sat, 5 Aug 2023 15:18:37 -0400 Subject: [PATCH] OM mob related tweaks Adjusts things so that the OM mob won't lose its map_z. Also adds a 5 minute cooldown on announcements related to OM mobs --- code/modules/overmap/events/event_handler.dm | 2 +- maps/offmap_vr/common_offmaps.dm | 1 + maps/stellar_delight/stellar_delight_shuttle_defs.dm | 6 ++++++ maps/tether/tether_defines.dm | 6 ++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/code/modules/overmap/events/event_handler.dm b/code/modules/overmap/events/event_handler.dm index 2d9c2badda..b2782c2450 100644 --- a/code/modules/overmap/events/event_handler.dm +++ b/code/modules/overmap/events/event_handler.dm @@ -80,7 +80,7 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new) E.startWhen = 0 E.endWhen = INFINITY // TODO - Leshana - Note: event.setup() is called before these are set! - E.affecting_z = ship.map_z + E.affecting_z = ship.map_z.Copy() E.victim = ship LAZYADD(ship_events[ship], E) diff --git a/maps/offmap_vr/common_offmaps.dm b/maps/offmap_vr/common_offmaps.dm index da989f3806..94905bf82f 100644 --- a/maps/offmap_vr/common_offmaps.dm +++ b/maps/offmap_vr/common_offmaps.dm @@ -235,6 +235,7 @@ /datum/map_z_level/common_lateload/redgate_destination name = "Redgate Destination" z = Z_LEVEL_REDGATE + flags = MAP_LEVEL_PLAYER|MAP_LEVEL_SEALED /datum/map_template/common_lateload/redgate/on_map_loaded(z) . = ..() diff --git a/maps/stellar_delight/stellar_delight_shuttle_defs.dm b/maps/stellar_delight/stellar_delight_shuttle_defs.dm index 57cbe5d469..c5e42b9f7d 100644 --- a/maps/stellar_delight/stellar_delight_shuttle_defs.dm +++ b/maps/stellar_delight/stellar_delight_shuttle_defs.dm @@ -256,6 +256,7 @@ initial_restricted_waypoints = list("Central Command Shuttlepad" = list("cc_shuttlepad")) extra_z_levels = list(Z_LEVEL_SPACE_ROCKS) + var/mob_announce_cooldown = 0 /////SD Starts at V3b to pick up crew refuel and repair (And to make sure it doesn't spawn on hazards) /obj/effect/overmap/visitable/sector/virgo3b/Initialize() @@ -273,6 +274,11 @@ announce_atc(AM,going = TRUE) /obj/effect/overmap/visitable/sector/virgo3b/proc/announce_atc(var/atom/movable/AM, var/going = FALSE) + if(istype(AM, /obj/effect/overmap/visitable/ship/simplemob)) + if(world.time < mob_announce_cooldown) + return + else + mob_announce_cooldown = world.time + 5 MINUTES var/message = "Sensor contact for vessel '[AM.name]' has [going ? "left" : "entered"] ATC control area." //For landables, we need to see if their shuttle is cloaked if(istype(AM, /obj/effect/overmap/visitable/ship/landable)) diff --git a/maps/tether/tether_defines.dm b/maps/tether/tether_defines.dm index 47a1590e78..5e042c60ee 100644 --- a/maps/tether/tether_defines.dm +++ b/maps/tether/tether_defines.dm @@ -311,6 +311,7 @@ ) levels_for_distress = list(Z_LEVEL_OFFMAP1, Z_LEVEL_BEACH, Z_LEVEL_AEROSTAT, Z_LEVEL_DEBRISFIELD, Z_LEVEL_FUELDEPOT) + var/mob_announce_cooldown = 0 /obj/effect/overmap/visitable/sector/virgo3b/Crossed(var/atom/movable/AM) . = ..() @@ -324,6 +325,11 @@ return list(Z_LEVEL_SPACE_LOW) /obj/effect/overmap/visitable/sector/virgo3b/proc/announce_atc(var/atom/movable/AM, var/going = FALSE) + if(istype(AM, /obj/effect/overmap/visitable/ship/simplemob)) + if(world.time < mob_announce_cooldown) + return + else + mob_announce_cooldown = world.time + 5 MINUTES var/message = "Sensor contact for vessel '[AM.name]' has [going ? "left" : "entered"] ATC control area." //For landables, we need to see if their shuttle is cloaked if(istype(AM, /obj/effect/overmap/visitable/ship/landable))