mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
replace magic numbers related to emp and explosion severity with defines (#26495)
replace even more magic emp and ex numbers
This commit is contained in:
@@ -138,7 +138,7 @@
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/emp_act(severity)
|
||||
..()
|
||||
display_visor_message("[severity > 1 ? "Light" : "Strong"] electromagnetic pulse detected!")
|
||||
display_visor_message("[severity > EMP_HEAVY ? "Light" : "Strong"] electromagnetic pulse detected!")
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit
|
||||
name = "hardsuit"
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
return
|
||||
|
||||
/turf/simulated/floor/vines/ex_act(severity)
|
||||
if(severity < 3)
|
||||
if(severity < EXPLODE_LIGHT)
|
||||
ChangeTurf(baseturf)
|
||||
|
||||
/turf/simulated/floor/vines/narsie_act()
|
||||
@@ -209,7 +209,7 @@
|
||||
nofun = TRUE
|
||||
|
||||
/datum/spacevine_mutation/explosive/on_explosion(explosion_severity, obj/structure/spacevine/holder)
|
||||
if(explosion_severity < 3)
|
||||
if(explosion_severity < EXPLODE_LIGHT)
|
||||
qdel(holder)
|
||||
else
|
||||
addtimer(CALLBACK(holder, TYPE_PROC_REF(/obj/structure/spacevine, wither)), 5)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
location = get_atom_on_turf(src)
|
||||
if(location)
|
||||
explosion(location, boom_sizes[1], boom_sizes[2], boom_sizes[3], cause = src)
|
||||
location.ex_act(2, target)
|
||||
location.ex_act(EXPLODE_HEAVY, target)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/plastic/miningcharge/proc/override_safety()
|
||||
|
||||
@@ -288,7 +288,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)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/Destroy()
|
||||
|
||||
@@ -353,7 +353,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
|
||||
|
||||
/obj/item/stack/ore/ex_act(severity)
|
||||
if(!severity || severity >= 2)
|
||||
if(!severity || severity >= EXPLODE_HEAVY)
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -160,12 +160,10 @@
|
||||
if(!brainmob)
|
||||
return
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EMP_HEAVY)
|
||||
brainmob.emp_damage += rand(20, 30)
|
||||
if(2)
|
||||
if(EMP_LIGHT)
|
||||
brainmob.emp_damage += rand(10, 20)
|
||||
if(3)
|
||||
brainmob.emp_damage += rand(0, 10)
|
||||
..()
|
||||
|
||||
/obj/item/mmi/robotic_brain/New()
|
||||
|
||||
@@ -600,8 +600,8 @@ Difficulty: Hard
|
||||
if(mode == VORTEX)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/atom/A in T)
|
||||
A.ex_act(3) //Body is immune to explosions of this strength.
|
||||
T.ex_act(3)
|
||||
A.ex_act(EXPLODE_LIGHT) //Body is immune to explosions of this strength.
|
||||
T.ex_act(EXPLODE_LIGHT)
|
||||
if(mode == CRYO)
|
||||
var/turf/simulated/S = get_turf(src)
|
||||
S.MakeSlippery(TURF_WET_ICE, enraged ? rand(25, 35 SECONDS) : rand(10, 20 SECONDS))
|
||||
|
||||
@@ -356,7 +356,7 @@ Difficulty: Very Hard
|
||||
/obj/item/projectile/colossus/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(isturf(target) || isobj(target))
|
||||
target.ex_act(2)
|
||||
target.ex_act(EXPLODE_HEAVY)
|
||||
for(var/obj/machinery/light/L in range(2, src))
|
||||
L.break_light_tube(0, 1) //No leaving lights floating their as colossus breaks the station
|
||||
if(isliving(target))
|
||||
|
||||
@@ -455,7 +455,7 @@
|
||||
. = ..()
|
||||
if(!active || !wearer)
|
||||
return
|
||||
to_chat(wearer, "<span class='warning'>[severity > 1 ? "Light" : "Strong"] electromagnetic pulse detected!")
|
||||
to_chat(wearer, "<span class='warning'>[severity > EMP_HEAVY ? "Light" : "Strong"] electromagnetic pulse detected!")
|
||||
if(emp_proof)
|
||||
return
|
||||
selected_module?.on_deactivation(display_message = TRUE)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
/obj/singularity/narsie/proc/godsmack(atom/A)
|
||||
if(isobj(A))
|
||||
var/obj/O = A
|
||||
O.ex_act(1)
|
||||
O.ex_act(EXPLODE_DEVASTATE)
|
||||
if(O) qdel(O)
|
||||
|
||||
else if(isturf(A))
|
||||
|
||||
@@ -25,7 +25,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
|
||||
flags_2 = NO_MALF_EFFECT_2
|
||||
|
||||
/obj/machinery/gravity_generator/ex_act(severity)
|
||||
if(severity == 1) // Very sturdy.
|
||||
if(severity == EXPLODE_DEVASTATE) // Very sturdy.
|
||||
set_broken()
|
||||
|
||||
/obj/machinery/gravity_generator/blob_act(obj/structure/blob/B)
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
icon_state = "[initial(icon_state)][beaker ? "_working" : ""]"
|
||||
|
||||
/obj/machinery/chem_dispenser/ex_act(severity)
|
||||
if(severity < 3)
|
||||
if(severity < EXPLODE_LIGHT)
|
||||
if(beaker)
|
||||
beaker.ex_act(severity)
|
||||
..()
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
reagents.maximum_volume += B.reagents.maximum_volume
|
||||
|
||||
/obj/machinery/chem_master/ex_act(severity)
|
||||
if(severity < 3)
|
||||
if(severity < EXPLODE_LIGHT)
|
||||
if(beaker)
|
||||
beaker.ex_act(severity)
|
||||
if(loaded_pill_bottle)
|
||||
|
||||
@@ -688,7 +688,7 @@
|
||||
SEND_SOUND(M, loud_crash_sound)
|
||||
for(var/turf/T in L2)
|
||||
for(var/atom/movable/A in T.contents)
|
||||
A.ex_act(1)
|
||||
A.ex_act(EXPLODE_DEVASTATE)
|
||||
if(istype(A, /obj/machinery/atmospherics/supermatter_crystal))
|
||||
var/obj/machinery/atmospherics/supermatter_crystal/bakoom = A
|
||||
addtimer(CALLBACK(bakoom, TYPE_PROC_REF(/obj/machinery/atmospherics/supermatter_crystal, explode), bakoom.combined_gas, bakoom.power, bakoom.gasmix_power_ratio), 1 SECONDS)
|
||||
|
||||
@@ -198,9 +198,9 @@
|
||||
/obj/machinery/bsa/full/proc/fire(mob/user, turf/bullseye, target)
|
||||
var/turf/point = get_front_turf()
|
||||
for(var/turf/T in get_line(get_step(point,dir),get_target_turf()))
|
||||
T.ex_act(1)
|
||||
T.ex_act(EXPLODE_DEVASTATE)
|
||||
for(var/atom/A in T)
|
||||
A.ex_act(1)
|
||||
A.ex_act(EXPLODE_DEVASTATE)
|
||||
|
||||
point.Beam(get_target_turf(), icon_state = "bsa_beam", time = 50, maxdistance = world.maxx, beam_type = /obj/effect/ebeam/deadly) //ZZZAP
|
||||
playsound(src, 'sound/machines/bsa_fire.ogg', 100, 1)
|
||||
|
||||
Reference in New Issue
Block a user