Makes antag shuttles warn the user that they cannot return to Aurora if they go back to base (#9920)

This commit is contained in:
fernerr
2020-09-11 08:02:06 +02:00
committed by GitHub
parent 4448fec75a
commit d9f2307c91
3 changed files with 18 additions and 0 deletions

View File

@@ -34,3 +34,16 @@
if(href_list["toggle_cloaked"])
shuttle.cloaked = !shuttle.cloaked
return TOPIC_REFRESH
/obj/machinery/computer/shuttle_control/multi/can_move(var/datum/shuttle/autodock/shuttle, var/user)
if(istype(shuttle, /datum/shuttle/autodock/multi/antag))
var/datum/shuttle/autodock/multi/antag/our_shuttle = shuttle
if(our_shuttle.returned)
to_chat(user, SPAN_WARNING("You don't have enough fuel for another trip!"))
return FALSE
else if(our_shuttle.next_location == our_shuttle.home_waypoint)
if(our_shuttle.return_warning_cooldown < world.time)
our_shuttle.return_warning_cooldown = world.time + 60 SECONDS
alert(user, "If you return to base, you won't be able to return to [current_map.station_short]. Launch again if you're sure about this.","Shuttle Control","Acknowledged.")
return FALSE
return ..()

View File

@@ -30,6 +30,7 @@
var/cloaked = TRUE
var/returned = FALSE
var/return_warning_cooldown
var/announcer
var/arrival_message
var/departure_message