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
This commit is contained in:
VerySoft
2023-08-05 15:18:37 -04:00
parent d8fed4fa08
commit e6c827d9ac
4 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -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)
+1
View File
@@ -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)
. = ..()
@@ -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))
+6
View File
@@ -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))