Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds WY & UPP Sentries #6327

Merged
merged 10 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions code/datums/ammo/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@
R.durationfire = BURN_TIME_INSTANT
new /obj/flamer_fire(T, cause_data, R, 0)

/datum/ammo/flamethrower/sentry_flamer/wy
name = "sticky fire"
flamer_reagent_id = "stickynapalm"
shell_speed = AMMO_SPEED_TIER_4

/datum/ammo/flamethrower/sentry_flamer/upp
name = "gel fire"
flamer_reagent_id = "napalmgel"

/datum/ammo/flare
name = "flare"
ping = null //no bounce off.
Expand Down
5 changes: 5 additions & 0 deletions code/game/machinery/sentry_holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@
desc = "A box that deploys a sentry turret for protection of the residents in the area."
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/colony

/obj/structure/machinery/sentry_holder/wy
health = 200
desc = "A box that deploys a sentry turret for protecting Weyland-Yutani personnel"
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/wy

/obj/structure/machinery/sentry_holder/almayer
icon_state = "floor_sentry_installed"
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/almayer
Expand Down
8 changes: 6 additions & 2 deletions code/modules/defenses/defenses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,16 @@
switch(selection)
if(FACTION_MARINE)
faction_group = FACTION_LIST_MARINE
if(SENTRY_FACTION_WEYLAND)
faction_group = FACTION_LIST_MARINE_WY
if(SENTRY_FACTION_HUMAN)
faction_group = FACTION_LIST_HUMANOID
if(SENTRY_FACTION_COLONY)
faction_group = list(FACTION_MARINE, FACTION_COLONIST)
if(SENTRY_FACTION_WEYLAND)
faction_group = FACTION_LIST_MARINE_WY
if(FACTION_WY)
faction_group = FACTION_LIST_WY
if(FACTION_UPP)
Comxy marked this conversation as resolved.
Show resolved Hide resolved
faction_group = FACTION_LIST_UPP


/obj/structure/machinery/defenses/start_processing()
Expand Down
68 changes: 68 additions & 0 deletions code/modules/defenses/handheld.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,41 @@
defense_type = /obj/structure/machinery/defenses/sentry/mini
deployment_time = 0.75 SECONDS

/obj/item/defenses/handheld/sentry/wy
name = "handheld WY 202-GMA1 smart sentry"
desc = "A compact version of the Weyland-Yutani defenses. Designed for deployment in the field."
icon = 'icons/obj/structures/machinery/defenses/wy_defenses.dmi'
icon_state = "Normal wy_sentry_handheld"
defense_type = /obj/structure/machinery/defenses/sentry/wy
deployment_time = 5 SECONDS

/obj/item/defenses/handheld/sentry/wy/mini
name = "handheld WY 14-GRA2 mini sentry"
icon_state = "Mini wy_sentry_handheld"
defense_type = /obj/structure/machinery/defenses/sentry/mini/wy
deployment_time = 2 SECONDS

/obj/item/defenses/handheld/sentry/wy/heavy
name = "handheld WY 2-ADT-A3 heavy sentry"
icon = 'icons/obj/structures/machinery/defenses/wy_heavy.dmi'
icon_state = "Heavy wy_sentry_handheld"
defense_type = /obj/structure/machinery/defenses/sentry/dmr/wy
deployment_time = 10 SECONDS

/obj/item/defenses/handheld/sentry/upp
name = "handheld UPP SDS-R3 sentry gun"
desc = "A compact version of the UPP defense sentry SDS-R1. Designed for deployment in the field."
icon = 'icons/obj/structures/machinery/defenses/upp_defenses.dmi'
icon_state = "Normal upp_sentry_handheld"
defense_type = /obj/structure/machinery/defenses/sentry/upp
deployment_time = 5 SECONDS

/obj/item/defenses/handheld/sentry/upp/light
name = "handheld UPP SDS-R8 light sentry"
desc = "A compact version of the UPP defense sentry SDS-R7. Designed for deployment in the field."
icon_state = "Light upp_sentry_handheld"
defense_type = /obj/structure/machinery/defenses/sentry/upp/light
deployment_time = 2 SECONDS

// FLAMER BASE AND UPGRADES
/obj/item/defenses/handheld/sentry/flamer
Expand Down Expand Up @@ -202,6 +237,24 @@
defense_type = /obj/structure/machinery/defenses/sentry/flamer/plasma
ammo_convert = /obj/item/ammo_magazine/sentry_flamer/glob

/obj/item/defenses/handheld/sentry/flamer/wy
name = "handheld WY 406-FE2 smart sentry"
desc = "A compact version of the Weyland-Yutani defenses. Designed for deployment in the field."
icon = 'icons/obj/structures/machinery/defenses/wy_defenses.dmi'
icon_state = "Normal wy_flamer_handheld"
defense_type = /obj/structure/machinery/defenses/sentry/flamer/wy
deployment_time = 5 SECONDS
ammo_convert = /obj/item/ammo_magazine/sentry_flamer/wy

/obj/item/defenses/handheld/sentry/flamer/upp
name = "handheld UPP SDS-R5 sentry flamer"
desc = "A compact version of the UPP defenses. Designed for deployment in the field."
icon = 'icons/obj/structures/machinery/defenses/upp_defenses.dmi'
icon_state = "Normal upp_flamer_handheld"
defense_type = /obj/structure/machinery/defenses/sentry/flamer/upp
deployment_time = 5 SECONDS
ammo_convert = /obj/item/ammo_magazine/sentry_flamer/upp


// TESLA BASE AND UPGRADES
/obj/item/defenses/handheld/tesla_coil
Expand Down Expand Up @@ -300,4 +353,19 @@
deployment_time = 2 SECONDS
defense_type = /obj/structure/machinery/defenses/planted_flag/range

/obj/item/defenses/handheld/planted_flag/wy
name = "handheld WY planted flag"
desc = "A compact version of the Weyland-Yutani defenses. Designed for deployment in the field."
icon = 'icons/obj/structures/machinery/defenses/wy_defenses.dmi'
icon_state = "WY planted_flag_handheld"
deployment_time = 3 SECONDS
defense_type = /obj/structure/machinery/defenses/planted_flag/wy

/obj/item/defenses/handheld/planted_flag/upp
name = "handheld UPP planted flag"
desc = "A compact version of the UPP defenses. Designed for deployment in the field."
icon = 'icons/obj/structures/machinery/defenses/upp_defenses.dmi'
icon_state = "UPP planted_flag_handheld"
deployment_time = 5 SECONDS
defense_type = /obj/structure/machinery/defenses/planted_flag/upp

34 changes: 34 additions & 0 deletions code/modules/defenses/planted_flag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,40 @@
H.activate_order_buff(COMMAND_ORDER_FOCUS, buff_intensity, 5 SECONDS)
H.activate_order_buff(COMMAND_ORDER_MOVE, buff_intensity, 5 SECONDS)

/obj/structure/machinery/defenses/planted_flag/wy
name = "WY planted flag"
desc = "A planted flag with the iconic WY flag plastered all over it, you feel a burst of energy by its mere sight."
icon = 'icons/obj/structures/machinery/defenses/wy_defenses.dmi'
disassemble_time = 6 SECONDS
hack_time = 25 SECONDS
health = 300
health_max = 300
area_range = 11
handheld_type = /obj/item/defenses/handheld/planted_flag/wy
defense_type = "WY"
selected_categories = list(
SENTRY_CATEGORY_IFF = SENTRY_FACTION_WEYLAND,
)

/obj/structure/machinery/defenses/planted_flag/wy/apply_buff_to_player(mob/living/carbon/human/H)
H.activate_order_buff(COMMAND_ORDER_HOLD, buff_intensity, 2 SECONDS)
H.activate_order_buff(COMMAND_ORDER_FOCUS, buff_intensity, 2 SECONDS)
H.activate_order_buff(COMMAND_ORDER_MOVE, buff_intensity, 2 SECONDS)

/obj/structure/machinery/defenses/planted_flag/upp
name = "UPP planted flag"
desc = "A planted flag with the iconic UPP flag plastered all over it, you feel a burst of energy by its mere sight."
icon = 'icons/obj/structures/machinery/defenses/upp_defenses.dmi'
disassemble_time = 5 SECONDS
health = 300
health_max = 300
area_range = 11
handheld_type = /obj/item/defenses/handheld/planted_flag/upp
defense_type = "UPP"
selected_categories = list(
SENTRY_CATEGORY_IFF = FACTION_UPP,
)

/obj/item/storage/backpack/jima
name = "JIMA frame mount"
icon = 'icons/obj/items/clothing/backpacks.dmi'
Expand Down
110 changes: 104 additions & 6 deletions code/modules/defenses/sentry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
var/fire_delay = 4
var/immobile = FALSE //Used for prebuilt ones.
var/obj/item/ammo_magazine/ammo = new /obj/item/ammo_magazine/sentry
var/sentry_type = "sentry" //Used for the icon
var/sentry_type = "uac_sentry" //Used for the icon
display_additional_stats = TRUE
/// Light strength when turned on
var/luminosity_strength = 5
Expand All @@ -45,7 +45,7 @@
/// action list is configurable for all subtypes, this is just an example
choice_categories = list(
// SENTRY_CATEGORY_ROF = list(ROF_SINGLE, ROF_BURST, ROF_FULL_AUTO),
SENTRY_CATEGORY_IFF = list(FACTION_MARINE, SENTRY_FACTION_WEYLAND, SENTRY_FACTION_HUMAN),
SENTRY_CATEGORY_IFF = list(FACTION_MARINE, SENTRY_FACTION_WEYLAND, SENTRY_FACTION_HUMAN, FACTION_UPP),
)

selected_categories = list(
Expand Down Expand Up @@ -115,16 +115,16 @@

overlays.Cut()
if(stat == DEFENSE_DAMAGED)
overlays += "[defense_type] uac_[sentry_type]_destroyed"
overlays += "[defense_type] [sentry_type]_destroyed"
return

if(!ammo || ammo && !ammo.current_rounds)
overlays += "[defense_type] uac_[sentry_type]_noammo"
overlays += "[defense_type] [sentry_type]_noammo"
return
if(turned_on)
overlays += "[defense_type] uac_[sentry_type]_on"
overlays += "[defense_type] [sentry_type]_on"
else
overlays += "[defense_type] uac_[sentry_type]"
overlays += "[defense_type] [sentry_type]"


/obj/structure/machinery/defenses/sentry/attack_hand_checks(mob/user)
Expand Down Expand Up @@ -526,6 +526,23 @@
choice_categories[SENTRY_CATEGORY_IFF] = list(SENTRY_FACTION_COLONY, SENTRY_FACTION_WEYLAND)
selected_categories[SENTRY_CATEGORY_IFF] = SENTRY_FACTION_COLONY

/obj/structure/machinery/defenses/sentry/premade/deployable/wy
name = "WY 5-GSE3 Static Turret"
desc = "An old static, semi-automated turret with AI targeting capabilities from Weyland-Yutani."
icon = 'icons/obj/structures/machinery/defenses/wy_static.dmi'
defense_type = "Static"
sentry_type = "wy_sentry"
health = 350
health_max = 350
faction_group = list(FACTION_MARINE, FACTION_COLONIST, FACTION_SURVIVOR, FACTION_WY)
fire_delay = 0.6 SECONDS
damage_mult = 2

/obj/structure/machinery/defenses/sentry/premade/deployable/wy/Initialize()
. = ..()
choice_categories[SENTRY_CATEGORY_IFF] = list(SENTRY_FACTION_COLONY, SENTRY_FACTION_WEYLAND)
selected_categories[SENTRY_CATEGORY_IFF] = SENTRY_FACTION_COLONY

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer
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."
Expand Down Expand Up @@ -740,5 +757,86 @@
new /obj/item/stack/sheet/plasteel/medium_stack(loc)
return ..()

/obj/structure/machinery/defenses/sentry/wy
name = "WY 202-GMA1 Smart Sentry"
desc = "A deployable, fully-automated turret with AI targeting capabilities used by the PMC."
icon = 'icons/obj/structures/machinery/defenses/wy_defenses.dmi'
sentry_type = "wy_sentry"
fire_delay = 2 SECONDS
health = 350
health_max = 350
damage_mult = 3.5
disassemble_time = 5 SECONDS
hack_time = 25 SECONDS
sentry_range = 6
omni_directional = TRUE
handheld_type = /obj/item/defenses/handheld/sentry/wy
ammo = new /obj/item/ammo_magazine/sentry/wy
selected_categories = list(
SENTRY_CATEGORY_IFF = SENTRY_FACTION_WEYLAND,
)

/obj/structure/machinery/defenses/sentry/mini/wy
name = "WY 14-GRA2 Mini Sentry"
desc = "A deployable, semi-automated turret with AI targeting capabilities used by the PMC."
icon = 'icons/obj/structures/machinery/defenses/wy_defenses.dmi'
sentry_type = "wy_sentry"
fire_delay = 0.08 SECONDS
health = 200
health_max = 200
damage_mult = 0.3
disassemble_time = 2 SECONDS
hack_time = 25 SECONDS
handheld_type = /obj/item/defenses/handheld/sentry/wy/mini
ammo = new /obj/item/ammo_magazine/sentry/wy/mini
selected_categories = list(
SENTRY_CATEGORY_IFF = SENTRY_FACTION_WEYLAND,
)

/obj/structure/machinery/defenses/sentry/dmr/wy
name = "WY 2-ADT-A3 Heavy Sentry"
desc = "A deployable, semi-automated turret with AI targeting capabilities used by the PMC."
defense_type = "Heavy"
icon = 'icons/obj/structures/machinery/defenses/wy_heavy.dmi'
sentry_type = "wy_sentry"
fire_delay = 4 SECONDS
health = 600
health_max = 600
damage_mult = 5
disassemble_time = 10 SECONDS
hack_time = 25 SECONDS
sentry_range = 8
handheld_type = /obj/item/defenses/handheld/sentry/wy
ammo = new /obj/item/ammo_magazine/sentry/wy
selected_categories = list(
SENTRY_CATEGORY_IFF = SENTRY_FACTION_WEYLAND,
)

/obj/structure/machinery/defenses/sentry/upp
name = "UPP SDS-R3 Sentry Gun"
desc = "A deployable, fully-automated turret with AI targeting capabilities used by the UPP."
icon = 'icons/obj/structures/machinery/defenses/upp_defenses.dmi'
sentry_type = "upp_sentry"
health = 300
health_max = 300
damage_mult = 1.2
disassemble_time = 5 SECONDS
handheld_type = /obj/item/defenses/handheld/sentry/upp
ammo = new /obj/item/ammo_magazine/sentry/upp
selected_categories = list(
SENTRY_CATEGORY_IFF = FACTION_UPP,
)

/obj/structure/machinery/defenses/sentry/upp/light
name = "UPP SDS-R8 Light Sentry"
defense_type = "Light"
fire_delay = 0.3 SECONDS
health = 200
health_max = 200
disassemble_time = 2 SECONDS
sentry_range = 3
omni_directional = TRUE
handheld_type = /obj/item/defenses/handheld/sentry/upp/light

#undef SENTRY_FIREANGLE
#undef SENTRY_RANGE
Loading
Loading