Skip to content

Commit

Permalink
Dropship Sentry Camera (#3737)
Browse files Browse the repository at this point in the history
# 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
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl: ihatethisengine
add: Added cameras to dropship deployable sentries.
/:cl:
  • Loading branch information
ihatethisengine authored Jun 30, 2023
1 parent ec1d1d5 commit 0f36175
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 12 additions & 1 deletion code/modules/cm_marines/dropship_equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions code/modules/defenses/sentry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f36175

Please sign in to comment.