mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Fix clamp case breaking BYOND versions below 513.1490
513.1490 added `clamp` as a native proc
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
if(user.client)
|
if(user.client)
|
||||||
user.client.images += bar
|
user.client.images += bar
|
||||||
|
|
||||||
progress = clamp(progress, 0, goal)
|
progress = CLAMP(progress, 0, goal)
|
||||||
bar.icon_state = "prog_bar_[round(((progress / goal) * 100), 5)]"
|
bar.icon_state = "prog_bar_[round(((progress / goal) * 100), 5)]"
|
||||||
if(!shown && user.is_preference_enabled(/datum/client_preference/show_progress_bar))
|
if(!shown && user.is_preference_enabled(/datum/client_preference/show_progress_bar))
|
||||||
user.client.images += bar
|
user.client.images += bar
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
|
|
||||||
//inputting
|
//inputting
|
||||||
if(input_attempt && (!input_pulsed && !input_cut) && !grid_check)
|
if(input_attempt && (!input_pulsed && !input_cut) && !grid_check)
|
||||||
target_load = clamp((capacity-charge)/SMESRATE, 0, input_level) // Amount we will request from the powernet.
|
target_load = CLAMP((capacity-charge)/SMESRATE, 0, input_level) // Amount we will request from the powernet.
|
||||||
var/input_available = FALSE
|
var/input_available = FALSE
|
||||||
for(var/obj/machinery/power/terminal/term in terminals)
|
for(var/obj/machinery/power/terminal/term in terminals)
|
||||||
if(!term.powernet)
|
if(!term.powernet)
|
||||||
|
|||||||
Reference in New Issue
Block a user