mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Add shuttle stranding
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user