From 0f36175cbcdab1be582ad40340291f9d8d650b85 Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Fri, 30 Jun 2023 10:48:14 +0300 Subject: [PATCH] Dropship Sentry Camera (#3737) # About the pull request Adds cameras to dropship deployable sentries. Only work when deployed. # Explain why it's good for the game A bit more awareness for the most boring role in the game won't hurt. Also, it was a feature a few years ago, I still don't understand why it was removed, maybe just got dropped during refactoring or something. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: ihatethisengine add: Added cameras to dropship deployable sentries. /:cl: --- code/modules/cm_marines/dropship_equipment.dm | 13 ++++++++++++- code/modules/defenses/sentry.dm | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/code/modules/cm_marines/dropship_equipment.dm b/code/modules/cm_marines/dropship_equipment.dm index 42bbd7f746e7..89d33134bdb8 100644 --- a/code/modules/cm_marines/dropship_equipment.dm +++ b/code/modules/cm_marines/dropship_equipment.dm @@ -256,6 +256,13 @@ deployed_turret.start_processing() deployed_turret.set_range() + deployed_turret.linked_cam = new(deployed_turret.loc, "[capitalize_first_letters(ship_base.name)] [capitalize_first_letters(name)]") + if (linked_shuttle.id == DROPSHIP_ALAMO) + deployed_turret.linked_cam.network = list(CAMERA_NET_ALAMO) + else if (linked_shuttle.id == DROPSHIP_NORMANDY) + deployed_turret.linked_cam.network = list(CAMERA_NET_NORMANDY) + + /obj/structure/dropship_equipment/sentry_holder/proc/undeploy_sentry() if(!deployed_turret) return @@ -267,8 +274,12 @@ deployed_turret.stop_processing() deployed_turret.unset_range() icon_state = "sentry_system_installed" + QDEL_NULL(deployed_turret.linked_cam) - +/obj/structure/dropship_equipment/sentry_holder/Destroy() + if(deployed_turret) + QDEL_NULL(deployed_turret.linked_cam) + . = ..() /// Holder for the dropship mannable machinegun system diff --git a/code/modules/defenses/sentry.dm b/code/modules/defenses/sentry.dm index 3d485f3abda7..946c347efaa0 100644 --- a/code/modules/defenses/sentry.dm +++ b/code/modules/defenses/sentry.dm @@ -539,11 +539,13 @@ choice_categories = list() selected_categories = list() var/obj/structure/dropship_equipment/sentry_holder/deployment_system + var/obj/structure/machinery/camera/cas/linked_cam /obj/structure/machinery/defenses/sentry/premade/dropship/Destroy() if(deployment_system) deployment_system.deployed_turret = null deployment_system = null + QDEL_NULL(linked_cam) . = ..() #define SENTRY_SNIPER_RANGE 10