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 5 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
5 changes: 5 additions & 0 deletions code/datums/ammo/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
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/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 @@ -114,6 +114,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
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/almayer
require_red_alert = TRUE
29 changes: 29 additions & 0 deletions code/modules/defenses/handheld.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@
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

// FLAMER BASE AND UPGRADES
/obj/item/defenses/handheld/sentry/flamer
Expand Down Expand Up @@ -202,6 +215,15 @@
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


// TESLA BASE AND UPGRADES
/obj/item/defenses/handheld/tesla_coil
Expand Down Expand Up @@ -300,4 +322,11 @@
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

19 changes: 19 additions & 0 deletions code/modules/defenses/planted_flag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,25 @@
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
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 = 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/item/storage/backpack/jima
name = "JIMA frame mount"
icon = 'icons/obj/items/clothing/backpacks.dmi'
Expand Down
61 changes: 56 additions & 5 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 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(FACTION_COLONY, FACTION_WEYLAND)
selected_categories[SENTRY_CATEGORY_IFF] = 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(FACTION_COLONY, FACTION_WEYLAND)
selected_categories[SENTRY_CATEGORY_IFF] = FACTION_WEYLAND

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer
fire_delay = 4
omni_directional = TRUE
Expand Down Expand Up @@ -723,5 +740,39 @@
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
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 = 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
handheld_type = /obj/item/defenses/handheld/sentry/wy/mini
ammo = new /obj/item/ammo_magazine/sentry/wy/mini
selected_categories = list(
SENTRY_CATEGORY_IFF = FACTION_WEYLAND,
)

#undef SENTRY_FIREANGLE
#undef SENTRY_RANGE
38 changes: 36 additions & 2 deletions code/modules/defenses/sentry_flamer.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/obj/structure/machinery/defenses/sentry/flamer
name = "\improper UA 42-F sentry flamer"
name = "\improper UA 42-F Sentry Flamer"
icon = 'icons/obj/structures/machinery/defenses/flamer.dmi'
desc = "A deployable, semi-automated turret with AI targeting capabilities. Armed with a special flamer and a 100 liters fuel tank."
fire_delay = 30
ammo = new /obj/item/ammo_magazine/sentry_flamer
sentry_type = "flamer"
sentry_type = "uac_flamer"
handheld_type = /obj/item/defenses/handheld/sentry/flamer
health = 200
health_max = 200
Expand Down Expand Up @@ -99,3 +99,37 @@
range_bounds = RECT(x, y - (FLAMER_SENTRY_SNIPER_RANGE/2), FLAMER_SENTRY_SNIPER_RANGE, FLAMER_SENTRY_SNIPER_RANGE)

#undef FLAMER_SENTRY_SNIPER_RANGE


/obj/structure/machinery/defenses/sentry/flamer/wy
name = "WY 406-FE2 Smart Sentry"
icon = 'icons/obj/structures/machinery/defenses/wy_defenses.dmi'
desc = "A deployable, fully-automated turret with AI targeting capabilities used by the PMC."
health = 300
health_max = 300
fire_delay = 2 SECONDS
disassemble_time = 5 SECONDS
hack_time = 25 SECONDS
ammo = new /obj/item/ammo_magazine/sentry_flamer/wy
sentry_type = "wy_flamer"
sentry_range = 6
omni_directional = TRUE
handheld_type = /obj/item/defenses/handheld/sentry/flamer/wy
selected_categories = list(
SENTRY_CATEGORY_ROF = ROF_SINGLE,
SENTRY_CATEGORY_IFF = FACTION_WEYLAND,
)

/obj/structure/machinery/defenses/sentry/flamer/wy/destroyed_action()
visible_message("[icon2html(src, viewers(src))] [SPAN_WARNING("The [name] starts spitting out sparks and smoke!")]")
playsound(loc, 'sound/mecha/critdestrsyndi.ogg', 25, 1)
for(var/i = 1 to 6)
setDir(pick(NORTH, EAST, SOUTH, WEST))
sleep(2)

if(ammo.current_rounds != 0)
Comxy marked this conversation as resolved.
Show resolved Hide resolved
var/datum/reagent/napalm/sticky/sticky_napalm = new()
new /obj/flamer_fire(loc, create_cause_data("sentry explosion", owner_mob), sticky_napalm, 2)
cell_explosion(loc, 10, 10, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, create_cause_data("sentry explosion", owner_mob))
if(!QDELETED(src))
qdel(src)
10 changes: 5 additions & 5 deletions code/modules/gear_presets/pmc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1688,8 +1688,8 @@ list("POUCHES (CHOOSE 2)", 0, null, null, null),
new_human.equip_to_slot_or_del(new /obj/item/explosive/plastic, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/binoculars/range, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/tool/shovel/etool/folded, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/defenses/handheld/sentry/mini, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/defenses/handheld/sentry/mini, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/defenses/handheld/sentry/wy/mini, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/defenses/handheld/sentry/wy/mini, WEAR_IN_BACK)

new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/construction/full, WEAR_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/construction/full, WEAR_R_STORE)
Expand Down Expand Up @@ -1755,9 +1755,9 @@ list("POUCHES (CHOOSE 2)", 0, null, null, null),
list("Essential Engineer Set", 0, /obj/effect/essentials_set/engi, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY),

list("HANDHELD DEFENSE (CHOOSE 1)", 0, null, null, null),
list("JIMA Planted Flag", 0, /obj/item/defenses/handheld/planted_flag, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_MANDATORY),
list("UA 42-F Sentry Flamer", 0, /obj/item/defenses/handheld/sentry/flamer, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_MANDATORY),
list("UA 571-C Sentry Gun", 0, /obj/item/defenses/handheld/sentry, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_MANDATORY),
list("WY Planted Flag", 0, /obj/item/defenses/handheld/planted_flag/wy, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_MANDATORY),
list("WY 406-FE2 Smart Sentry", 0, /obj/item/defenses/handheld/sentry/flamer/wy, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_MANDATORY),
list("WY 202-GMA1 Smart Sentry", 0, /obj/item/defenses/handheld/sentry/wy, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_MANDATORY),

list("ENGINEERING SUPPLIES", 0, null, null, null),
list("Airlock Circuit Board", 2, /obj/item/circuitboard/airlock, null, VENDOR_ITEM_REGULAR),
Expand Down
25 changes: 25 additions & 0 deletions code/modules/projectiles/magazines/sentries.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@
max_rounds = 50
default_ammo = /datum/ammo/bullet/shotgun/buckshot

/obj/item/ammo_magazine/sentry/wy
name = "H20 ammo drum (10x42mm Caseless)"
desc = "An ammo drum of 200 10x42mm caseless rounds for the WY 202-GMA1 Smart Sentry. Just feed it into the sentry gun's ammo port when its ammo is depleted."
icon = 'icons/obj/items/weapons/guns/ammo_by_faction/wy.dmi'
icon_state = "wy22e5"
caliber = "10x42mm"
max_rounds = 200

/obj/item/ammo_magazine/sentry/wy/mini
name = "H16 ammo drum (10x12mm Caseless)"
desc = "An ammo drum of 1000 10x12mm caseless rounds for the WY 14-GRA2 Mini Sentry. Just feed it into the sentry gun's ammo port when its ammo is depleted."
icon = 'icons/obj/items/weapons/guns/ammo_by_faction/wy.dmi'
icon_state = "wy22e5"
caliber = "10x12mm"
max_rounds = 1000

// FLAMER Sentry
/obj/item/ammo_magazine/sentry_flamer
name = "sentry incinerator tank"
Expand All @@ -51,3 +67,12 @@
name = "mini sentry incinerator tank"
desc = "A fuel tank of Ultra Thick Napthal Fuel, used in the UA 45-FM."
default_ammo = /datum/ammo/flamethrower/sentry_flamer/mini

/obj/item/ammo_magazine/sentry_flamer/wy
name = "wy sentry incinerator tank"
desc = "A fuel tank of Ultra Thick Sticky Napthal Fuel, used in the WY 406-FE2."
icon = 'icons/obj/items/weapons/guns/ammo_by_faction/wy.dmi'
icon_state = "wy22e5"
caliber = "Sticky Napalm"
max_rounds = 200
default_ammo = /datum/ammo/flamethrower/sentry_flamer/wy
Binary file modified icons/obj/items/weapons/guns/ammo_by_faction/wy.dmi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading