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
@@ -55,13 +55,11 @@
/obj/effect/decal/cleanable/greenglow/Initialize(mapload)
. = ..()
if (!mapload) // Round-start goo should stick around.
QDEL_IN(src, 2 MINUTES)
/obj/effect/decal/cleanable/greenglow/post_sweep(var/mob/user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_radiation(3)
H.rad_act(30)
STOP_PROCESSING(SSprocessing, src)
ABSTRACT_TYPE(/obj/effect/decal/cleanable/greenglow/radioactive)
@@ -71,6 +69,13 @@ ABSTRACT_TYPE(/obj/effect/decal/cleanable/greenglow/radioactive)
light_power = 0.6
light_color = "#64C864"
/obj/effect/decal/cleanable/greenglow/radioactive/post_sweep(var/mob/user)
if(radioactivity)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.rad_act(radioactivity)
STOP_PROCESSING(SSprocessing, src)
/obj/effect/decal/cleanable/greenglow/radioactive/antagonist_hints(mob/user, distance, is_adjacent)
. += ..()
. += "Characters directly adjacent to or on top of this object will be exposed to <b>[radioactivity] IU/s</b> of radiation. Radiation falls off (approximately) by 75% for every tile away you move."
@@ -123,7 +128,6 @@ ABSTRACT_TYPE(/obj/effect/decal/cleanable/greenglow/radioactive)
/obj/effect/decal/cleanable/greenglow/radioactive/process()
SSradiation.radiate(src, radioactivity)
/obj/effect/decal/cleanable/cobweb
name = "cobweb"
desc = "Somebody should remove that."
@@ -7,6 +7,7 @@
anchored = TRUE
density = FALSE
mouse_opacity = MOUSE_OPACITY_ICON
layer = ABOVE_DOOR_LAYER
var/obj/item/plastique/parent
/obj/effect/plastic_explosive/feedback_hints(mob/user, distance, is_adjacent)
@@ -16,8 +17,8 @@
/obj/effect/plastic_explosive/Initialize(var/atom/owner_pos, var/atom/target, var/obj/item/plastique/c4)
. = ..()
parent = c4
if(parent)
parent = c4
parent.forceMove(src)
name = parent.name
desc = parent.desc
@@ -46,8 +47,8 @@
/obj/effect/plastic_explosive/attack_hand(mob/living/user)
to_chat(user, SPAN_WARNING("\The [src] is solidly attached, it doesn't budge!"))
/obj/effect/plastic_explosive/attackby(obj/item/attacking_item, mob/user)
return parent.attackby(attacking_item, user)
/obj/effect/plastic_explosive/attackby(obj/item/attacking_item, mob/user, click_parameters)
return parent.attackby(attacking_item, user, click_parameters)
/obj/effect/plastic_explosive/big
name = "bundled plastic explosives"
+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"
@@ -161,7 +161,7 @@
affect_ingest(M, alien, removed, holder)
/singleton/reagent/uranium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder)
M.apply_damage(5 * removed, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
M.apply_damage(5 * removed, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED, armor_pen = 100) //Radiation in the blood shouldn't check your radsuit.
/singleton/reagent/uranium/touch_turf(var/turf/T, var/amount, var/datum/reagents/holder)
if(amount >= 3)
@@ -186,7 +186,7 @@
/singleton/reagent/radioactive_waste/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder)
var/rad_damage = min(75, 40 * removed)
M.apply_effect(rad_damage, DAMAGE_RADIATION, blocked = 0)
M.apply_damage(rad_damage, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED, armor_pen = 100)
/singleton/reagent/radioactive_waste/touch_turf(var/turf/T, var/amount, var/datum/reagents/holder)
if(amount >= 3)
@@ -0,0 +1,8 @@
author: Fenodyree
delete-after: True
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."