mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-20 02:27:36 +01:00
Merge pull request #15980 from AffectedArc07/toml-config
[READY] Converts configs to use TOML + Configuration refactor
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/oldloc = loc
|
||||
step(src, direction)
|
||||
if(oldloc != loc)
|
||||
addtimer(CALLBACK(src, .proc/ResetMoveDelay), config.walk_speed)
|
||||
addtimer(CALLBACK(src, .proc/ResetMoveDelay), GLOB.configuration.movement.base_walk_speed)
|
||||
else
|
||||
move_delay = FALSE
|
||||
|
||||
|
||||
@@ -114,12 +114,9 @@
|
||||
|
||||
if("Body")
|
||||
var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin")
|
||||
if(config.usealienwhitelist)
|
||||
for(var/Spec in GLOB.whitelisted_species)
|
||||
if(is_alien_whitelisted(H, Spec))
|
||||
race_list += Spec
|
||||
else
|
||||
race_list += GLOB.whitelisted_species
|
||||
for(var/species in GLOB.whitelisted_species)
|
||||
if(is_alien_whitelisted(H, species))
|
||||
race_list += species
|
||||
|
||||
var/datum/ui_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
|
||||
@@ -116,7 +116,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
|
||||
|
||||
Reference in New Issue
Block a user