Fixes C4, dirty bombs and nuclear waste (#22945)

changes:
  - bugfix: "Fixes C4 effects not correctly getting their parent item."
  - bugfix: "Fixes C4 not being placed correctly."
  - bugfix: "Fixes Dirty Bombs deleting their own radiation source."
- bugfix: "Fixes Dirty Bomb goop puddles disapearing long before the
radiation does."
  - bugfix: "Fixes drinking radioactive waste not irradiating you."

3 dirty bombs set off. One on a floor, one on a wall one on a machine.
<img width="1191" height="1182" alt="image"
src="https://github.com/user-attachments/assets/584e7572-441c-4937-8e0e-7203010fcd54"
/>

---------

Signed-off-by: FenodyreeAv <fenodyree.av@gmail.com>
This commit is contained in:
FenodyreeAv
2026-07-29 17:29:31 +00:00
committed by GitHub
parent 514bc2346e
commit 2fdf11ca75
5 changed files with 55 additions and 14 deletions
+33 -5
View File
@@ -48,7 +48,6 @@
/obj/item/plastique/Destroy()
qdel(wires)
wires = null
qdel(target)
target = null
return ..()
@@ -195,11 +194,40 @@
desc = "A small explosive laced with radium. The explosion is small, but the radioactive material will remain for a fair while."
timer = 30 SECONDS
/obj/item/plastique/dirty/explode(turf/location)
/obj/item/plastique/dirty/explode(turf/location) //Does not call parent because we need a different order of operations.
if(!target)
target = get_atom_on_turf(src)
if(!target)
target = src
if(target)
if (istype(target, /turf/simulated/wall))
var/turf/simulated/wall/W = target
W.dismantle_wall(1, no_product = TRUE)
else if(istype(target, /mob/living))
target.ex_act(2) // c4 can't gib mobs anymore.
target.rad_act(800) //A dirty bomb going off on top of you completely irradiates you, radsuit or not.
else
target.ex_act(1)
if(location)
SSradiation.radiate(src, 250)
new /obj/effect/decal/cleanable/greenglow/radioactive/medium(get_turf(src))
..()
explosion(location, devastation_range, heavy_impact_range, light_impact_range, 3, spreading = 0)
SSradiation.radiate(location, 250)
new /obj/effect/decal/cleanable/greenglow/radioactive/extreme(location)
for(var/turf/T in RANGE_TURFS(4, location))
if(T == location)
continue
if(T in RANGE_TURFS(1, location)) //High radioactive puddles 1 tile from the epicenter, medium up to 4 tiles away.
if(prob(75))
new /obj/effect/decal/cleanable/greenglow/radioactive/high(T)
else if(prob(25))
new /obj/effect/decal/cleanable/greenglow/radioactive/medium(T)
var/obj/effect/plastic_explosive/effect = locate(/obj/effect/plastic_explosive) in get_turf(src)
if(effect)
qdel(effect)
qdel(src)
/obj/item/plastique/strong
name = "bundled plastic explosives"