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"