mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 22:18:27 +01:00
Make the multi-z explosion strength scalar configurable.
* Its much easier to test out and decide what explosion scalar is nice if you can configure it. * As an added bonus, by setting it to zero this lets you disable multi-z explosions altogether without turning off all of multi-z.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//TODO: Flash range does nothing currently
|
||||
|
||||
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = UP|DOWN, shaped)
|
||||
var/multi_z_scalar = 0.35
|
||||
var/multi_z_scalar = config.multi_z_explosion_scalar
|
||||
src = null //so we don't abort once src is deleted
|
||||
spawn(0)
|
||||
var/start = world.timeofday
|
||||
@@ -9,7 +9,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
if(!epicenter) return
|
||||
|
||||
// Handles recursive propagation of explosions.
|
||||
if(z_transfer)
|
||||
if(z_transfer && multi_z_scalar)
|
||||
var/adj_dev = max(0, (multi_z_scalar * devastation_range) - (shaped ? 2 : 0) )
|
||||
var/adj_heavy = max(0, (multi_z_scalar * heavy_impact_range) - (shaped ? 2 : 0) )
|
||||
var/adj_light = max(0, (multi_z_scalar * light_impact_range) - (shaped ? 2 : 0) )
|
||||
@@ -45,8 +45,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5)
|
||||
|
||||
if(adminlog)
|
||||
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[epicenter.x];Y=[epicenter.y];Z=[epicenter.z]'>JMP</a>)")
|
||||
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
|
||||
message_admins("Explosion with [shaped ? "shaped" : "non-shaped"] size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[epicenter.x];Y=[epicenter.y];Z=[epicenter.z]'>JMP</a>)")
|
||||
log_game("Explosion with [shaped ? "shaped" : "non-shaped"] size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
|
||||
|
||||
var/approximate_intensity = (devastation_range * 3) + (heavy_impact_range * 2) + light_impact_range
|
||||
var/powernet_rebuild_was_deferred_already = defer_powernet_rebuild
|
||||
|
||||
Reference in New Issue
Block a user