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

X17 Riot Breaching Charge #5285

Merged
merged 4 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
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.