Refactors explosions
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
diff a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm (rejected hunks)
|
||||
@@ -515,11 +515,11 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, AVerbsHideable())
|
||||
var/flash_range = input("Flash range (in tiles):") as null|num
|
||||
if(flash_range == null)
|
||||
return
|
||||
- if(devastation_range > SSexplosion.devastation_cap || heavy_impact_range > SSexplosion.heavy_cap || light_impact_range > SSexplosion.light_cap || flash_range > SSexplosion.flash_cap)
|
||||
+ if(devastation_range > GLOB.MAX_EX_DEVESTATION_RANGE || heavy_impact_range > GLOB.MAX_EX_HEAVY_RANGE || light_impact_range > GLOB.MAX_EX_LIGHT_RANGE || flash_range > GLOB.MAX_EX_FLASH_RANGE)
|
||||
if(alert("Bomb is bigger than the maxcap. Continue?",,"Yes","No") != "Yes")
|
||||
return
|
||||
epicenter = mob.loc //We need to reupdate as they may have moved again
|
||||
- SSexplosion.Create(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, TRUE, TRUE)
|
||||
+ explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, TRUE, TRUE)
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].")
|
||||
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
|
||||
feedback_add_details("admin_verb","Drop Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -532,7 +532,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, AVerbsHideable())
|
||||
var/ex_power = input("Explosive Power:") as null|num
|
||||
var/turf/epicenter = mob.loc
|
||||
if(ex_power && epicenter)
|
||||
- SSexplosion.CreateDynamic(epicenter, ex_power)
|
||||
+ dyn_explosion(epicenter, ex_power)
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].")
|
||||
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
|
||||
feedback_add_details("admin_verb","Drop Dynamic Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -0,0 +1,29 @@
|
||||
diff a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm (rejected hunks)
|
||||
@@ -386,19 +386,19 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","BC")
|
||||
|
||||
- var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", SSexplosion.light_cap) as num|null
|
||||
+ var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE) as num|null
|
||||
if (newBombCap < 4)
|
||||
return
|
||||
|
||||
- SSexplosion.devastation_cap = round(newBombCap/4)
|
||||
- SSexplosion.heavy_cap = round(newBombCap/2)
|
||||
- SSexplosion.light_cap = newBombCap
|
||||
+ GLOB.MAX_EX_DEVESTATION_RANGE = round(newBombCap/4)
|
||||
+ GLOB.MAX_EX_HEAVY_RANGE = round(newBombCap/2)
|
||||
+ GLOB.MAX_EX_LIGHT_RANGE = newBombCap
|
||||
//I don't know why these are their own variables, but fuck it, they are.
|
||||
- SSexplosion.flash_cap = newBombCap
|
||||
- SSexplosion.flame_cap = newBombCap
|
||||
+ GLOB.MAX_EX_FLASH_RANGE = newBombCap
|
||||
+ GLOB.MAX_EX_FLAME_RANGE = newBombCap
|
||||
|
||||
- message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [SSexplosion.devastation_cap], [SSexplosion.heavy_cap], [SSexplosion.light_cap]</span>")
|
||||
- log_admin("[key_name(usr)] changed the bomb cap to [SSexplosion.devastation_cap], [SSexplosion.heavy_cap], [SSexplosion.light_cap]")
|
||||
+ message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]</span>")
|
||||
+ log_admin("[key_name(usr)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]")
|
||||
|
||||
|
||||
if("lightsout")
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm (rejected hunks)
|
||||
@@ -557,7 +557,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
|
||||
return
|
||||
|
||||
- SSexplosion.Create(O, devastation, heavy, light, flash, null, null,flames)
|
||||
+ explosion(O, devastation, heavy, light, flash, null, null,flames)
|
||||
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
|
||||
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
|
||||
feedback_add_details("admin_verb","Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -53,7 +53,7 @@
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
var/loc = pick(L)
|
||||
explosion(loc,explosiondev,explosionmed,explosionlight)
|
||||
explosion(loc,explosiondev,explosionmed,explosionlight)
|
||||
reload = 0
|
||||
|
||||
/*/mob/proc/openfire()
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
explosion(M, 1, 0, 0, 0)
|
||||
explosion(M, 1, 0, 0, 0)
|
||||
qdel(src)
|
||||
|
||||
/////For the Wishgranter///////////
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
M.speak = rampant_speeches.Copy()
|
||||
M.speak_chance = 7
|
||||
else
|
||||
explosion(upriser.loc, -1, 1, 2, 4, 0)
|
||||
explosion(upriser.loc, -1, 1, 2, 4, 0)
|
||||
qdel(upriser)
|
||||
|
||||
kill()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
var/obj/machinery/telecomms/processor/P = T
|
||||
if(prob(10))
|
||||
// Damage the surrounding area to indicate that it popped
|
||||
explosion(get_turf(P), 0, 0, 2)
|
||||
explosion(get_turf(P), 0, 0, 2)
|
||||
// Only a level 1 explosion actually damages the machine
|
||||
// at all
|
||||
P.ex_act(1)
|
||||
|
||||
@@ -263,11 +263,11 @@
|
||||
spawn(det_time)
|
||||
if(primed)
|
||||
if(quality == 3)
|
||||
explosion(src.loc,2,4,9,adminlog = notify_admins)
|
||||
explosion(src.loc,2,4,9,adminlog = notify_admins)
|
||||
if(quality == 2)
|
||||
explosion(src.loc,1,2,5,adminlog = notify_admins)
|
||||
explosion(src.loc,1,2,5,adminlog = notify_admins)
|
||||
if(quality == 1)
|
||||
explosion(src.loc,-1,1,3,adminlog = notify_admins)
|
||||
explosion(src.loc,-1,1,3,adminlog = notify_admins)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/ore/Initialize()
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm (rejected hunks)
|
||||
@@ -72,7 +72,7 @@
|
||||
special_names = list("Flood","Fire","Bar","Man")
|
||||
|
||||
/datum/species/golem/plasma/spec_death(gibbed, mob/living/carbon/human/H)
|
||||
- SSexplosion.Create(get_turf(H),0,1,2,flame_range = 5)
|
||||
+ explosion(get_turf(H),0,1,2,flame_range = 5)
|
||||
if(H)
|
||||
H.gib()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
if(explosive)
|
||||
spawn(10)
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
if(src.key)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm (rejected hunks)
|
||||
@@ -130,7 +130,7 @@ Difficulty: Medium
|
||||
playsound(T,'sound/magic/Fireball.ogg', 200, 1)
|
||||
new /obj/effect/overlay/temp/fireball(T)
|
||||
sleep(12)
|
||||
- SSexplosion.Create(T, 0, 0, 1, 0, 0, 0, 1)
|
||||
+ explosion(T, 0, 0, 1, 0, 0, 0, 1)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/OpenFire()
|
||||
anger_modifier = Clamp(((maxHealth - health)/50),0,20)
|
||||
@@ -18,12 +18,12 @@
|
||||
/obj/item/weapon/am_containment/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
explosion(get_turf(src), 1, 2, 3, 5)//Should likely be larger but this works fine for now I guess
|
||||
explosion(get_turf(src), 1, 2, 3, 5)//Should likely be larger but this works fine for now I guess
|
||||
if(src)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob((fuel/10)-stability))
|
||||
explosion(get_turf(src), 1, 2, 3, 5)
|
||||
explosion(get_turf(src), 1, 2, 3, 5)
|
||||
if(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/obj/machinery/power/am_control_unit/process()
|
||||
if(exploding)
|
||||
explosion(get_turf(src),8,12,18,12)
|
||||
explosion(get_turf(src),8,12,18,12)
|
||||
if(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
corrupt()
|
||||
return
|
||||
//explosion(T, 0, 1, 2, 2)
|
||||
explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range)
|
||||
explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/proc/corrupt()
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
src.updateDialog()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/proc/overheat()
|
||||
explosion(src.loc, 2, 5, 2, -1)
|
||||
explosion(src.loc, 2, 5, 2, -1)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, sheet_path))
|
||||
@@ -294,7 +294,7 @@
|
||||
board_path = /obj/item/weapon/circuitboard/machine/pacman/super
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/super/overheat()
|
||||
explosion(src.loc, 3, 3, 3, -1)
|
||||
explosion(src.loc, 3, 3, 3, -1)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/mrs
|
||||
name = "\improper M.R.S.P.A.C.M.A.N.-type portable generator"
|
||||
@@ -305,4 +305,4 @@
|
||||
board_path = /obj/item/weapon/circuitboard/machine/pacman/mrs
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/mrs/overheat()
|
||||
explosion(src.loc, 4, 4, 4, -1)
|
||||
explosion(src.loc, 4, 4, 4, -1)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm (rejected hunks)
|
||||
@@ -174,7 +174,7 @@
|
||||
S.consume(src)
|
||||
else
|
||||
investigate_log("has exploded.", "supermatter")
|
||||
- SSexplosion.Create(get_turf(T), explosion_power * max(gasmix_power_ratio, 0.205) * 0.5 , explosion_power * max(gasmix_power_ratio, 0.205) + 2, explosion_power * max(gasmix_power_ratio, 0.205) + 4 , explosion_power * max(gasmix_power_ratio, 0.205) + 6, 1, 1)
|
||||
+ explosion(get_turf(T), explosion_power * max(gasmix_power_ratio, 0.205) * 0.5 , explosion_power * max(gasmix_power_ratio, 0.205) + 2, explosion_power * max(gasmix_power_ratio, 0.205) + 4 , explosion_power * max(gasmix_power_ratio, 0.205) + 6, 1, 1)
|
||||
if(power > CRITICAL_POWER_PENALTY_THRESHOLD)
|
||||
investigate_log("has spawned additional energy balls.", "supermatter")
|
||||
var/obj/singularity/energy_ball/E = new(T)
|
||||
@@ -166,5 +166,5 @@
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/fireball/zap_self(mob/living/user)
|
||||
..()
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
charges--
|
||||
@@ -61,10 +61,10 @@
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/on_hit(atom/target, blocked = 0)
|
||||
..()
|
||||
explosion(target, 0, 0, 2)
|
||||
explosion(target, 0, 0, 2)
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/on_range()
|
||||
explosion(src, 0, 0, 2)
|
||||
explosion(src, 0, 0, 2)
|
||||
do_sparks(3, TRUE, src)
|
||||
..()
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
reagent_id = "welding_fuel"
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/boom()
|
||||
explosion(get_turf(src), 0, 1, 5, flame_range = 5)
|
||||
explosion(get_turf(src), 0, 1, 5, flame_range = 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/blob_act(obj/structure/blob/B)
|
||||
@@ -165,7 +165,7 @@
|
||||
reagent_id = "beer"
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg/blob_act(obj/structure/blob/B)
|
||||
explosion(src.loc,0,3,5,7,10)
|
||||
explosion(src.loc,0,3,5,7,10)
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -683,7 +683,7 @@
|
||||
spawn(rand(35,100))
|
||||
if(src.loc == user)
|
||||
visible_message("<span class='notice'>The [src]'s top opens, releasing a powerful blast!</span>")
|
||||
explosion(user.loc, -1, rand(1,5), rand(1,5), rand(1,5), rand(1,5), flame_range = 2)
|
||||
explosion(user.loc, -1, rand(1,5), rand(1,5), rand(1,5), rand(1,5), flame_range = 2)
|
||||
warn_admins(user, "Explosion")
|
||||
qdel(src) //Comment this line to produce a light grenade (the bomb that keeps on exploding when used)!!
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm (rejected hunks)
|
||||
@@ -352,7 +352,7 @@
|
||||
FB.fire()
|
||||
else if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
visible_message("<span class='danger'>[src] malfunctions, melting [exp_on] and releasing a burst of flame!</span>")
|
||||
- SSexplosion.Create(src.loc, -1, 0, 0, 0, 0, flame_range = 2)
|
||||
+ explosion(src.loc, -1, 0, 0, 0, 0, flame_range = 2)
|
||||
investigate_log("Experimentor started a fire.", "experimentor")
|
||||
ejectItem(TRUE)
|
||||
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
@@ -10,6 +10,6 @@
|
||||
/obj/effect/proc_holder/spell/targeted/explosion/cast(list/targets,mob/user = usr)
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
explosion(target.loc,ex_severe,ex_heavy,ex_light,ex_flash)
|
||||
explosion(target.loc,ex_severe,ex_heavy,ex_light,ex_flash)
|
||||
|
||||
return
|
||||
Reference in New Issue
Block a user