diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm index 8e27b4e2acb..60bce0fa978 100644 --- a/code/__HELPERS/maths.dm +++ b/code/__HELPERS/maths.dm @@ -17,8 +17,8 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, var/a = arccos(x / sqrt(x*x + y*y)) return y >= 0 ? a : -a -/proc/Ceiling(x) - return -round(-x) +/proc/Ceiling(x, y=1) + return -round(-x / y) * y #define Clamp(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) ) diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm index 67d4aebd8db..19b2364b032 100644 --- a/code/game/machinery/computer/telecrystalconsoles.dm +++ b/code/game/machinery/computer/telecrystalconsoles.dm @@ -145,7 +145,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F ..() var/danger danger = joined_player_list.len - ticker.mode.syndicates.len - while(!IsMultiple(++danger,10))//Just round up to the nearest multiple of ten. + danger = Ceiling(danger, 10) scaleTC(danger) /obj/machinery/computer/telecrystals/boss/proc/scaleTC(amt)//Its own proc, since it'll probably need a lot of tweaks for balance, use a fancier algorhithm, etc.