Replaces ex_act and emp_act numbers with defines

This commit is contained in:
CitadelStationBot
2017-07-13 17:46:41 -05:00
parent da324257fe
commit 55462ed7d1
38 changed files with 74 additions and 66 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
// Examples
/*
-- Will call the proc for all computers in the world, thats dir is 2.
CALL ex_act(1) ON /obj/machinery/computer IN world WHERE dir == 2
CALL ex_act(EXPLODE_DEVASTATE) ON /obj/machinery/computer IN world WHERE dir == 2
-- Will open a window with a list of all the closets in the world, with a link to VV them.
SELECT /obj/structure/closet/secure_closet/security/cargo IN world WHERE icon_off == "secoff"
-- Will change all the tube lights to green
@@ -156,7 +156,7 @@ GLOBAL_VAR_INIT(sc_safecode5, "[rand(0,9)]")
L.gib()
else if(istype(A,/obj/))
var/obj/O = A
O.ex_act(1)
O.ex_act(EXPLODE_DEVASTATE)
if(O) qdel(O)
else if(isturf(A))
var/turf/T = A
@@ -23,4 +23,4 @@
/datum/round_event/communications_blackout/start()
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
T.emp_act(1)
T.emp_act(EMP_HEAVY)
+2 -2
View File
@@ -80,7 +80,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
if(isturf(clong) || isobj(clong))
if(clong.density)
clong.ex_act(2)
clong.ex_act(EXPLODE_HEAVY)
else if(isliving(clong))
penetrate(clong)
@@ -100,4 +100,4 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
var/mob/living/carbon/human/H = L
H.adjustBruteLoss(160)
if(L && (L.density || prob(10)))
L.ex_act(2)
L.ex_act(EXPLODE_HEAVY)
+2 -2
View File
@@ -35,6 +35,6 @@
explosion(get_turf(P), 0, 0, 2)
// Only a level 1 explosion actually damages the machine
// at all
P.ex_act(1)
P.ex_act(EXPLODE_DEVASTATE)
else
P.emp_act(1)
P.emp_act(EMP_HEAVY)
+1 -1
View File
@@ -135,7 +135,7 @@
for(var/turf/T in linked)
if(prob(30))
do_sparks(2, 1, T)
T.ex_act(3)
T.ex_act(EXPLODE_LIGHT)
T.hotspot_expose(1000,500,1)
if(!emagged)
@@ -76,7 +76,7 @@
stored_obj.forceMove(T)
playsound(T,'sound/effects/explosion2.ogg', 200, 1)
new /obj/effect/temp_visual/explosion(T)
user.ex_act(2)
user.ex_act(EXPLODE_HEAVY)
qdel(src)
else
to_chat(user, "<span class='holoparasite'>[src] glows with a strange <font color=\"[spawner.namedatum.colour]\">light</font>, and you don't touch it.</span>")
@@ -176,7 +176,7 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/bubblegum/Bump(atom/A)
if(charging)
if(isturf(A) || isobj(A) && A.density)
A.ex_act(2)
A.ex_act(EXPLODE_HEAVY)
DestroySurroundings()
..()
@@ -254,7 +254,7 @@ Difficulty: Very Hard
/obj/item/projectile/colossus/on_hit(atom/target, blocked = FALSE)
. = ..()
if(isturf(target) || isobj(target))
target.ex_act(2)
target.ex_act(EXPLODE_HEAVY)
/obj/item/device/gps/internal/colossus
+1 -1
View File
@@ -154,7 +154,7 @@
/obj/item/weapon/stock_parts/cell/blob_act(obj/structure/blob/B)
ex_act(1)
ex_act(EXPLODE_DEVASTATE)
/obj/item/weapon/stock_parts/cell/proc/get_electrocute_damage()
if(charge >= 1000)
+1 -1
View File
@@ -218,7 +218,7 @@
/obj/machinery/power/port_gen/pacman/emag_act(mob/user)
if(!emagged)
emagged = TRUE
emp_act(1)
emp_act(EMP_HEAVY)
/obj/machinery/power/port_gen/pacman/attack_hand(mob/user)
..()
+1 -1
View File
@@ -272,7 +272,7 @@ GLOBAL_LIST_INIT(blacklisted_tesla_types, typecacheof(list(/obj/machinery/atmosp
if(issilicon(closest_mob))
var/mob/living/silicon/S = closest_mob
if(stun_mobs)
S.emp_act(2)
S.emp_act(EMP_LIGHT)
tesla_zap(S, 7, power / 1.5, explosive, stun_mobs) // metallic folks bounce it further
else
tesla_zap(closest_mob, 5, power / 1.5, explosive, stun_mobs)
+1 -1
View File
@@ -355,7 +355,7 @@
if(wall_pierce++ < wall_pierce_amount)
loc = target
if(prob(wall_devastate))
target.ex_act(2)
target.ex_act(EXPLODE_HEAVY)
return TRUE
if(ismovableatom(target))
var/atom/movable/AM = target
@@ -112,11 +112,11 @@
/obj/item/projectile/blastwave/Range()
..()
if(heavyr)
loc.ex_act(1)
loc.ex_act(EXPLODE_DEVASTATE)
else if(mediumr)
loc.ex_act(2)
loc.ex_act(EXPLODE_HEAVY)
else if(lightr)
loc.ex_act(3)
loc.ex_act(EXPLODE_LIGHT)
else
qdel(src)
heavyr--
+1 -1
View File
@@ -75,7 +75,7 @@
/obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = FALSE)
. = ..()
if(isturf(target) || istype(target,/obj/structure/))
target.ex_act(2)
target.ex_act(EXPLODE_HEAVY)
/obj/item/projectile/beam/pulse/shot
damage = 40
@@ -114,7 +114,7 @@
if(A == firer)
loc = A.loc
return
A.ex_act(2)
A.ex_act(EXPLODE_HEAVY)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
for(var/mob/M in urange(10, src))
if(!M.stat)
@@ -361,7 +361,7 @@
/datum/reagent/blob/electromagnetic_web/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
reac_volume = ..()
if(prob(reac_volume*2))
M.emp_act(2)
M.emp_act(EMP_LIGHT)
if(M)
M.apply_damage(reac_volume, BURN)
+1 -1
View File
@@ -180,7 +180,7 @@
/obj/machinery/bsa/full/proc/fire(mob/user, turf/bullseye)
var/turf/point = get_front_turf()
for(var/turf/T in getline(get_step(point,dir),get_target_turf()))
T.ex_act(1)
T.ex_act(EXPLODE_DEVASTATE)
point.Beam(get_target_turf(),icon_state="bsa_beam",time=50,maxdistance = world.maxx) //ZZZAP
message_admins("[key_name_admin(user)] has launched an artillery strike.")