This commit is contained in:
AffectedArc07
2021-05-23 17:26:17 +01:00
parent 110f579464
commit 7486d026b7
72 changed files with 411 additions and 590 deletions
@@ -45,15 +45,15 @@
var/light = -1
var/flash = -1
// Clamp all values to MAX_EXPLOSION_RANGE
// We dont need to clamp here. It gets clamped inside explosion()
if(round(amount/12) > 0)
devastation = min (GLOB.max_ex_devastation_range, devastation + round(amount/12))
devastation += round(amount/12)
if(round(amount/6) > 0)
heavy = min (GLOB.max_ex_heavy_range, heavy + round(amount/6))
heavy += round(amount/6)
if(round(amount/3) > 0)
light = min (GLOB.max_ex_light_range, light + round(amount/3))
light += round(amount/3)
if(flashing && flashing_factor)
flash += (round(amount/4) * flashing_factor)
+7 -7
View File
@@ -24,11 +24,11 @@
if(!ignorecap)
// Clamp all values to MAX_EXPLOSION_RANGE
devastation_range = min (GLOB.max_ex_devastation_range, devastation_range)
heavy_impact_range = min (GLOB.max_ex_heavy_range, heavy_impact_range)
light_impact_range = min (GLOB.max_ex_light_range, light_impact_range)
flash_range = min (GLOB.max_ex_flash_range, flash_range)
flame_range = min (GLOB.max_ex_flame_range, flame_range)
devastation_range = min (GLOB.configuration.general.bomb_cap / 4, devastation_range)
heavy_impact_range = min (GLOB.configuration.general.bomb_cap / 2, heavy_impact_range)
light_impact_range = min (GLOB.configuration.general.bomb_cap, light_impact_range)
flash_range = min (GLOB.configuration.general.bomb_cap, flash_range)
flame_range = min (GLOB.configuration.general.bomb_cap, flame_range)
var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flame_range)
@@ -118,7 +118,7 @@
var/list/affected_turfs = spiral_range_turfs(max_range, epicenter)
if(config.reactionary_explosions)
if(GLOB.configuration.general.reactionary_explosions)
for(var/A in affected_turfs) // we cache the explosion block rating of every turf in the explosion area
var/turf/T = A
cached_exp_block[T] = 0
@@ -136,7 +136,7 @@
continue
var/dist = HYPOTENUSE(T.x, T.y, x0, y0)
if(config.reactionary_explosions)
if(GLOB.configuration.general.reactionary_explosions)
var/turf/Trajectory = T
while(Trajectory != epicenter)
Trajectory = get_step_towards(Trajectory, epicenter)
+4 -5
View File
@@ -179,12 +179,11 @@
addtimer(CALLBACK(src, .proc/boom, user, result), 4 SECONDS)
/obj/item/dice/d20/e20/proc/boom(mob/user, result)
var/capped = FALSE
var/capped = TRUE
var/actual_result = result
if(result != 20)
capped = TRUE
result = min(result, GLOB.max_ex_light_range) // Apply the bombcap
else // Rolled a nat 20, screw the bombcap
// Rolled a nat 20, screw the bombcap
if(result == 20)
capped = FALSE
result = 24
var/turf/epicenter = get_turf(src)
@@ -121,7 +121,7 @@
set category = "Object"
set src in oview(1)
if(config.ghost_interaction)
if(GLOB.configuration.general.ghost_interaction)
setDir(turn(dir, 90))
handle_rotation()
return