Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@

#define XENO_STARTING_CRYSTAL 100 //How much building resource the queen gets to start with

/// Whether the xeno in question is capable of unlocking dropships and starting hijack
#define IS_XENO_DROPSHIP_CAPABLE(X) (X.hive_pos == XENO_QUEEN || X.caste_type == XENO_CASTE_PREDALIEN)

// Queen permission toggles
#define COOLDOWN_TOGGLE_SLASH "cooldown_toggle_slash"
#define COOLDOWN_TOGGLE_CONSTRUCTION "cooldown_toggle_construction"
Expand Down
25 changes: 24 additions & 1 deletion code/game/machinery/doors/airlock_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,29 @@
name = "Press Office"
req_access = list(ACCESS_PRESS)

/obj/structure/machinery/door/airlock/almayer/generic/shuttle
name = "\improper Shuttle Airlock"
no_panel = TRUE
not_weldable = TRUE
unslashable = TRUE
unacidable = TRUE

/obj/structure/machinery/door/airlock/almayer/generic/shuttle/attack_alien(mob/living/carbon/xenomorph/xeno)
if(!IS_XENO_DROPSHIP_CAPABLE(xeno))
return ..()

if(!locked)
return ..()

if(xeno.action_busy)
return

to_chat(xeno, SPAN_NOTICE("You try and force the doors open!"))
if(do_after(xeno, 5 SECONDS, INTERRUPT_ALL, BUSY_ICON_HOSTILE))
unlock(TRUE)
open(TRUE)
lock(TRUE)

/obj/structure/machinery/door/airlock/almayer/marine
name = "\improper Airlock"
icon = 'icons/obj/structures/doors/prepdoor.dmi'
Expand Down Expand Up @@ -906,7 +929,7 @@
return ..()

/obj/structure/machinery/door/airlock/dropship_hatch/attack_alien(mob/living/carbon/xenomorph/xeno)
if(xeno.hive_pos != XENO_QUEEN)
if(!IS_XENO_DROPSHIP_CAPABLE(xeno))
return ..()

if(!locked)
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/doors/multi_tile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
if(!queen_pryable)
return ..()

if(xeno.hive_pos != XENO_QUEEN)
if(!IS_XENO_DROPSHIP_CAPABLE(xeno))
return ..()

if(xeno.action_busy)
Expand Down Expand Up @@ -347,7 +347,7 @@
return ..()

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/attack_alien(mob/living/carbon/xenomorph/xeno)
if(xeno.hive_pos != XENO_QUEEN)
if(!IS_XENO_DROPSHIP_CAPABLE(xeno))
return ..()

if(!queen_pryable)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/hive_status.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

var/hivenumber = XENO_HIVE_NORMAL
var/mob/living/carbon/xenomorph/queen/living_xeno_queen
var/mob/living/carbon/xenomorph/predalien/living_xeno_predalien
var/egg_planting_range = 15

/// Toggles for the hive that are reset on queen death unless hive_flags_locked
Expand Down Expand Up @@ -827,7 +828,7 @@
return length(hive_structures[name_ref])

/datum/hive_status/proc/abandon_on_hijack()
var/area/hijacked_dropship = get_area(living_xeno_queen)
var/area/hijacked_dropship = get_area(living_xeno_queen && living_xeno_predalien)
if(!hijacked_dropship)
return FALSE
var/shipside_humans_weighted_count = 0
Expand Down
13 changes: 13 additions & 0 deletions code/modules/shuttle/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,19 @@
return TRUE
tgui_interact(user)

/obj/structure/machinery/computer/shuttle/ert/attack_alien(mob/living/carbon/xenomorph/xeno)
// If the attacking xeno isn't the queen or predalien.
if(IS_XENO_DROPSHIP_CAPABLE(xeno))
xeno.animation_attack_on(src)
disabled = TRUE
to_chat(xeno, SPAN_XENONOTICE("We slash at [src], rendering it inoperable!"))
playsound(loc, 'sound/machines/terminal_shutdown.ogg', 20)
else
to_chat(xeno, SPAN_NOTICE("Lights flash from the terminal but we can't comprehend their meaning."))
playsound(loc, 'sound/machines/terminal_error.ogg', KEYBOARD_SOUND_VOLUME, TRUE)
return XENO_NONCOMBAT_ACTION


/obj/structure/machinery/computer/shuttle/ert/small
name = "transport shuttle"
desc = "A transport shuttle flight computer."
Expand Down
4 changes: 2 additions & 2 deletions code/modules/shuttle/computers/dropship_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@

var/obj/docking_port/mobile/marine_dropship/dropship = SSshuttle.getShuttle(shuttleId)

// If the attacking xeno isn't the queen.
if(xeno.hive_pos != XENO_QUEEN)
// If the attacking xeno isn't the queen or predalien.
if(!IS_XENO_DROPSHIP_CAPABLE(xeno))
// If the 'about to launch' alarm is playing, a xeno can whack the computer to stop it.
if(dropship.playing_launch_announcement_alarm)
stop_playing_launch_announcement_alarm()
Expand Down
4 changes: 2 additions & 2 deletions maps/shuttles/ert_pmc_shuttle.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
/area/shuttle/ert)
"q" = (
/obj/structure/machinery/door/airlock/almayer/generic{
/obj/structure/machinery/door/airlock/almayer/generic/shuttle{
dir = 2
},
/turf/open/shuttle/dropship/light_grey_single_wide_left_to_right,
Expand All @@ -90,7 +90,7 @@
/turf/open/shuttle/dropship/light_grey_single_wide_up_to_down,
/area/shuttle/ert)
"t" = (
/obj/structure/machinery/door/airlock/almayer/generic,
/obj/structure/machinery/door/airlock/almayer/generic/shuttle,
/turf/open/shuttle/dropship/light_grey_single_wide_up_to_down,
/area/shuttle/ert)
"u" = (
Expand Down
4 changes: 2 additions & 2 deletions maps/shuttles/ert_response_shuttle.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/turf/template_noop,
/area/shuttle/ert)
"d" = (
/obj/structure/machinery/door/airlock/almayer/generic{
/obj/structure/machinery/door/airlock/almayer/generic/shuttle{
dir = 2
},
/turf/open/shuttle/dropship/light_grey_single_wide_left_to_right,
Expand Down Expand Up @@ -76,7 +76,7 @@
},
/area/shuttle/ert)
"y" = (
/obj/structure/machinery/door/airlock/almayer/generic,
/obj/structure/machinery/door/airlock/almayer/generic/shuttle,
/turf/open/shuttle/dropship/light_grey_single_wide_up_to_down,
/area/shuttle/ert)
"z" = (
Expand Down
4 changes: 2 additions & 2 deletions maps/shuttles/ert_twe_shuttle.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
},
/area/shuttle/ert)
"D" = (
/obj/structure/machinery/door/airlock/almayer/generic,
/obj/structure/machinery/door/airlock/almayer/generic/shuttle,
/turf/open/shuttle/dropship/light_grey_single_wide_up_to_down,
/area/shuttle/ert)
"E" = (
Expand Down Expand Up @@ -133,7 +133,7 @@
/turf/open/shuttle/dropship/light_grey_top_left,
/area/shuttle/ert)
"M" = (
/obj/structure/machinery/door/airlock/almayer/generic{
/obj/structure/machinery/door/airlock/almayer/generic/shuttle{
dir = 2
},
/turf/open/shuttle/dropship/light_grey_single_wide_left_to_right,
Expand Down
4 changes: 2 additions & 2 deletions maps/shuttles/ert_upp_shuttle.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
/turf/template_noop,
/area/shuttle/ert)
"G" = (
/obj/structure/machinery/door/airlock/almayer/generic,
/obj/structure/machinery/door/airlock/almayer/generic/shuttle,
/turf/open/shuttle/dropship/light_grey_single_wide_up_to_down,
/area/shuttle/ert)
"I" = (
Expand Down Expand Up @@ -186,7 +186,7 @@
/turf/open/shuttle/dropship/medium_grey_single_wide_up_to_down,
/area/shuttle/ert)
"Y" = (
/obj/structure/machinery/door/airlock/almayer/generic{
/obj/structure/machinery/door/airlock/almayer/generic/shuttle{
dir = 2
},
/turf/open/shuttle/dropship/light_grey_single_wide_left_to_right,
Expand Down