Skip to content

Commit

Permalink
Fixes alamo being unable to be called down if you touch the console a…
Browse files Browse the repository at this point in the history
…s it is taking off (#12943)

* Fixes alamo xeno locking while alamo is taking off

* Actions please

* Garmarmr

Co-authored-by: BraveMole <[email protected]>

---------

Co-authored-by: BraveMole <[email protected]>
  • Loading branch information
ivanmixo and BraveMole authored May 11, 2023
1 parent 3a3cb04 commit b1f1b17
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions code/modules/shuttle/marine_dropship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -490,19 +490,22 @@
/obj/machinery/computer/shuttle/marine_dropship/attack_alien(mob/living/carbon/xenomorph/X, damage_amount = X.xeno_caste.melee_damage, damage_type = BRUTE, damage_flag = "", effects = TRUE, armor_penetration = 0, isrightclick = FALSE)
if(!(X.xeno_caste.caste_flags & CASTE_IS_INTELLIGENT))
return
#ifndef TESTING
if(SSticker.round_start_time + SHUTTLE_HIJACK_LOCK > world.time)
to_chat(X, span_xenowarning("It's too early to do this!"))
return
#endif
var/obj/docking_port/mobile/marine_dropship/M = SSshuttle.getShuttle(shuttleId)
var/dat = "Status: [M ? M.getStatusText() : "*Missing*"]<br><br>"
if(M)
dat += "<A href='?src=[REF(src)];hijack=1'>Launch to [SSmapping.configs[SHIP_MAP].map_name]</A><br>"
M.unlock_all()
dat += "<A href='?src=[REF(src)];abduct=1'>Capture the [M]</A><br>"
if(M.hijack_state != HIJACK_STATE_CALLED_DOWN)
to_chat(X, span_xenowarning("We corrupt the bird's controls, unlocking the doors and preventing it from flight."))
M.set_hijack_state(HIJACK_STATE_CALLED_DOWN)
M.do_start_hijack_timer()
to_chat(X, span_xenowarning("We corrupt the bird's controls, unlocking the doors[(M.mode != SHUTTLE_IGNITING) ? "and preventing it from flying." : ", but we are unable to prevent it from flying as it is already taking off!"]"))
if(M.mode != SHUTTLE_IGNITING)
M.set_hijack_state(HIJACK_STATE_CALLED_DOWN)
M.do_start_hijack_timer()

var/datum/browser/popup = new(X, "computer", M ? M.name : "shuttle", 300, 200)
popup.set_content("<center>[dat]</center>")
Expand Down

0 comments on commit b1f1b17

Please sign in to comment.