Backward 512 compatibility removal.
This commit is contained in:
@@ -141,7 +141,7 @@
|
||||
say("Mineral access is on hold, please contact the quartermaster.")
|
||||
return FALSE
|
||||
var/power = 1000
|
||||
amount = CLAMP(amount, 1, 50)
|
||||
amount = clamp(amount, 1, 50)
|
||||
for(var/M in D.materials)
|
||||
power += round(D.materials[M] * amount / 35)
|
||||
power = min(3000, power)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
value = text2num(value)
|
||||
if(!value || !isnum(value))
|
||||
return
|
||||
src.value = CLAMP(value, min, max)
|
||||
src.value = clamp(value, min, max)
|
||||
|
||||
/datum/nanite_extra_setting/number/get_copy()
|
||||
return new /datum/nanite_extra_setting/number(value, min, max, unit)
|
||||
|
||||
@@ -72,14 +72,14 @@
|
||||
if("set_safety")
|
||||
var/threshold = text2num(params["value"])
|
||||
if(!isnull(threshold))
|
||||
chamber.set_safety(CLAMP(round(threshold, 1),0,500))
|
||||
chamber.set_safety(clamp(round(threshold, 1),0,500))
|
||||
playsound(src, "terminal_type", 25, FALSE)
|
||||
chamber.occupant.investigate_log("'s nanites' safety threshold was set to [threshold] by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES)
|
||||
. = TRUE
|
||||
if("set_cloud")
|
||||
var/cloud_id = text2num(params["value"])
|
||||
if(!isnull(cloud_id))
|
||||
chamber.set_cloud(CLAMP(round(cloud_id, 1),0,100))
|
||||
chamber.set_cloud(clamp(round(cloud_id, 1),0,100))
|
||||
playsound(src, "terminal_type", 25, FALSE)
|
||||
chamber.occupant.investigate_log("'s nanites' cloud id was set to [cloud_id] by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES)
|
||||
. = TRUE
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
var/cloud_id = new_backup_id
|
||||
if(!isnull(cloud_id))
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
||||
cloud_id = CLAMP(round(cloud_id, 1),1,100)
|
||||
cloud_id = clamp(round(cloud_id, 1),1,100)
|
||||
generate_backup(cloud_id, usr)
|
||||
. = TRUE
|
||||
if("delete_backup")
|
||||
|
||||
@@ -86,13 +86,13 @@
|
||||
var/target_code = params["target_code"]
|
||||
switch(target_code)
|
||||
if("activation")
|
||||
program.activation_code = CLAMP(round(new_code, 1),0,9999)
|
||||
program.activation_code = clamp(round(new_code, 1),0,9999)
|
||||
if("deactivation")
|
||||
program.deactivation_code = CLAMP(round(new_code, 1),0,9999)
|
||||
program.deactivation_code = clamp(round(new_code, 1),0,9999)
|
||||
if("kill")
|
||||
program.kill_code = CLAMP(round(new_code, 1),0,9999)
|
||||
program.kill_code = clamp(round(new_code, 1),0,9999)
|
||||
if("trigger")
|
||||
program.trigger_code = CLAMP(round(new_code, 1),0,9999)
|
||||
program.trigger_code = clamp(round(new_code, 1),0,9999)
|
||||
. = TRUE
|
||||
if("set_extra_setting")
|
||||
program.set_extra_setting(params["target_setting"], params["value"])
|
||||
@@ -102,7 +102,7 @@
|
||||
var/timer = text2num(params["delay"])
|
||||
if(!isnull(timer))
|
||||
playsound(src, "terminal_type", 25, FALSE)
|
||||
timer = CLAMP(round(timer, 1), 0, 3600)
|
||||
timer = clamp(round(timer, 1), 0, 3600)
|
||||
timer *= 10 //convert to deciseconds
|
||||
program.timer_restart = timer
|
||||
. = TRUE
|
||||
@@ -110,7 +110,7 @@
|
||||
var/timer = text2num(params["delay"])
|
||||
if(!isnull(timer))
|
||||
playsound(src, "terminal_type", 25, FALSE)
|
||||
timer = CLAMP(round(timer, 1), 0, 3600)
|
||||
timer = clamp(round(timer, 1), 0, 3600)
|
||||
timer *= 10 //convert to deciseconds
|
||||
program.timer_shutdown = timer
|
||||
. = TRUE
|
||||
@@ -118,7 +118,7 @@
|
||||
var/timer = text2num(params["delay"])
|
||||
if(!isnull(timer))
|
||||
playsound(src, "terminal_type", 25, FALSE)
|
||||
timer = CLAMP(round(timer, 1), 0, 3600)
|
||||
timer = clamp(round(timer, 1), 0, 3600)
|
||||
timer *= 10 //convert to deciseconds
|
||||
program.timer_trigger = timer
|
||||
. = TRUE
|
||||
@@ -126,7 +126,7 @@
|
||||
var/timer = text2num(params["delay"])
|
||||
if(!isnull(timer))
|
||||
playsound(src, "terminal_type", 25, FALSE)
|
||||
timer = CLAMP(round(timer, 1), 0, 3600)
|
||||
timer = clamp(round(timer, 1), 0, 3600)
|
||||
timer *= 10 //convert to deciseconds
|
||||
program.timer_trigger_delay = timer
|
||||
. = TRUE
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
/datum/nanite_program/explosive/on_trigger(comm_message)
|
||||
host_mob.visible_message("<span class='warning'>[host_mob] starts emitting a high-pitched buzzing, and [host_mob.p_their()] skin begins to glow...</span>",\
|
||||
"<span class='userdanger'>You start emitting a high-pitched buzzing, and your skin begins to glow...</span>")
|
||||
addtimer(CALLBACK(src, .proc/boom), CLAMP((nanites.nanite_volume * 0.35), 25, 150))
|
||||
addtimer(CALLBACK(src, .proc/boom), clamp((nanites.nanite_volume * 0.35), 25, 150))
|
||||
|
||||
/datum/nanite_program/explosive/proc/boom()
|
||||
var/nanite_amount = nanites.nanite_volume
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
return
|
||||
var/new_code = text2num(params["code"])
|
||||
if(!isnull(new_code))
|
||||
new_code = CLAMP(round(new_code, 1),0,9999)
|
||||
new_code = clamp(round(new_code, 1),0,9999)
|
||||
code = new_code
|
||||
. = TRUE
|
||||
if("set_relay_code")
|
||||
@@ -114,7 +114,7 @@
|
||||
return
|
||||
var/new_code = text2num(params["code"])
|
||||
if(!isnull(new_code))
|
||||
new_code = CLAMP(round(new_code, 1),0,9999)
|
||||
new_code = clamp(round(new_code, 1),0,9999)
|
||||
relay_code = new_code
|
||||
. = TRUE
|
||||
if("update_name")
|
||||
|
||||
@@ -801,7 +801,7 @@
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You feed the slime the stabilizer. It is now less likely to mutate.</span>")
|
||||
M.mutation_chance = CLAMP(M.mutation_chance-15,0,100)
|
||||
M.mutation_chance = clamp(M.mutation_chance-15,0,100)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/slimepotion/slime/mutator
|
||||
@@ -825,7 +825,7 @@
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You feed the slime the mutator. It is now more likely to mutate.</span>")
|
||||
M.mutation_chance = CLAMP(M.mutation_chance+12,0,100)
|
||||
M.mutation_chance = clamp(M.mutation_chance+12,0,100)
|
||||
M.mutator_used = TRUE
|
||||
qdel(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user