mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Some explosions code cleanup (#57493)
Clears out two deprecated explosions systems (explosion ids and explosion levels) Refactors a bunch of contents_explosions procs to be maybe slightly faster. Cleans up a bunch of ex_act code. Slightly cleaner code A few less unused vars on /atom and /turf
This commit is contained in:
@@ -470,7 +470,6 @@ SUBSYSTEM_DEF(explosions)
|
||||
lowturf = list()
|
||||
for(var/thing in low_turf)
|
||||
var/turf/turf_thing = thing
|
||||
turf_thing.explosion_level = max(turf_thing.explosion_level, EXPLODE_LIGHT)
|
||||
turf_thing.ex_act(EXPLODE_LIGHT)
|
||||
cost_lowturf = MC_AVERAGE(cost_lowturf, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
|
||||
@@ -479,7 +478,6 @@ SUBSYSTEM_DEF(explosions)
|
||||
medturf = list()
|
||||
for(var/thing in med_turf)
|
||||
var/turf/turf_thing = thing
|
||||
turf_thing.explosion_level = max(turf_thing.explosion_level, EXPLODE_HEAVY)
|
||||
turf_thing.ex_act(EXPLODE_HEAVY)
|
||||
cost_medturf = MC_AVERAGE(cost_medturf, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
|
||||
@@ -488,7 +486,6 @@ SUBSYSTEM_DEF(explosions)
|
||||
highturf = list()
|
||||
for(var/thing in high_turf)
|
||||
var/turf/turf_thing = thing
|
||||
turf_thing.explosion_level = max(turf_thing.explosion_level, EXPLODE_DEVASTATE)
|
||||
turf_thing.ex_act(EXPLODE_DEVASTATE)
|
||||
cost_highturf = MC_AVERAGE(cost_highturf, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
var/atom/movable/moving_from_pull //attempt to resume grab after moving instead of before.
|
||||
var/list/client_mobs_in_contents // This contains all the client mobs within this container
|
||||
var/list/area_sensitive_contents // A (nested) list of contents that need to be sent signals to when moving between areas. Can include src.
|
||||
var/list/acted_explosions //for explosion dodging
|
||||
var/datum/forced_movement/force_moving = null //handled soley by forced_movement.dm
|
||||
|
||||
/**
|
||||
@@ -939,14 +938,6 @@
|
||||
. += "<option value='?_src_=holder;[HrefToken()];adminplayerobservefollow=[REF(src)]'>Follow</option>"
|
||||
. += "<option value='?_src_=holder;[HrefToken()];admingetmovable=[REF(src)]'>Get</option>"
|
||||
|
||||
/atom/movable/proc/ex_check(ex_id)
|
||||
if(!ex_id)
|
||||
return TRUE
|
||||
LAZYINITLIST(acted_explosions)
|
||||
if(ex_id in acted_explosions)
|
||||
return FALSE
|
||||
acted_explosions += ex_id
|
||||
return TRUE
|
||||
|
||||
/* Language procs
|
||||
* Unless you are doing something very specific, these are the ones you want to use.
|
||||
|
||||
@@ -78,10 +78,22 @@
|
||||
stored_id_card = null
|
||||
|
||||
/obj/machinery/pdapainter/contents_explosion(severity, target)
|
||||
if(stored_pda)
|
||||
stored_pda.ex_act(severity, target)
|
||||
if(stored_id_card)
|
||||
stored_id_card.ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
if(stored_pda)
|
||||
SSexplosions.high_mov_atom += stored_pda
|
||||
if(stored_id_card)
|
||||
SSexplosions.high_mov_atom += stored_id_card
|
||||
if(EXPLODE_HEAVY)
|
||||
if(stored_pda)
|
||||
SSexplosions.med_mov_atom += stored_pda
|
||||
if(stored_id_card)
|
||||
SSexplosions.med_mov_atom += stored_id_card
|
||||
if(EXPLODE_LIGHT)
|
||||
if(stored_pda)
|
||||
SSexplosions.low_mov_atom += stored_pda
|
||||
if(stored_id_card)
|
||||
SSexplosions.low_mov_atom += stored_id_card
|
||||
|
||||
/obj/machinery/pdapainter/handle_atom_del(atom/A)
|
||||
if(A == stored_pda)
|
||||
|
||||
@@ -548,7 +548,16 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/contents_explosion(severity, target)
|
||||
occupant?.ex_act(severity, target)
|
||||
if(!occupant)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += occupant
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += occupant
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += occupant
|
||||
|
||||
/obj/machinery/handle_atom_del(atom/A)
|
||||
if(A == occupant)
|
||||
|
||||
@@ -42,8 +42,16 @@
|
||||
storedpart = null
|
||||
|
||||
/obj/machinery/aug_manipulator/contents_explosion(severity, target)
|
||||
if(storedpart)
|
||||
storedpart.ex_act(severity, target)
|
||||
if(!storedpart)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += storedpart
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += storedpart
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += storedpart
|
||||
|
||||
/obj/machinery/aug_manipulator/handle_atom_del(atom/A)
|
||||
if(A == storedpart)
|
||||
|
||||
@@ -173,8 +173,8 @@
|
||||
|
||||
/obj/machinery/camera/ex_act(severity, target)
|
||||
if(invuln)
|
||||
return
|
||||
..()
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/camera/proc/setViewRange(num = 7)
|
||||
src.view_range = num
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
/obj/machinery/door/ex_act(severity, target)
|
||||
//if it blows up a wall it should blow up a door
|
||||
..(severity ? max(1, severity - 1) : 0, target)
|
||||
return ..(severity ? max(1, severity - 1) : 0, target)
|
||||
|
||||
/obj/machinery/door/GetExplosionBlock()
|
||||
return density ? real_explosion_block : 0
|
||||
|
||||
@@ -68,4 +68,4 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/password/ex_act(severity, target)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
@@ -141,9 +141,9 @@
|
||||
|
||||
//"BLAST" doors are obviously stronger than regular doors when it comes to BLASTS.
|
||||
/obj/machinery/door/poddoor/ex_act(severity, target)
|
||||
if(severity == 3)
|
||||
return
|
||||
..()
|
||||
if(severity == EXPLODE_LIGHT)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/poddoor/do_animate(animation)
|
||||
switch(animation)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
return
|
||||
|
||||
/obj/effect/anomaly/ex_act(severity, target)
|
||||
if(severity == 1)
|
||||
if(severity == EXPLODE_DEVASTATE)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/anomaly/proc/anomalyNeutralize()
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/fire_act(exposed_temperature, exposed_volume)
|
||||
if(reagents)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
streak(dirs)
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/ex_act()
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/up
|
||||
icon_state = "xgibup1"
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
AddComponent(/datum/component/rot/gibs)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/ex_act(severity, target)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/Crossed(atom/movable/L)
|
||||
if(isliving(L) && has_gravity(loc))
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
beauty = -300
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/ex_act()
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/filled/Initialize()
|
||||
. = ..()
|
||||
@@ -181,7 +181,7 @@
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/shreds/ex_act(severity, target)
|
||||
if(severity == 1) //so shreds created during an explosion aren't deleted by the explosion.
|
||||
if(severity == EXPLODE_DEVASTATE) //so shreds created during an explosion aren't deleted by the explosion.
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/shreds/Initialize(mapload, oldname)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
streak(dirs)
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/ex_act()
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/limb
|
||||
icon_state = "gibarm"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
return
|
||||
|
||||
/obj/effect/ex_act(severity, target)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/effect/singularity_act()
|
||||
qdel(src)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/effect/dummy/phased_mob/ex_act()
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/effect/dummy/phased_mob/bullet_act(blah)
|
||||
return BULLET_ACT_FORCE_PIERCE
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/chrono_field/ex_act()
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/structure/chrono_field/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/portable_chem_mixer/ex_act(severity, target)
|
||||
if(severity < 3)
|
||||
..()
|
||||
if(severity < EXPLODE_LIGHT)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/portable_chem_mixer/attackby(obj/item/I, mob/user, params)
|
||||
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
/obj/item/latexballon/ex_act(severity, target)
|
||||
burst()
|
||||
switch(severity)
|
||||
if (1)
|
||||
if (EXPLODE_DEVASTATE)
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (EXPLODE_HEAVY)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -487,8 +487,10 @@
|
||||
balanced = 0
|
||||
|
||||
/obj/item/melee/supermatter_sword/ex_act(severity, target)
|
||||
visible_message("<span class='danger'>The blast wave smacks into [src] and rapidly flashes to ash.</span>",\
|
||||
"<span class='hear'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||
visible_message(
|
||||
"<span class='danger'>The blast wave smacks into [src] and rapidly flashes to ash.</span>",
|
||||
"<span class='hear'>You hear a loud crack as you are washed with a wave of heat.</span>"
|
||||
)
|
||||
consume_everything()
|
||||
|
||||
/obj/item/melee/supermatter_sword/acid_act()
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/keycard/ex_act(severity, target)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/door/keycard/try_to_activate_door(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -19,14 +19,13 @@
|
||||
return FALSE
|
||||
|
||||
/obj/item/storage/contents_explosion(severity, target)
|
||||
for(var/thing in contents)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += thing
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += thing
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += thing
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += contents
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += contents
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += contents
|
||||
|
||||
/obj/item/storage/canStrip(mob/who)
|
||||
. = ..()
|
||||
|
||||
@@ -57,18 +57,19 @@
|
||||
/obj/ex_act(severity, target)
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
return
|
||||
..() //contents explosion
|
||||
|
||||
. = ..() //contents explosion
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(target == src)
|
||||
take_damage(INFINITY, BRUTE, BOMB, 0)
|
||||
return
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
take_damage(INFINITY, BRUTE, BOMB, 0)
|
||||
if(2)
|
||||
if(EXPLODE_HEAVY)
|
||||
take_damage(rand(100, 250), BRUTE, BOMB, 0)
|
||||
if(3)
|
||||
if(EXPLODE_LIGHT)
|
||||
take_damage(rand(10, 90), BRUTE, BOMB, 0)
|
||||
|
||||
/obj/bullet_act(obj/projectile/P)
|
||||
|
||||
@@ -502,14 +502,13 @@
|
||||
req_access += pick(SSid_access.get_region_access_list(list(REGION_ALL_STATION)))
|
||||
|
||||
/obj/structure/closet/contents_explosion(severity, target)
|
||||
for(var/thing in contents)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += thing
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += thing
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += thing
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += contents
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += contents
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += contents
|
||||
|
||||
/obj/structure/closet/singularity_act()
|
||||
dump_contents()
|
||||
|
||||
@@ -21,10 +21,9 @@
|
||||
recursive_organ_check(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/ex_act()
|
||||
if(!jones)
|
||||
jones = TRUE
|
||||
else
|
||||
..()
|
||||
if(jones)
|
||||
return ..()
|
||||
jones = TRUE
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen
|
||||
name = "kitchen cabinet"
|
||||
|
||||
@@ -32,14 +32,16 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/contents_explosion(severity, target)
|
||||
if(stored_extinguisher)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += stored_extinguisher
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += stored_extinguisher
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += stored_extinguisher
|
||||
if(!stored_extinguisher)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += stored_extinguisher
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += stored_extinguisher
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += stored_extinguisher
|
||||
|
||||
/obj/structure/extinguisher_cabinet/handle_atom_del(atom/A)
|
||||
if(A == stored_extinguisher)
|
||||
|
||||
@@ -113,14 +113,13 @@
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/guncase/contents_explosion(severity, target)
|
||||
for(var/thing in contents)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += thing
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += thing
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += thing
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += contents
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += contents
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += contents
|
||||
|
||||
/obj/structure/guncase/shotgun
|
||||
name = "shotgun locker"
|
||||
|
||||
@@ -246,9 +246,8 @@
|
||||
|
||||
/obj/structure/reflector/ex_act()
|
||||
if(admin)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/reflector/singularity_act()
|
||||
if(admin)
|
||||
|
||||
@@ -83,7 +83,7 @@ FLOOR SAFES
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity, target)
|
||||
if(((severity == 2 && target == src) || severity == 1) && explosion_count < BROKEN_THRESHOLD)
|
||||
if(((severity == EXPLODE_HEAVY && target == src) || severity == EXPLODE_DEVASTATE) && explosion_count < BROKEN_THRESHOLD)
|
||||
explosion_count++
|
||||
switch(explosion_count)
|
||||
if(1)
|
||||
|
||||
@@ -80,8 +80,16 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/tank_holder/contents_explosion(severity, target)
|
||||
if(tank)
|
||||
tank.ex_act(severity, target)
|
||||
if(!tank)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += tank
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += tank
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += tank
|
||||
|
||||
/// Call this after taking the tank from contents in order to update references, icon
|
||||
/// and density.
|
||||
|
||||
@@ -60,19 +60,18 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/transit_tube_pod/ex_act(severity, target)
|
||||
..()
|
||||
. = ..()
|
||||
if(!QDELETED(src))
|
||||
empty_pod()
|
||||
|
||||
/obj/structure/transit_tube_pod/contents_explosion(severity, target)
|
||||
for(var/thing in contents)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += thing
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += thing
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += thing
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += contents
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += contents
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += contents
|
||||
|
||||
/obj/structure/transit_tube_pod/singularity_pull(S, current_size)
|
||||
..()
|
||||
|
||||
@@ -82,8 +82,6 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
var/old_corners = corners
|
||||
var/old_directional_opacity = directional_opacity
|
||||
|
||||
var/old_exl = explosion_level
|
||||
var/old_exi = explosion_id
|
||||
var/old_bp = blueprint_data
|
||||
blueprint_data = null
|
||||
|
||||
@@ -108,9 +106,6 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
else
|
||||
W.baseturfs = baseturfs_string_list(old_baseturfs, W) //Just to be safe
|
||||
|
||||
W.explosion_id = old_exi
|
||||
W.explosion_level = old_exl
|
||||
|
||||
if(!(flags & CHANGETURF_DEFER_CHANGE))
|
||||
W.AfterChange(flags, old_type)
|
||||
|
||||
|
||||
@@ -162,16 +162,16 @@
|
||||
ScrapeAway()
|
||||
|
||||
/turf/closed/mineral/ex_act(severity, target)
|
||||
..()
|
||||
. = ..()
|
||||
switch(severity)
|
||||
if(3)
|
||||
if (prob(75))
|
||||
gets_drilled(null, FALSE)
|
||||
if(2)
|
||||
if (prob(90))
|
||||
gets_drilled(null, FALSE)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
gets_drilled(null, FALSE)
|
||||
if(EXPLODE_HEAVY)
|
||||
if(prob(90))
|
||||
gets_drilled(null, FALSE)
|
||||
if(EXPLODE_LIGHT)
|
||||
if(prob(75))
|
||||
gets_drilled(null, FALSE)
|
||||
return
|
||||
|
||||
/turf/closed/mineral/random
|
||||
@@ -674,6 +674,6 @@
|
||||
return
|
||||
|
||||
/turf/closed/mineral/strong/ex_act(severity, target)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
#undef MINING_MESSAGE_COOLDOWN
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
/turf/closed/wall/mineral/plastitanium/explosive/ex_act(severity)
|
||||
var/obj/item/bombcore/large/bombcore = new(get_turf(src))
|
||||
bombcore.detonate()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/turf/closed/wall/mineral/plastitanium/hulk_recoil(obj/item/bodypart/arm, mob/living/carbon/human/hulkman, damage = 41)
|
||||
return ..()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
/turf/closed/wall/attack_tk()
|
||||
return
|
||||
|
||||
/turf/closed/wall/proc/dismantle_wall(devastated=0, explode=0)
|
||||
/turf/closed/wall/proc/dismantle_wall(devastated = FALSE, explode = FALSE)
|
||||
if(devastated)
|
||||
devastate_wall()
|
||||
else
|
||||
@@ -92,18 +92,16 @@
|
||||
if(target == src)
|
||||
dismantle_wall(1,1)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
//SN src = null
|
||||
var/turf/NT = ScrapeAway()
|
||||
NT.contents_explosion(severity, target)
|
||||
return
|
||||
if(2)
|
||||
if (prob(50))
|
||||
dismantle_wall(0,1)
|
||||
else
|
||||
dismantle_wall(1,1)
|
||||
if(3)
|
||||
if(EXPLODE_HEAVY)
|
||||
dismantle_wall(prob(50), TRUE)
|
||||
if(EXPLODE_LIGHT)
|
||||
if (prob(hardness))
|
||||
dismantle_wall(0,1)
|
||||
if(!density)
|
||||
|
||||
@@ -61,21 +61,22 @@
|
||||
return ..()
|
||||
|
||||
/turf/open/floor/ex_act(severity, target)
|
||||
var/shielded = is_shielded()
|
||||
..()
|
||||
if(severity != 1 && shielded && target != src)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
if(target == src)
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
return
|
||||
if(target != null)
|
||||
severity = 3
|
||||
return TRUE
|
||||
if(severity != EXPLODE_DEVASTATE && is_shielded())
|
||||
return FALSE
|
||||
|
||||
if(target)
|
||||
severity = EXPLODE_LIGHT
|
||||
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
ScrapeAway(2, flags = CHANGETURF_INHERIT_AIR)
|
||||
if(2)
|
||||
switch(rand(1,3))
|
||||
if(EXPLODE_HEAVY)
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
if(!length(baseturfs) || !ispath(baseturfs[baseturfs.len-1], /turf/open/floor))
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
@@ -94,7 +95,7 @@
|
||||
hotspot_expose(1000,CELL_VOLUME)
|
||||
if(prob(33))
|
||||
new /obj/item/stack/sheet/iron(src)
|
||||
if(3)
|
||||
if(EXPLODE_LIGHT)
|
||||
if (prob(50))
|
||||
src.break_tile()
|
||||
src.hotspot_expose(1000,CELL_VOLUME)
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
return FALSE
|
||||
|
||||
/turf/open/floor/plating/foam/ex_act()
|
||||
..()
|
||||
. = ..()
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
|
||||
/turf/open/floor/plating/foam/tool_act(mob/living/user, obj/item/I, tool_type)
|
||||
|
||||
@@ -53,16 +53,16 @@
|
||||
acidpwr = min(acidpwr, 50) //we reduce the power so reinf floor never get melted.
|
||||
return ..()
|
||||
|
||||
/turf/open/floor/engine/ex_act(severity,target)
|
||||
var/shielded = is_shielded()
|
||||
/turf/open/floor/engine/ex_act(severity, target)
|
||||
contents_explosion(severity, target)
|
||||
if(severity != 1 && shielded && target != src)
|
||||
return
|
||||
if(target == src)
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
return
|
||||
return TRUE
|
||||
if(severity != EXPLODE_DEVASTATE && is_shielded())
|
||||
return FALSE
|
||||
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
if(prob(80))
|
||||
if(!length(baseturfs) || !ispath(baseturfs[baseturfs.len-1], /turf/open/floor))
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
@@ -73,7 +73,7 @@
|
||||
ScrapeAway(2, flags = CHANGETURF_INHERIT_AIR)
|
||||
else
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
if(2)
|
||||
if(EXPLODE_HEAVY)
|
||||
if(prob(50))
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
|
||||
var/list/image/blueprint_data //for the station blueprints, images of objects eg: pipes
|
||||
|
||||
var/explosion_level = 0 //for preventing explosion dodging
|
||||
var/explosion_id = 0
|
||||
var/list/explosion_throw_details
|
||||
|
||||
var/requires_activation //add to air processing after initialize?
|
||||
@@ -480,8 +478,6 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
var/atom/movable/movable_thing = thing
|
||||
if(QDELETED(movable_thing))
|
||||
continue
|
||||
if(!movable_thing.ex_check(explosion_id))
|
||||
continue
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += movable_thing
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
//Immunities
|
||||
|
||||
/mob/living/simple_animal/revenant/ex_act(severity, target)
|
||||
return 1 //Immune to the effects of explosions.
|
||||
return FALSE //Immune to the effects of explosions.
|
||||
|
||||
/mob/living/simple_animal/revenant/blob_act(obj/structure/blob/B)
|
||||
return //blah blah blobs aren't in tune with the spirit world, or something.
|
||||
|
||||
@@ -249,11 +249,11 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/imp/slaughter/laughter/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
death()
|
||||
if(2)
|
||||
if(EXPLODE_HEAVY)
|
||||
adjustBruteLoss(60)
|
||||
if(3)
|
||||
if(EXPLODE_LIGHT)
|
||||
adjustBruteLoss(30)
|
||||
|
||||
/mob/living/simple_animal/hostile/imp/slaughter/laughter/proc/release_friends()
|
||||
|
||||
@@ -163,15 +163,17 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/contents_explosion(severity, target)
|
||||
..()
|
||||
if(beaker)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += beaker
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += beaker
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += beaker
|
||||
. = ..()
|
||||
if(!beaker)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += beaker
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += beaker
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += beaker
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/handle_atom_del(atom/A)
|
||||
..()
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/ex_act(severity, target)
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
return //Indestructable cans shouldn't release air
|
||||
if(severity == 1 || target == src)
|
||||
return FALSE //Indestructable cans shouldn't release air
|
||||
|
||||
if(severity == EXPLODE_DEVASTATE || target == src)
|
||||
//This explosion will destroy the can, release its air.
|
||||
var/turf/T = get_turf(src)
|
||||
T.assume_air(air_contents)
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
..()
|
||||
|
||||
/obj/structure/closet/supplypod/ex_act() //Explosions dont do SHIT TO US! This is because supplypods create explosions when they land.
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/structure/closet/supplypod/contents_explosion() //Supplypods also protect their contents from the harmful effects of fucking exploding.
|
||||
return
|
||||
|
||||
@@ -27,15 +27,17 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/biogenerator/contents_explosion(severity, target)
|
||||
..()
|
||||
if(beaker)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += beaker
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += beaker
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += beaker
|
||||
. = ..()
|
||||
if(!beaker)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += beaker
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += beaker
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += beaker
|
||||
|
||||
/obj/machinery/biogenerator/handle_atom_del(atom/A)
|
||||
..()
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
// Variety of overrides so the overlays don't get affected by weird things.
|
||||
|
||||
/atom/movable/lighting_object/ex_act(severity)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/atom/movable/lighting_object/singularity_act()
|
||||
return
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/ex_act(severity, target)
|
||||
do_sparks(5, TRUE, src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][powered() ? null : "-off"]"
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/ex_act(severity, target)
|
||||
do_sparks(5, TRUE, src)
|
||||
if(prob(50 / severity) && severity < 3)
|
||||
if(prob(50 / severity) && severity < EXPLODE_LIGHT)
|
||||
qdel(src)
|
||||
|
||||
/****************Golem Point Vendor**************************/
|
||||
|
||||
@@ -131,9 +131,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/ore/glass/ex_act(severity, target)
|
||||
if (severity == EXPLODE_NONE)
|
||||
return
|
||||
qdel(src)
|
||||
if(severity != EXPLODE_NONE)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/ore/glass/basalt
|
||||
name = "volcanic ash"
|
||||
@@ -335,9 +334,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
pixel_y = base_pixel_y + rand(0, 8) - 8
|
||||
|
||||
/obj/item/stack/ore/ex_act(severity, target)
|
||||
if (!severity || severity >= 2)
|
||||
return
|
||||
qdel(src)
|
||||
if(severity == EXPLODE_DEVASTATE)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/*****************************Coin********************************/
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
/mob/living/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/mob/living/brain/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
@@ -102,10 +102,12 @@ In all, this is a lot like the monkey code. /N
|
||||
|
||||
/mob/living/carbon/alien/ex_act(severity, target, origin)
|
||||
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
return
|
||||
..()
|
||||
return FALSE
|
||||
|
||||
. = ..()
|
||||
if(QDELETED(src))
|
||||
return
|
||||
|
||||
var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS)
|
||||
switch (severity)
|
||||
if (EXPLODE_DEVASTATE)
|
||||
|
||||
@@ -378,8 +378,9 @@
|
||||
|
||||
/mob/living/carbon/human/ex_act(severity, target, origin)
|
||||
if(TRAIT_BOMBIMMUNE in dna.species.species_traits)
|
||||
return
|
||||
..()
|
||||
return FALSE
|
||||
|
||||
. = ..()
|
||||
if (!severity || QDELETED(src))
|
||||
return
|
||||
var/brute_loss = 0
|
||||
@@ -433,7 +434,7 @@
|
||||
take_overall_damage(brute_loss,burn_loss)
|
||||
|
||||
//attempt to dismember bodyparts
|
||||
if(severity <= 2 || !bomb_armor)
|
||||
if(severity <= EXPLODE_HEAVY || !bomb_armor)
|
||||
var/max_limb_loss = round(4/severity) //so you don't lose four limbs at severity 3.
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
|
||||
@@ -326,8 +326,8 @@
|
||||
|
||||
/mob/living/ex_act(severity, target, origin)
|
||||
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
return
|
||||
..()
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
//Looking for irradiate()? It's been moved to radiation.dm under the rad_act() for mobs.
|
||||
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
|
||||
/mob/living/silicon/ai/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
gib()
|
||||
if(2)
|
||||
if(EXPLODE_HEAVY)
|
||||
if (stat != DEAD)
|
||||
adjustBruteLoss(60)
|
||||
adjustFireLoss(60)
|
||||
if(3)
|
||||
if(EXPLODE_LIGHT)
|
||||
if (stat != DEAD)
|
||||
adjustBruteLoss(30)
|
||||
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
/mob/living/silicon/pai/ex_act(severity, target)
|
||||
take_holo_damage(severity * 50)
|
||||
switch(severity)
|
||||
if(1) //RIP
|
||||
if(EXPLODE_DEVASTATE) //RIP
|
||||
qdel(card)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(EXPLODE_HEAVY)
|
||||
fold_in(force = 1)
|
||||
Paralyze(400)
|
||||
if(3)
|
||||
if(EXPLODE_LIGHT)
|
||||
fold_in(force = 1)
|
||||
Paralyze(200)
|
||||
|
||||
|
||||
@@ -393,14 +393,14 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
|
||||
|
||||
/mob/living/silicon/robot/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
gib()
|
||||
return
|
||||
if(2)
|
||||
if(EXPLODE_HEAVY)
|
||||
if (stat != DEAD)
|
||||
adjustBruteLoss(60)
|
||||
adjustFireLoss(60)
|
||||
if(3)
|
||||
if(EXPLODE_LIGHT)
|
||||
if (stat != DEAD)
|
||||
adjustBruteLoss(30)
|
||||
|
||||
|
||||
@@ -142,8 +142,9 @@
|
||||
|
||||
/mob/living/simple_animal/ex_act(severity, target, origin)
|
||||
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
return
|
||||
..()
|
||||
return FALSE
|
||||
|
||||
. = ..()
|
||||
if(QDELETED(src))
|
||||
return
|
||||
var/bomb_armor = getarmor(null, BOMB)
|
||||
@@ -160,7 +161,7 @@
|
||||
bloss = bloss / 1.5
|
||||
adjustBruteLoss(bloss)
|
||||
|
||||
if(EXPLODE_LIGHT)
|
||||
if (EXPLODE_LIGHT)
|
||||
var/bloss = 30
|
||||
if(prob(bomb_armor))
|
||||
bloss = bloss / 1.5
|
||||
|
||||
@@ -213,12 +213,12 @@
|
||||
/mob/living/simple_animal/bot/mulebot/ex_act(severity)
|
||||
unload(0)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
qdel(src)
|
||||
if(2)
|
||||
for(var/i = 1; i < 3; i++)
|
||||
wires.cut_random()
|
||||
if(3)
|
||||
if(EXPLODE_HEAVY)
|
||||
wires.cut_random()
|
||||
wires.cut_random()
|
||||
if(EXPLODE_LIGHT)
|
||||
wires.cut_random()
|
||||
|
||||
|
||||
|
||||
@@ -270,12 +270,12 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
gib()
|
||||
return
|
||||
if(2)
|
||||
return TRUE
|
||||
if(EXPLODE_HEAVY)
|
||||
adjustBruteLoss(60)
|
||||
if(3)
|
||||
if(EXPLODE_LIGHT)
|
||||
adjustBruteLoss(30)
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/gib()
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
var/toggle = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/protector/ex_act(severity)
|
||||
if(severity == 1)
|
||||
if(severity == EXPLODE_DEVASTATE)
|
||||
adjustBruteLoss(400) //if in protector mode, will do 20 damage and not actually necessarily kill the summoner
|
||||
else
|
||||
..()
|
||||
. = ..()
|
||||
if(QDELETED(src))
|
||||
return
|
||||
return FALSE
|
||||
if(toggle)
|
||||
visible_message("<span class='danger'>The explosion glances off [src]'s energy shielding!</span>")
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/cockroach/ex_act() //Explosions are a terrible way to handle a cockroach.
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/cockroach/hauberoach
|
||||
name = "hauberoach"
|
||||
|
||||
@@ -140,7 +140,7 @@ Difficulty: Medium
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/ex_act(severity, target)
|
||||
if(dash())
|
||||
return
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/MeleeAction(patience = TRUE)
|
||||
|
||||
@@ -439,7 +439,8 @@ Difficulty: Hard
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/ex_act(severity, target)
|
||||
if(severity >= EXPLODE_LIGHT)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
severity = EXPLODE_LIGHT // puny mortals
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ Difficulty: Extremely Hard
|
||||
target.ex_act(EXPLODE_HEAVY)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/ex_act(severity, target)
|
||||
adjustBruteLoss(30 * severity - 120)
|
||||
adjustBruteLoss((30 * severity) - 120)
|
||||
visible_message("<span class='danger'>[src] absorbs the explosion!</span>", "<span class='userdanger'>You absorb the explosion!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/Goto(target, delay, minimum_distance)
|
||||
|
||||
@@ -402,8 +402,8 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/ex_act(severity, target)
|
||||
if(severity == EXPLODE_LIGHT)
|
||||
return
|
||||
..()
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (swooping & SWOOP_INVULNERABLE))
|
||||
|
||||
@@ -62,11 +62,11 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
gib()
|
||||
if(2)
|
||||
if(EXPLODE_HEAVY)
|
||||
adjustBruteLoss(140)
|
||||
if(3)
|
||||
if(EXPLODE_LIGHT)
|
||||
adjustBruteLoss(110)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/AttackingTarget()
|
||||
|
||||
@@ -128,15 +128,17 @@
|
||||
// Stronger explosions cause serious damage to internal components
|
||||
// Minor explosions are mostly mitigitated by casing.
|
||||
/obj/machinery/modular_computer/ex_act(severity)
|
||||
if(cpu)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += cpu
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += cpu
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += cpu
|
||||
..()
|
||||
if(!cpu)
|
||||
return ..()
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += cpu
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += cpu
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += cpu
|
||||
return ..()
|
||||
|
||||
// EMPs are similar to explosions, but don't cause physical damage to the casing. Instead they screw up the components
|
||||
/obj/machinery/modular_computer/emp_act(severity)
|
||||
|
||||
@@ -136,15 +136,17 @@
|
||||
charge = 0
|
||||
|
||||
/obj/item/stock_parts/cell/ex_act(severity, target)
|
||||
..()
|
||||
if(!QDELETED(src))
|
||||
switch(severity)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
corrupt()
|
||||
if(3)
|
||||
if(prob(25))
|
||||
corrupt()
|
||||
. = ..()
|
||||
if(QDELETED(src))
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_HEAVY)
|
||||
if(prob(50))
|
||||
corrupt()
|
||||
if(EXPLODE_LIGHT)
|
||||
if(prob(25))
|
||||
corrupt()
|
||||
|
||||
/obj/item/stock_parts/cell/attack_self(mob/user)
|
||||
if(isethereal(user))
|
||||
|
||||
@@ -38,7 +38,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/gravity_generator/ex_act(severity, target)
|
||||
if(severity == 1) // Very sturdy.
|
||||
if(severity == EXPLODE_DEVASTATE) // Very sturdy.
|
||||
set_broken()
|
||||
|
||||
/obj/machinery/gravity_generator/blob_act(obj/structure/blob/B)
|
||||
|
||||
@@ -121,17 +121,17 @@
|
||||
|
||||
/obj/singularity/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
if(current_size <= STAGE_TWO)
|
||||
investigate_log("has been destroyed by a heavy explosion.", INVESTIGATE_SINGULO)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
energy -= round(((energy+1)/2),1)
|
||||
if(2)
|
||||
energy -= round(((energy+1)/3),1)
|
||||
if(3)
|
||||
energy -= round(((energy+1)/4),1)
|
||||
|
||||
energy -= round(((energy + 1) / 2), 1)
|
||||
if(EXPLODE_HEAVY)
|
||||
energy -= round(((energy + 1) / 3), 1)
|
||||
if(EXPLODE_LIGHT)
|
||||
energy -= round(((energy + 1) / 4), 1)
|
||||
|
||||
/obj/singularity/process(delta_time)
|
||||
if(current_size >= STAGE_TWO)
|
||||
|
||||
@@ -171,4 +171,4 @@
|
||||
return
|
||||
|
||||
/obj/projectile/blastwave/ex_act()
|
||||
return
|
||||
return FALSE
|
||||
|
||||
@@ -162,19 +162,22 @@
|
||||
obj_flags |= EMAGGED
|
||||
|
||||
/obj/machinery/chem_dispenser/ex_act(severity, target)
|
||||
if(severity < 3)
|
||||
..()
|
||||
if(severity >= EXPLODE_LIGHT) // Note that the explosion defines are inverted. Stronger explosions have smaller numbers.
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_dispenser/contents_explosion(severity, target)
|
||||
..()
|
||||
if(beaker)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += beaker
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += beaker
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += beaker
|
||||
if(!beaker)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += beaker
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += beaker
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += beaker
|
||||
|
||||
/obj/machinery/chem_dispenser/handle_atom_del(atom/A)
|
||||
..()
|
||||
|
||||
@@ -65,26 +65,27 @@
|
||||
reagents.maximum_volume += B.reagents.maximum_volume
|
||||
|
||||
/obj/machinery/chem_master/ex_act(severity, target)
|
||||
if(severity < 3)
|
||||
..()
|
||||
if(severity >= EXPLODE_LIGHT) // This actually makes the dispenser immune to explosions at least as weak as [EXPLODE_LIGHT]. Don't ask me why the defines are inverted. I don't know.
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_master/contents_explosion(severity, target)
|
||||
..()
|
||||
if(beaker)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
. = ..()
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
if(beaker)
|
||||
SSexplosions.high_mov_atom += beaker
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += beaker
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += beaker
|
||||
if(bottle)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
if(bottle)
|
||||
SSexplosions.high_mov_atom += bottle
|
||||
if(EXPLODE_HEAVY)
|
||||
if(EXPLODE_HEAVY)
|
||||
if(beaker)
|
||||
SSexplosions.med_mov_atom += beaker
|
||||
if(bottle)
|
||||
SSexplosions.med_mov_atom += bottle
|
||||
if(EXPLODE_LIGHT)
|
||||
if(EXPLODE_LIGHT)
|
||||
if(beaker)
|
||||
SSexplosions.low_mov_atom += beaker
|
||||
if(bottle)
|
||||
SSexplosions.low_mov_atom += bottle
|
||||
|
||||
/obj/machinery/chem_master/handle_atom_del(atom/A)
|
||||
|
||||
@@ -52,14 +52,16 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/reagentgrinder/contents_explosion(severity, target)
|
||||
if(beaker)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += beaker
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += beaker
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += beaker
|
||||
if(!beaker)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += beaker
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += beaker
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += beaker
|
||||
|
||||
/obj/machinery/reagentgrinder/RefreshParts()
|
||||
speed = 1
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
if(!QDELETED(src))
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/fire_act(exposed_temperature, exposed_volume)
|
||||
reagents.expose_temperature(exposed_temperature)
|
||||
|
||||
@@ -144,4 +144,4 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/disposalholder/ex_act(severity, target)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
@@ -119,8 +119,7 @@
|
||||
// pipe affected by explosion
|
||||
/obj/structure/disposalpipe/contents_explosion(severity, target)
|
||||
var/obj/structure/disposalholder/H = locate() in src
|
||||
if(H)
|
||||
H.contents_explosion(severity, target)
|
||||
H?.contents_explosion(severity, target)
|
||||
|
||||
|
||||
//welding tool: unfasten and convert to obj/disposalconstruct
|
||||
|
||||
@@ -26,14 +26,13 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/big_delivery/contents_explosion(severity, target)
|
||||
for(var/thing in contents)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += thing
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += thing
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += thing
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += contents
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += contents
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += contents
|
||||
|
||||
/obj/structure/big_delivery/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -177,14 +176,13 @@
|
||||
var/obj/item/barcode/sticker
|
||||
|
||||
/obj/item/small_delivery/contents_explosion(severity, target)
|
||||
for(var/thing in contents)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += thing
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += thing
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += thing
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += contents
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += contents
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += contents
|
||||
|
||||
/obj/item/small_delivery/attack_self(mob/user)
|
||||
to_chat(user, "<span class='notice'>You start to unwrap the package...</span>")
|
||||
|
||||
@@ -262,12 +262,13 @@ Burning extracts:
|
||||
user.visible_message("<span class='warning'>[user] activates [src]. It's going to explode!</span>", "<span class='danger'>You activate [src]. It crackles in anticipation</span>")
|
||||
addtimer(CALLBACK(src, .proc/boom), 50)
|
||||
|
||||
/// Inflicts a blastwave upon every mob within a small radius.
|
||||
/obj/item/slimecross/burning/oil/proc/boom()
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, 'sound/effects/explosion2.ogg', 200, TRUE)
|
||||
for(var/mob/living/M in range(2, T))
|
||||
new /obj/effect/temp_visual/explosion(get_turf(M))
|
||||
M.ex_act(EXPLODE_HEAVY)
|
||||
for(var/mob/living/target in range(2, T))
|
||||
new /obj/effect/temp_visual/explosion(get_turf(target))
|
||||
SSexplosions.med_mov_atom += target
|
||||
qdel(src)
|
||||
|
||||
/obj/item/slimecross/burning/black
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/power/emitter/energycannon/magical/ex_act(severity)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/power/emitter/energycannon/magical/emag_act(mob/user)
|
||||
return
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
var/obj/machinery/parent
|
||||
|
||||
/obj/structure/filler/ex_act()
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/computer/bsa_control
|
||||
name = "bluespace artillery control"
|
||||
|
||||
@@ -122,31 +122,33 @@
|
||||
if(prob(deflect_chance))
|
||||
severity++
|
||||
log_message("Armor saved, changing severity to [severity]", LOG_MECHA)
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/sealed/mecha/contents_explosion(severity, target)
|
||||
severity++
|
||||
for(var/X in equipment)
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = X
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += ME
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += ME
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += ME
|
||||
for(var/Y in trackers)
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = Y
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += MT
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += MT
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += MT
|
||||
for(var/Z in occupants)
|
||||
var/mob/living/occupant = Z
|
||||
occupant.ex_act(severity,target)
|
||||
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
if(equipment)
|
||||
SSexplosions.high_mov_atom += equipment
|
||||
if(trackers)
|
||||
SSexplosions.high_mov_atom += trackers
|
||||
if(occupants)
|
||||
SSexplosions.high_mov_atom += occupants
|
||||
if(EXPLODE_HEAVY)
|
||||
if(equipment)
|
||||
SSexplosions.med_mov_atom += equipment
|
||||
if(trackers)
|
||||
SSexplosions.med_mov_atom += trackers
|
||||
if(occupants)
|
||||
SSexplosions.med_mov_atom += occupants
|
||||
if(EXPLODE_LIGHT)
|
||||
if(equipment)
|
||||
SSexplosions.low_mov_atom += equipment
|
||||
if(trackers)
|
||||
SSexplosions.low_mov_atom += trackers
|
||||
if(occupants)
|
||||
SSexplosions.low_mov_atom += occupants
|
||||
|
||||
/obj/vehicle/sealed/mecha/handle_atom_del(atom/A)
|
||||
if(A in occupants)
|
||||
|
||||
Reference in New Issue
Block a user