diff --git a/code/__DEFINES/hijack.dm b/code/__DEFINES/hijack.dm index 85d4c227ae70..96c6318a2e4a 100644 --- a/code/__DEFINES/hijack.dm +++ b/code/__DEFINES/hijack.dm @@ -8,6 +8,7 @@ #define EVACUATION_STATUS_NOT_INITIATED 0 #define EVACUATION_STATUS_INITIATED 1 +#define HIJACK_OBJECTIVES_SHIP_INBOUND -1 #define HIJACK_OBJECTIVES_NOT_STARTED 0 #define HIJACK_OBJECTIVES_STARTED 1 #define HIJACK_OBJECTIVES_COMPLETE 2 diff --git a/code/modules/cm_marines/anti_air.dm b/code/modules/cm_marines/anti_air.dm index e867c0d64083..7820be367c15 100644 --- a/code/modules/cm_marines/anti_air.dm +++ b/code/modules/cm_marines/anti_air.dm @@ -73,6 +73,8 @@ GLOBAL_DATUM(almayer_aa_cannon, /obj/structure/anti_air_cannon) return UI_CLOSE if(!allowed(user)) return UI_CLOSE + if(SShijack.hijack_status != HIJACK_OBJECTIVES_SHIP_INBOUND) + return UI_CLOSE /obj/structure/machinery/computer/aa_console/ui_static_data(mob/user) var/list/data = list() @@ -138,3 +140,7 @@ GLOBAL_DATUM(almayer_aa_cannon, /obj/structure/anti_air_cannon) if(!allowed(user)) to_chat(user, SPAN_WARNING("You do not have access to this.")) return TRUE + + if(SShijack.hijack_status != HIJACK_OBJECTIVES_SHIP_INBOUND) + to_chat(user, SPAN_WARNING("There is no current air threat.")) + return TRUE diff --git a/code/modules/shuttle/computers/dropship_computer.dm b/code/modules/shuttle/computers/dropship_computer.dm index 08a35b83071d..871a94a4d743 100644 --- a/code/modules/shuttle/computers/dropship_computer.dm +++ b/code/modules/shuttle/computers/dropship_computer.dm @@ -297,6 +297,9 @@ dropship.crashing = TRUE dropship.is_hijacked = TRUE + if(SShijack.hijack_status == HIJACK_OBJECTIVES_NOT_STARTED) + SShijack.hijack_status = HIJACK_OBJECTIVES_SHIP_INBOUND + hijack.fire() GLOB.alt_ctrl_disabled = TRUE diff --git a/code/modules/shuttle/dropship_hijack.dm b/code/modules/shuttle/dropship_hijack.dm index 73150f5bfc08..2be22106b6bb 100644 --- a/code/modules/shuttle/dropship_hijack.dm +++ b/code/modules/shuttle/dropship_hijack.dm @@ -116,7 +116,8 @@ if(!offset_target) offset_target = target // Welp the offsetting failed so... crash_site.forceMove(offset_target) - marine_announcement("A hostile aircraft on course for the [target_ship_section] has been successfully deterred.", "IX-50 MGAD System", logging = ARES_LOG_SECURITY) + marine_announcement("A hostile aircraft on course for the [target_ship_section] has been successfully engaged and destroyed.", "IX-50 MGAD System", logging = ARES_LOG_SECURITY) + xeno_announcement(SPAN_XENOANNOUNCE("High caliber tracers begin ripping past the dropship!"), "everything", XENO_HIJACK_ANNOUNCE) target_ship_section = new_target_ship_section // TODO mobs not alerted for(var/area/internal_area in shuttle.shuttle_areas) @@ -126,9 +127,14 @@ to_chat(M, SPAN_DANGER("You feel the ship turning sharply as it adjusts its course!")) shake_camera(M, 60, 2) playsound_area(internal_area, 'sound/effects/antiair_explosions.ogg') + addtimer(CALLBACK(src, PROC_REF(aa_interception), shuttle), 5 SECONDS) hijacked_bypass_aa = TRUE +/datum/dropship_hijack/almayer/proc/aa_interception(/obj/docking_port/mobile/shuttle) + shuttle.intoTheSunset() + SSticker.mode.round_finished = MODE_INFESTATION_X_MINOR + /datum/dropship_hijack/almayer/proc/check_final_approach() // if our duration isn't far enough away if(shuttle.mode != SHUTTLE_CALL)