Skip to content

Commit

Permalink
TGS Test Merge (#6671)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Aug 1, 2024
2 parents 8696c7f + 2a5bbd2 commit 59221d4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
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
3 changes: 3 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,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

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!"))
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)
Expand Down

0 comments on commit 59221d4

Please sign in to comment.