Skip to content

Commit

Permalink
Project ARES: Almayer Sentries (#6268)
Browse files Browse the repository at this point in the history
# About the pull request

Changes the sprites for the sentry deployment systems aboard the USS
Almayer to use a custom floor based holder, rather than a floating wall
mount.

Also adds mini sentry deployers, along with an AI-Core subtype that
autodeploys on lockdown.

# Explain why it's good for the game

Currently the sentry deployment system sprites are designed as if
they're mounted to walls, and they usually are, but on the Almayer
they're essentially floating next to the fuel pumps. This changes that.

Also it allows the AI Core to be protected from xenos without subjecting
non-existant joes to melee combat.


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


![image](https://github.com/cmss13-devs/cmss13/assets/41653574/a4a671a2-2772-4c13-8f84-c11cf3bd807b)

![image](https://github.com/cmss13-devs/cmss13/assets/41653574/61f83c72-aa40-4a9b-b528-8fd86b4df5f5)


</details>


# Changelog
:cl:
imageadd: added sprites for floor-mounted sentry deployment systems.
add: Added mini-sentry deployment systems, and an AI Core subtype.
/:cl:

---------

Co-authored-by: Drathek <[email protected]>
  • Loading branch information
realforest2001 and Drulikar committed May 25, 2024
1 parent b30b59d commit 9d6826c
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 10 deletions.
40 changes: 33 additions & 7 deletions code/game/machinery/sentry_holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
var/ox = 0
var/oy = 0
var/require_red_alert = FALSE
var/base_icon_state = "sentry_system"

/obj/structure/machinery/sentry_holder/Initialize()
. = ..()
Expand Down Expand Up @@ -76,13 +77,14 @@
deployment_cooldown = world.time + 50
deployed_turret.turned_on = TRUE
deployed_turret.forceMove(loc)
icon_state = "sentry_system_deployed"
icon_state = "[base_icon_state]_deployed"

for(var/mob/M in deployed_turret.loc)
if(deployed_turret.loc == src.loc)
step(M, deployed_turret.dir)
else
step(M, get_dir(src,deployed_turret))
if(deployed_turret.density)
for(var/mob/blocking_mob in deployed_turret.loc)
if(deployed_turret.loc == loc)
step(blocking_mob, deployed_turret.dir)
else
step(blocking_mob, get_dir(src, deployed_turret))

deployed_turret.setDir(dir)
deployed_turret.pixel_x = 0
Expand All @@ -103,7 +105,7 @@
deployed_turret.unset_range()
pixel_x = ox
pixel_y = oy
icon_state = "sentry_system_installed"
icon_state = "[base_icon_state]_installed"

/obj/structure/machinery/sentry_holder/Destroy()
QDEL_NULL(deployed_turret)
Expand All @@ -115,5 +117,29 @@
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/colony

/obj/structure/machinery/sentry_holder/almayer
icon_state = "floor_sentry_installed"
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/almayer
base_icon_state = "floor_sentry"
require_red_alert = TRUE

/obj/structure/machinery/sentry_holder/almayer/mini
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini

/obj/structure/machinery/sentry_holder/almayer/mini/aicore

/obj/structure/machinery/sentry_holder/almayer/mini/aicore/Initialize()
. = ..()
RegisterSignal(SSdcs, COMSIG_GLOB_AICORE_LOCKDOWN, PROC_REF(auto_deploy))
RegisterSignal(SSdcs, COMSIG_GLOB_AICORE_LIFT, PROC_REF(undeploy_sentry))

/obj/structure/machinery/sentry_holder/almayer/mini/aicore/proc/auto_deploy()
if(deployed_turret.loc == src) //not deployed
if(stat & NOPOWER)
return FALSE

deploy_sentry()
return TRUE

/obj/structure/machinery/sentry_holder/almayer/mini/aicore/attack_hand(mob/user)
to_chat(user, SPAN_WARNING("[src] can only be deployed remotely."))
return
19 changes: 18 additions & 1 deletion code/modules/defenses/sentry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,26 @@
selected_categories[SENTRY_CATEGORY_IFF] = FACTION_COLONY

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer
fire_delay = 4
name = "UA-635C Static Gauss Turret"
desc = "A fully-automated defence turret with mid-range targeting capabilities. Armed with a modified M32-S Autocannon and an internal belt feed and modified for UA warship use."
fire_delay = 0.4 SECONDS
omni_directional = TRUE

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini
name = "UA 512-S mini sentry"
desc = "A fully-automated defence turret with mid-range targeting capabilities. Armed with a modified M30 Autocannon and an internal belt feed and modified for UA warship use."
defense_type = "Mini"
fire_delay = 0.25 SECONDS
health = 150
health_max = 150
damage_mult = 0.6
density = FALSE
layer = BELOW_MOB_LAYER
disassemble_time = 0.75 SECONDS
handheld_type = /obj/item/defenses/handheld/sentry/mini
composite_icon = FALSE


//the turret inside the shuttle sentry deployment system
/obj/structure/machinery/defenses/sentry/premade/dropship
density = TRUE
Expand Down
Binary file modified icons/obj/structures/props/almayer_props.dmi
Binary file not shown.
10 changes: 8 additions & 2 deletions maps/map_files/USS_Almayer/USS_Almayer.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -23036,6 +23036,12 @@
icon_state = "plate"
},
/area/almayer/maint/hull/upper/p_bow)
"dJC" = (
/obj/structure/machinery/sentry_holder/almayer/mini/aicore,
/turf/open/floor/almayer/no_build{
icon_state = "plating"
},
/area/almayer/command/airoom)
"dJG" = (
/obj/structure/pipes/standard/simple/hidden/supply{
dir = 9
Expand Down Expand Up @@ -140719,7 +140725,7 @@ daz
daz
eKJ
yaZ
ffE
dJC
hZj
clw
daz
Expand Down Expand Up @@ -141531,7 +141537,7 @@ daz
daz
eKJ
yaZ
ffE
dJC
hZj
fQD
daz
Expand Down

0 comments on commit 9d6826c

Please sign in to comment.