deterministic explosion system (#13392)

* wae explosions

* okay

* changes

* fixes

* fix

* ok

* ok

* kills more dead code

* okay

* fix

* ok

* tiles

* ok

* okay

* woops

* ok

* fix

* okay

* mob damage

* fixes

* insanity

* more

* more

* fixes

* more

* woot

* don't commit that

* YES

* fix
This commit is contained in:
silicons
2021-05-12 04:44:53 -06:00
committed by GitHub
parent 5eb1f38f5e
commit 5601badbff
35 changed files with 822 additions and 2 deletions
+46
View File
@@ -96,6 +96,7 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list(
/client/proc/cmd_select_equipment,
/client/proc/cmd_admin_gib_self,
/client/proc/drop_bomb,
/client/proc/drop_wave_explosion,
/client/proc/set_dynex_scale,
/client/proc/drop_dynex_bomb,
/client/proc/cinematic,
@@ -550,6 +551,51 @@ GLOBAL_PROTECT(admin_verbs_hideable)
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/drop_wave_explosion()
set category = "Special Verbs"
set name = "Drop Wave Explosion"
set desc = "Cause an explosive shockwave at your location."
var/power = input(src, "Wave initial power", "Power", 50) as num|null
if(isnull(power))
return
var/falloff = input(src, "Wave innate falloff factor", "Falloff", EXPLOSION_DEFAULT_FALLOFF_MULTIPLY) as num|null
if(isnull(falloff))
return
falloff = max(0, falloff)
if(falloff > 1)
to_chat(src, "<span class='danger'>Aborting: Falloff cannot be higher tahn 1.")
return
var/constant = input(src, "Wave innate falloff constant", "Constant", EXPLOSION_DEFAULT_FALLOFF_SUBTRACT) as num|null
if(isnull(constant))
return
if(constant < 0)
to_chat(src, "<span class='danger'>Aborting: Falloff constant cannot be less than 0.")
return
var/fire = input(src, "Probability per tile of fire?", "Fire Probability", 0) as num|null
if(isnull(fire))
return
var/speed = input(src, "Speed in ticks to wait between cycles? 0 for fast as possible", "Wait", 0) as num|null
if(isnull(speed))
return
var/block_resistance = input(src, "DANGEROUS: Block resistance? USE 1 IF YOU DO NOT KNOW WHAT YOU ARE DOING.", "Block Negation", 1) as num|null
if(isnull(block_resistance))
return
block_resistance = max(0, block_resistance)
if(power > 500)
var/sure = alert(src, "Explosion power is extremely high. Are you absolutely sure?", "Uhh...", "No", "Yes")
if(sure != "Yes")
return
// point of no return
var/turf/target = get_turf(mob)
if(!target)
to_chat(src, "<span class='danger'>Cannot proceed. Not on turf.</span>")
return
message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [target.loc].")
log_admin("[key_name(usr)] created an admin explosion at [target.loc].")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Wave Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
wave_explosion(target, power, falloff, constant, null, fire, speed = speed, block_resistance = block_resistance)
/client/proc/drop_dynex_bomb()
set category = "Admin.Fun"
set name = "Drop DynEx Bomb"
@@ -177,6 +177,9 @@
/mob/living/simple_animal/revenant/ex_act(severity, target)
return 1 //Immune to the effects of explosions.
/mob/living/simple_animal/revenant/wave_ex_act(power, datum/wave_explosion/explosion, dir)
return power
/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.
@@ -206,6 +206,9 @@
/mob/living/simple_animal/hostile/retaliate/clown/insane/ex_act()
return
/mob/living/simple_animal/hostile/retaliate/clown/insane/wave_ex_act(power, datum/wave_explosion/explosion, dir)
return power
/mob/living/simple_animal/hostile/retaliate/clown/insane/Life()
timer--
if(target)
+4
View File
@@ -13,6 +13,10 @@
/obj/effect/dummy/phased_mob/slaughter/ex_act()
return
/obj/effect/dummy/phased_mob/slaughter/wave_ex_act(power, datum/wave_explosion/explosion, dir)
return power
/obj/effect/dummy/phased_mob/slaughter/bullet_act()
return BULLET_ACT_FORCE_PIERCE
+3
View File
@@ -46,6 +46,9 @@
/mob/living/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
return
/mob/living/brain/wave_ex_act(power, datum/wave_explosion/explosion, dir)
return power
/mob/living/brain/blob_act(obj/structure/blob/B)
return
@@ -438,6 +438,12 @@
return
..()
/mob/living/wave_ex_act(power, datum/wave_explosion/explosion, dir)
if(power > EXPLOSION_POWER_NORMAL_MOB_GIB)
gib()
adjustBruteLoss(EXPLOSION_POWER_STANDARD_SCALE_MOB_DAMAGE(power, explosion.mob_damage_mod))
return power
//Looking for irradiate()? It's been moved to radiation.dm under the rad_act() for mobs.
/mob/living/acid_act(acidpwr, acid_volume)
@@ -280,6 +280,9 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
if(3)
adjustBruteLoss(30)
/mob/living/simple_animal/hostile/guardian/wave_ex_act(power, datum/wave_explosion/explosion, dir)
adjustBruteLoss(EXPLOSION_POWER_STANDARD_SCALE_MOB_DAMAGE(power, explosion.mob_damage_mod * 0.33))
/mob/living/simple_animal/hostile/guardian/gib()
if(summoner)
to_chat(summoner, "<span class='danger'><B>Your [src] was blown up!</span></B>")
@@ -149,6 +149,9 @@
if(EXPLODE_LIGHT)
adjustBruteLoss(50)
/mob/living/simple_animal/hostile/megafauna/wave_ex_act(power, datum/wave_explosion/explosion, dir)
adjustBruteLoss(EXPLOSION_POWER_STANDARD_SCALE_MOB_DAMAGE(power, explosion.mob_damage_mod) / 2)
/// Sets the next time the megafauna can use a melee or ranged attack, in deciseconds
/mob/living/simple_animal/hostile/megafauna/proc/SetRecoveryTime(buffer_time, ranged_buffer_time)
recovery_time = world.time + buffer_time
@@ -59,6 +59,13 @@
if(3)
adjustBruteLoss(110)
/mob/living/simple_animal/hostile/asteroid/basilisk/wave_ex_act(power, datum/wave_explosion/explosion, dir)
. = ..()
if(power > EXPLOSION_POWER_NORMAL_MOB_GIB)
gib()
else
adjustBruteLoss(EXPLOSION_POWER_STANDARD_SCALE_MOB_DAMAGE(power, explosion.mob_damage_mod))
//Watcher
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher
name = "watcher"
@@ -108,5 +108,8 @@
/obj/effect/dummy/phased_mob/spell_jaunt/ex_act(blah)
return
/obj/effect/dummy/phased_mob/spell_jaunt/wave_ex_act(power, datum/wave_explosion/explosion, dir)
return power
/obj/effect/dummy/phased_mob/spell_jaunt/bullet_act(blah)
return BULLET_ACT_FORCE_PIERCE
@@ -90,6 +90,9 @@
/obj/effect/dummy/phased_mob/shadow/ex_act()
return
/obj/effect/dummy/phased_mob/shadow/wave_ex_act(power, datum/wave_explosion/explosion, dir)
return power
/obj/effect/dummy/phased_mob/shadow/bullet_act()
return BULLET_ACT_FORCE_PIERCE