mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Merge pull request #17151 from optimumtact/wakemeup
Add multiple option to ceiling
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user