Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successful AA interceptions now destroy the hijacked shuttle and end the round #6671

Closed
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/hijack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions code/modules/cm_marines/anti_air.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions code/modules/shuttle/computers/dropship_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@
dropship.crashing = TRUE
dropship.is_hijacked = TRUE

SShijack.hijack_status = HIJACK_OBJECTIVES_SHIP_INBOUND
blackdragonTOW marked this conversation as resolved.
Show resolved Hide resolved

hijack.fire()
GLOB.alt_ctrl_disabled = TRUE

Expand Down
8 changes: 7 additions & 1 deletion code/modules/shuttle/dropship_hijack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -126,9 +127,14 @@
to_chat(M, SPAN_DANGER("You feel the ship turning sharply as it adjusts its course!"))
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
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()
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
SSticker.mode.round_finished = MODE_INFESTATION_X_MINOR
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
Drulikar marked this conversation as resolved.
Show resolved Hide resolved

/datum/dropship_hijack/almayer/proc/check_final_approach()
// if our duration isn't far enough away
if(shuttle.mode != SHUTTLE_CALL)
Expand Down
Loading