Merge pull request #17151 from optimumtact/wakemeup

Add multiple option to ceiling
This commit is contained in:
Jordie
2016-04-29 14:30:21 +10:00
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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)) ) )
@@ -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.