Skip to content

Commit

Permalink
X17 Riot Breaching Charge (#5285)
Browse files Browse the repository at this point in the history
# About the pull request
Adds the X17 breaching charge, similar to the normal marine breaching
charge except it fires rubber pellets rather than metal shrapnel, for
use by MPs.
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
Allows MPs to have tools that break into secure places without
immediately killing the occupants.
# 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:
add: Added the X17 Riot Breaching Charge.
/:cl:
  • Loading branch information
realforest2001 committed Jan 11, 2024
1 parent 0df5049 commit 36bac31
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions code/game/machinery/vending/vending_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@
/obj/item/ammo_magazine/rifle/rubber = 40,
/obj/item/ammo_magazine/rifle/m4ra/rubber = 40,
/obj/item/clothing/head/helmet/marine/MP = 8,
/obj/item/explosive/plastic/breaching_charge/rubber = 6,
)

/obj/structure/machinery/vending/sea
Expand Down
24 changes: 14 additions & 10 deletions code/game/objects/items/explosives/plastic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@
penetration = 0.60
deploying_time = 10
var/shrapnel_volume = 40
var/shrapnel_type = /datum/ammo/bullet/shrapnel/metal
var/explosion_strength = 60

/obj/item/explosive/plastic/breaching_charge/can_place(mob/user, atom/target)
if(!is_type_in_list(target, breachable))//only items on the list are allowed
Expand All @@ -347,13 +349,21 @@

/obj/item/explosive/plastic/breaching_charge/handle_explosion(turf/target_turf, dir, cause_data)
var/explosion_target = get_step(target_turf, dir)
create_shrapnel(explosion_target, shrapnel_volume, dir, angle,/datum/ammo/bullet/shrapnel/metal, cause_data)
create_shrapnel(explosion_target, shrapnel_volume, dir, angle, shrapnel_type, cause_data)
addtimer(CALLBACK(src, PROC_REF(trigger_explosion), target_turf, dir, cause_data), 1)

/obj/item/explosive/plastic/breaching_charge/proc/trigger_explosion(turf/target_turf, dir, cause_data)
cell_explosion(target_turf, 60, 60, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, dir, cause_data)
cell_explosion(target_turf, explosion_strength, explosion_strength, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, dir, cause_data)
qdel(src)

/obj/item/explosive/plastic/breaching_charge/rubber
name = "X17 riot charge"
desc = "An explosive device used to break into areas while protecting the user from the blast. Unlike the standard breaching charge, the X17 deploys a cone spray of rubber pellets to incapacitate rather than kill."
icon_state = "riot-charge"
overlay_image = "riot-active"
shrapnel_volume = 20
shrapnel_type = /datum/ammo/bullet/shrapnel/rubber

/obj/item/explosive/plastic/breaching_charge/plasma
name = "plasma charge"
desc = "An alien explosive device. Who knows what it might do."
Expand All @@ -367,18 +377,12 @@
deploying_time = 10
flags_item = NOBLUDGEON|ITEM_PREDATOR
shrapnel_volume = 10
shrapnel_type = /datum/ammo/bullet/shrapnel/plasma
explosion_strength = 90

/obj/item/explosive/plastic/breaching_charge/plasma/can_place(mob/user, atom/target)
if(!HAS_TRAIT(user, TRAIT_YAUTJA_TECH))
to_chat(user, SPAN_WARNING("You don't quite understand how the device works..."))
return FALSE
. = ..()

/obj/item/explosive/plastic/breaching_charge/plasma/handle_explosion(turf/target_turf, dir, cause_data)
var/explosion_target = get_step(target_turf, dir)
create_shrapnel(explosion_target, shrapnel_volume, dir, angle,/datum/ammo/bullet/shrapnel/plasma, cause_data)
addtimer(CALLBACK(src, PROC_REF(trigger_explosion), target_turf, dir, cause_data), 1)

/obj/item/explosive/plastic/breaching_charge/plasma/trigger_explosion(turf/target_turf, dir, cause_data)
cell_explosion(target_turf, 90, 90, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, dir, cause_data)
qdel(src)
Binary file modified icons/obj/items/assemblies.dmi
Binary file not shown.

0 comments on commit 36bac31

Please sign in to comment.