From 1b5ea90c8fc18f9f4b6ea811b56b65ce273fb383 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Thu, 18 Jun 2020 08:16:05 -0700 Subject: [PATCH] sigh --- code/game/atoms.dm | 8 +++++++ code/game/machinery/computer/camera.dm | 14 +++++++---- code/game/machinery/shuttle/shuttle_engine.dm | 24 +++++++++---------- .../circuitboards/computer_circuitboards.dm | 4 ++++ .../comp_board_designs_sec.dm | 8 +++++++ code/modules/shuttle/shuttle.dm | 7 ++++-- .../shuttle_creation/shuttle_upgrades.dm | 6 ++--- 7 files changed, 49 insertions(+), 22 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index edd657e6ce..e3f4829d3d 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -872,6 +872,14 @@ /atom/proc/GenerateTag() 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) return diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 2a166c2cdc..70a59230b2 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -35,11 +35,6 @@ M.unset_machine() //to properly reset the view of the users if the console is deleted. 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) if((!hasSiliconAccessInArea(user) && !Adjacent(user)) || is_blind(user) || !in_view_range(user, src)) return FALSE @@ -262,3 +257,12 @@ name = "AI upload monitor" desc = "A telescreen that connects to the AI upload's camera network." 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]" diff --git a/code/game/machinery/shuttle/shuttle_engine.dm b/code/game/machinery/shuttle/shuttle_engine.dm index bdc16c565b..1b2ce686d2 100644 --- a/code/game/machinery/shuttle/shuttle_engine.dm +++ b/code/game/machinery/shuttle/shuttle_engine.dm @@ -57,7 +57,16 @@ . = ..() check_setup() +/obj/machinery/shuttle/engine/Destroy() + attached_heater = FALSE + thruster_active = FALSE + return ..() + /obj/machinery/shuttle/engine/proc/check_setup() + if(!anchored) + attached_heater = null + update_engine() + return var/heater_turf switch(dir) if(NORTH) @@ -124,15 +133,6 @@ env.temperature += deltaTemperature air_update_turf() -/obj/machinery/shuttle/engine/attackby(obj/item/I, mob/living/user, params) - check_setup() - if(default_deconstruction_screwdriver(user, icon_state_open, icon_state_closed, I)) - 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 ..() +/obj/machinery/shuttle/engine/default_change_direction_wrench(mob/user, obj/item/I) + . = ..() + update_engine() diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index ae579054b1..f94c8f3513 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -14,6 +14,10 @@ name = "Security Cameras (Computer Board)" 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 name = "circuit board (Xenobiology Console)" build_path = /obj/machinery/computer/camera_advanced/xenobio diff --git a/code/modules/research/designs/comp_board_designs/comp_board_designs_sec.dm b/code/modules/research/designs/comp_board_designs/comp_board_designs_sec.dm index 0e93481f66..914e9ec225 100644 --- a/code/modules/research/designs/comp_board_designs/comp_board_designs_sec.dm +++ b/code/modules/research/designs/comp_board_designs/comp_board_designs_sec.dm @@ -10,6 +10,14 @@ category = list("Computer Boards") 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 name = "Computer Design (Security Records Console)" desc = "Allows for the construction of circuit boards used to build a security records console." diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 77fb37b65c..b782eccfcc 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -183,7 +183,7 @@ name = "dock[SSshuttle.stationary.len]" if(!area_type) 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) for(var/turf/T in return_turfs()) @@ -218,6 +218,9 @@ if(!roundstart_template) CRASH("Invalid path ([roundstart_template]) passed to docking port.") + if(roundstart_template) + SSshuttle.manipulator.action_load(roundstart_template, src) + //returns first-found touching shuttleport /obj/docking_port/stationary/get_docked() . = locate(/obj/docking_port/mobile) in loc @@ -704,7 +707,7 @@ if(timeleft > 1 HOURS) return "--:--" 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 return "00:00" diff --git a/code/modules/shuttle/shuttle_creation/shuttle_upgrades.dm b/code/modules/shuttle/shuttle_creation/shuttle_upgrades.dm index b014b7bbf8..6b67eec5b8 100644 --- a/code/modules/shuttle/shuttle_creation/shuttle_upgrades.dm +++ b/code/modules/shuttle/shuttle_creation/shuttle_upgrades.dm @@ -4,9 +4,9 @@ icon = 'icons/obj/module.dmi' icon_state = "shuttledisk" force = 0 - throwforce = 8 - throw_speed = 3 - throw_range = 5 + throwforce = 0 + throw_speed = 1 + throw_range = 7 density = FALSE anchored = FALSE item_flags = NOBLUDGEON