This commit is contained in:
kevinz000
2020-06-18 08:16:05 -07:00
parent da704db97d
commit 1b5ea90c8f
7 changed files with 49 additions and 22 deletions

View File

@@ -872,6 +872,14 @@
/atom/proc/GenerateTag() /atom/proc/GenerateTag()
return return
/**
* Called after a shuttle is loaded **from map template initially**.
*
* @params
* * port - Mobile port/shuttle
* * dock - Stationary dock the shuttle's at
* * idnum - ID number of the shuttle
*/
/atom/proc/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE) /atom/proc/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
return return

View File

@@ -35,11 +35,6 @@
M.unset_machine() //to properly reset the view of the users if the console is deleted. M.unset_machine() //to properly reset the view of the users if the console is deleted.
return ..() return ..()
/obj/machinery/computer/security/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
for(var/i in network)
network -= i
network += "[idnum][i]"
/obj/machinery/computer/security/can_interact(mob/user) /obj/machinery/computer/security/can_interact(mob/user)
if((!hasSiliconAccessInArea(user) && !Adjacent(user)) || is_blind(user) || !in_view_range(user, src)) if((!hasSiliconAccessInArea(user) && !Adjacent(user)) || is_blind(user) || !in_view_range(user, src))
return FALSE return FALSE
@@ -262,3 +257,12 @@
name = "AI upload monitor" name = "AI upload monitor"
desc = "A telescreen that connects to the AI upload's camera network." desc = "A telescreen that connects to the AI upload's camera network."
network = list("aiupload") network = list("aiupload")
// Subtype that connects to shuttles.
/obj/machinery/computer/security/shuttle
circuit = /obj/item/circuitboard/computer/security/shuttle
/obj/machinery/computer/security/shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
for(var/i in network)
network -= i
network += "[idnum][i]"

View File

@@ -57,7 +57,16 @@
. = ..() . = ..()
check_setup() check_setup()
/obj/machinery/shuttle/engine/Destroy()
attached_heater = FALSE
thruster_active = FALSE
return ..()
/obj/machinery/shuttle/engine/proc/check_setup() /obj/machinery/shuttle/engine/proc/check_setup()
if(!anchored)
attached_heater = null
update_engine()
return
var/heater_turf var/heater_turf
switch(dir) switch(dir)
if(NORTH) if(NORTH)
@@ -124,15 +133,6 @@
env.temperature += deltaTemperature env.temperature += deltaTemperature
air_update_turf() air_update_turf()
/obj/machinery/shuttle/engine/attackby(obj/item/I, mob/living/user, params) /obj/machinery/shuttle/engine/default_change_direction_wrench(mob/user, obj/item/I)
check_setup() . = ..()
if(default_deconstruction_screwdriver(user, icon_state_open, icon_state_closed, I)) update_engine()
return
if(default_pry_open(I))
return
if(panel_open)
if(default_change_direction_wrench(user, I))
return
if(default_deconstruction_crowbar(I))
return
return ..()

View File

@@ -14,6 +14,10 @@
name = "Security Cameras (Computer Board)" name = "Security Cameras (Computer Board)"
build_path = /obj/machinery/computer/security build_path = /obj/machinery/computer/security
/obj/item/circuitboard/computer/security/shuttle
name = "Shuttlelinking Security Cameras (Computer Board)"
build_path = /obj/machinery/computer/security/shuttle
/obj/item/circuitboard/computer/xenobiology /obj/item/circuitboard/computer/xenobiology
name = "circuit board (Xenobiology Console)" name = "circuit board (Xenobiology Console)"
build_path = /obj/machinery/computer/camera_advanced/xenobio build_path = /obj/machinery/computer/camera_advanced/xenobio

View File

@@ -10,6 +10,14 @@
category = list("Computer Boards") category = list("Computer Boards")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY departmental_flags = DEPARTMENTAL_FLAG_SECURITY
/datum/design/board/shuttleseccamera
name = "Computer Design (Shuttle-Linked Security Camera)"
desc = "Same as a regular security camera console, but when linked to a shuttle, will specifically access cameras on that shuttle."
id = "shuttleseccamera"
build_path = /obj/item/circuitboard/computer/security/shuttle
category = list("Computer Boards")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
/datum/design/board/secdata /datum/design/board/secdata
name = "Computer Design (Security Records Console)" name = "Computer Design (Security Records Console)"
desc = "Allows for the construction of circuit boards used to build a security records console." desc = "Allows for the construction of circuit boards used to build a security records console."

View File

@@ -183,7 +183,7 @@
name = "dock[SSshuttle.stationary.len]" name = "dock[SSshuttle.stationary.len]"
if(!area_type) if(!area_type)
var/area/place = get_area(src) var/area/place = get_area(src)
area_type = place?.type // We might be created in nullspace area_type = place?.type || SHUTTLE_DEFAULT_UNDERLYING_AREA // We might be created in nullspace
if(mapload) if(mapload)
for(var/turf/T in return_turfs()) for(var/turf/T in return_turfs())
@@ -218,6 +218,9 @@
if(!roundstart_template) if(!roundstart_template)
CRASH("Invalid path ([roundstart_template]) passed to docking port.") CRASH("Invalid path ([roundstart_template]) passed to docking port.")
if(roundstart_template)
SSshuttle.manipulator.action_load(roundstart_template, src)
//returns first-found touching shuttleport //returns first-found touching shuttleport
/obj/docking_port/stationary/get_docked() /obj/docking_port/stationary/get_docked()
. = locate(/obj/docking_port/mobile) in loc . = locate(/obj/docking_port/mobile) in loc
@@ -704,7 +707,7 @@
if(timeleft > 1 HOURS) if(timeleft > 1 HOURS)
return "--:--" return "--:--"
else if(timeleft > 0) else if(timeleft > 0)
return "[add_leading(num2text((timeleft / 60) % 60), 2, "0")]:[add_leading(num2text(timeleft % 60), 2, " ")]" return "[add_leading(num2text((timeleft / 60) % 60), 2, "0")]:[add_leading(num2text(timeleft % 60), 2, "0")]"
else else
return "00:00" return "00:00"

View File

@@ -4,9 +4,9 @@
icon = 'icons/obj/module.dmi' icon = 'icons/obj/module.dmi'
icon_state = "shuttledisk" icon_state = "shuttledisk"
force = 0 force = 0
throwforce = 8 throwforce = 0
throw_speed = 3 throw_speed = 1
throw_range = 5 throw_range = 7
density = FALSE density = FALSE
anchored = FALSE anchored = FALSE
item_flags = NOBLUDGEON item_flags = NOBLUDGEON