Merge pull request #14112 from silicons/ex_act_3
~~hugboxes~~ fixes the bug (that was probably my fault) that makes 1 dev explosions ALWAYS delete brain
This commit is contained in:
@@ -239,8 +239,13 @@ GLOBAL_LIST_EMPTY(explosions)
|
||||
atoms += A
|
||||
for(var/i in atoms)
|
||||
var/atom/A = i
|
||||
if(!QDELETED(A))
|
||||
A.ex_act(dist)
|
||||
if(QDELETED(A))
|
||||
continue
|
||||
A.ex_act(dist, null, src)
|
||||
if(QDELETED(A) || !ismovable(A))
|
||||
continue
|
||||
var/atom/movable/AM = A
|
||||
LAZYADD(AM.acted_explosions, explosion_id)
|
||||
|
||||
if(flame_dist && prob(40) && !isspaceturf(T) && !T.density)
|
||||
new /obj/effect/hotspot(T) //Mostly for ambience!
|
||||
|
||||
+1
-1
@@ -548,7 +548,7 @@
|
||||
/atom/proc/contents_explosion(severity, target)
|
||||
return //For handling the effects of explosions on contents that would not normally be effected
|
||||
|
||||
/atom/proc/ex_act(severity, target)
|
||||
/atom/proc/ex_act(severity, target, datum/explosion/E)
|
||||
set waitfor = FALSE
|
||||
contents_explosion(severity, target)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_EX_ACT, severity, target)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//This is the proc for gibbing a mob. Cannot gib ghosts.
|
||||
//added different sort of gibs and animations. N
|
||||
/mob/proc/gib()
|
||||
/mob/proc/gib(no_brain, no_organs, no_bodyparts, datum/explosion/was_explosion)
|
||||
return
|
||||
|
||||
//This is the proc for turning a mob into ash. Mostly a copy of gib code (above).
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if(SSticker.mode)
|
||||
SSticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now
|
||||
|
||||
/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts)
|
||||
/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts, datum/explosion/was_explosion)
|
||||
var/atom/Tsec = drop_location()
|
||||
for(var/mob/M in src)
|
||||
if(M in stomach_contents)
|
||||
@@ -27,7 +27,7 @@
|
||||
"<span class='danger'>You burst out of [src]!</span>")
|
||||
..()
|
||||
|
||||
/mob/living/carbon/spill_organs(no_brain, no_organs, no_bodyparts)
|
||||
/mob/living/carbon/spill_organs(no_brain, no_organs, no_bodyparts, datum/explosion/was_explosion)
|
||||
var/atom/Tsec = drop_location()
|
||||
if(!no_bodyparts)
|
||||
if(no_organs)//so the organs don't get transfered inside the bodyparts we'll drop.
|
||||
@@ -41,6 +41,8 @@
|
||||
qdel(O) //so the brain isn't transfered to the head when the head drops.
|
||||
continue
|
||||
if(!(O.organ_flags & ORGAN_NO_DISMEMBERMENT) && check_zone(O.zone) == BODY_ZONE_CHEST)
|
||||
if(was_explosion)
|
||||
LAZYADD(O.acted_explosions, was_explosion.explosion_id)
|
||||
O.Remove()
|
||||
O.forceMove(Tsec)
|
||||
O.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
|
||||
@@ -50,13 +52,16 @@
|
||||
if(I.organ_flags & ORGAN_NO_DISMEMBERMENT || (no_brain && istype(I, /obj/item/organ/brain)) || (no_organs && !istype(I, /obj/item/organ/brain)))
|
||||
qdel(I)
|
||||
continue
|
||||
if(was_explosion)
|
||||
LAZYADD(I.acted_explosions, was_explosion.explosion_id)
|
||||
I.Remove()
|
||||
I.forceMove(Tsec)
|
||||
I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
|
||||
|
||||
|
||||
/mob/living/carbon/spread_bodyparts()
|
||||
/mob/living/carbon/spread_bodyparts(no_brain, no_organs, datum/explosion/was_explosion)
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(was_explosion)
|
||||
LAZYADD(BP.acted_explosions, was_explosion.explosion_id)
|
||||
BP.drop_limb()
|
||||
BP.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/gib(no_brain, no_organs, no_bodyparts)
|
||||
/mob/living/gib(no_brain, no_organs, no_bodyparts, datum/explosion/was_explosion)
|
||||
var/prev_lying = lying
|
||||
if(stat != DEAD)
|
||||
death(1)
|
||||
@@ -6,22 +6,22 @@
|
||||
if(!prev_lying)
|
||||
gib_animation()
|
||||
|
||||
spill_organs(no_brain, no_organs, no_bodyparts)
|
||||
spill_organs(no_brain, no_organs, no_bodyparts, was_explosion)
|
||||
|
||||
if(!no_bodyparts)
|
||||
spread_bodyparts(no_brain, no_organs)
|
||||
spread_bodyparts(no_brain, no_organs, was_explosion)
|
||||
|
||||
for(var/X in implants)
|
||||
var/obj/item/implant/I = X
|
||||
qdel(I)
|
||||
|
||||
spawn_gibs(no_bodyparts)
|
||||
spawn_gibs(no_bodyparts, null, was_explosion)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/proc/gib_animation()
|
||||
return
|
||||
|
||||
/mob/living/proc/spawn_gibs(with_bodyparts, atom/loc_override)
|
||||
/mob/living/proc/spawn_gibs(with_bodyparts, atom/loc_override, datum/explosion/was_explosion)
|
||||
var/location = loc_override ? loc_override.drop_location() : drop_location()
|
||||
if(mob_biotypes & MOB_ROBOTIC)
|
||||
new /obj/effect/gibspawner/robot(location, src, get_static_viruses())
|
||||
@@ -31,7 +31,7 @@
|
||||
/mob/living/proc/spill_organs()
|
||||
return
|
||||
|
||||
/mob/living/proc/spread_bodyparts()
|
||||
/mob/living/proc/spread_bodyparts(no_brain, no_organs, datum/explosion/was_explosion)
|
||||
return
|
||||
|
||||
/mob/living/dust(just_ash, drop_items, force)
|
||||
|
||||
Reference in New Issue
Block a user