diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm
index 1c32854fc26..65dbf0bf594 100644
--- a/code/datums/uplink_item.dm
+++ b/code/datums/uplink_item.dm
@@ -989,7 +989,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
/datum/uplink_item/explosives/plastic_explosives
name = "Composition C-4"
- desc = "C-4 is plastic explosive of the common variety Composition C. You can use it to breach walls or connect an assembly to its wiring to make it remotely detonable. It has a modifiable timer with a minimum setting of 10 seconds."
+ desc = "C-4 is plastic explosive of the common variety Composition C. Reliably destroys the object it's placed on, assuming it isn't bomb resistant. Does not stick to crewmembers. Will only destroy station floors if placed directly on it. It has a modifiable timer with a minimum setting of 10 seconds."
reference = "C4"
item = /obj/item/grenade/plastic/c4
cost = 1
@@ -1014,7 +1014,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
name = "Composition X-4"
desc = "X-4 is a shaped charge designed to be safe to the user while causing maximum damage to the occupants of the room beach breached. It has a modifiable timer with a minimum setting of 10 seconds."
reference = "X4"
- item = /obj/item/grenade/plastic/x4
+ item = /obj/item/grenade/plastic/c4/x4
cost = 2
gamemodes = list(/datum/game_mode/nuclear)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 3b907a9046c..478d5abc02d 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1287,6 +1287,17 @@ About the new airlock wires panel:
if(duration > electrified_until)
electrify(duration)
+/obj/machinery/door/airlock/ex_act(severity)
+ if(resistance_flags & INDESTRUCTIBLE)
+ return
+ switch(severity)
+ if(EXPLODE_DEVASTATE) //Destroy the airlock completely.
+ qdel(src)
+ if(EXPLODE_HEAVY) //Deconstruct the airlock, leaving damaged airlock frame and parts behind
+ deconstruct(FALSE, null)
+ if(EXPLODE_LIGHT) //Deals 150 damage to the airlock, half a standard airlock's integrity
+ take_damage(150)
+
/obj/machinery/door/airlock/attack_alien(mob/living/carbon/alien/humanoid/user)
add_fingerprint(user)
if(isElectrified())
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 467b82b04a9..09bab988c73 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -378,11 +378,6 @@
if(!stat) //Opens only powered doors.
open() //Open everything!
-/obj/machinery/door/ex_act(severity)
- //if it blows up a wall it should blow up a door
- ..(severity ? max(1, severity - 1) : 0)
-
-
/obj/machinery/door/GetExplosionBlock()
return density ? real_explosion_block : 0
diff --git a/code/game/objects/effects/spawners/random_spawners.dm b/code/game/objects/effects/spawners/random_spawners.dm
index 64708c0ff25..803d4294110 100644
--- a/code/game/objects/effects/spawners/random_spawners.dm
+++ b/code/game/objects/effects/spawners/random_spawners.dm
@@ -288,7 +288,7 @@
/obj/item/clothing/glasses/thermal = 1,
/obj/item/chameleon = 1,
/obj/item/reagent_containers/hypospray/autoinjector/stimulants = 1,
- /obj/item/grenade/plastic/x4 = 1)
+ /obj/item/grenade/plastic/c4/x4 = 1)
// Layout-affecting spawns
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index 5b2fc0c851b..f741901cde1 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -67,9 +67,10 @@
to_chat(user, "Timer set for [det_time] seconds.")
/obj/item/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
- if (!flag)
+ if(!flag)
return
- if (istype(AM, /mob/living/carbon))
+ if(iscarbon(AM))
+ to_chat(user, "You can't get the [src] to stick to [AM]!")
return
to_chat(user, "You start planting [src]. The timer is set to [det_time]...")
@@ -129,104 +130,67 @@
/obj/item/grenade/plastic/c4
name = "C4"
desc = "Used to put holes in specific areas without too much extra hole. A saboteurs favourite."
+ /// If set to true, the secondary explosion will be centered two tiles behind the wall/object it's set on for a targeted breach and entry.
+ var/shaped = FALSE
+ /// Set when installing the charge, to know which direction to explode to when setting up a shaped c4
+ var/aim_dir
+ /// Range values given to the explosion proc when primed
+ var/ex_devastate = 0
+ var/ex_heavy = 0
+ var/ex_light = 3
+ /// Will the explosion cause a breach. C4 placed on floors will always cause a breach, regardless of this value.
+ var/ex_breach = FALSE
+
+/obj/item/grenade/plastic/c4/afterattack(atom/movable/AM, mob/user, flag)
+ aim_dir = get_dir(user, AM)
+ ..()
/obj/item/grenade/plastic/c4/prime()
var/turf/location
if(target)
if(!QDELETED(target))
- if(istype(target, /turf/))
- location = get_turf(target) // Set the explosion location to turf if planted directly on a wall or floor
- else
- location = get_atom_on_turf(target) // Otherwise, make sure we're blowing up what's on top of the turf
+ location = get_turf(target)
target.overlays -= image_overlay
+ if(!ex_breach && istype(target, /turf/simulated/wall)) //Walls get dismantled instead of destroyed to avoid making unwanted holes to space.
+ var/turf/simulated/wall/W = target
+ W.dismantle_wall(TRUE, TRUE)
+ else
+ target.ex_act(EXPLODE_DEVASTATE)
else
- location = get_atom_on_turf(src)
+ location = get_turf(src)
if(location)
- explosion(location,0,0,3)
- location.ex_act(2, target)
- if(istype(target, /mob))
- var/mob/M = target
- M.gib()
+ if(shaped && aim_dir)
+ location = get_step(get_step(location, aim_dir), aim_dir) //Move the explosion location two steps away from the target when using a shaped c4
+ explosion(location, ex_devastate, ex_heavy, ex_light, breach = ex_breach)
+
qdel(src)
// X4 is an upgraded directional variant of c4 which is relatively safe to be standing next to. And much less safe to be standing on the other side of.
// C4 is intended to be used for infiltration, and destroying tech. X4 is intended to be used for heavy breaching and tight spaces.
// Intended to replace C4 for nukeops, and to be a randomdrop in surplus/random traitor purchases.
-/obj/item/grenade/plastic/x4
+/obj/item/grenade/plastic/c4/x4
name = "X4"
desc = "A specialized shaped high explosive breaching charge. Designed to be safer for the user, and less so, for the wall."
- var/aim_dir = NORTH
icon_state = "plasticx40"
item_state = "plasticx4"
-
-/obj/item/grenade/plastic/x4/prime()
- var/turf/location
- if(target)
- if(!QDELETED(target))
- if(istype(target, /turf/))
- location = get_turf(target)
- else
- location = get_atom_on_turf(target)
- target.overlays -= image_overlay
- else
- location = get_atom_on_turf(src)
- if(location)
- if(target && target.density)
- var/turf/T = get_step(location, aim_dir)
- explosion(get_step(T, aim_dir),0,0,3)
- explosion(T,0,2,0)
- location.ex_act(2, target)
- else
- explosion(location, 0, 2, 3)
- location.ex_act(2, target)
- if(istype(target, /mob))
- var/mob/M = target
- M.gib()
- qdel(src)
-
-/obj/item/grenade/plastic/x4/afterattack(atom/movable/AM, mob/user, flag)
- aim_dir = get_dir(user,AM)
- ..()
+ shaped = TRUE
+ ex_heavy = 2
+ ex_breach = TRUE
// Shaped charge
// Same blasting power as C4, but with the same idea as the X4 -- Everyone on one side of the wall is safe.
-/obj/item/grenade/plastic/c4_shaped
+/obj/item/grenade/plastic/c4/shaped
name = "C4 (shaped)"
desc = "A brick of C4 shaped to allow more precise breaching."
- var/aim_dir = NORTH
+ shaped = TRUE
-/obj/item/grenade/plastic/c4_shaped/prime()
- var/turf/location
- if(target)
- if(!QDELETED(target))
- location = get_turf(target)
- target.overlays -= image_overlay
- else
- location = get_turf(src)
- if(location)
- if(target && target.density)
- var/turf/T = get_step(location, aim_dir)
- explosion(get_step(T, aim_dir),0,0,3)
- location.ex_act(2, target)
- else
- explosion(location, 0, 0, 3)
- location.ex_act(2, target)
- if(istype(target, /mob))
- var/mob/M = target
- M.gib()
- qdel(src)
-
-/obj/item/grenade/plastic/c4_shaped/afterattack(atom/movable/AM, mob/user, flag)
- aim_dir = get_dir(user,AM)
- ..()
-
-/obj/item/grenade/plastic/c4_shaped/flash
+/obj/item/grenade/plastic/c4/shaped/flash
name = "C4 (flash)"
desc = "A C4 charge with an altered chemical composition, designed to blind and deafen the occupants of a room before breaching."
-/obj/item/grenade/plastic/c4_shaped/flash/prime()
+/obj/item/grenade/plastic/c4/shaped/flash/prime()
var/turf/T
if(target && target.density)
T = get_step(get_turf(target), aim_dir)
@@ -240,14 +204,14 @@
..()
-/obj/item/grenade/plastic/x4/thermite
+/obj/item/grenade/plastic/c4/thermite
name = "T4"
desc = "A wall breaching charge, containing fuel, metal oxide and metal powder mixed in just the right way. One hell of a combination. Effective against walls, ineffective against airlocks..."
det_time = 2
icon_state = "t4breach0"
item_state = "t4breach"
-/obj/item/grenade/plastic/x4/thermite/prime()
+/obj/item/grenade/plastic/c4/thermite/prime()
var/turf/location
if(target)
if(!QDELETED(target))
@@ -269,7 +233,6 @@
addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3)
addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3)
-
if(isliving(target))
var/mob/living/M = target
M.adjust_fire_stacks(2)
diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm
index 1976d443ecd..84ad6f28813 100644
--- a/code/game/objects/items/weapons/storage/backpack.dm
+++ b/code/game/objects/items/weapons/storage/backpack.dm
@@ -433,7 +433,7 @@
/obj/item/storage/backpack/duffel/syndie/x4/populate_contents()
for(var/i in 1 to 3)
- new /obj/item/grenade/plastic/x4(src)
+ new /obj/item/grenade/plastic/c4/x4(src)
/obj/item/storage/backpack/duffel/syndie/surgery
name = "surgery duffelbag"
diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm
index 851ca02a441..f14f04a7da6 100644
--- a/code/game/objects/items/weapons/storage/lockbox.dm
+++ b/code/game/objects/items/weapons/storage/lockbox.dm
@@ -118,7 +118,7 @@
/obj/item/storage/lockbox/t4/populate_contents()
for(var/i in 0 to 2)
- new /obj/item/grenade/plastic/x4/thermite(src)
+ new /obj/item/grenade/plastic/c4/thermite(src)
/obj/item/storage/lockbox/research
diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm
index 5e1e561319a..ed9818d2ae1 100644
--- a/code/game/objects/items/weapons/storage/uplink_kits.dm
+++ b/code/game/objects/items/weapons/storage/uplink_kits.dm
@@ -53,7 +53,7 @@
/obj/item/storage/box/syndie_kit/space, // 4TC
/obj/item/encryptionkey/syndicate) // 2TC
- var/static/list/payday = list( // 35TC + four 0TC
+ var/static/list/payday = list( // 36TC + four 0TC
/obj/item/gun/projectile/revolver, // 13TC
/obj/item/ammo_box/a357, // 3TC
/obj/item/ammo_box/a357, // 3TC
@@ -64,6 +64,7 @@
/obj/item/clothing/suit/storage/lawyer/blackjacket/armored, //0TC
/obj/item/clothing/gloves/color/latex/nitrile, //0 TC
/obj/item/clothing/mask/gas/clown_hat, // 0TC
+ /obj/item/grenade/plastic/c4, //1TC
/obj/item/thermal_drill/diamond_drill, // 1TC
/obj/item/encryptionkey/syndicate) // 2TC
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index 877dff5cd69..baa155309a3 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -188,7 +188,7 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
if(is_leader)
equip_to_slot_or_del(new /obj/item/disk/nuclear/unrestricted(src), slot_in_backpack)
else
- equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
+ equip_to_slot_or_del(new /obj/item/grenade/plastic/c4/x4(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/melee/energy/sword/saber(src), slot_l_store)
diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm
index b40f9b6aae6..766660b6a15 100644
--- a/code/modules/admin/verbs/striketeam_syndicate.dm
+++ b/code/modules/admin/verbs/striketeam_syndicate.dm
@@ -140,12 +140,12 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
equip_to_slot_or_del(new /obj/item/gun/projectile/revolver(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/ammo_box/a357(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/combat/nanites(src), slot_in_backpack)
- equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
+ equip_to_slot_or_del(new /obj/item/grenade/plastic/c4/x4(src), slot_in_backpack)
if(is_leader)
equip_to_slot_or_del(new /obj/item/pinpointer(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/disk/nuclear/unrestricted(src), slot_in_backpack)
else
- equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack)
+ equip_to_slot_or_del(new /obj/item/grenade/plastic/c4/x4(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/card/emag(src), slot_r_store)
equip_to_slot_or_del(new /obj/item/melee/energy/sword/saber/red(src), slot_l_store)