mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 23:48:28 +01:00
Merge remote-tracking branch 'upstream/master' into spawn-removal
This commit is contained in:
@@ -150,11 +150,6 @@
|
||||
|
||||
emergency_shuttle_called.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." : "" ]")
|
||||
|
||||
if(reason == "Automatic Crew Transfer" && signalOrigin == null) // Best way we have to check that it's actually a crew transfer and not just a player using the same message- any other calls to this proc should have a signalOrigin.
|
||||
GLOB.atc.shift_ending()
|
||||
else // Emergency shuttle call (probably)
|
||||
GLOB.atc.reroute_traffic(yes = TRUE)
|
||||
|
||||
|
||||
/obj/docking_port/mobile/emergency/cancel(area/signalOrigin)
|
||||
if(!canRecall)
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
flags = NODECONSTRUCT
|
||||
|
||||
/obj/machinery/computer/shuttle/ert/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
/obj/machinery/computer/shuttle/ert/can_call_shuttle(mob/user, action)
|
||||
if(action == "move")
|
||||
var/authorized_roles = list(SPECIAL_ROLE_ERT, SPECIAL_ROLE_DEATHSQUAD)
|
||||
if(!((usr.mind?.assigned_role in authorized_roles) || is_admin(usr)))
|
||||
message_admins("Potential ERT shuttle hijack, ERT shuttle moved by unauthorized user: [key_name_admin(usr)]")
|
||||
..()
|
||||
|
||||
if(!((user.mind?.assigned_role in authorized_roles) || is_admin(user)))
|
||||
message_admins("Potential ERT shuttle hijack, ERT shuttle moved by unauthorized user: [key_name_admin(user)]")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/ert
|
||||
name = "specops navigation computer"
|
||||
|
||||
@@ -727,13 +727,13 @@
|
||||
name = "Shuttle Console"
|
||||
icon_screen = "shuttle"
|
||||
icon_keyboard = "tech_key"
|
||||
req_access = list( )
|
||||
req_access = list()
|
||||
circuit = /obj/item/circuitboard/shuttle
|
||||
var/shuttleId
|
||||
var/possible_destinations = ""
|
||||
var/admin_controlled
|
||||
var/max_connect_range = 7
|
||||
var/docking_request = 0
|
||||
var/moved = FALSE //workaround for nukie shuttle, hope I find a better way to do this...
|
||||
|
||||
/obj/machinery/computer/shuttle/New(location, obj/item/circuitboard/shuttle/C)
|
||||
..()
|
||||
@@ -773,21 +773,20 @@
|
||||
return
|
||||
connect()
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/computer/shuttle/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/machinery/computer/shuttle/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "shuttle_console.tmpl", M ? M.name : "shuttle", 300, 200)
|
||||
ui = new(user, src, ui_key, "ShuttleConsole", name, 350, 150, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/shuttle/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
|
||||
var/data[0]
|
||||
/obj/machinery/computer/shuttle/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
data["status"] = M ? M.getStatusText() : null
|
||||
if(M)
|
||||
data["shuttle"] = 1
|
||||
data["shuttle"] = TRUE //this should just be boolean, right?
|
||||
var/list/docking_ports = list()
|
||||
data["docking_ports"] = docking_ports
|
||||
var/list/options = params2list(possible_destinations)
|
||||
@@ -799,34 +798,35 @@
|
||||
docking_ports[++docking_ports.len] = list("name" = S.name, "id" = S.id)
|
||||
data["docking_ports_len"] = docking_ports.len
|
||||
data["admin_controlled"] = admin_controlled
|
||||
data["docking_request"] = docking_request
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/shuttle/tgui_act(action, params)
|
||||
if(..()) //we can't actually interact, so no action
|
||||
return TRUE
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='danger'>Access denied.</span>")
|
||||
return
|
||||
|
||||
return TRUE
|
||||
if(!can_call_shuttle(usr, action))
|
||||
return TRUE
|
||||
var/list/options = params2list(possible_destinations)
|
||||
if(href_list["move"])
|
||||
if(!options.Find(href_list["move"])) //I see you're trying Href exploits, I see you're failing, I SEE ADMIN WARNING.
|
||||
// Seriously, though, NEVER trust a Topic with something like this. Ever.
|
||||
// Sidenote for whoever did this last. Why did you set it to echo whatever the user entered to admin chat? You solved one exploit and created another.
|
||||
if(action == "move")
|
||||
var/destination = params["move"]
|
||||
if(!options.Find(destination))//figure out if this translation works
|
||||
message_admins("<span class='boldannounce'>EXPLOIT:</span> [ADMIN_LOOKUPFLW(usr)] attempted to move [src] to an invalid location! [ADMIN_COORDJMP(src)]")
|
||||
return
|
||||
switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1, usr))
|
||||
switch(SSshuttle.moveShuttle(shuttleId, destination, TRUE, usr))
|
||||
if(0)
|
||||
atom_say("Shuttle departing! Please stand away from the doors.")
|
||||
usr.create_log(MISC_LOG, "used [src] to call the [shuttleId] shuttle")
|
||||
if(!moved)
|
||||
moved = TRUE
|
||||
add_fingerprint(usr)
|
||||
return TRUE
|
||||
if(1)
|
||||
to_chat(usr, "<span class='warning'>Invalid shuttle requested.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>Unable to comply.</span>")
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
@@ -834,6 +834,10 @@
|
||||
emagged = 1
|
||||
to_chat(user, "<span class='notice'>You fried the consoles ID checking system.</span>")
|
||||
|
||||
//for restricting when the computer can be used, needed for some console subtypes.
|
||||
/obj/machinery/computer/shuttle/proc/can_call_shuttle(mob/user, action)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/shuttle/ferry
|
||||
name = "transport ferry console"
|
||||
circuit = /obj/item/circuitboard/ferry
|
||||
@@ -844,25 +848,23 @@
|
||||
/obj/machinery/computer/shuttle/ferry/request
|
||||
name = "ferry console"
|
||||
circuit = /obj/item/circuitboard/ferry/request
|
||||
var/cooldown //prevents spamming admins
|
||||
var/next_request //to prevent spamming admins
|
||||
possible_destinations = "ferry_home"
|
||||
admin_controlled = 1
|
||||
admin_controlled = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/machinery/computer/shuttle/ferry/request/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["request"])
|
||||
if(cooldown)
|
||||
/obj/machinery/computer/shuttle/ferry/request/tgui_act(action, params)
|
||||
if(..()) // Note that the parent handels normal shuttle movement on top of security checks
|
||||
return
|
||||
if(action == "request")
|
||||
if(world.time < next_request)
|
||||
return
|
||||
cooldown = 1
|
||||
next_request = world.time + 60 SECONDS //1 minute cooldown
|
||||
to_chat(usr, "<span class='notice'>Your request has been recieved by Centcom.</span>")
|
||||
log_admin("[key_name(usr)] requested to move the transport ferry to Centcom.")
|
||||
message_admins("<b>FERRY: <font color='blue'>[key_name_admin(usr)] (<A HREF='?_src_=holder;secretsfun=moveferry'>Move Ferry</a>)</b> is requesting to move the transport ferry to Centcom.</font>")
|
||||
. = 1
|
||||
SSnanoui.update_uis(src)
|
||||
spawn(600) //One minute cooldown
|
||||
cooldown = 0
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle/white_ship
|
||||
name = "White Ship Console"
|
||||
|
||||
@@ -11,20 +11,18 @@
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
flags = NODECONSTRUCT
|
||||
var/challenge = FALSE
|
||||
var/moved = FALSE
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/recall
|
||||
name = "syndicate shuttle recall terminal"
|
||||
circuit = /obj/item/circuitboard/shuttle/syndicate/recall
|
||||
possible_destinations = "syndicate_away"
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
/obj/machinery/computer/shuttle/syndicate/can_call_shuttle(user, action)
|
||||
if(action == "move")
|
||||
if(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
|
||||
moved = TRUE
|
||||
..()
|
||||
to_chat(user, "<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 FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod
|
||||
name = "syndicate assault pod control"
|
||||
@@ -35,11 +33,11 @@
|
||||
shuttleId = "steel_rain"
|
||||
possible_destinations = null
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod/can_call_shuttle(user, action)
|
||||
if(action == "move")
|
||||
if(z != level_name_to_num(CENTCOMM))
|
||||
to_chat(usr, "<span class='warning'>Pods are one way!</span>")
|
||||
return 0
|
||||
to_chat(user, "<span class='warning'>Pods are one way!</span>")
|
||||
return FALSE
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/shuttle/sst
|
||||
|
||||
Reference in New Issue
Block a user