+178
-183
@@ -1,151 +1,146 @@
|
||||
/obj/docking_port/mobile/arrivals
|
||||
name = "arrivals shuttle"
|
||||
id = "arrivals"
|
||||
|
||||
dwidth = 3
|
||||
width = 7
|
||||
height = 15
|
||||
dir = WEST
|
||||
port_angle = 180
|
||||
|
||||
callTime = INFINITY
|
||||
ignitionTime = 50
|
||||
|
||||
roundstart_move = TRUE //force a call to dockRoundstart
|
||||
|
||||
var/sound_played
|
||||
var/damaged //too damaged to undock?
|
||||
var/list/areas //areas in our shuttle
|
||||
var/list/queued_announces //people coming in that we have to announce
|
||||
var/obj/machinery/requests_console/console
|
||||
var/force_depart = FALSE
|
||||
var/perma_docked = FALSE //highlander with RESPAWN??? OH GOD!!!
|
||||
|
||||
/obj/docking_port/mobile/arrivals/Initialize(mapload)
|
||||
|
||||
|
||||
if(SSshuttle.arrivals)
|
||||
WARNING("More than one arrivals docking_port placed on map!")
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
SSshuttle.arrivals = src
|
||||
|
||||
. = ..()
|
||||
|
||||
preferred_direction = dir
|
||||
return INITIALIZE_HINT_LATELOAD //for latejoin list
|
||||
|
||||
|
||||
/obj/docking_port/mobile/arrivals/LateInitialize()
|
||||
areas = list()
|
||||
|
||||
var/list/new_latejoin = list()
|
||||
for(var/area/shuttle/arrival/A in GLOB.sortedAreas)
|
||||
for(var/obj/structure/chair/C in A)
|
||||
new_latejoin += C
|
||||
if(!console)
|
||||
console = locate(/obj/machinery/requests_console) in A
|
||||
areas += A
|
||||
|
||||
/obj/docking_port/mobile/arrivals
|
||||
name = "arrivals shuttle"
|
||||
id = "arrivals"
|
||||
|
||||
dwidth = 3
|
||||
width = 7
|
||||
height = 15
|
||||
dir = WEST
|
||||
port_angle = 180
|
||||
|
||||
callTime = INFINITY
|
||||
ignitionTime = 50
|
||||
|
||||
roundstart_move = TRUE //force a call to dockRoundstart
|
||||
|
||||
var/sound_played
|
||||
var/damaged //too damaged to undock?
|
||||
var/list/areas //areas in our shuttle
|
||||
var/list/queued_announces //people coming in that we have to announce
|
||||
var/obj/machinery/requests_console/console
|
||||
var/force_depart = FALSE
|
||||
var/perma_docked = FALSE //highlander with RESPAWN??? OH GOD!!!
|
||||
|
||||
/obj/docking_port/mobile/arrivals/Initialize(mapload)
|
||||
if(SSshuttle.arrivals)
|
||||
WARNING("More than one arrivals docking_port placed on map!")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
SSshuttle.arrivals = src
|
||||
|
||||
. = ..()
|
||||
|
||||
preferred_direction = dir
|
||||
return INITIALIZE_HINT_LATELOAD //for latejoin list
|
||||
|
||||
/obj/docking_port/mobile/arrivals/LateInitialize()
|
||||
areas = list()
|
||||
|
||||
var/list/new_latejoin = list()
|
||||
for(var/area/shuttle/arrival/A in GLOB.sortedAreas)
|
||||
for(var/obj/structure/chair/C in A)
|
||||
new_latejoin += C
|
||||
if(!console)
|
||||
console = locate(/obj/machinery/requests_console) in A
|
||||
areas += A
|
||||
|
||||
if(SSjob.latejoin_trackers.len)
|
||||
WARNING("Map contains predefined latejoin spawn points and an arrivals shuttle. Using the arrivals shuttle.")
|
||||
|
||||
if(!new_latejoin.len)
|
||||
WARNING("Arrivals shuttle contains no chairs for spawn points. Reverting to latejoin landmarks.")
|
||||
WARNING("Map contains predefined latejoin spawn points and an arrivals shuttle. Using the arrivals shuttle.")
|
||||
|
||||
if(!new_latejoin.len)
|
||||
WARNING("Arrivals shuttle contains no chairs for spawn points. Reverting to latejoin landmarks.")
|
||||
if(!SSjob.latejoin_trackers.len)
|
||||
WARNING("No latejoin landmarks exist. Players will spawn unbuckled on the shuttle.")
|
||||
return
|
||||
|
||||
WARNING("No latejoin landmarks exist. Players will spawn unbuckled on the shuttle.")
|
||||
return
|
||||
|
||||
SSjob.latejoin_trackers = new_latejoin
|
||||
|
||||
/obj/docking_port/mobile/arrivals/dockRoundstart()
|
||||
SSshuttle.generate_transit_dock(src)
|
||||
Launch()
|
||||
timer = world.time
|
||||
check()
|
||||
return TRUE
|
||||
|
||||
/obj/docking_port/mobile/arrivals/check()
|
||||
. = ..()
|
||||
|
||||
if(perma_docked)
|
||||
if(mode != SHUTTLE_CALL)
|
||||
sound_played = FALSE
|
||||
mode = SHUTTLE_IDLE
|
||||
else
|
||||
SendToStation()
|
||||
return
|
||||
|
||||
if(damaged)
|
||||
if(!CheckTurfsPressure())
|
||||
damaged = FALSE
|
||||
if(console)
|
||||
console.say("Repairs complete, launching soon.")
|
||||
return
|
||||
|
||||
//If this proc is high on the profiler add a cooldown to the stuff after this line
|
||||
|
||||
else if(CheckTurfsPressure())
|
||||
damaged = TRUE
|
||||
if(console)
|
||||
console.say("Alert, hull breach detected!")
|
||||
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
|
||||
announcer.announce("ARRIVALS_BROKEN", channels = list())
|
||||
if(mode != SHUTTLE_CALL)
|
||||
sound_played = FALSE
|
||||
mode = SHUTTLE_IDLE
|
||||
else
|
||||
SendToStation()
|
||||
return
|
||||
|
||||
|
||||
/obj/docking_port/mobile/arrivals/dockRoundstart()
|
||||
SSshuttle.generate_transit_dock(src)
|
||||
Launch()
|
||||
timer = world.time
|
||||
check()
|
||||
return TRUE
|
||||
|
||||
/obj/docking_port/mobile/arrivals/check()
|
||||
. = ..()
|
||||
|
||||
if(perma_docked)
|
||||
if(mode != SHUTTLE_CALL)
|
||||
sound_played = FALSE
|
||||
mode = SHUTTLE_IDLE
|
||||
else
|
||||
SendToStation()
|
||||
return
|
||||
|
||||
if(damaged)
|
||||
if(!CheckTurfsPressure())
|
||||
damaged = FALSE
|
||||
if(console)
|
||||
console.say("Repairs complete, launching soon.")
|
||||
return
|
||||
|
||||
//If this proc is high on the profiler add a cooldown to the stuff after this line
|
||||
|
||||
else if(CheckTurfsPressure())
|
||||
damaged = TRUE
|
||||
if(console)
|
||||
console.say("Alert, hull breach detected!")
|
||||
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
|
||||
announcer.announce("ARRIVALS_BROKEN", channels = list())
|
||||
if(mode != SHUTTLE_CALL)
|
||||
sound_played = FALSE
|
||||
mode = SHUTTLE_IDLE
|
||||
else
|
||||
SendToStation()
|
||||
return
|
||||
|
||||
var/found_awake = PersonCheck() || NukeDiskCheck()
|
||||
if(mode == SHUTTLE_CALL)
|
||||
if(found_awake)
|
||||
SendToStation()
|
||||
else if(mode == SHUTTLE_IGNITING)
|
||||
if(found_awake && !force_depart)
|
||||
mode = SHUTTLE_IDLE
|
||||
sound_played = FALSE
|
||||
else if(!sound_played)
|
||||
hyperspace_sound(HYPERSPACE_WARMUP, areas)
|
||||
sound_played = TRUE
|
||||
else if(!found_awake)
|
||||
Launch(FALSE)
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/CheckTurfsPressure()
|
||||
if(mode == SHUTTLE_CALL)
|
||||
if(found_awake)
|
||||
SendToStation()
|
||||
else if(mode == SHUTTLE_IGNITING)
|
||||
if(found_awake && !force_depart)
|
||||
mode = SHUTTLE_IDLE
|
||||
sound_played = FALSE
|
||||
else if(!sound_played)
|
||||
hyperspace_sound(HYPERSPACE_WARMUP, areas)
|
||||
sound_played = TRUE
|
||||
else if(!found_awake)
|
||||
Launch(FALSE)
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/CheckTurfsPressure()
|
||||
for(var/I in SSjob.latejoin_trackers)
|
||||
var/turf/open/T = get_turf(I)
|
||||
var/pressure = T.air.return_pressure()
|
||||
if(pressure < HAZARD_LOW_PRESSURE || pressure > HAZARD_HIGH_PRESSURE) //simple safety check
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/PersonCheck()
|
||||
for(var/M in (GLOB.living_mob_list & GLOB.player_list))
|
||||
var/mob/living/L = M
|
||||
if((get_area(M) in areas) && L.stat != DEAD)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
var/turf/open/T = get_turf(I)
|
||||
var/pressure = T.air.return_pressure()
|
||||
if(pressure < HAZARD_LOW_PRESSURE || pressure > HAZARD_HIGH_PRESSURE) //simple safety check
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/PersonCheck()
|
||||
for(var/M in (GLOB.living_mob_list & GLOB.player_list))
|
||||
var/mob/living/L = M
|
||||
if((get_area(M) in areas) && L.stat != DEAD)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/NukeDiskCheck()
|
||||
for (var/obj/item/weapon/disk/nuclear/N in GLOB.poi_list)
|
||||
if (get_area(N) in areas)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/SendToStation()
|
||||
var/dockTime = config.arrivals_shuttle_dock_window
|
||||
if(mode == SHUTTLE_CALL && timeLeft(1) > dockTime)
|
||||
if(console)
|
||||
console.say(damaged ? "Initiating emergency docking for repairs!" : "Now approaching: [station_name()].")
|
||||
hyperspace_sound(HYPERSPACE_LAUNCH, areas) //for the new guy
|
||||
setTimer(dockTime)
|
||||
|
||||
/obj/docking_port/mobile/arrivals/dock(obj/docking_port/stationary/S1, force=FALSE)
|
||||
var/docked = S1 == assigned_transit
|
||||
sound_played = FALSE
|
||||
if(docked) //about to launch
|
||||
/obj/docking_port/mobile/arrivals/proc/SendToStation()
|
||||
var/dockTime = config.arrivals_shuttle_dock_window
|
||||
if(mode == SHUTTLE_CALL && timeLeft(1) > dockTime)
|
||||
if(console)
|
||||
console.say(damaged ? "Initiating emergency docking for repairs!" : "Now approaching: [station_name()].")
|
||||
hyperspace_sound(HYPERSPACE_LAUNCH, areas) //for the new guy
|
||||
setTimer(dockTime)
|
||||
|
||||
/obj/docking_port/mobile/arrivals/dock(obj/docking_port/stationary/S1, force=FALSE)
|
||||
var/docked = S1 == assigned_transit
|
||||
sound_played = FALSE
|
||||
if(docked) //about to launch
|
||||
if(!force_depart)
|
||||
var/cancel_reason
|
||||
if(PersonCheck())
|
||||
@@ -157,53 +152,53 @@
|
||||
if(console)
|
||||
console.say("Launch cancelled, [cancel_reason].")
|
||||
return
|
||||
force_depart = FALSE
|
||||
. = ..()
|
||||
if(!. && !docked && !damaged)
|
||||
force_depart = FALSE
|
||||
. = ..()
|
||||
if(!. && !docked && !damaged)
|
||||
if(console)
|
||||
console.say("Welcome to your new life, employees!")
|
||||
for(var/L in queued_announces)
|
||||
var/datum/callback/C = L
|
||||
C.Invoke()
|
||||
LAZYCLEARLIST(queued_announces)
|
||||
|
||||
/obj/docking_port/mobile/arrivals/check_effects()
|
||||
..()
|
||||
if(mode == SHUTTLE_CALL && !sound_played && timeLeft(1) <= HYPERSPACE_END_TIME)
|
||||
sound_played = TRUE
|
||||
hyperspace_sound(HYPERSPACE_END, areas)
|
||||
|
||||
/obj/docking_port/mobile/arrivals/canDock(obj/docking_port/stationary/S)
|
||||
. = ..()
|
||||
if(. == SHUTTLE_ALREADY_DOCKED)
|
||||
. = SHUTTLE_CAN_DOCK
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/Launch(pickingup)
|
||||
if(pickingup)
|
||||
force_depart = TRUE
|
||||
if(mode == SHUTTLE_IDLE)
|
||||
if(console)
|
||||
console.say(pickingup ? "Departing immediately for new employee pickup." : "Shuttle departing.")
|
||||
request(SSshuttle.getDock("arrivals_stationary")) //we will intentionally never return SHUTTLE_ALREADY_DOCKED
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/RequireUndocked(mob/user)
|
||||
if(mode == SHUTTLE_CALL || damaged)
|
||||
return
|
||||
|
||||
Launch(TRUE)
|
||||
|
||||
for(var/L in queued_announces)
|
||||
var/datum/callback/C = L
|
||||
C.Invoke()
|
||||
LAZYCLEARLIST(queued_announces)
|
||||
|
||||
/obj/docking_port/mobile/arrivals/check_effects()
|
||||
..()
|
||||
if(mode == SHUTTLE_CALL && !sound_played && timeLeft(1) <= HYPERSPACE_END_TIME)
|
||||
sound_played = TRUE
|
||||
hyperspace_sound(HYPERSPACE_END, areas)
|
||||
|
||||
/obj/docking_port/mobile/arrivals/canDock(obj/docking_port/stationary/S)
|
||||
. = ..()
|
||||
if(. == SHUTTLE_ALREADY_DOCKED)
|
||||
. = SHUTTLE_CAN_DOCK
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/Launch(pickingup)
|
||||
if(pickingup)
|
||||
force_depart = TRUE
|
||||
if(mode == SHUTTLE_IDLE)
|
||||
if(console)
|
||||
console.say(pickingup ? "Departing immediately for new employee pickup." : "Shuttle departing.")
|
||||
request(SSshuttle.getDock("arrivals_stationary")) //we will intentionally never return SHUTTLE_ALREADY_DOCKED
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/RequireUndocked(mob/user)
|
||||
if(mode == SHUTTLE_CALL || damaged)
|
||||
return
|
||||
|
||||
Launch(TRUE)
|
||||
|
||||
to_chat(user, "<span class='notice'>Calling your shuttle. One moment...</span>")
|
||||
while(mode != SHUTTLE_CALL && !damaged)
|
||||
stoplag()
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/QueueAnnounce(mob, rank)
|
||||
if(mode != SHUTTLE_CALL)
|
||||
AnnounceArrival(mob, rank)
|
||||
else
|
||||
LAZYADD(queued_announces, CALLBACK(GLOBAL_PROC, .proc/AnnounceArrival, mob, rank))
|
||||
|
||||
/obj/docking_port/mobile/arrivals/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("perma_docked")
|
||||
while(mode != SHUTTLE_CALL && !damaged)
|
||||
stoplag()
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/QueueAnnounce(mob, rank)
|
||||
if(mode != SHUTTLE_CALL)
|
||||
AnnounceArrival(mob, rank)
|
||||
else
|
||||
LAZYADD(queued_announces, CALLBACK(GLOBAL_PROC, .proc/AnnounceArrival, mob, rank))
|
||||
|
||||
/obj/docking_port/mobile/arrivals/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("perma_docked")
|
||||
SSblackbox.add_details("admin_secrets_fun_used","ShA[var_value ? "s" : "g"]")
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/docking_port/mobile/assault_pod/dock(obj/docking_port/stationary/S1)
|
||||
..()
|
||||
if(!istype(S1, /obj/docking_port/stationary/transit))
|
||||
playsound(get_turf(src.loc), 'sound/effects/Explosion1.ogg',50,1)
|
||||
playsound(get_turf(src.loc), 'sound/effects/explosion1.ogg',50,1)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
/obj/machinery/computer/shuttle
|
||||
name = "Shuttle Console"
|
||||
icon_screen = "shuttle"
|
||||
icon_keyboard = "tech_key"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
req_access = list( )
|
||||
circuit = /obj/item/weapon/circuitboard/computer/shuttle
|
||||
var/shuttleId
|
||||
var/possible_destinations = ""
|
||||
var/admin_controlled
|
||||
var/no_destination_swap = 0
|
||||
|
||||
/obj/machinery/computer/shuttle
|
||||
name = "Shuttle Console"
|
||||
icon_screen = "shuttle"
|
||||
icon_keyboard = "tech_key"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
req_access = list( )
|
||||
circuit = /obj/item/weapon/circuitboard/computer/shuttle
|
||||
var/shuttleId
|
||||
var/possible_destinations = ""
|
||||
var/admin_controlled
|
||||
var/no_destination_swap = 0
|
||||
|
||||
/obj/machinery/computer/shuttle/Initialize(mapload, obj/item/weapon/circuitboard/computer/shuttle/C)
|
||||
. = ..()
|
||||
if(istype(C))
|
||||
possible_destinations = C.possible_destinations
|
||||
shuttleId = C.shuttleId
|
||||
|
||||
/obj/machinery/computer/shuttle/attack_hand(mob/user)
|
||||
if(..(user))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
var/list/options = params2list(possible_destinations)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
var/dat = "Status: [M ? M.getStatusText() : "*Missing*"]<br><br>"
|
||||
if(M)
|
||||
var/destination_found
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!options.Find(S.id))
|
||||
continue
|
||||
if(!M.check_dock(S))
|
||||
continue
|
||||
destination_found = 1
|
||||
dat += "<A href='?src=\ref[src];move=[S.id]'>Send to [S.name]</A><br>"
|
||||
if(!destination_found)
|
||||
dat += "<B>Shuttle Locked</B><br>"
|
||||
if(admin_controlled)
|
||||
dat += "Authorized personnel only<br>"
|
||||
dat += "<A href='?src=\ref[src];request=1]'>Request Authorization</A><br>"
|
||||
dat += "<a href='?src=\ref[user];mach_close=computer'>Close</a>"
|
||||
|
||||
var/datum/browser/popup = new(user, "computer", M ? M.name : "shuttle", 300, 200)
|
||||
popup.set_content("<center>[dat]</center>")
|
||||
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='danger'>Access denied.</span>")
|
||||
return
|
||||
|
||||
if(href_list["move"])
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
if(M.launch_status == ENDGAME_LAUNCHED)
|
||||
to_chat(usr, "<span class='warning'>You've already escaped. Never going back to that place again!</span>")
|
||||
return
|
||||
if(no_destination_swap)
|
||||
if(M.mode != SHUTTLE_IDLE)
|
||||
to_chat(usr, "<span class='warning'>Shuttle already in transit.</span>")
|
||||
return
|
||||
switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1))
|
||||
if(0)
|
||||
say("Shuttle departing. Please stand away from the doors.")
|
||||
if(1)
|
||||
to_chat(usr, "<span class='warning'>Invalid shuttle requested.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>Unable to comply.</span>")
|
||||
|
||||
/obj/machinery/computer/shuttle/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
src.req_access = list()
|
||||
emagged = 1
|
||||
to_chat(user, "<span class='notice'>You fried the consoles ID checking system.</span>")
|
||||
|
||||
if(istype(C))
|
||||
possible_destinations = C.possible_destinations
|
||||
shuttleId = C.shuttleId
|
||||
|
||||
/obj/machinery/computer/shuttle/attack_hand(mob/user)
|
||||
if(..(user))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
var/list/options = params2list(possible_destinations)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
var/dat = "Status: [M ? M.getStatusText() : "*Missing*"]<br><br>"
|
||||
if(M)
|
||||
var/destination_found
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!options.Find(S.id))
|
||||
continue
|
||||
if(!M.check_dock(S))
|
||||
continue
|
||||
destination_found = 1
|
||||
dat += "<A href='?src=\ref[src];move=[S.id]'>Send to [S.name]</A><br>"
|
||||
if(!destination_found)
|
||||
dat += "<B>Shuttle Locked</B><br>"
|
||||
if(admin_controlled)
|
||||
dat += "Authorized personnel only<br>"
|
||||
dat += "<A href='?src=\ref[src];request=1]'>Request Authorization</A><br>"
|
||||
dat += "<a href='?src=\ref[user];mach_close=computer'>Close</a>"
|
||||
|
||||
var/datum/browser/popup = new(user, "computer", M ? M.name : "shuttle", 300, 200)
|
||||
popup.set_content("<center>[dat]</center>")
|
||||
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='danger'>Access denied.</span>")
|
||||
return
|
||||
|
||||
if(href_list["move"])
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
if(M.launch_status == ENDGAME_LAUNCHED)
|
||||
to_chat(usr, "<span class='warning'>You've already escaped. Never going back to that place again!</span>")
|
||||
return
|
||||
if(no_destination_swap)
|
||||
if(M.mode != SHUTTLE_IDLE)
|
||||
to_chat(usr, "<span class='warning'>Shuttle already in transit.</span>")
|
||||
return
|
||||
switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1))
|
||||
if(0)
|
||||
say("Shuttle departing. Please stand away from the doors.")
|
||||
if(1)
|
||||
to_chat(usr, "<span class='warning'>Invalid shuttle requested.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>Unable to comply.</span>")
|
||||
|
||||
/obj/machinery/computer/shuttle/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
src.req_access = list()
|
||||
emagged = 1
|
||||
to_chat(user, "<span class='notice'>You fried the consoles ID checking system.</span>")
|
||||
|
||||
|
||||
@@ -230,14 +230,14 @@
|
||||
else
|
||||
SSshuttle.emergencyLastCallLoc = null
|
||||
|
||||
priority_announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]", null, 'sound/AI/shuttlecalled.ogg', "Priority")
|
||||
priority_announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]", null, 'sound/ai/shuttlecalled.ogg', "Priority")
|
||||
|
||||
/obj/docking_port/mobile/emergency/cancel(area/signalOrigin)
|
||||
if(mode != SHUTTLE_CALL)
|
||||
return
|
||||
if(SSshuttle.emergencyNoRecall)
|
||||
return
|
||||
|
||||
|
||||
invertTimer()
|
||||
mode = SHUTTLE_RECALL
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
SSshuttle.emergencyLastCallLoc = signalOrigin
|
||||
else
|
||||
SSshuttle.emergencyLastCallLoc = null
|
||||
priority_announce("The emergency shuttle has been recalled.[SSshuttle.emergencyLastCallLoc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
|
||||
priority_announce("The emergency shuttle has been recalled.[SSshuttle.emergencyLastCallLoc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]", null, 'sound/ai/shuttlerecalled.ogg', "Priority")
|
||||
|
||||
/obj/docking_port/mobile/emergency/proc/is_hijacked()
|
||||
var/has_people = FALSE
|
||||
@@ -296,7 +296,7 @@
|
||||
mode = SHUTTLE_DOCKED
|
||||
setTimer(SSshuttle.emergencyDockTime)
|
||||
send2irc("Server", "The Emergency Shuttle has docked with the station.")
|
||||
priority_announce("The Emergency Shuttle has docked with the station. You have [timeLeft(600)] minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
|
||||
priority_announce("The Emergency Shuttle has docked with the station. You have [timeLeft(600)] minutes to board the Emergency Shuttle.", null, 'sound/ai/shuttledock.ogg', "Priority")
|
||||
if(SSdbcore.Connect())
|
||||
var/datum/DBQuery/query_round_shuttle_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET shuttle_name = '[name]' WHERE id = [GLOB.round_id]")
|
||||
query_round_shuttle_name.Execute()
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
diff a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm (rejected hunks)
|
||||
@@ -383,12 +381,7 @@
|
||||
//move each escape pod to its corresponding escape dock
|
||||
for(var/A in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = A
|
||||
- if(M.launch_status == ENDGAME_LAUNCHED)
|
||||
- if(istype(M, /obj/docking_port/mobile/pod))
|
||||
- M.dock(SSshuttle.getDock("[M.id]_away")) //Escape pods dock at centcomm
|
||||
- else
|
||||
- M.launch_status = ENDGAME_TRANSIT
|
||||
- //Mapping a new docking point for each ship mappers could potentially want docking with centcomm would take up lots of space, just let them keep flying off into the sunset for their greentext
|
||||
+ M.on_emergency_dock()
|
||||
|
||||
// now move the actual emergency shuttle to centcomm
|
||||
// unless the shuttle is "hijacked"
|
||||
@@ -52,7 +52,7 @@
|
||||
if(!.)
|
||||
return
|
||||
if(!buckled && knockdown)
|
||||
Weaken(3)
|
||||
Knockdown(60)
|
||||
|
||||
/obj/effect/abstract/proximity_checker/onShuttleMove()
|
||||
//timer so it only happens once
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
// Existing sleepers
|
||||
for(var/i in found)
|
||||
var/mob/living/L = i
|
||||
L.SetSleeping(10)
|
||||
L.SetSleeping(200)
|
||||
|
||||
// Missing sleepers
|
||||
for(var/i in sleepers - found)
|
||||
@@ -192,7 +192,7 @@
|
||||
// No climbing on the bar please
|
||||
var/mob/living/M = AM
|
||||
var/throwtarget = get_edge_target_turf(src, boot_dir)
|
||||
M.Weaken(2)
|
||||
M.Knockdown(40)
|
||||
M.throw_at(throwtarget, 5, 1,src)
|
||||
to_chat(M, "<span class='notice'>No climbing on the bar please.</span>")
|
||||
else
|
||||
|
||||
@@ -9,7 +9,6 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
|
||||
/obj/singularity,
|
||||
/obj/machinery/teleport/station,
|
||||
/obj/machinery/teleport/hub,
|
||||
/obj/machinery/telepad,
|
||||
/obj/machinery/quantumpad,
|
||||
/obj/machinery/clonepod,
|
||||
/obj/effect/mob_spawn,
|
||||
|
||||
@@ -1,60 +1,60 @@
|
||||
#define SYNDICATE_CHALLENGE_TIMER 12000 //20 minutes
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate
|
||||
name = "syndicate shuttle terminal"
|
||||
circuit = /obj/item/weapon/circuitboard/computer/syndicate_shuttle
|
||||
icon_screen = "syndishuttle"
|
||||
icon_keyboard = "syndie_key"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
req_access = list(GLOB.access_syndicate)
|
||||
shuttleId = "syndicate"
|
||||
possible_destinations = "syndicate_away;syndicate_z5;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s"
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/recall
|
||||
name = "syndicate shuttle recall terminal"
|
||||
possible_destinations = "syndicate_away"
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
var/obj/item/weapon/circuitboard/computer/syndicate_shuttle/board = circuit
|
||||
if(board.challenge && world.time < SYNDICATE_CHALLENGE_TIMER)
|
||||
to_chat(usr, "<span class='warning'>You've issued a combat challenge to the station! You've got to give them at least [round(((SYNDICATE_CHALLENGE_TIMER - world.time) / 10) / 60)] more minutes to allow them to prepare.</span>")
|
||||
return 0
|
||||
board.moved = TRUE
|
||||
..()
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/syndicate_shuttle
|
||||
name = "Syndicate Shuttle (Computer Board)"
|
||||
build_path = /obj/machinery/computer/shuttle/syndicate
|
||||
var/challenge = FALSE
|
||||
var/moved = FALSE
|
||||
|
||||
#define SYNDICATE_CHALLENGE_TIMER 12000 //20 minutes
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate
|
||||
name = "syndicate shuttle terminal"
|
||||
circuit = /obj/item/weapon/circuitboard/computer/syndicate_shuttle
|
||||
icon_screen = "syndishuttle"
|
||||
icon_keyboard = "syndie_key"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
req_access = list(GLOB.access_syndicate)
|
||||
shuttleId = "syndicate"
|
||||
possible_destinations = "syndicate_away;syndicate_z5;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s"
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/recall
|
||||
name = "syndicate shuttle recall terminal"
|
||||
possible_destinations = "syndicate_away"
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
var/obj/item/weapon/circuitboard/computer/syndicate_shuttle/board = circuit
|
||||
if(board.challenge && world.time < SYNDICATE_CHALLENGE_TIMER)
|
||||
to_chat(usr, "<span class='warning'>You've issued a combat challenge to the station! You've got to give them at least [round(((SYNDICATE_CHALLENGE_TIMER - world.time) / 10) / 60)] more minutes to allow them to prepare.</span>")
|
||||
return 0
|
||||
board.moved = TRUE
|
||||
..()
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/syndicate_shuttle
|
||||
name = "Syndicate Shuttle (Computer Board)"
|
||||
build_path = /obj/machinery/computer/shuttle/syndicate
|
||||
var/challenge = FALSE
|
||||
var/moved = FALSE
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/syndicate_shuttle/Initialize()
|
||||
. = ..()
|
||||
GLOB.syndicate_shuttle_boards += src
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/syndicate_shuttle/Destroy()
|
||||
GLOB.syndicate_shuttle_boards -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod
|
||||
name = "syndicate assault pod control"
|
||||
icon = 'icons/obj/terminals.dmi'
|
||||
icon_state = "dorm_available"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
req_access = list(GLOB.access_syndicate)
|
||||
shuttleId = "steel_rain"
|
||||
possible_destinations = null
|
||||
clockwork = TRUE //it'd look weird
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
if(z != ZLEVEL_CENTCOM)
|
||||
to_chat(usr, "<span class='warning'>Pods are one way!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
|
||||
GLOB.syndicate_shuttle_boards += src
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/syndicate_shuttle/Destroy()
|
||||
GLOB.syndicate_shuttle_boards -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod
|
||||
name = "syndicate assault pod control"
|
||||
icon = 'icons/obj/terminals.dmi'
|
||||
icon_state = "dorm_available"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
req_access = list(GLOB.access_syndicate)
|
||||
shuttleId = "steel_rain"
|
||||
possible_destinations = null
|
||||
clockwork = TRUE //it'd look weird
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
if(z != ZLEVEL_CENTCOM)
|
||||
to_chat(usr, "<span class='warning'>Pods are one way!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
|
||||
#undef SYNDICATE_CHALLENGE_TIMER
|
||||
Reference in New Issue
Block a user