Add shuttle stranding

This commit is contained in:
Markolie
2015-02-01 16:05:43 +01:00
parent 8fb90212b8
commit 2a1e9931a6
13 changed files with 72 additions and 36 deletions
+7 -4
View File
@@ -937,11 +937,14 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(confirm != "Yes") return
var/choice
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "confliction")
if(emergency_shuttle.auto_recall)
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice == "Confirm")
emergency_shuttle.auto_recall = 1 //enable auto-recall
else
if(choice != "Confirm")
return
if(emergency_shuttle.no_escape)
choice = input("The shuttle will not be able to leave if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice != "Confirm")
return
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
+1 -1
View File
@@ -337,7 +337,7 @@ var/list/ai_list = list()
/mob/living/silicon/ai/proc/ai_cancel_call()
set category = "AI Commands"
set category = "Malfunction"
if(src.stat == 2)
src << "You can't send the shuttle back because you are dead!"
return
@@ -5,7 +5,7 @@
icon_state = "samak"
icon_living = "samak"
icon_dead = "samak_dead"
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
icon = 'code/modules/jungle/jungle.dmi'
move_to_delay = 2
maxHealth = 125
health = 125
@@ -26,7 +26,7 @@
icon_state = "diyaab"
icon_living = "diyaab"
icon_dead = "diyaab_dead"
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
icon = 'code/modules/jungle/jungle.dmi'
move_to_delay = 1
maxHealth = 25
health = 25
@@ -47,7 +47,7 @@
icon_state = "shantak"
icon_living = "shantak"
icon_dead = "shantak_dead"
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
icon = 'code/modules/jungle/jungle.dmi'
move_to_delay = 1
maxHealth = 75
health = 75
@@ -66,7 +66,7 @@
icon_state = "yithian"
icon_living = "yithian"
icon_dead = "yithian_dead"
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
icon = 'code/modules/jungle/jungle.dmi'
/mob/living/simple_animal/tindalos
name = "tindalos"
@@ -74,4 +74,4 @@
icon_state = "tindalos"
icon_living = "tindalos"
icon_dead = "tindalos_dead"
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
icon = 'code/modules/jungle/jungle.dmi'
+9 -9
View File
@@ -73,29 +73,29 @@
src.add_fingerprint(usr)
if(href_list["move"])
launch()
launch(usr)
if(href_list["force"])
force_launch()
force_launch(usr)
else if(href_list["cancel"])
cancel_launch()
cancel_launch(usr)
/obj/machinery/computer/shuttle_control/proc/launch()
/obj/machinery/computer/shuttle_control/proc/launch(var/mob/user)
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
if (!istype(shuttle))
return
shuttle.launch(src)
shuttle.launch(user)
/obj/machinery/computer/shuttle_control/proc/force_launch()
/obj/machinery/computer/shuttle_control/proc/force_launch(var/mob/user)
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
if (!istype(shuttle))
return
shuttle.force_launch(src)
shuttle.force_launch(user)
/obj/machinery/computer/shuttle_control/proc/cancel_launch()
/obj/machinery/computer/shuttle_control/proc/cancel_launch(var/mob/user)
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
if (!istype(shuttle))
return
shuttle.cancel_launch(src)
shuttle.cancel_launch(user)
/obj/machinery/computer/shuttle_control/attackby(obj/item/weapon/W as obj, mob/user as mob)
+13 -4
View File
@@ -32,14 +32,17 @@
..(origin, destination)
/datum/shuttle/ferry/emergency/can_launch(var/user)
/datum/shuttle/ferry/emergency/can_launch(var/mob/user)
if (istype(user, /obj/machinery/computer/shuttle_control/emergency))
var/obj/machinery/computer/shuttle_control/emergency/C = user
if (!C.has_authorization())
return 0
if(moving_status == SHUTTLE_STRANDED && C.has_authorization())
return 1
return ..()
/datum/shuttle/ferry/emergency/can_force(var/user)
/datum/shuttle/ferry/emergency/can_force(var/mob/user)
if (istype(user, /obj/machinery/computer/shuttle_control/emergency))
var/obj/machinery/computer/shuttle_control/emergency/C = user
@@ -47,9 +50,10 @@
//this is so that people can force launch if the docking controller cannot safely undock without needing X heads to swipe.
if (process_state != WAIT_LAUNCH && !C.has_authorization())
return 0
return ..()
/datum/shuttle/ferry/emergency/can_cancel(var/user)
/datum/shuttle/ferry/emergency/can_cancel(var/mob/user)
if (istype(user, /obj/machinery/computer/shuttle_control/emergency))
var/obj/machinery/computer/shuttle_control/emergency/C = user
if (!C.has_authorization())
@@ -58,6 +62,10 @@
/datum/shuttle/ferry/emergency/launch(var/user)
if (!can_launch(user)) return
if(emergency_shuttle.no_escape)
user << "<span class='warning'>The emergency shuttle has been disabled by Centcom.</span>"
return
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
if (emergency_shuttle.autopilot)
@@ -164,6 +172,7 @@
if(SHUTTLE_IDLE) shuttle_state = "idle"
if(SHUTTLE_WARMUP) shuttle_state = "warmup"
if(SHUTTLE_INTRANSIT) shuttle_state = "in_transit"
if(SHUTTLE_STRANDED) shuttle_state = "idle"
var/shuttle_status
switch (shuttle.process_state)
@@ -175,7 +184,7 @@
else
shuttle_status = "Standing-by at Central Command."
if(WAIT_LAUNCH)
shuttle_status = "Shuttle has recieved command and will depart shortly."
shuttle_status = "Shuttle has received command and will depart shortly."
if(WAIT_ARRIVE)
shuttle_status = "Proceeding to destination."
if(WAIT_FINISH)
+1 -1
View File
@@ -145,7 +145,7 @@
return 1
/datum/shuttle/ferry/proc/can_force()
if (moving_status == SHUTTLE_IDLE && process_state == WAIT_LAUNCH)
if ((moving_status == SHUTTLE_IDLE) && process_state == WAIT_LAUNCH)
return 1
return 0