diff --git a/code/__DEFINES/__513_compatibility.dm b/code/__DEFINES/__513_compatibility.dm
deleted file mode 100644
index 12577fb68b..0000000000
--- a/code/__DEFINES/__513_compatibility.dm
+++ /dev/null
@@ -1,32 +0,0 @@
-
-#if DM_VERSION < 513
-
-#define ismovableatom(A) (istype(A, /atom/movable))
-
-#define islist(L) (istype(L, /list))
-
-#define CLAMP01(x) (CLAMP(x, 0, 1))
-
-#define CLAMP(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
-
-#define ATAN2(x, y) ( !(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))) )
-
-#define TAN(x) (sin(x) / cos(x))
-
-#define arctan(x) (arcsin(x/sqrt(1+x*x)))
-
-//////////////////////////////////////////////////
-
-#else
-
-#define ismovableatom(A) ismovable(A)
-
-#define CLAMP01(x) clamp(x, 0, 1)
-
-#define CLAMP(CLVALUE, CLMIN, CLMAX) clamp(CLVALUE, CLMIN, CLMAX)
-
-#define TAN(x) tan(x)
-
-#define ATAN2(x, y) arctan(x, y)
-
-#endif
diff --git a/code/__DEFINES/maths.dm b/code/__DEFINES/maths.dm
index f37efd694c..e418b8b4c6 100644
--- a/code/__DEFINES/maths.dm
+++ b/code/__DEFINES/maths.dm
@@ -17,6 +17,8 @@
#define PERCENT(val) (round((val)*100, 0.1))
+#define CLAMP01(x) clamp(x, 0, 1)
+
//time of day but automatically adjusts to the server going into the next day within the same round.
//for when you need a reliable time number that doesn't depend on byond time.
#define REALTIMEOFDAY (world.timeofday + (MIDNIGHT_ROLLOVER * MIDNIGHT_ROLLOVER_CHECK))
@@ -30,13 +32,13 @@
#define FLOOR(x, y) ( round((x) / (y)) * (y) )
// Similar to clamp but the bottom rolls around to the top and vice versa. min is inclusive, max is exclusive
-#define WRAP(val, min, max) CLAMP(( min == max ? min : (val) - (round(((val) - (min))/((max) - (min))) * ((max) - (min))) ),min,max-1)
+#define WRAP(val, min, max) clamp(( min == max ? min : (val) - (round(((val) - (min))/((max) - (min))) * ((max) - (min))) ),min,max-1)
// Real modulus that handles decimals
#define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) )
// Cotangent
-#define COT(x) (1 / TAN(x))
+#define COT(x) (1 / tan(x))
// Secant
#define SEC(x) (1 / cos(x))
@@ -169,8 +171,8 @@
while(pixel_y < -16)
pixel_y += 32
new_y--
- new_x = CLAMP(new_x, 0, world.maxx)
- new_y = CLAMP(new_y, 0, world.maxy)
+ new_x = clamp(new_x, 0, world.maxx)
+ new_y = clamp(new_y, 0, world.maxy)
return locate(new_x, new_y, starting.z)
// Returns a list where [1] is all x values and [2] is all y values that overlap between the given pair of rectangles
@@ -195,7 +197,7 @@
#define EXP_DISTRIBUTION(desired_mean) ( -(1/(1/desired_mean)) * log(rand(1, 1000) * 0.001) )
-#define LORENTZ_DISTRIBUTION(x, s) ( s*TAN(TODEGREES(PI*(rand()-0.5))) + x )
+#define LORENTZ_DISTRIBUTION(x, s) ( s*tan(TODEGREES(PI*(rand()-0.5))) + x )
#define LORENTZ_CUMULATIVE_DISTRIBUTION(x, y, s) ( (1/PI)*TORADIANS(arctan((x-y)/s)) + 1/2 )
#define RULE_OF_THREE(a, b, x) ((a*x)/b)
diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm
index 7e52fbe273..801a2cd431 100644
--- a/code/__HELPERS/icon_smoothing.dm
+++ b/code/__HELPERS/icon_smoothing.dm
@@ -61,7 +61,7 @@
var/adjacencies = 0
var/atom/movable/AM
- if(ismovableatom(A))
+ if(ismovable(A))
AM = A
if(AM.can_be_unanchored && !AM.anchored)
return 0
diff --git a/code/__HELPERS/mouse_control.dm b/code/__HELPERS/mouse_control.dm
index a69c139d80..10fe976c26 100644
--- a/code/__HELPERS/mouse_control.dm
+++ b/code/__HELPERS/mouse_control.dm
@@ -11,7 +11,7 @@
var/screenviewY = screenview[2] * world.icon_size
var/ox = round(screenviewX/2) - client.pixel_x //"origin" x
var/oy = round(screenviewY/2) - client.pixel_y //"origin" y
- var/angle = SIMPLIFY_DEGREES(ATAN2(y - oy, x - ox))
+ var/angle = SIMPLIFY_DEGREES(arctan(y - oy, x - ox))
return angle
//Wow, specific name!
diff --git a/code/__HELPERS/radio.dm b/code/__HELPERS/radio.dm
index 5fe87bdf5b..dc52299025 100644
--- a/code/__HELPERS/radio.dm
+++ b/code/__HELPERS/radio.dm
@@ -2,9 +2,9 @@
/proc/sanitize_frequency(frequency, free = FALSE)
frequency = round(frequency)
if(free)
- . = CLAMP(frequency, MIN_FREE_FREQ, MAX_FREE_FREQ)
+ . = clamp(frequency, MIN_FREE_FREQ, MAX_FREE_FREQ)
else
- . = CLAMP(frequency, MIN_FREQ, MAX_FREQ)
+ . = clamp(frequency, MIN_FREQ, MAX_FREQ)
if(!(. % 2)) // Ensure the last digit is an odd number
. += 1
diff --git a/code/__HELPERS/sanitize_values.dm b/code/__HELPERS/sanitize_values.dm
index e494468fe7..dadd4322fb 100644
--- a/code/__HELPERS/sanitize_values.dm
+++ b/code/__HELPERS/sanitize_values.dm
@@ -9,7 +9,7 @@
/proc/sanitize_num_clamp(number, min=0, max=1, default=0, quantize=0)
if(!isnum(number))
return default
- . = CLAMP(number, min, max)
+ . = clamp(number, min, max)
if(quantize)
. = round(number, quantize)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index afa858afb7..8a196e8651 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -777,8 +777,8 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
tX = splittext(tX[1], ":")
tX = tX[1]
var/list/actual_view = getviewsize(C ? C.view : world.view)
- tX = CLAMP(origin.x + text2num(tX) - round(actual_view[1] / 2) - 1, 1, world.maxx)
- tY = CLAMP(origin.y + text2num(tY) - round(actual_view[2] / 2) - 1, 1, world.maxy)
+ tX = clamp(origin.x + text2num(tX) - round(actual_view[1] / 2) - 1, 1, world.maxx)
+ tY = clamp(origin.y + text2num(tY) - round(actual_view[2] / 2) - 1, 1, world.maxy)
return locate(tX, tY, tZ)
/proc/screen_loc2turf(text, turf/origin, client/C)
@@ -791,8 +791,8 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
tX = text2num(tX[2])
tZ = origin.z
var/list/actual_view = getviewsize(C ? C.view : world.view)
- tX = CLAMP(origin.x + round(actual_view[1] / 2) - tX, 1, world.maxx)
- tY = CLAMP(origin.y + round(actual_view[2] / 2) - tY, 1, world.maxy)
+ tX = clamp(origin.x + round(actual_view[1] / 2) - tX, 1, world.maxx)
+ tY = clamp(origin.y + round(actual_view[2] / 2) - tY, 1, world.maxy)
return locate(tX, tY, tZ)
/proc/IsValidSrc(datum/D)
@@ -1568,7 +1568,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
/proc/blood_sucking_checks(var/mob/living/carbon/target, check_neck, check_blood)
//Bypass this if the target isnt carbon.
if(!iscarbon(target))
- return TRUE
+ return TRUE
if(check_neck)
if(istype(target.get_item_by_slot(SLOT_NECK), /obj/item/clothing/neck/garlic_necklace))
return FALSE
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
index fe4761ddcd..9a36c626ba 100644
--- a/code/_compile_options.dm
+++ b/code/_compile_options.dm
@@ -32,31 +32,12 @@
#endif
//Update this whenever you need to take advantage of more recent byond features
-#define MIN_COMPILER_VERSION 512
-#if DM_VERSION < MIN_COMPILER_VERSION
+#define MIN_COMPILER_VERSION 513
+#define MIN_COMPILER_BUILD 1508
+#if DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD
//Don't forget to update this part
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
-#error You need version 512 or higher
-#endif
-
-//Compatability -- These procs were added in 513.1493, not 513.1490
-//Which really shoulda bumped us up to 514 right then and there but instead Lummox is a dumb dumb
-#if DM_BUILD < 1493
-#define length_char(args...) length(args)
-#define text2ascii_char(args...) text2ascii(args)
-#define copytext_char(args...) copytext(args)
-#define splittext_char(args...) splittext(args)
-#define spantext_char(args...) spantext(args)
-#define nonspantext_char(args...) nonspantext(args)
-#define findtext_char(args...) findtext(args)
-#define findtextEx_char(args...) findtextEx(args)
-#define findlasttext_char(args...) findlasttext(args)
-#define findlasttextEx_char(args...) findlasttextEx(args)
-#define replacetext_char(args...) replacetext(args)
-#define replacetextEx_char(args...) replacetextEx(args)
-// /regex procs
-#define Find_char(args...) Find(args)
-#define Replace_char(args...) Replace(args)
+#error You need version 513.1508 or higher
#endif
//Additional code for the above flags.
diff --git a/code/_onclick/hud/picture_in_picture.dm b/code/_onclick/hud/picture_in_picture.dm
index e028212e96..5e474331f6 100644
--- a/code/_onclick/hud/picture_in_picture.dm
+++ b/code/_onclick/hud/picture_in_picture.dm
@@ -102,8 +102,8 @@
add_overlay(standard_background)
/obj/screen/movable/pic_in_pic/proc/set_view_size(width, height, do_refresh = TRUE)
- width = CLAMP(width, 0, max_dimensions)
- height = CLAMP(height, 0, max_dimensions)
+ width = clamp(width, 0, max_dimensions)
+ height = clamp(height, 0, max_dimensions)
src.width = width
src.height = height
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index b0e1d39d9a..98db89a100 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -155,9 +155,9 @@
/obj/item/proc/get_clamped_volume()
if(w_class)
if(force)
- return CLAMP((force + w_class) * 4, 30, 100)// Add the item's force to its weight class and multiply by 4, then clamp the value between 30 and 100
+ return clamp((force + w_class) * 4, 30, 100)// Add the item's force to its weight class and multiply by 4, then clamp the value between 30 and 100
else
- return CLAMP(w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
+ return clamp(w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
/mob/living/proc/send_item_attack_message(obj/item/I, mob/living/user, hit_area)
var/message_verb = "attacked"
diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm
index d596b5fabf..9f9870a9e5 100644
--- a/code/_onclick/observer.dm
+++ b/code/_onclick/observer.dm
@@ -5,7 +5,7 @@
return // seems legit.
// Things you might plausibly want to follow
- if(ismovableatom(A))
+ if(ismovable(A))
ManualFollow(A)
// Otherwise jump
diff --git a/code/controllers/configuration/config_entry.dm b/code/controllers/configuration/config_entry.dm
index d7323700e4..4647b83cd7 100644
--- a/code/controllers/configuration/config_entry.dm
+++ b/code/controllers/configuration/config_entry.dm
@@ -103,7 +103,7 @@
return FALSE
var/temp = text2num(trim(str_val))
if(!isnull(temp))
- config_entry_value = CLAMP(integer ? round(temp) : temp, min_val, max_val)
+ config_entry_value = clamp(integer ? round(temp) : temp, min_val, max_val)
if(config_entry_value != temp && !(datum_flags & DF_VAR_EDITED))
log_config("Changing [name] from [temp] to [config_entry_value]!")
return TRUE
diff --git a/code/controllers/subsystem/profiler.dm b/code/controllers/subsystem/profiler.dm
index ec8b243073..ef10e0626c 100644
--- a/code/controllers/subsystem/profiler.dm
+++ b/code/controllers/subsystem/profiler.dm
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(profiler)
init_order = INIT_ORDER_PROFILER
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
wait = 3000
- flags = SS_NO_TICK_CHECK
+ flags = SS_NO_TICK_CHECK
var/fetch_cost = 0
var/write_cost = 0
@@ -31,23 +31,12 @@ SUBSYSTEM_DEF(profiler)
return ..()
/datum/controller/subsystem/profiler/proc/StartProfiling()
-#if DM_BUILD < 1506 || DM_VERSION < 513
- stack_trace("Auto profiling unsupported on this byond version")
- CONFIG_SET(flag/auto_profile, FALSE)
-#else
world.Profile(PROFILE_START)
-#endif
/datum/controller/subsystem/profiler/proc/StopProfiling()
-#if DM_BUILD >= 1506 && DM_VERSION >= 513
world.Profile(PROFILE_STOP)
-#endif
/datum/controller/subsystem/profiler/proc/DumpFile()
-#if DM_BUILD < 1506 || DM_VERSION < 513
- stack_trace("Auto profiling unsupported on this byond version")
- CONFIG_SET(flag/auto_profile, FALSE)
-#else
var/timer = TICK_USAGE_REAL
var/current_profile_data = world.Profile(PROFILE_REFRESH,format="json")
fetch_cost = MC_AVERAGE(fetch_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
@@ -60,4 +49,3 @@ SUBSYSTEM_DEF(profiler)
timer = TICK_USAGE_REAL
WRITE_FILE(json_file, current_profile_data)
write_cost = MC_AVERAGE(write_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
-#endif
diff --git a/code/datums/components/bouncy.dm b/code/datums/components/bouncy.dm
index c7ca85455b..fed603410e 100644
--- a/code/datums/components/bouncy.dm
+++ b/code/datums/components/bouncy.dm
@@ -4,7 +4,7 @@
var/list/bounce_signals = list(COMSIG_MOVABLE_IMPACT, COMSIG_ITEM_HIT_REACT, COMSIG_ITEM_ATTACK)
/datum/component/bouncy/Initialize(_bouncy_mod, list/_bounce_signals)
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
if(_bouncy_mod)
bouncy_mod = _bouncy_mod
diff --git a/code/datums/components/butchering.dm b/code/datums/components/butchering.dm
index e5625dee6a..441a161428 100644
--- a/code/datums/components/butchering.dm
+++ b/code/datums/components/butchering.dm
@@ -55,7 +55,7 @@
log_combat(user, H, "starts slicing the throat of")
playsound(H.loc, butcher_sound, 50, TRUE, -1)
- if(do_mob(user, H, CLAMP(500 / source.force, 30, 100)) && H.Adjacent(source))
+ if(do_mob(user, H, clamp(500 / source.force, 30, 100)) && H.Adjacent(source))
if(H.has_status_effect(/datum/status_effect/neck_slice))
user.show_message("[H]'s neck has already been already cut, you can't make the bleeding any worse!", 1, \
"Their neck has already been already cut, you can't make the bleeding any worse!")
@@ -65,7 +65,7 @@
"[user] slits your throat...")
log_combat(user, H, "finishes slicing the throat of")
H.apply_damage(source.force, BRUTE, BODY_ZONE_HEAD)
- H.bleed_rate = CLAMP(H.bleed_rate + 20, 0, 30)
+ H.bleed_rate = clamp(H.bleed_rate + 20, 0, 30)
H.apply_status_effect(/datum/status_effect/neck_slice)
/datum/component/butchering/proc/Butcher(mob/living/butcher, mob/living/meat)
diff --git a/code/datums/components/edit_complainer.dm b/code/datums/components/edit_complainer.dm
index bf52296e2c..e2cca2eb50 100644
--- a/code/datums/components/edit_complainer.dm
+++ b/code/datums/components/edit_complainer.dm
@@ -3,7 +3,7 @@
var/list/say_lines
/datum/component/edit_complainer/Initialize(list/text)
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
var/static/list/default_lines = list(
diff --git a/code/datums/components/explodable.dm b/code/datums/components/explodable.dm
index 820208a319..2e5834c025 100644
--- a/code/datums/components/explodable.dm
+++ b/code/datums/components/explodable.dm
@@ -13,7 +13,7 @@
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/explodable_attack)
RegisterSignal(parent, COMSIG_TRY_STORAGE_INSERT, .proc/explodable_insert_item)
RegisterSignal(parent, COMSIG_ATOM_EX_ACT, .proc/detonate)
- if(ismovableatom(parent))
+ if(ismovable(parent))
RegisterSignal(parent, COMSIG_MOVABLE_IMPACT, .proc/explodable_impact)
RegisterSignal(parent, COMSIG_MOVABLE_BUMP, .proc/explodable_bump)
if(isitem(parent))
diff --git a/code/datums/components/fantasy/prefixes.dm b/code/datums/components/fantasy/prefixes.dm
index 702ec9329a..5ef2ac2baf 100644
--- a/code/datums/components/fantasy/prefixes.dm
+++ b/code/datums/components/fantasy/prefixes.dm
@@ -54,7 +54,7 @@
/datum/fantasy_affix/pyromantic/apply(datum/component/fantasy/comp, newName)
var/obj/item/master = comp.parent
- comp.appliedComponents += master.AddComponent(/datum/component/igniter, CLAMP(comp.quality, 1, 10))
+ comp.appliedComponents += master.AddComponent(/datum/component/igniter, clamp(comp.quality, 1, 10))
return "pyromantic [newName]"
/datum/fantasy_affix/vampiric
diff --git a/code/datums/components/infective.dm b/code/datums/components/infective.dm
index ad2b7ded14..8d3c6ab81f 100644
--- a/code/datums/components/infective.dm
+++ b/code/datums/components/infective.dm
@@ -13,7 +13,7 @@
expire_time = world.time + expire_in
QDEL_IN(src, expire_in)
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean)
RegisterSignal(parent, COMSIG_MOVABLE_BUCKLE, .proc/try_infect_buckle)
diff --git a/code/datums/components/knockback.dm b/code/datums/components/knockback.dm
index 988a0e575e..3899e92a22 100644
--- a/code/datums/components/knockback.dm
+++ b/code/datums/components/knockback.dm
@@ -34,7 +34,7 @@
do_knockback(target, null, angle2dir(Angle))
/datum/component/knockback/proc/do_knockback(atom/target, mob/thrower, throw_dir)
- if(!ismovableatom(target) || throw_dir == null)
+ if(!ismovable(target) || throw_dir == null)
return
var/atom/movable/throwee = target
if(throwee.anchored && !throw_anchored)
diff --git a/code/datums/components/magnetic_catch.dm b/code/datums/components/magnetic_catch.dm
index c7e59e0ead..181b24260b 100644
--- a/code/datums/components/magnetic_catch.dm
+++ b/code/datums/components/magnetic_catch.dm
@@ -2,7 +2,7 @@
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
- if(ismovableatom(parent))
+ if(ismovable(parent))
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/crossed_react)
RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/uncrossed_react)
for(var/i in get_turf(parent))
diff --git a/code/datums/components/mirage_border.dm b/code/datums/components/mirage_border.dm
index 20e3b317ec..de4425e208 100644
--- a/code/datums/components/mirage_border.dm
+++ b/code/datums/components/mirage_border.dm
@@ -14,8 +14,8 @@
var/x = target.x
var/y = target.y
var/z = target.z
- var/turf/southwest = locate(CLAMP(x - (direction & WEST ? range : 0), 1, world.maxx), CLAMP(y - (direction & SOUTH ? range : 0), 1, world.maxy), CLAMP(z, 1, world.maxz))
- var/turf/northeast = locate(CLAMP(x + (direction & EAST ? range : 0), 1, world.maxx), CLAMP(y + (direction & NORTH ? range : 0), 1, world.maxy), CLAMP(z, 1, world.maxz))
+ var/turf/southwest = locate(clamp(x - (direction & WEST ? range : 0), 1, world.maxx), clamp(y - (direction & SOUTH ? range : 0), 1, world.maxy), clamp(z, 1, world.maxz))
+ var/turf/northeast = locate(clamp(x + (direction & EAST ? range : 0), 1, world.maxx), clamp(y + (direction & NORTH ? range : 0), 1, world.maxy), clamp(z, 1, world.maxz))
//holder.vis_contents += block(southwest, northeast) // This doesnt work because of beta bug memes
for(var/i in block(southwest, northeast))
holder.vis_contents += i
diff --git a/code/datums/components/nanites.dm b/code/datums/components/nanites.dm
index 7aacb745b6..8ba748dac7 100644
--- a/code/datums/components/nanites.dm
+++ b/code/datums/components/nanites.dm
@@ -175,7 +175,7 @@
return (nanite_volume > 0)
/datum/component/nanites/proc/adjust_nanites(datum/source, amount)
- nanite_volume = CLAMP(nanite_volume + amount, 0, max_nanites)
+ nanite_volume = clamp(nanite_volume + amount, 0, max_nanites)
if(nanite_volume <= 0) //oops we ran out
qdel(src)
@@ -187,7 +187,7 @@
if(remove || stealth)
return //bye icon
var/nanite_percent = (nanite_volume / max_nanites) * 100
- nanite_percent = CLAMP(CEILING(nanite_percent, 10), 10, 100)
+ nanite_percent = clamp(CEILING(nanite_percent, 10), 10, 100)
holder.icon_state = "nanites[nanite_percent]"
/datum/component/nanites/proc/on_emp(datum/source, severity)
@@ -249,13 +249,13 @@
return FALSE
/datum/component/nanites/proc/set_volume(datum/source, amount)
- nanite_volume = CLAMP(amount, 0, max_nanites)
+ nanite_volume = clamp(amount, 0, max_nanites)
/datum/component/nanites/proc/set_max_volume(datum/source, amount)
max_nanites = max(1, max_nanites)
/datum/component/nanites/proc/set_cloud(datum/source, amount)
- cloud_id = CLAMP(amount, 0, 100)
+ cloud_id = clamp(amount, 0, 100)
/datum/component/nanites/proc/set_cloud_sync(datum/source, method)
switch(method)
@@ -267,7 +267,7 @@
cloud_active = TRUE
/datum/component/nanites/proc/set_safety(datum/source, amount)
- safety_threshold = CLAMP(amount, 0, max_nanites)
+ safety_threshold = clamp(amount, 0, max_nanites)
/datum/component/nanites/proc/set_regen(datum/source, amount)
regen_rate = amount
diff --git a/code/datums/components/orbiter.dm b/code/datums/components/orbiter.dm
index 2be22d01e5..49e6b91c6d 100644
--- a/code/datums/components/orbiter.dm
+++ b/code/datums/components/orbiter.dm
@@ -22,14 +22,14 @@
/datum/component/orbiter/RegisterWithParent()
. = ..()
var/atom/target = parent
- while(ismovableatom(target))
+ while(ismovable(target))
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react)
target = target.loc
/datum/component/orbiter/UnregisterFromParent()
. = ..()
var/atom/target = parent
- while(ismovableatom(target))
+ while(ismovable(target))
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
target = target.loc
@@ -111,12 +111,12 @@
// These are prety rarely activated, how often are you following something in a bag?
if(oldloc && !isturf(oldloc)) // We used to be registered to it, probably
var/atom/target = oldloc
- while(ismovableatom(target))
+ while(ismovable(target))
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
target = target.loc
if(orbited?.loc && orbited.loc != newturf) // We want to know when anything holding us moves too
var/atom/target = orbited.loc
- while(ismovableatom(target))
+ while(ismovable(target))
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react, TRUE)
target = target.loc
diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm
index 4d8cfc4412..d185221163 100644
--- a/code/datums/components/riding.dm
+++ b/code/datums/components/riding.dm
@@ -21,7 +21,7 @@
var/list/offhands = list() // keyed list containing all the current riding offsets associated by mob
/datum/component/riding/Initialize()
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_MOVABLE_BUCKLE, .proc/vehicle_mob_buckle)
RegisterSignal(parent, COMSIG_MOVABLE_UNBUCKLE, .proc/vehicle_mob_unbuckle)
diff --git a/code/datums/components/rotation.dm b/code/datums/components/rotation.dm
index 422d73520e..6a32a46aef 100644
--- a/code/datums/components/rotation.dm
+++ b/code/datums/components/rotation.dm
@@ -14,7 +14,7 @@
var/default_rotation_direction = ROTATION_CLOCKWISE
/datum/component/simple_rotation/Initialize(rotation_flags = NONE ,can_user_rotate,can_be_rotated,after_rotation)
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
//throw if no rotation direction is specificed ?
diff --git a/code/datums/components/shielded.dm b/code/datums/components/shielded.dm
index 405e7fc064..2052e57f49 100644
--- a/code/datums/components/shielded.dm
+++ b/code/datums/components/shielded.dm
@@ -66,7 +66,7 @@
if(world.time < last_time_used && !dissipating)
return
var/old_charges = charges
- charges = CLAMP(charges + recharge_rate, 0, max_charges)
+ charges = clamp(charges + recharge_rate, 0, max_charges)
if(round(old_charges) >= round(charges)) //only send outputs if it effectively gained at least one charge
return
var/sound = recharge_sound
@@ -85,7 +85,7 @@
/datum/component/shielded/proc/adjust_charges(amount)
var/old_charges = charges
- charges = CLAMP(charges + amount, 0, max_charges)
+ charges = clamp(charges + amount, 0, max_charges)
if(recharge_delay && recharge_rate && (dissipating ? !charges : charges == max_charges))
STOP_PROCESSING(SSdcs, src)
if(charges < 1 && del_on_overload)
diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm
index ad538760db..792222b27b 100644
--- a/code/datums/components/squeak.dm
+++ b/code/datums/components/squeak.dm
@@ -16,7 +16,7 @@
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak)
- if(ismovableatom(parent))
+ if(ismovable(parent))
RegisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT), .proc/play_squeak)
RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ITEM_WEARERCROSSED), .proc/play_squeak_crossed)
RegisterSignal(parent, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react)
diff --git a/code/datums/components/stationloving.dm b/code/datums/components/stationloving.dm
index 13267e74c3..b651133274 100644
--- a/code/datums/components/stationloving.dm
+++ b/code/datums/components/stationloving.dm
@@ -5,7 +5,7 @@
var/allow_death = FALSE
/datum/component/stationloving/Initialize(inform_admins = FALSE, allow_death = FALSE)
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_MOVABLE_Z_CHANGED), .proc/check_in_bounds)
RegisterSignal(parent, list(COMSIG_MOVABLE_SECLUDED_LOCATION), .proc/relocate)
diff --git a/code/datums/components/storage/ui.dm b/code/datums/components/storage/ui.dm
index ab0535064a..f37f574002 100644
--- a/code/datums/components/storage/ui.dm
+++ b/code/datums/components/storage/ui.dm
@@ -27,8 +27,8 @@
numbered_contents = _process_numerical_display()
adjusted_contents = numbered_contents.len
- var/columns = CLAMP(max_items, 1, maxcolumns ? maxcolumns : screen_max_columns)
- var/rows = CLAMP(CEILING(adjusted_contents / columns, 1), 1, screen_max_rows)
+ var/columns = clamp(max_items, 1, maxcolumns ? maxcolumns : screen_max_columns)
+ var/rows = clamp(CEILING(adjusted_contents / columns, 1), 1, screen_max_rows)
// First, boxes.
ui_boxes = get_ui_boxes()
@@ -105,7 +105,7 @@
// after this point we are sure we can somehow fit all items into our max number of rows.
// determine rows
- var/rows = CLAMP(CEILING(min_pixels / horizontal_pixels, 1), 1, screen_max_rows)
+ var/rows = clamp(CEILING(min_pixels / horizontal_pixels, 1), 1, screen_max_rows)
var/overrun = FALSE
if(used > our_volume)
diff --git a/code/datums/components/wet_floor.dm b/code/datums/components/wet_floor.dm
index 30c6625049..0fbbcd59b0 100644
--- a/code/datums/components/wet_floor.dm
+++ b/code/datums/components/wet_floor.dm
@@ -181,7 +181,7 @@
/datum/component/wet_floor/proc/_do_add_wet(type, duration_minimum, duration_add, duration_maximum)
var/time = 0
if(LAZYACCESS(time_left_list, "[type]"))
- time = CLAMP(LAZYACCESS(time_left_list, "[type]") + duration_add, duration_minimum, duration_maximum)
+ time = clamp(LAZYACCESS(time_left_list, "[type]") + duration_add, duration_minimum, duration_maximum)
else
time = min(duration_minimum, duration_maximum)
LAZYSET(time_left_list, "[type]", time)
diff --git a/code/datums/dash_weapon.dm b/code/datums/dash_weapon.dm
index c31139dcd7..80570d0c3b 100644
--- a/code/datums/dash_weapon.dm
+++ b/code/datums/dash_weapon.dm
@@ -42,7 +42,7 @@
addtimer(CALLBACK(src, .proc/charge), charge_rate)
/datum/action/innate/dash/proc/charge()
- current_charges = CLAMP(current_charges + 1, 0, max_charges)
+ current_charges = clamp(current_charges + 1, 0, max_charges)
holder.update_action_buttons_icon()
if(recharge_sound)
playsound(dashing_item, recharge_sound, 50, 1)
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 330a3494d9..7e3ac29b2d 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -246,10 +246,10 @@
else
visibility_flags &= ~HIDDEN_SCANNER
- SetSpread(CLAMP(2 ** (properties["transmittable"] - symptoms.len), DISEASE_SPREAD_BLOOD, DISEASE_SPREAD_AIRBORNE))
+ SetSpread(clamp(2 ** (properties["transmittable"] - symptoms.len), DISEASE_SPREAD_BLOOD, DISEASE_SPREAD_AIRBORNE))
permeability_mod = max(CEILING(0.4 * properties["transmittable"], 1), 1)
- cure_chance = 15 - CLAMP(properties["resistance"], -5, 5) // can be between 10 and 20
+ cure_chance = 15 - clamp(properties["resistance"], -5, 5) // can be between 10 and 20
stage_prob = max(properties["stage_rate"], 2)
SetSeverity(properties["severity"])
GenerateCure(properties)
@@ -304,7 +304,7 @@
// Will generate a random cure, the less resistance the symptoms have, the harder the cure.
/datum/disease/advance/proc/GenerateCure()
if(properties && properties.len)
- var/res = CLAMP(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
+ var/res = clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
if(res == oldres)
return
cures = list(pick(advance_cures[res]))
diff --git a/code/datums/elements/cleaning.dm b/code/datums/elements/cleaning.dm
index 3f80204089..d86fe22632 100644
--- a/code/datums/elements/cleaning.dm
+++ b/code/datums/elements/cleaning.dm
@@ -1,6 +1,6 @@
/datum/element/cleaning/Attach(datum/target)
. = ..()
- if(!ismovableatom(target))
+ if(!ismovable(target))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/Clean)
diff --git a/code/datums/elements/firestacker.dm b/code/datums/elements/firestacker.dm
index 39021d23bb..771812242f 100644
--- a/code/datums/elements/firestacker.dm
+++ b/code/datums/elements/firestacker.dm
@@ -10,7 +10,7 @@
/datum/element/firestacker/Attach(datum/target, amount)
. = ..()
- if(!ismovableatom(target))
+ if(!ismovable(target))
return ELEMENT_INCOMPATIBLE
src.amount = amount
diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm
index 7be4489e86..f763affcd1 100644
--- a/code/datums/explosion.dm
+++ b/code/datums/explosion.dm
@@ -121,14 +121,14 @@ GLOBAL_LIST_EMPTY(explosions)
if(dist <= round(max_range + world.view - 2, 1))
M.playsound_local(epicenter, null, 100, 1, frequency, falloff = 5, S = explosion_sound)
if(baseshakeamount > 0)
- shake_camera(M, 25, CLAMP(baseshakeamount, 0, 10))
+ shake_camera(M, 25, clamp(baseshakeamount, 0, 10))
// You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
else if(dist <= far_dist)
- var/far_volume = CLAMP(far_dist, 30, 50) // Volume is based on explosion size and dist
+ var/far_volume = clamp(far_dist, 30, 50) // Volume is based on explosion size and dist
far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion
M.playsound_local(epicenter, null, far_volume, 1, frequency, falloff = 5, S = far_explosion_sound)
if(baseshakeamount > 0)
- shake_camera(M, 10, CLAMP(baseshakeamount*0.25, 0, 2.5))
+ shake_camera(M, 10, clamp(baseshakeamount*0.25, 0, 2.5))
EX_PREPROCESS_CHECK_TICK
//postpone processing for a bit
diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm
index 4332b09ac6..f054867de4 100644
--- a/code/datums/martial/krav_maga.dm
+++ b/code/datums/martial/krav_maga.dm
@@ -116,7 +116,7 @@
"[A] slams your chest! You can't breathe!")
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1)
if(D.losebreath <= 10)
- D.losebreath = CLAMP(D.losebreath + 5, 0, 10)
+ D.losebreath = clamp(D.losebreath + 5, 0, 10)
D.adjustOxyLoss(damage + 5)
log_combat(A, D, "quickchoked")
return TRUE
@@ -128,7 +128,7 @@
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1)
D.apply_damage(damage, BRUTE)
if(D.silent <= 10)
- D.silent = CLAMP(D.silent + 10, 0, 10)
+ D.silent = clamp(D.silent + 10, 0, 10)
log_combat(A, D, "neck chopped")
return TRUE
@@ -187,7 +187,7 @@
if(damage >= stunthreshold)
D.visible_message("[D] sputters and recoils in pain!", "You recoil in pain as you are jabbed in a nerve!")
D.drop_all_held_items()
-
+
return TRUE
//Krav Maga Gloves
diff --git a/code/datums/materials/basemats.dm b/code/datums/materials/basemats.dm
index c3d0deeac6..f07b1d8792 100644
--- a/code/datums/materials/basemats.dm
+++ b/code/datums/materials/basemats.dm
@@ -92,7 +92,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
/datum/material/plasma/on_applied(atom/source, amount, material_flags)
. = ..()
- if(ismovableatom(source))
+ if(ismovable(source))
source.AddElement(/datum/element/firestacker, amount=1)
source.AddComponent(/datum/component/explodable, 0, 0, amount / 2500, amount / 1250)
diff --git a/code/datums/position_point_vector.dm b/code/datums/position_point_vector.dm
index 44ff87e8ae..608683c3dc 100644
--- a/code/datums/position_point_vector.dm
+++ b/code/datums/position_point_vector.dm
@@ -20,7 +20,7 @@
return sqrt(((b.x - a.x) ** 2) + ((b.y - a.y) ** 2))
/proc/angle_between_points(datum/point/a, datum/point/b)
- return ATAN2((b.y - a.y), (b.x - a.x))
+ return arctan((b.y - a.y), (b.x - a.x))
/datum/position //For positions with map x/y/z and pixel x/y so you don't have to return lists. Could use addition/subtraction in the future I guess.
var/x = 0
diff --git a/code/datums/progressbar.dm b/code/datums/progressbar.dm
index faecf809cc..fbc194cc6f 100644
--- a/code/datums/progressbar.dm
+++ b/code/datums/progressbar.dm
@@ -38,7 +38,7 @@
if (user.client)
user.client.images += bar
- progress = CLAMP(progress, 0, goal)
+ progress = clamp(progress, 0, goal)
bar.icon_state = "prog_bar_[round(((progress / goal) * 100), 5)]"
if (!shown)
user.client.images += bar
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 69b74841df..e22b33d90a 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -336,7 +336,7 @@
if(prob(severity * 0.15))
to_chat(owner, "\"[text2ratvar(pick(mania_messages))]\"")
owner.playsound_local(get_turf(motor), hum, severity, 1)
- owner.adjust_drugginess(CLAMP(max(severity * 0.075, 1), 0, max(0, 50 - owner.druggy))) //7.5% of severity per second, minimum 1
+ owner.adjust_drugginess(clamp(max(severity * 0.075, 1), 0, max(0, 50 - owner.druggy))) //7.5% of severity per second, minimum 1
if(owner.hallucination < 50)
owner.hallucination = min(owner.hallucination + max(severity * 0.075, 1), 50) //7.5% of severity per second, minimum 1
if(owner.dizziness < 50)
@@ -594,7 +594,7 @@
old_health = owner.health
if(!old_oxyloss)
old_oxyloss = owner.getOxyLoss()
- var/health_difference = old_health - owner.health - CLAMP(owner.getOxyLoss() - old_oxyloss,0, owner.getOxyLoss())
+ var/health_difference = old_health - owner.health - clamp(owner.getOxyLoss() - old_oxyloss,0, owner.getOxyLoss())
if(!health_difference)
return
owner.visible_message("The light in [owner]'s eyes dims as [owner.p_theyre()] harmed!", \
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 40090c35c5..b71f51bd07 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -192,7 +192,7 @@
reagents = new()
reagents.reagent_list.Add(A)
reagents.conditional_update()
- else if(ismovableatom(A))
+ else if(ismovable(A))
var/atom/movable/M = A
if(isliving(M.loc))
var/mob/living/L = M.loc
@@ -692,7 +692,7 @@
/atom/vv_get_dropdown()
. = ..()
VV_DROPDOWN_OPTION("", "---------")
- if(!ismovableatom(src))
+ if(!ismovable(src))
var/turf/curturf = get_turf(src)
if(curturf)
. += ""
diff --git a/code/game/gamemodes/bloodsucker/bloodsucker.dm b/code/game/gamemodes/bloodsucker/bloodsucker.dm
index bb776d7bc0..c54de16e2e 100644
--- a/code/game/gamemodes/bloodsucker/bloodsucker.dm
+++ b/code/game/gamemodes/bloodsucker/bloodsucker.dm
@@ -53,7 +53,7 @@
restricted_jobs += "Assistant"
// Set number of Vamps
- recommended_enemies = CLAMP(round(num_players()/10), 1, 6);
+ recommended_enemies = clamp(round(num_players()/10), 1, 6);
// Select Antags
for(var/i = 0, i < recommended_enemies, i++)
@@ -195,7 +195,7 @@
return FALSE
if(target.stat > UNCONSCIOUS)
return FALSE
-
+
// Check Overdose: Am I even addicted to blood? Do I even have any in me?
//if (!target.reagents.addiction_list || !target.reagents.reagent_list)
//message_admins("DEBUG2: can_make_vassal() Abort: No reagents")
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm
index 48e306b2b5..4378a5c440 100644
--- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm
@@ -105,7 +105,7 @@
if (M.mind && M.mind.assigned_role && (M.mind.assigned_role in enemy_roles) && (!(M in candidates) || (M.mind.assigned_role in restricted_roles)))
job_check++ // Checking for "enemies" (such as sec officers). To be counters, they must either not be candidates to that rule, or have a job that restricts them from it
- var/threat = CLAMP(round(mode.threat_level/10),1,10)
+ var/threat = clamp(round(mode.threat_level/10),1,10)
if (job_check < required_enemies[threat])
SSblackbox.record_feedback("tally","dynamic",1,"Times rulesets rejected due to not enough enemy roles")
return FALSE
@@ -671,7 +671,7 @@
message_admins("[ADMIN_LOOKUPFLW(Ninja)] has been made into a ninja by dynamic.")
log_game("[key_name(Ninja)] was spawned as a ninja by dynamic.")
return Ninja
-
+
/datum/dynamic_ruleset/midround/from_ghosts/ninja/finish_setup(mob/new_character, index)
return
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
index a7fc9b86ce..edaadeae1c 100644
--- a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
@@ -789,7 +789,7 @@
if (prob(meteorminutes/2))
wavetype = GLOB.meteors_catastrophic
- var/ramp_up_final = CLAMP(round(meteorminutes/rampupdelta), 1, 10)
+ var/ramp_up_final = clamp(round(meteorminutes/rampupdelta), 1, 10)
spawn_meteors(ramp_up_final, wavetype)
diff --git a/code/game/gamemodes/dynamic/dynamic_storytellers.dm b/code/game/gamemodes/dynamic/dynamic_storytellers.dm
index c37eb9bc2a..3639ada166 100644
--- a/code/game/gamemodes/dynamic/dynamic_storytellers.dm
+++ b/code/game/gamemodes/dynamic/dynamic_storytellers.dm
@@ -11,7 +11,7 @@
WAROPS_ALWAYS_ALLOWED: Can always do warops, regardless of threat level.
USE_PREF_WEIGHTS: Will use peoples' preferences to change the threat centre.
FORCE_IF_WON: If this mode won the vote, forces it
- USE_PREV_ROUND_WEIGHTS: Changes its threat centre based on the average chaos of previous rounds.
+ USE_PREV_ROUND_WEIGHTS: Changes its threat centre based on the average chaos of previous rounds.
*/
var/flags = 0
var/dead_player_weight = 1 // How much dead players matter for threat calculation
@@ -22,11 +22,11 @@
var/datum/game_mode/dynamic/mode = null // Cached as soon as it's made, by dynamic.
/**
-Property weights are:
+Property weights are:
"story_potential" -- essentially how many different ways the antag can be played.
"trust" -- How much it makes the crew trust each other. Negative values means they're suspicious. Team antags are like this.
"chaos" -- How chaotic it makes the round. Has some overlap with "valid" and somewhat contradicts "extended".
-"valid" -- How likely the non-antag-enemy crew are to get involved, e.g. nukies encouraging the warden to
+"valid" -- How likely the non-antag-enemy crew are to get involved, e.g. nukies encouraging the warden to
let everyone into the armory, wizard moving around and being a nuisance, nightmare busting lights.
"extended" -- How much the antag is conducive to a long round. Nukies and cults are bad for this; Wizard is less bad; and so on.
"conversion" -- Basically a bool. Conversion antags, well, convert. It's its own class for a good reason.
@@ -34,13 +34,13 @@ Property weights are:
/datum/dynamic_storyteller/proc/start_injection_cooldowns()
var/latejoin_injection_cooldown_middle = 0.5*(GLOB.dynamic_first_latejoin_delay_max + GLOB.dynamic_first_latejoin_delay_min)
- mode.latejoin_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_first_latejoin_delay_min, GLOB.dynamic_first_latejoin_delay_max)) + world.time
+ mode.latejoin_injection_cooldown = round(clamp(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_first_latejoin_delay_min, GLOB.dynamic_first_latejoin_delay_max)) + world.time
var/midround_injection_cooldown_middle = 0.5*(GLOB.dynamic_first_midround_delay_min + GLOB.dynamic_first_midround_delay_max)
- mode.midround_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_first_midround_delay_min, GLOB.dynamic_first_midround_delay_max)) + world.time
-
+ mode.midround_injection_cooldown = round(clamp(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_first_midround_delay_min, GLOB.dynamic_first_midround_delay_max)) + world.time
+
var/event_injection_cooldown_middle = 0.5*(GLOB.dynamic_event_delay_max + GLOB.dynamic_event_delay_min)
- mode.event_injection_cooldown = (round(CLAMP(EXP_DISTRIBUTION(event_injection_cooldown_middle), GLOB.dynamic_event_delay_min, GLOB.dynamic_event_delay_max)) + world.time)
+ mode.event_injection_cooldown = (round(clamp(EXP_DISTRIBUTION(event_injection_cooldown_middle), GLOB.dynamic_event_delay_min, GLOB.dynamic_event_delay_max)) + world.time)
/datum/dynamic_storyteller/proc/calculate_threat()
var/threat = 0
@@ -99,15 +99,15 @@ Property weights are:
/datum/dynamic_storyteller/proc/get_midround_cooldown()
var/midround_injection_cooldown_middle = 0.5*(GLOB.dynamic_midround_delay_max + GLOB.dynamic_midround_delay_min)
- return round(CLAMP(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_midround_delay_min, GLOB.dynamic_midround_delay_max))
+ return round(clamp(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_midround_delay_min, GLOB.dynamic_midround_delay_max))
/datum/dynamic_storyteller/proc/get_event_cooldown()
var/event_injection_cooldown_middle = 0.5*(GLOB.dynamic_event_delay_max + GLOB.dynamic_event_delay_min)
- return round(CLAMP(EXP_DISTRIBUTION(event_injection_cooldown_middle), GLOB.dynamic_event_delay_min, GLOB.dynamic_event_delay_max))
+ return round(clamp(EXP_DISTRIBUTION(event_injection_cooldown_middle), GLOB.dynamic_event_delay_min, GLOB.dynamic_event_delay_max))
/datum/dynamic_storyteller/proc/get_latejoin_cooldown()
var/latejoin_injection_cooldown_middle = 0.5*(GLOB.dynamic_latejoin_delay_max + GLOB.dynamic_latejoin_delay_min)
- return round(CLAMP(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_latejoin_delay_min, GLOB.dynamic_latejoin_delay_max))
+ return round(clamp(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_latejoin_delay_min, GLOB.dynamic_latejoin_delay_max))
/datum/dynamic_storyteller/proc/get_injection_chance(dry_run = FALSE)
if(mode.forced_injection)
@@ -144,7 +144,7 @@ Property weights are:
if(!(rule.flags & MINOR_RULESET)) // makes the traitor rulesets always possible anyway
var/cost_difference = abs(rule.cost-(mode.threat_level-mode.threat))
/* Basically, the closer the cost is to the current threat-level-away-from-threat, the more likely it is to
- pick this particular ruleset.
+ pick this particular ruleset.
Let's use a toy example: there's 60 threat level and 10 threat spent.
We want to pick a ruleset that's close to that, so we run the below equation, on two rulesets.
Ruleset 1 has 30 cost, ruleset 2 has 5 cost.
@@ -212,7 +212,7 @@ Property weights are:
flags = WAROPS_ALWAYS_ALLOWED
min_players = 40
var/refund_cooldown = 0
-
+
/datum/dynamic_storyteller/chaotic/do_process()
if(refund_cooldown < world.time)
mode.create_threat(20)
@@ -221,7 +221,7 @@ Property weights are:
/datum/dynamic_storyteller/chaotic/get_midround_cooldown()
return ..() / 4
-
+
/datum/dynamic_storyteller/chaotic/get_latejoin_cooldown()
return ..() / 4
diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm
index 7857eb8253..afeebb770b 100644
--- a/code/game/gamemodes/meteor/meteor.dm
+++ b/code/game/gamemodes/meteor/meteor.dm
@@ -25,7 +25,7 @@
if (prob(meteorminutes/2))
wavetype = GLOB.meteors_catastrophic
- var/ramp_up_final = CLAMP(round(meteorminutes/rampupdelta), 1, 10)
+ var/ramp_up_final = clamp(round(meteorminutes/rampupdelta), 1, 10)
spawn_meteors(ramp_up_final, wavetype)
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index 74554ac9f8..9eed18d906 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -70,7 +70,7 @@
/datum/game_mode/revolution/post_setup()
var/list/heads = SSjob.get_living_heads()
var/list/sec = SSjob.get_living_sec()
- var/weighted_score = CLAMP(round(heads.len - ((3 - sec.len) / 3)), 1, max_headrevs)
+ var/weighted_score = clamp(round(heads.len - ((3 - sec.len) / 3)), 1, max_headrevs)
for(var/datum/mind/rev_mind in headrev_candidates) //People with return to lobby may still be in the lobby. Let's pick someone else in that case.
if(isnewplayer(rev_mind.current))
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 6fa7fa30c0..8b3958e606 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -169,7 +169,7 @@
var/multiplier = text2num(href_list["multiplier"])
var/is_stack = ispath(being_built.build_path, /obj/item/stack)
- multiplier = CLAMP(multiplier,1,50)
+ multiplier = clamp(multiplier,1,50)
/////////////////
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index bc0fec68ba..3f4b389b77 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -69,7 +69,7 @@
for(var/obj/item/stock_parts/manipulator/P in component_parts)
speed_coeff += (P.rating / 2)
speed_coeff = max(1, speed_coeff)
- heal_level = CLAMP((efficiency * 10) + 10, MINIMUM_HEAL_LEVEL, 100)
+ heal_level = clamp((efficiency * 10) + 10, MINIMUM_HEAL_LEVEL, 100)
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
//TO-DO: Make the genetics machine accept them.
diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm
index 6d22f9d6c8..eae2d5fa5b 100644
--- a/code/game/machinery/computer/apc_control.dm
+++ b/code/game/machinery/computer/apc_control.dm
@@ -150,7 +150,7 @@
return
log_activity("changed greater than charge filter to \"[new_filter]\"")
if(new_filter)
- new_filter = CLAMP(new_filter, 0, 100)
+ new_filter = clamp(new_filter, 0, 100)
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
result_filters["Charge Above"] = new_filter
if(href_list["below_filter"])
@@ -160,7 +160,7 @@
return
log_activity("changed lesser than charge filter to \"[new_filter]\"")
if(new_filter)
- new_filter = CLAMP(new_filter, 0, 100)
+ new_filter = clamp(new_filter, 0, 100)
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
result_filters["Charge Below"] = new_filter
if(href_list["access_filter"])
diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm
index 370f85b4b9..ad325455ad 100644
--- a/code/game/machinery/computer/arcade/minesweeper.dm
+++ b/code/game/machinery/computer/arcade/minesweeper.dm
@@ -308,12 +308,12 @@
var/new_rows = input(user, "How many rows do you want? (Minimum: 4, Maximum: 30)", "Minesweeper Rows") as null|num
if(!new_rows || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return FALSE
- new_rows = CLAMP(new_rows + 1, 4, 30)
+ new_rows = clamp(new_rows + 1, 4, 30)
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
var/new_columns = input(user, "How many columns do you want? (Minimum: 4, Maximum: 50)", "Minesweeper Squares") as null|num
if(!new_columns || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return FALSE
- new_columns = CLAMP(new_columns + 1, 4, 50)
+ new_columns = clamp(new_columns + 1, 4, 50)
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
var/grid_area = (new_rows - 1) * (new_columns - 1)
var/lower_limit = round(grid_area*0.156)
@@ -324,7 +324,7 @@
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
rows = new_rows
columns = new_columns
- mine_limit = CLAMP(new_mine_limit, lower_limit, upper_limit)
+ mine_limit = clamp(new_mine_limit, lower_limit, upper_limit)
return TRUE
/obj/machinery/computer/arcade/minesweeper/proc/make_mines(var/reset_everything)
diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm
index 22e102b54b..79ea51eca4 100644
--- a/code/game/machinery/computer/atmos_control.dm
+++ b/code/game/machinery/computer/atmos_control.dm
@@ -296,7 +296,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
if("rate")
var/target = text2num(params["rate"])
if(!isnull(target))
- target = CLAMP(target, 0, MAX_TRANSFER_RATE)
+ target = clamp(target, 0, MAX_TRANSFER_RATE)
signal.data += list("tag" = input_tag, "set_volume_rate" = target)
. = TRUE
if("output")
@@ -305,7 +305,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
if("pressure")
var/target = text2num(params["pressure"])
if(!isnull(target))
- target = CLAMP(target, 0, MAX_OUTPUT_PRESSURE)
+ target = clamp(target, 0, MAX_OUTPUT_PRESSURE)
signal.data += list("tag" = output_tag, "set_internal_pressure" = target)
. = TRUE
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm
index b9bd3da95e..d465ff2022 100644
--- a/code/game/machinery/computer/dna_console.dm
+++ b/code/game/machinery/computer/dna_console.dm
@@ -604,13 +604,13 @@
if("setbufferlabel")
var/text = sanitize(input(usr, "Input a new label:", "Input a Text", null) as text|null)
if(num && text)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
buffer_slot["label"] = text
if("setbuffer")
if(num && viable_occupant)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
buffer[num] = list(
"label"="Buffer[num]:[viable_occupant.real_name]",
"UI"=viable_occupant.dna.uni_identity,
@@ -620,7 +620,7 @@
)
if("clearbuffer")
if(num)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
buffer_slot.Cut()
@@ -635,7 +635,7 @@
apply_buffer(SCANNER_ACTION_MIXED,num)
if("injector")
if(num && injectorready < world.time)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
var/obj/item/dnainjector/timed/I
@@ -662,11 +662,11 @@
injectorready = world.time + INJECTOR_TIMEOUT
if("loaddisk")
if(num && diskette && diskette.fields)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
buffer[num] = diskette.fields.Copy()
if("savedisk")
if(num && diskette && !diskette.read_only)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
diskette.name = "data disk \[[buffer_slot["label"]]\]"
@@ -953,7 +953,7 @@
return viable_occupant
/obj/machinery/computer/scan_consolenew/proc/apply_buffer(action,buffer_num)
- buffer_num = CLAMP(buffer_num, 1, NUMBER_OF_BUFFERS)
+ buffer_num = clamp(buffer_num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[buffer_num]
var/mob/living/carbon/viable_occupant = get_viable_occupant()
if(istype(buffer_slot))
diff --git a/code/game/machinery/computer/prisoner/gulag_teleporter.dm b/code/game/machinery/computer/prisoner/gulag_teleporter.dm
index e4a6a0b2d4..ca75ff1dd0 100644
--- a/code/game/machinery/computer/prisoner/gulag_teleporter.dm
+++ b/code/game/machinery/computer/prisoner/gulag_teleporter.dm
@@ -97,7 +97,7 @@
return
if(!new_goal)
new_goal = default_goal
- contained_id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points
+ contained_id.goal = clamp(new_goal, 0, 1000) //maximum 1000 points
return TRUE
if("toggle_open")
if(teleporter.locked)
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 686b62d1c3..67113fcf78 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -33,7 +33,7 @@
to_chat(user, "You begin repairing [src]...")
if(I.use_tool(src, user, 40, volume=40))
- obj_integrity = CLAMP(obj_integrity + 20, 0, max_integrity)
+ obj_integrity = clamp(obj_integrity + 20, 0, max_integrity)
else
return ..()
diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm
index adc1748ded..cd22b2dc05 100644
--- a/code/game/machinery/doors/brigdoors.dm
+++ b/code/game/machinery/doors/brigdoors.dm
@@ -135,7 +135,7 @@
. /= 10
/obj/machinery/door_timer/proc/set_timer(value)
- var/new_time = CLAMP(value,0,MAX_TIMER)
+ var/new_time = clamp(value,0,MAX_TIMER)
. = new_time == timer_duration //return 1 on no change
timer_duration = new_time
diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm
index d01f7e3e40..c8219e9ebf 100644
--- a/code/game/machinery/launch_pad.dm
+++ b/code/game/machinery/launch_pad.dm
@@ -68,9 +68,9 @@
if(teleporting)
return
if(!isnull(x))
- x_offset = CLAMP(x, -range, range)
+ x_offset = clamp(x, -range, range)
if(!isnull(y))
- y_offset = CLAMP(y, -range, range)
+ y_offset = clamp(y, -range, range)
/obj/machinery/launchpad/proc/doteleport(mob/user, sending)
if(teleporting)
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index b0e26ce129..c144616c05 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -55,9 +55,9 @@
new /obj/item/pipe_meter(loc)
wait = world.time + 15
if(href_list["layer_up"])
- piping_layer = CLAMP(++piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
+ piping_layer = clamp(++piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
if(href_list["layer_down"])
- piping_layer = CLAMP(--piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
+ piping_layer = clamp(--piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
return
/obj/machinery/pipedispenser/attackby(obj/item/W, mob/user, params)
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index c152e302fe..34db7b0e08 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -270,7 +270,7 @@
use_stored_power(50)
/obj/machinery/shieldwallgen/proc/use_stored_power(amount)
- power = CLAMP(power - amount, 0, maximum_stored_power)
+ power = clamp(power - amount, 0, maximum_stored_power)
update_activity()
/obj/machinery/shieldwallgen/proc/update_activity()
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index 41dfe8e3ac..f9f4eb3e80 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -127,7 +127,7 @@
settableTemperatureRange = cap * 30
efficiency = (cap + 1) * 10000
- targetTemperature = CLAMP(targetTemperature,
+ targetTemperature = clamp(targetTemperature,
max(settableTemperatureMedian - settableTemperatureRange, TCMB),
settableTemperatureMedian + settableTemperatureRange)
@@ -230,7 +230,7 @@
target= text2num(target) + T0C
. = TRUE
if(.)
- targetTemperature = CLAMP(round(target),
+ targetTemperature = clamp(round(target),
max(settableTemperatureMedian - settableTemperatureRange, TCMB),
settableTemperatureMedian + settableTemperatureRange)
if("eject")
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index b8d4ef26e8..50984c43b8 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -195,7 +195,7 @@
/obj/machinery/syndicatebomb/proc/settings(mob/user)
var/new_timer = input(user, "Please set the timer.", "Timer", "[timer_set]") as num
if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station
- timer_set = CLAMP(new_timer, minimum_timer, maximum_timer)
+ timer_set = clamp(new_timer, minimum_timer, maximum_timer)
loc.visible_message("[icon2html(src, viewers(src))] timer set for [timer_set] seconds.")
if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, user) && isliving(user))
if(defused || active)
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 985c1166b7..16ae158ea7 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -70,7 +70,7 @@
com.target = null
visible_message("Cannot authenticate locked on coordinates. Please reinstate coordinate matrix.")
return
- if (ismovableatom(M))
+ if (ismovable(M))
if(do_teleport(M, com.target, channel = TELEPORT_CHANNEL_BLUESPACE))
use_power(5000)
diff --git a/code/game/machinery/toylathe.dm b/code/game/machinery/toylathe.dm
index c679f3f983..4e039d304c 100644
--- a/code/game/machinery/toylathe.dm
+++ b/code/game/machinery/toylathe.dm
@@ -156,7 +156,7 @@
var/multiplier = text2num(href_list["multiplier"])
var/is_stack = ispath(being_built.build_path, /obj/item/stack)
- multiplier = CLAMP(multiplier,1,50)
+ multiplier = clamp(multiplier,1,50)
/////////////////
@@ -240,7 +240,7 @@
T=1.2
for(var/obj/item/stock_parts/manipulator/M in component_parts)
T -= M.rating*0.2
- prod_coeff = CLAMP(T,1,0) // Coeff going 1 -> 0,8 -> 0,6 -> 0,4
+ prod_coeff = clamp(T,1,0) // Coeff going 1 -> 0,8 -> 0,6 -> 0,4
/obj/machinery/autoylathe/proc/main_win(mob/user)
var/dat = "
Autoylathe Menu:
"
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index f1fa5ddd20..65aa001fe1 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -484,7 +484,7 @@
/obj/item/punching_glove/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..())
- if(ismovableatom(hit_atom))
+ if(ismovable(hit_atom))
var/atom/movable/AM = hit_atom
AM.safe_throw_at(get_edge_target_turf(AM,get_dir(src, AM)), 7, 2)
qdel(src)
diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm
index 3b5a029df4..5276062121 100644
--- a/code/game/objects/effects/alien_acid.dm
+++ b/code/game/objects/effects/alien_acid.dm
@@ -17,7 +17,7 @@
target = get_turf(src)
if(acid_amt)
- acid_level = min( (CLAMP(round(acid_amt, 1), 0, INFINITY)) *acid_pwr, 12000) //capped so the acid effect doesn't last a half hour on the floor.
+ acid_level = min( (clamp(round(acid_amt, 1), 0, INFINITY)) *acid_pwr, 12000) //capped so the acid effect doesn't last a half hour on the floor.
//handle APCs and newscasters and stuff nicely
pixel_x = target.pixel_x + rand(-4,4)
diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm
index 01edd82ccb..80178c95c4 100644
--- a/code/game/objects/effects/step_triggers.dm
+++ b/code/game/objects/effects/step_triggers.dm
@@ -52,7 +52,7 @@
var/list/affecting = list()
/obj/effect/step_trigger/thrower/Trigger(atom/A)
- if(!A || !ismovableatom(A))
+ if(!A || !ismovable(A))
return
var/atom/movable/AM = A
var/curtiles = 0
diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm
index 6b3428698b..c3b6c0312f 100644
--- a/code/game/objects/items/chrono_eraser.dm
+++ b/code/game/objects/items/chrono_eraser.dm
@@ -193,7 +193,7 @@
/obj/effect/chrono_field/update_icon()
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
- ttk_frame = CLAMP(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
+ ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
if(ttk_frame != RPpos)
RPpos = ttk_frame
mob_underlay.icon_state = "frame[RPpos]"
diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm
index aaa87bbf01..ef0380fce0 100644
--- a/code/game/objects/items/circuitboards/machine_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm
@@ -804,7 +804,7 @@
var/new_cloud = input("Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id) as num|null
if(new_cloud == null)
return
- cloud_id = CLAMP(round(new_cloud, 1), 1, 100)
+ cloud_id = clamp(round(new_cloud, 1), 1, 100)
/obj/item/circuitboard/machine/public_nanite_chamber/examine(mob/user)
. = ..()
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index 09c045497c..60136f5529 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -346,8 +346,8 @@
var/clicky
if(click_params && click_params["icon-x"] && click_params["icon-y"])
- clickx = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
- clicky = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ clickx = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ clicky = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
if(!instant)
to_chat(user, "
You start drawing a [temp] on the [target.name]...")
diff --git a/code/game/objects/items/devices/desynchronizer.dm b/code/game/objects/items/devices/desynchronizer.dm
index e5dcfc0075..e3385dc13f 100644
--- a/code/game/objects/items/devices/desynchronizer.dm
+++ b/code/game/objects/items/devices/desynchronizer.dm
@@ -39,7 +39,7 @@
var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num
if(new_duration)
new_duration = new_duration SECONDS
- new_duration = CLAMP(new_duration, 50, max_duration)
+ new_duration = clamp(new_duration, 50, max_duration)
duration = new_duration
to_chat(user, "
You set the duration to [DisplayTimeText(duration)].")
return TRUE
diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm
index 9a09be093d..981a811bc3 100644
--- a/code/game/objects/items/devices/gps.dm
+++ b/code/game/objects/items/devices/gps.dm
@@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
if(!ui)
// Variable window height, depending on how many GPS units there are
// to show, clamped to relatively safe range.
- var/gps_window_height = CLAMP(325 + GLOB.GPS_list.len * 14, 325, 700)
+ var/gps_window_height = clamp(325 + GLOB.GPS_list.len * 14, 325, 700)
ui = new(user, src, ui_key, "gps", "Global Positioning System", 470, gps_window_height, master_ui, state) //width, height
ui.open()
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index bee59b254c..9ab6115634 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -171,7 +171,7 @@
// Negative numbers will subtract
/obj/item/lightreplacer/proc/AddUses(amount = 1)
- uses = CLAMP(uses + amount, 0, max_uses)
+ uses = clamp(uses + amount, 0, max_uses)
/obj/item/lightreplacer/proc/AddShards(amount = 1, user)
bulb_shards += amount
diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm
index 1eee083c80..e94d14a57d 100644
--- a/code/game/objects/items/devices/radio/electropack.dm
+++ b/code/game/objects/items/devices/radio/electropack.dm
@@ -81,7 +81,7 @@
if(!usr.canUseTopic(src, BE_CLOSE))
return
new_code = round(new_code)
- new_code = CLAMP(new_code, 1, 100)
+ new_code = clamp(new_code, 1, 100)
code = new_code
if(href_list["set"] == "power")
diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm
index 4bab5a5bcd..b6261b9060 100644
--- a/code/game/objects/items/devices/traitordevices.dm
+++ b/code/game/objects/items/devices/traitordevices.dm
@@ -232,7 +232,7 @@ effective or pretty fucking useless.
charge = max(0,charge - 25)//Quick decrease in light
else
charge = min(max_charge,charge + 50) //Charge in the dark
- animate(user,alpha = CLAMP(255 - charge,0,255),time = 10)
+ animate(user,alpha = clamp(255 - charge,0,255),time = 10)
/obj/item/jammer
diff --git a/code/game/objects/items/dice.dm b/code/game/objects/items/dice.dm
index f572d0a841..4fdb862288 100644
--- a/code/game/objects/items/dice.dm
+++ b/code/game/objects/items/dice.dm
@@ -170,7 +170,7 @@
/obj/item/dice/proc/diceroll(mob/user)
result = roll(sides)
if(rigged && result != rigged)
- if(prob(CLAMP(1/(sides - 1) * 100, 25, 80)))
+ if(prob(clamp(1/(sides - 1) * 100, 25, 80)))
result = rigged
var/fake_result = roll(sides)//Daredevil isn't as good as he used to be
var/comment = ""
diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm
index eaecae5a92..66869d6f04 100644
--- a/code/game/objects/items/grenades/plastic.dm
+++ b/code/game/objects/items/grenades/plastic.dm
@@ -94,7 +94,7 @@
return
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_held_item() == src)
- newtime = CLAMP(newtime, 10, 60000)
+ newtime = clamp(newtime, 10, 60000)
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm
index c961134244..6e270b6374 100644
--- a/code/game/objects/items/his_grace.dm
+++ b/code/game/objects/items/his_grace.dm
@@ -197,9 +197,9 @@
/obj/item/his_grace/proc/adjust_bloodthirst(amt)
prev_bloodthirst = bloodthirst
if(prev_bloodthirst < HIS_GRACE_CONSUME_OWNER && !ascended)
- bloodthirst = CLAMP(bloodthirst + amt, HIS_GRACE_SATIATED, HIS_GRACE_CONSUME_OWNER)
+ bloodthirst = clamp(bloodthirst + amt, HIS_GRACE_SATIATED, HIS_GRACE_CONSUME_OWNER)
else if(!ascended)
- bloodthirst = CLAMP(bloodthirst + amt, HIS_GRACE_CONSUME_OWNER, HIS_GRACE_FALL_ASLEEP)
+ bloodthirst = clamp(bloodthirst + amt, HIS_GRACE_CONSUME_OWNER, HIS_GRACE_FALL_ASLEEP)
update_stats()
/obj/item/his_grace/proc/update_stats()
diff --git a/code/game/objects/items/hot_potato.dm b/code/game/objects/items/hot_potato.dm
index 5f74830c99..347ec118fd 100644
--- a/code/game/objects/items/hot_potato.dm
+++ b/code/game/objects/items/hot_potato.dm
@@ -74,7 +74,7 @@
L.SetAllImmobility(0)
L.SetSleeping(0)
L.SetUnconscious(0)
- L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, CLAMP(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
+ L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, clamp(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
colorize(L)
/obj/item/hot_potato/examine(mob/user)
diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm
index 342f756ffc..23be8cbb9a 100644
--- a/code/game/objects/items/pneumaticCannon.dm
+++ b/code/game/objects/items/pneumaticCannon.dm
@@ -201,8 +201,8 @@
return target
var/x_o = (target.x - starting.x)
var/y_o = (target.y - starting.y)
- var/new_x = CLAMP((starting.x + (x_o * range_multiplier)), 0, world.maxx)
- var/new_y = CLAMP((starting.y + (y_o * range_multiplier)), 0, world.maxy)
+ var/new_x = clamp((starting.x + (x_o * range_multiplier)), 0, world.maxx)
+ var/new_y = clamp((starting.y + (y_o * range_multiplier)), 0, world.maxy)
var/turf/newtarget = locate(new_x, new_y, starting.z)
return newtarget
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index 318753e4ad..abb2d12a1f 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -649,7 +649,7 @@
continue
usage += projectile_tick_speed_ecost
usage += (tracked[I] * projectile_damage_tick_ecost_coefficient)
- energy = CLAMP(energy - usage, 0, maxenergy)
+ energy = clamp(energy - usage, 0, maxenergy)
if(energy <= 0)
deactivate_field()
visible_message("
[src] blinks \"ENERGY DEPLETED\".")
@@ -659,7 +659,7 @@
if(iscyborg(host.loc))
host = host.loc
else
- energy = CLAMP(energy + energy_recharge, 0, maxenergy)
+ energy = clamp(energy + energy_recharge, 0, maxenergy)
return
if(host.cell && (host.cell.charge >= (host.cell.maxcharge * cyborg_cell_critical_percentage)) && (energy < maxenergy))
host.cell.use(energy_recharge*energy_recharge_cyborg_drain_coefficient)
diff --git a/code/game/objects/items/sharpener.dm b/code/game/objects/items/sharpener.dm
index 93056adc99..014d4cb159 100644
--- a/code/game/objects/items/sharpener.dm
+++ b/code/game/objects/items/sharpener.dm
@@ -35,14 +35,14 @@
if(TH.force_wielded > initial(TH.force_wielded))
to_chat(user, "
[TH] has already been refined before. It cannot be sharpened further!")
return
- TH.force_wielded = CLAMP(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
+ TH.force_wielded = clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
if(I.force > initial(I.force))
to_chat(user, "
[I] has already been refined before. It cannot be sharpened further!")
return
user.visible_message("
[user] sharpens [I] with [src]!", "
You sharpen [I], making it much more deadly than before.")
I.sharpness = IS_SHARP_ACCURATE
- I.force = CLAMP(I.force + increment, 0, max)
- I.throwforce = CLAMP(I.throwforce + increment, 0, max)
+ I.force = clamp(I.force + increment, 0, max)
+ I.throwforce = clamp(I.throwforce + increment, 0, max)
I.name = "[prefix] [I.name]"
name = "worn out [name]"
desc = "[desc] At least, it used to."
diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm
index 16f29491be..1ba6fc2364 100644
--- a/code/game/objects/items/shields.dm
+++ b/code/game/objects/items/shields.dm
@@ -169,7 +169,7 @@
max_integrity = 75
/obj/item/shield/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
- if(ismovableatom(object))
+ if(ismovable(object))
var/atom/movable/AM = object
if(CHECK_BITFIELD(shield_flags, SHIELD_TRANSPARENT) && (AM.pass_flags & PASSGLASS))
return BLOCK_NONE
diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm
index 4c64ed9dd4..dc761ee3bf 100644
--- a/code/game/objects/items/singularityhammer.dm
+++ b/code/game/objects/items/singularityhammer.dm
@@ -37,7 +37,7 @@
/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
for(var/atom/X in orange(5,pull))
- if(ismovableatom(X))
+ if(ismovable(X))
var/atom/movable/A = X
if(A == wielder)
continue
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 70b00c72ec..add9ebd6b2 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -71,9 +71,9 @@
/obj/item/stack/proc/update_weight()
if(amount <= (max_amount * (1/3)))
- w_class = CLAMP(full_w_class-2, WEIGHT_CLASS_TINY, full_w_class)
+ w_class = clamp(full_w_class-2, WEIGHT_CLASS_TINY, full_w_class)
else if (amount <= (max_amount * (2/3)))
- w_class = CLAMP(full_w_class-1, WEIGHT_CLASS_TINY, full_w_class)
+ w_class = clamp(full_w_class-1, WEIGHT_CLASS_TINY, full_w_class)
else
w_class = full_w_class
diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm
index 58e16ad615..1c92ed4e61 100644
--- a/code/game/objects/items/tanks/tanks.dm
+++ b/code/game/objects/items/tanks/tanks.dm
@@ -204,7 +204,7 @@
pressure = text2num(pressure)
. = TRUE
if(.)
- distribute_pressure = CLAMP(round(pressure), TANK_MIN_RELEASE_PRESSURE, TANK_MAX_RELEASE_PRESSURE)
+ distribute_pressure = clamp(round(pressure), TANK_MIN_RELEASE_PRESSURE, TANK_MAX_RELEASE_PRESSURE)
/obj/item/tank/remove_air(amount)
return air_contents.remove(amount)
diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm
index 6fbf9316ed..08390e1607 100644
--- a/code/game/objects/items/theft_tools.dm
+++ b/code/game/objects/items/theft_tools.dm
@@ -256,7 +256,7 @@
. = ..()
if(!sliver)
return
- if(proximity && ismovableatom(O) && O != sliver)
+ if(proximity && ismovable(O) && O != sliver)
Consume(O, user)
/obj/item/hemostat/supermatter/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) // no instakill supermatter javelins
diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm
index e582aa7e67..8dac972d04 100644
--- a/code/game/objects/obj_defense.dm
+++ b/code/game/objects/obj_defense.dm
@@ -31,7 +31,7 @@
if(damage_flag)
armor_protection = armor.getRating(damage_flag)
if(armor_protection) //Only apply weak-against-armor/hollowpoint effects if there actually IS armor.
- armor_protection = CLAMP(armor_protection - armour_penetration, 0, 100)
+ armor_protection = clamp(armor_protection - armour_penetration, 0, 100)
return round(damage_amount * (100 - armor_protection)*0.01, DAMAGE_PRECISION)
//the sound played when the obj is damaged.
@@ -213,7 +213,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
if(T.intact && level == 1) //fire can't damage things hidden below the floor.
return
if(exposed_temperature && !(resistance_flags & FIRE_PROOF))
- take_damage(CLAMP(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
+ take_damage(clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE))
resistance_flags |= ON_FIRE
SSfire_burning.processing[src] = src
@@ -244,7 +244,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
if(has_buckled_mobs())
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
- buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
+ buckled_mob.electrocute_act((clamp(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
/obj/proc/reset_shocked()
obj_flags &= ~BEING_SHOCKED
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index a40314c7ad..5da04a6686 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -505,7 +505,7 @@
/obj/structure/closet/container_resist(mob/living/user)
if(opened)
return
- if(ismovableatom(loc))
+ if(ismovable(loc))
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
var/atom/movable/AM = loc
diff --git a/code/game/objects/structures/fireplace.dm b/code/game/objects/structures/fireplace.dm
index ee8f285230..ca66dbd8de 100644
--- a/code/game/objects/structures/fireplace.dm
+++ b/code/game/objects/structures/fireplace.dm
@@ -130,7 +130,7 @@
if(burn_time_remaining() < MAXIMUM_BURN_TIMER)
flame_expiry_timer = world.time + MAXIMUM_BURN_TIMER
else
- fuel_added = CLAMP(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
+ fuel_added = clamp(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
/obj/structure/fireplace/proc/burn_time_remaining()
if(lit)
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index 7c373f2734..fd62ffd368 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -294,7 +294,7 @@
/obj/structure/girder/CanAStarPass(ID, dir, caller)
. = !density
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSGRILLE)
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 61983dcb4f..54e08db210 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -129,7 +129,7 @@
/obj/structure/grille/CanAStarPass(ID, dir, caller)
. = !density
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSGRILLE)
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 8cf5b1ee66..79a7ce0519 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -333,7 +333,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
to_chat(user, "
That's not connected to anything!")
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
- if(!ismovableatom(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
+ if(!ismovable(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
return
if(!ismob(O))
if(!istype(O, /obj/structure/closet/body_bag))
@@ -375,6 +375,6 @@ GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
. = !density
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSTABLE)
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 550c0216c6..bbdf6925f9 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -103,7 +103,7 @@
/obj/structure/table/CanAStarPass(ID, dir, caller)
. = !density
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSTABLE)
@@ -175,8 +175,8 @@
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
- I.pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
- I.pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
return 1
else
return ..()
@@ -610,7 +610,7 @@
/obj/structure/rack/CanAStarPass(ID, dir, caller)
. = !density
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSTABLE)
diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm
index bc4cd8df33..3a719d05b9 100644
--- a/code/game/turfs/change_turf.dm
+++ b/code/game/turfs/change_turf.dm
@@ -256,9 +256,9 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
if(depth)
var/list/target_baseturfs
if(length(copytarget.baseturfs))
- // with default inputs this would be Copy(CLAMP(2, -INFINITY, baseturfs.len))
+ // with default inputs this would be Copy(clamp(2, -INFINITY, baseturfs.len))
// Don't forget a lower index is lower in the baseturfs stack, the bottom is baseturfs[1]
- target_baseturfs = copytarget.baseturfs.Copy(CLAMP(1 + ignore_bottom, 1 + copytarget.baseturfs.len - depth, copytarget.baseturfs.len))
+ target_baseturfs = copytarget.baseturfs.Copy(clamp(1 + ignore_bottom, 1 + copytarget.baseturfs.len - depth, copytarget.baseturfs.len))
else if(!ignore_bottom)
target_baseturfs = list(copytarget.baseturfs)
if(target_baseturfs)
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index f31649eaca..849b6cf45d 100755
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -441,7 +441,7 @@
for(var/V in contents)
var/atom/A = V
if(!QDELETED(A) && A.level >= affecting_level)
- if(ismovableatom(A))
+ if(ismovable(A))
var/atom/movable/AM = A
if(!AM.ex_check(explosion_id))
continue
diff --git a/code/game/world.dm b/code/game/world.dm
index 77361310b8..bee595047f 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -10,9 +10,7 @@ GLOBAL_LIST(topic_status_cache)
/world/New()
enable_debugger()
-#if DM_VERSION >= 513 && DM_BUILD >= 1506
world.Profile(PROFILE_START)
-#endif
log_world("World loaded at [TIME_STAMP("hh:mm:ss", FALSE)]!")
diff --git a/code/modules/admin/sound_emitter.dm b/code/modules/admin/sound_emitter.dm
index 702e2071bd..56c778dc85 100644
--- a/code/modules/admin/sound_emitter.dm
+++ b/code/modules/admin/sound_emitter.dm
@@ -95,7 +95,7 @@
var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num
if(isnull(new_volume))
return
- new_volume = CLAMP(new_volume, 0, 100)
+ new_volume = clamp(new_volume, 0, 100)
sound_volume = new_volume
to_chat(user, "
Volume set to [sound_volume]%.")
if(href_list["edit_mode"])
@@ -118,7 +118,7 @@
var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num
if(isnull(new_radius))
return
- new_radius = CLAMP(new_radius, 0, 127)
+ new_radius = clamp(new_radius, 0, 127)
play_radius = new_radius
to_chat(user, "
Audible radius set to [play_radius].")
if(href_list["play"])
diff --git a/code/modules/admin/sql_message_system.dm b/code/modules/admin/sql_message_system.dm
index 7b59e72403..356746ddbc 100644
--- a/code/modules/admin/sql_message_system.dm
+++ b/code/modules/admin/sql_message_system.dm
@@ -393,7 +393,7 @@
var/nsd = CONFIG_GET(number/note_stale_days)
var/nfd = CONFIG_GET(number/note_fresh_days)
if (agegate && type == "note" && isnum(nsd) && isnum(nfd) && nsd > nfd)
- var/alpha = CLAMP(100 - (age - nfd) * (85 / (nsd - nfd)), 15, 100)
+ var/alpha = clamp(100 - (age - nfd) * (85 / (nsd - nfd)), 15, 100)
if (alpha < 100)
if (alpha <= 15)
if (skipped)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 62c2dc900c..342f2ca6eb 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2363,7 +2363,7 @@
return
var/list/offset = splittext(href_list["offset"],",")
- var/number = CLAMP(text2num(href_list["object_count"]), 1, 100)
+ var/number = clamp(text2num(href_list["object_count"]), 1, 100)
var/X = offset.len > 0 ? text2num(offset[1]) : 0
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
var/Z = offset.len > 2 ? text2num(offset[3]) : 0
diff --git a/code/modules/admin/verbs/borgpanel.dm b/code/modules/admin/verbs/borgpanel.dm
index 83f2839438..869e44e4f5 100644
--- a/code/modules/admin/verbs/borgpanel.dm
+++ b/code/modules/admin/verbs/borgpanel.dm
@@ -85,7 +85,7 @@
if ("set_charge")
var/newcharge = input("New charge (0-[borg.cell.maxcharge]):", borg.name, borg.cell.charge) as num|null
if (newcharge)
- borg.cell.charge = CLAMP(newcharge, 0, borg.cell.maxcharge)
+ borg.cell.charge = clamp(newcharge, 0, borg.cell.maxcharge)
message_admins("[key_name_admin(user)] set the charge of [ADMIN_LOOKUPFLW(borg)] to [borg.cell.charge].")
log_admin("[key_name(user)] set the charge of [key_name(borg)] to [borg.cell.charge].")
if ("remove_cell")
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index cbbec40f85..066c38bcba 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -10,7 +10,7 @@
var/freq = input(usr, "What frequency would you like the sound to play at?",, 1) as null|num
if(!freq)
freq = 1
- vol = CLAMP(vol, 1, 100)
+ vol = clamp(vol, 1, 100)
var/sound/admin_sound = new()
admin_sound.file = S
diff --git a/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm b/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm
index 3757aecd02..fbdeea6b84 100644
--- a/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm
+++ b/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm
@@ -42,7 +42,7 @@
/mob/living/simple_animal/hostile/blob/fire_act(exposed_temperature, exposed_volume)
..()
if(exposed_temperature)
- adjustFireLoss(CLAMP(0.01 * exposed_temperature, 1, 5))
+ adjustFireLoss(clamp(0.01 * exposed_temperature, 1, 5))
else
adjustFireLoss(5)
diff --git a/code/modules/antagonists/blob/blob/overmind.dm b/code/modules/antagonists/blob/blob/overmind.dm
index aed64e4039..02be432045 100644
--- a/code/modules/antagonists/blob/blob/overmind.dm
+++ b/code/modules/antagonists/blob/blob/overmind.dm
@@ -203,7 +203,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
B.hud_used.blobpwrdisplay.maptext = "
[round(blob_core.obj_integrity)]
"
/mob/camera/blob/proc/add_points(points)
- blob_points = CLAMP(blob_points + points, 0, max_blob_points)
+ blob_points = clamp(blob_points + points, 0, max_blob_points)
hud_used.blobpwrdisplay.maptext = "
[round(blob_points)]
"
/mob/camera/blob/say(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
diff --git a/code/modules/antagonists/blob/blob/theblob.dm b/code/modules/antagonists/blob/blob/theblob.dm
index 444b10684b..5717dc557d 100644
--- a/code/modules/antagonists/blob/blob/theblob.dm
+++ b/code/modules/antagonists/blob/blob/theblob.dm
@@ -77,7 +77,7 @@
/obj/structure/blob/CanAStarPass(ID, dir, caller)
. = 0
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSBLOB)
diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_life.dm b/code/modules/antagonists/bloodsucker/bloodsucker_life.dm
index efccb5591e..3bfc76322d 100644
--- a/code/modules/antagonists/bloodsucker/bloodsucker_life.dm
+++ b/code/modules/antagonists/bloodsucker/bloodsucker_life.dm
@@ -39,7 +39,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/datum/antagonist/bloodsucker/proc/AddBloodVolume(value)
- owner.current.blood_volume = CLAMP(owner.current.blood_volume + value, 0, max_blood_volume)
+ owner.current.blood_volume = clamp(owner.current.blood_volume + value, 0, max_blood_volume)
update_hud()
/datum/antagonist/bloodsucker/proc/HandleFeeding(mob/living/carbon/target, mult=1)
@@ -112,7 +112,7 @@
CheckVampOrgans() // Heart, Eyes
if(check_limbs(costMult))
return TRUE
-
+
// BRUTE: Always Heal
var/bruteheal = min(C.getBruteLoss(), actual_regen)
var/toxinheal = min(C.getToxLoss(), actual_regen)
@@ -121,7 +121,7 @@
if(mult == 0)
return TRUE
if(owner.current.stat >= UNCONSCIOUS) //Faster regeneration while unconcious, so you dont have to wait all day
- mult *= 2
+ mult *= 2
// We have damage. Let's heal (one time)
C.adjustBruteLoss(-bruteheal * mult, forced = TRUE)// Heal BRUTE / BURN in random portions throughout the body.
C.adjustFireLoss(-fireheal * mult, forced = TRUE)
@@ -129,7 +129,7 @@
//C.heal_overall_damage(bruteheal * mult, fireheal * mult) // REMOVED: We need to FORCE this, because otherwise, vamps won't heal EVER. Swapped to above.
AddBloodVolume((bruteheal * -0.5 + fireheal * -1 + toxinheal * -0.2) / mult * costMult) // Costs blood to heal
return TRUE // Healed! Done for this tick.
-
+
/datum/antagonist/bloodsucker/proc/check_limbs(costMult)
@@ -137,7 +137,7 @@
var/mob/living/carbon/C = owner.current
var/list/missing = C.get_missing_limbs()
if(missing.len && C.blood_volume < limb_regen_cost + 5)
- return FALSE
+ return FALSE
for(var/targetLimbZone in missing) // 1) Find ONE Limb and regenerate it.
C.regenerate_limb(targetLimbZone, FALSE) // regenerate_limbs() <--- If you want to EXCLUDE certain parts, do it like this ----> regenerate_limbs(0, list("head"))
AddBloodVolume(50)
@@ -183,7 +183,7 @@
owner.current.blur_eyes(8 - 8 * (owner.current.blood_volume / BLOOD_VOLUME_BAD))
// Nutrition
owner.current.nutrition = clamp(owner.current.blood_volume, 545, 0) //The amount of blood is how full we are.
- //A bit higher regeneration based on blood volume
+ //A bit higher regeneration based on blood volume
if(owner.current.blood_volume < 700)
additional_regen = 0.4
else if(owner.current.blood_volume < BLOOD_VOLUME_NORMAL)
@@ -369,8 +369,8 @@
//Puke blood only if puke_blood is true, and loose some blood, else just puke normally.
if(puke_blood)
C.blood_volume = max(0, C.blood_volume - foodInGut * 2)
- C.vomit(foodInGut * 4, foodInGut * 2, 0)
- else
+ C.vomit(foodInGut * 4, foodInGut * 2, 0)
+ else
C.vomit(foodInGut * 4, FALSE, 0)
C.Stun(30)
//C.Dizzy(50)
diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm b/code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm
index 0c80ce0dee..7043c2f429 100644
--- a/code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm
+++ b/code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm
@@ -87,7 +87,7 @@
// Heads?
if (target_role == "HEAD")
target_amount = rand(1, round(SSticker.mode.num_players() / 20))
- target_amount = CLAMP(target_amount,1,3)
+ target_amount = clamp(target_amount,1,3)
// Department?
else
switch(target_role)
@@ -100,7 +100,7 @@
if("Quartermaster")
department_string = "Cargo"
target_amount = rand(round(SSticker.mode.num_players() / 20), round(SSticker.mode.num_players() / 10))
- target_amount = CLAMP(target_amount, 2, 4)
+ target_amount = clamp(target_amount, 2, 4)
..()
// EXPLANATION
diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_lair.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_lair.dm
index f68191d6d7..dd7e835d3a 100644
--- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_lair.dm
+++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_lair.dm
@@ -63,7 +63,7 @@
// Find Animals in Area
/* if(rand(0,2) == 0)
var/mobCount = 0
- var/mobMax = CLAMP(area_turfs.len / 25, 1, 4)
+ var/mobMax = clamp(area_turfs.len / 25, 1, 4)
for (var/turf/T in area_turfs)
if(!T) continue
var/mob/living/simple_animal/SA = locate() in T
diff --git a/code/modules/antagonists/clockcult/clock_helpers/fabrication_helpers.dm b/code/modules/antagonists/clockcult/clock_helpers/fabrication_helpers.dm
index 05f11294de..b0259c460e 100644
--- a/code/modules/antagonists/clockcult/clock_helpers/fabrication_helpers.dm
+++ b/code/modules/antagonists/clockcult/clock_helpers/fabrication_helpers.dm
@@ -239,7 +239,7 @@
if(!do_after(user, repair_values["healing_for_cycle"] * fabricator.speed_multiplier, target = src, \
extra_checks = CALLBACK(fabricator, /obj/item/clockwork/replica_fabricator.proc/fabricator_repair_checks, repair_values, src, user, TRUE)))
break
- obj_integrity = CLAMP(obj_integrity + repair_values["healing_for_cycle"], 0, max_integrity)
+ obj_integrity = clamp(obj_integrity + repair_values["healing_for_cycle"], 0, max_integrity)
adjust_clockwork_power(-repair_values["power_required"])
playsound(src, 'sound/machines/click.ogg', 50, 1)
diff --git a/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm b/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm
index f927fc237d..628add0cb3 100644
--- a/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm
+++ b/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm
@@ -10,7 +10,7 @@
if(GLOB.ratvar_awakens)
current_power = GLOB.clockwork_power = INFINITY
else
- current_power = GLOB.clockwork_power = CLAMP(GLOB.clockwork_power + amount, 0, MAX_CLOCKWORK_POWER)
+ current_power = GLOB.clockwork_power = clamp(GLOB.clockwork_power + amount, 0, MAX_CLOCKWORK_POWER)
for(var/obj/effect/clockwork/sigil/transmission/T in GLOB.all_clockwork_objects)
T.update_icon()
var/unlock_message
diff --git a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
index c7c9c42ee9..de2e85a501 100644
--- a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
+++ b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
@@ -211,7 +211,7 @@
var/mob/living/carbon/C = L
C.stuttering = max(8, C.stuttering)
C.drowsyness = max(8, C.drowsyness)
- C.confused += CLAMP(16 - C.confused, 0, 8)
+ C.confused += clamp(16 - C.confused, 0, 8)
C.apply_status_effect(STATUS_EFFECT_BELLIGERENT)
L.adjustFireLoss(15)
..()
diff --git a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm
index 4a10862e28..234f0445e0 100644
--- a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm
+++ b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm
@@ -59,7 +59,7 @@
if(issilicon(L))
L.DefaultCombatKnockdown(100)
else if(iscultist(L))
- L.confused += CLAMP(10 - L.confused, 0, 5) // Spearthrow now confuses enemy cultists + just deals extra damage / sets on fire instead of hardstunning + damage
+ L.confused += clamp(10 - L.confused, 0, 5) // Spearthrow now confuses enemy cultists + just deals extra damage / sets on fire instead of hardstunning + damage
to_chat(L, "
[src] crashes into you with burning force, sending you reeling!")
L.adjust_fire_stacks(2)
L.DefaultCombatKnockdown(1)
diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm
index 0fd6c8a8dc..ffe9ecfa80 100644
--- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm
+++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm
@@ -111,7 +111,7 @@
var/mob/living/L = M.current
if(ishuman(L) && L.stat != DEAD)
human_servants++
- construct_limit = round(CLAMP((human_servants / 4), 1, 3)) //1 per 4 human servants, maximum of 3
+ construct_limit = round(clamp((human_servants / 4), 1, 3)) //1 per 4 human servants, maximum of 3
//Summon Neovgre: Summon a very powerful combat mech that explodes when destroyed for massive damage.
/datum/clockwork_scripture/create_object/summon_arbiter
diff --git a/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm b/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm
index 9b4ac8085c..5fbaf9fd57 100644
--- a/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm
@@ -63,4 +63,4 @@
break
if(!M)
M = H.apply_status_effect(STATUS_EFFECT_MANIAMOTOR, src)
- M.severity = CLAMP(M.severity + ((11 - get_dist(src, H)) * efficiency * efficiency), 0, MAX_MANIA_SEVERITY)
+ M.severity = clamp(M.severity + ((11 - get_dist(src, H)) * efficiency * efficiency), 0, MAX_MANIA_SEVERITY)
diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm
index d64e99d206..28d1a66e00 100644
--- a/code/modules/antagonists/cult/blood_magic.dm
+++ b/code/modules/antagonists/cult/blood_magic.dm
@@ -454,16 +454,16 @@
S.emp_act(EMP_HEAVY)
else if(iscarbon(target))
var/mob/living/carbon/C = L
- C.silent += CLAMP(12 - C.silent, 0, 6)
- C.stuttering += CLAMP(30 - C.stuttering, 0, 15)
- C.cultslurring += CLAMP(30 - C.cultslurring, 0, 15)
+ C.silent += clamp(12 - C.silent, 0, 6)
+ C.stuttering += clamp(30 - C.stuttering, 0, 15)
+ C.cultslurring += clamp(30 - C.cultslurring, 0, 15)
C.Jitter(15)
else // cultstun no longer hardstuns + damages hostile cultists, instead debuffs them hard + deals some damage; debuffs for a bit longer since they don't add the clockie belligerent debuff
if(iscarbon(target))
var/mob/living/carbon/C = L
C.stuttering = max(10, C.stuttering)
C.drowsyness = max(10, C.drowsyness)
- C.confused += CLAMP(20 - C.confused, 0, 10)
+ C.confused += clamp(20 - C.confused, 0, 10)
L.adjustBruteLoss(15)
to_chat(user, "
In an brilliant flash of red, [L] [iscultist(L) ? "writhes in pain" : "falls to the ground!"]")
uses--
diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm
index b05aa7f769..fcb57a5a2e 100644
--- a/code/modules/antagonists/cult/cult_items.dm
+++ b/code/modules/antagonists/cult/cult_items.dm
@@ -731,7 +731,7 @@
if(!L.anti_magic_check())
if(is_servant_of_ratvar(L))
to_chat(L, "
\"Kneel for me, scum\"")
- L.confused += CLAMP(10 - L.confused, 0, 5) //confuses and lightly knockdowns + damages hostile cultists instead of hardstunning like before
+ L.confused += clamp(10 - L.confused, 0, 5) //confuses and lightly knockdowns + damages hostile cultists instead of hardstunning like before
L.DefaultCombatKnockdown(15)
L.adjustBruteLoss(10)
else
diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm
index b4f896fa08..5552efef1f 100644
--- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm
+++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm
@@ -358,7 +358,7 @@
if(NUKEUI_AWAIT_TIMER)
var/number_value = text2num(numeric_input)
if(number_value)
- timer_set = CLAMP(number_value, minimum_timer_set, maximum_timer_set)
+ timer_set = clamp(number_value, minimum_timer_set, maximum_timer_set)
playsound(src, 'sound/machines/nuke/general_beep.ogg', 50, FALSE)
set_safety()
. = TRUE
diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm
index ebe894138d..59ef15b4cf 100644
--- a/code/modules/atmospherics/gasmixtures/reactions.dm
+++ b/code/modules/atmospherics/gasmixtures/reactions.dm
@@ -282,7 +282,7 @@
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
- air.temperature = CLAMP(((air.temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB,INFINITY)
+ air.temperature = clamp(((air.temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB,INFINITY)
return REACTING
/datum/gas_reaction/nitrylformation //The formation of nitryl. Endothermic. Requires N2O as a catalyst.
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm
index 9238b8602b..2dc0afac26 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm
@@ -159,13 +159,13 @@
pump_direction = 1
if("set_input_pressure" in signal.data)
- input_pressure_min = CLAMP(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50)
+ input_pressure_min = clamp(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50)
if("set_output_pressure" in signal.data)
- output_pressure_max = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
+ output_pressure_max = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
if("set_external_pressure" in signal.data)
- external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
+ external_pressure_bound = clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
if("status" in signal.data)
spawn(2)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
index 02eb95acab..051dc965ad 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
@@ -122,7 +122,7 @@ Passive gate is similar to the regular pump except:
pressure = text2num(pressure)
. = TRUE
if(.)
- target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
+ target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
@@ -144,7 +144,7 @@ Passive gate is similar to the regular pump except:
on = !on
if("set_output_pressure" in signal.data)
- target_pressure = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
+ target_pressure = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
if(on != old_on)
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
index 9e49953df5..0e41f78e20 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
@@ -145,7 +145,7 @@
pressure = text2num(pressure)
. = TRUE
if(.)
- target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
+ target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
@@ -167,7 +167,7 @@
on = !on
if("set_output_pressure" in signal.data)
- target_pressure = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
+ target_pressure = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
if(on != old_on)
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm
index bc58ef158f..7bdd22cbd1 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm
@@ -91,7 +91,7 @@
pressure = text2num(pressure)
. = TRUE
if(.)
- open_pressure = CLAMP(pressure, close_pressure, 50*ONE_ATMOSPHERE)
+ open_pressure = clamp(pressure, close_pressure, 50*ONE_ATMOSPHERE)
investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
if("close_pressure")
var/pressure = params["close_pressure"]
@@ -106,6 +106,6 @@
pressure = text2num(pressure)
. = TRUE
if(.)
- close_pressure = CLAMP(pressure, 0, open_pressure)
+ close_pressure = clamp(pressure, 0, open_pressure)
investigate_log("close pressure was set to [close_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
index 864e3eef5e..1005f72afe 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
@@ -135,7 +135,7 @@
rate = text2num(rate)
. = TRUE
if(.)
- transfer_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
+ transfer_rate = clamp(rate, 0, MAX_TRANSFER_RATE)
investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
@@ -153,7 +153,7 @@
if("set_transfer_rate" in signal.data)
var/datum/gas_mixture/air1 = airs[1]
- transfer_rate = CLAMP(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
+ transfer_rate = clamp(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
if(on != old_on)
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
index 1099020662..78258dd10a 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
@@ -175,7 +175,7 @@
rate = text2num(rate)
. = TRUE
if(.)
- transfer_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
+ transfer_rate = clamp(rate, 0, MAX_TRANSFER_RATE)
investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
if("filter")
filter_type = null
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
index 5b929452fe..dcf0d09bee 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
@@ -164,7 +164,7 @@
pressure = text2num(pressure)
. = TRUE
if(.)
- target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
+ target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
if("node1")
var/value = text2num(params["concentration"])
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
index 87ab4fa643..05720583f9 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
@@ -123,7 +123,7 @@
if("set_volume_rate" in signal.data)
var/number = text2num(signal.data["set_volume_rate"])
var/datum/gas_mixture/air_contents = airs[1]
- volume_rate = CLAMP(number, 0, air_contents.volume)
+ volume_rate = clamp(number, 0, air_contents.volume)
if("status" in signal.data)
spawn(2)
@@ -172,7 +172,7 @@
rate = text2num(rate)
. = TRUE
if(.)
- volume_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
+ volume_rate = clamp(rate, 0, MAX_TRANSFER_RATE)
investigate_log("was set to [volume_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
broadcast_status()
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
index 4b6a4a4c10..1d8b875528 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
@@ -92,7 +92,7 @@
pressure = text2num(pressure)
. = TRUE
if(.)
- open_pressure = CLAMP(pressure, close_pressure, 50*ONE_ATMOSPHERE)
+ open_pressure = clamp(pressure, close_pressure, 50*ONE_ATMOSPHERE)
investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
if("close_pressure")
var/pressure = params["close_pressure"]
@@ -107,6 +107,6 @@
pressure = text2num(pressure)
. = TRUE
if(.)
- close_pressure = CLAMP(pressure, 0, open_pressure)
+ close_pressure = clamp(pressure, 0, open_pressure)
investigate_log("close pressure was set to [close_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
index 877826c1c1..f98f628cab 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
@@ -170,7 +170,7 @@
target = text2num(target)
. = TRUE
if(.)
- target_temperature = CLAMP(target, min_temperature, max_temperature)
+ target_temperature = clamp(target, min_temperature, max_temperature)
investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
index f2f2329661..9788bcb4ee 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
@@ -210,13 +210,13 @@
if("set_internal_pressure" in signal.data)
var/old_pressure = internal_pressure_bound
- internal_pressure_bound = CLAMP(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50)
+ internal_pressure_bound = clamp(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50)
if(old_pressure != internal_pressure_bound)
investigate_log(" internal pressure was set to [internal_pressure_bound] by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
if("set_external_pressure" in signal.data)
var/old_pressure = external_pressure_bound
- external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
+ external_pressure_bound = clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
if(old_pressure != external_pressure_bound)
investigate_log(" external pressure was set to [external_pressure_bound] by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
@@ -227,10 +227,10 @@
internal_pressure_bound = 0
if("adjust_internal_pressure" in signal.data)
- internal_pressure_bound = CLAMP(internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),0,ONE_ATMOSPHERE*50)
+ internal_pressure_bound = clamp(internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),0,ONE_ATMOSPHERE*50)
if("adjust_external_pressure" in signal.data)
- external_pressure_bound = CLAMP(external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),0,ONE_ATMOSPHERE*50)
+ external_pressure_bound = clamp(external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),0,ONE_ATMOSPHERE*50)
if("init" in signal.data)
name = signal.data["init"]
diff --git a/code/modules/atmospherics/machinery/pipes/layermanifold.dm b/code/modules/atmospherics/machinery/pipes/layermanifold.dm
index b98098584f..33092f5354 100644
--- a/code/modules/atmospherics/machinery/pipes/layermanifold.dm
+++ b/code/modules/atmospherics/machinery/pipes/layermanifold.dm
@@ -128,7 +128,7 @@
if(initialize_directions & dir)
return ..()
if((NORTH|EAST) & dir)
- user.ventcrawl_layer = CLAMP(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
+ user.ventcrawl_layer = clamp(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
if((SOUTH|WEST) & dir)
- user.ventcrawl_layer = CLAMP(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
+ user.ventcrawl_layer = clamp(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
to_chat(user, "You align yourself with the [user.ventcrawl_layer]\th output.")
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index 0b26cfc2f0..a41bdee3b6 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -390,7 +390,7 @@
pressure = text2num(pressure)
. = TRUE
if(.)
- release_pressure = CLAMP(round(pressure), can_min_release_pressure, can_max_release_pressure)
+ release_pressure = clamp(round(pressure), can_min_release_pressure, can_max_release_pressure)
investigate_log("was set to [release_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS)
if("valve")
var/logmsg
@@ -434,7 +434,7 @@
var/N = text2num(user_input)
if(!N)
return
- timer_set = CLAMP(N,minimum_timer_set,maximum_timer_set)
+ timer_set = clamp(N,minimum_timer_set,maximum_timer_set)
log_admin("[key_name(usr)] has activated a prototype valve timer")
. = TRUE
if("toggle_timer")
diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm
index 3603e46490..18e4da621a 100644
--- a/code/modules/atmospherics/machinery/portable/pump.dm
+++ b/code/modules/atmospherics/machinery/portable/pump.dm
@@ -150,7 +150,7 @@
pressure = text2num(pressure)
. = TRUE
if(.)
- pump.target_pressure = CLAMP(round(pressure), PUMP_MIN_PRESSURE, PUMP_MAX_PRESSURE)
+ pump.target_pressure = clamp(round(pressure), PUMP_MIN_PRESSURE, PUMP_MAX_PRESSURE)
investigate_log("was set to [pump.target_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS)
if("eject")
if(holding)
diff --git a/code/modules/buildmode/effects/line.dm b/code/modules/buildmode/effects/line.dm
index 60191de934..8bba27ac88 100644
--- a/code/modules/buildmode/effects/line.dm
+++ b/code/modules/buildmode/effects/line.dm
@@ -12,7 +12,7 @@
var/matrix/mat = matrix()
mat.Translate(0, 16)
mat.Scale(1, sqrt((x_offset * x_offset) + (y_offset * y_offset)) / 32)
- mat.Turn(90 - ATAN2(x_offset, y_offset)) // So... You pass coords in order x,y to this version of atan2. It should be called acsc2.
+ mat.Turn(90 - arctan(x_offset, y_offset)) // So... You pass coords in order x,y to this version of atan2. It should be called acsc2.
mat.Translate(atom_a.pixel_x, atom_a.pixel_y)
transform = mat
diff --git a/code/modules/buildmode/submodes/copy.dm b/code/modules/buildmode/submodes/copy.dm
index ba415c50fc..4aed8ac700 100644
--- a/code/modules/buildmode/submodes/copy.dm
+++ b/code/modules/buildmode/submodes/copy.dm
@@ -23,6 +23,6 @@
DuplicateObject(stored, perfectcopy=1, sameloc=0,newloc=T)
log_admin("Build Mode: [key_name(c)] copied [stored] to [AREACOORD(object)]")
else if(right_click)
- if(ismovableatom(object)) // No copying turfs for now.
+ if(ismovable(object)) // No copying turfs for now.
to_chat(c, "
[object] set as template.")
stored = object
diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm
index 74885d0ac0..989ccaf450 100644
--- a/code/modules/client/client_procs.dm
+++ b/code/modules/client/client_procs.dm
@@ -888,8 +888,8 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
var/viewscale = getviewsize(view)
var/x = viewscale[1]
var/y = viewscale[2]
- x = CLAMP(x+change, min, max)
- y = CLAMP(y+change, min,max)
+ x = clamp(x+change, min, max)
+ y = clamp(y+change, min,max)
change_view("[x]x[y]")
/client/proc/change_view(new_size)
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 76e0b36961..30291236e2 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -1966,7 +1966,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/max_D = CONFIG_GET(number/penis_max_inches_prefs)
var/new_length = input(user, "Penis length in inches:\n([min_D]-[max_D])", "Character Preference") as num|null
if(new_length)
- features["cock_length"] = CLAMP(round(new_length), min_D, max_D)
+ features["cock_length"] = clamp(round(new_length), min_D, max_D)
if("cock_shape")
var/new_shape
@@ -2163,7 +2163,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/danger = CONFIG_GET(number/threshold_body_size_slowdown)
var/new_body_size = input(user, "Choose your desired sprite size:\n([min*100]%-[max*100]%), Warning: May make your character look distorted[danger > min ? ", and an exponential slowdown will occur for those smaller than [danger*100]%!" : "!"]", "Character Preference", features["body_size"]*100) as num|null
if (new_body_size)
- new_body_size = CLAMP(new_body_size * 0.01, min, max)
+ new_body_size = clamp(new_body_size * 0.01, min, max)
var/dorfy
if(danger > new_body_size)
dorfy = alert(user, "The chosen size appears to be smaller than the threshold of [danger*100]%, which will lead to an added exponential slowdown. Are you sure about that?", "Dwarfism Alert", "Yes", "Move it to the threshold", "No")
diff --git a/code/modules/events/wormholes.dm b/code/modules/events/wormholes.dm
index b7f8b8f911..a8137acf48 100644
--- a/code/modules/events/wormholes.dm
+++ b/code/modules/events/wormholes.dm
@@ -57,7 +57,7 @@
if(!(ismecha(M) && mech_sized))
return
- if(ismovableatom(M))
+ if(ismovable(M))
if(GLOB.portals.len)
var/obj/effect/portal/P = pick(GLOB.portals)
if(P && isturf(P.loc))
diff --git a/code/modules/food_and_drinks/food.dm b/code/modules/food_and_drinks/food.dm
index 1342b1fcbf..203eb3eef6 100644
--- a/code/modules/food_and_drinks/food.dm
+++ b/code/modules/food_and_drinks/food.dm
@@ -25,7 +25,7 @@
pixel_y = rand(-5, 5)
/obj/item/reagent_containers/food/proc/adjust_food_quality(new_quality)
- food_quality = CLAMP(new_quality,0,100)
+ food_quality = clamp(new_quality,0,100)
/obj/item/reagent_containers/food/proc/checkLiked(var/fraction, mob/M)
if(last_check_time + 50 < world.time)
diff --git a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
index 68cc84c639..feba35da97 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
@@ -118,7 +118,7 @@
break
if(href_list["portion"])
- portion = CLAMP(input("How much drink do you want to dispense per glass?") as num, 0, 50)
+ portion = clamp(input("How much drink do you want to dispense per glass?") as num, 0, 50)
if(href_list["pour"] || href_list["m_pour"])
if(glasses-- <= 0)
diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm
index 94c8d7219c..19ded25b08 100644
--- a/code/modules/food_and_drinks/pizzabox.dm
+++ b/code/modules/food_and_drinks/pizzabox.dm
@@ -125,7 +125,7 @@
return
else
bomb_timer = input(user, "Set the [bomb] timer from [BOMB_TIMER_MIN] to [BOMB_TIMER_MAX].", bomb, bomb_timer) as num
- bomb_timer = CLAMP(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
+ bomb_timer = clamp(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
bomb_defused = FALSE
var/message = "[ADMIN_LOOKUPFLW(user)] has trapped a [src] with [bomb] set to [bomb_timer * 2] seconds."
diff --git a/code/modules/goonchat/browserOutput.dm b/code/modules/goonchat/browserOutput.dm
index 74432c7cbe..6d9e141309 100644
--- a/code/modules/goonchat/browserOutput.dm
+++ b/code/modules/goonchat/browserOutput.dm
@@ -138,7 +138,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
/datum/chatOutput/proc/setMusicVolume(volume = "")
if(volume)
- adminMusicVolume = CLAMP(text2num(volume), 0, 100)
+ adminMusicVolume = clamp(text2num(volume), 0, 100)
//Sends client connection details to the chat to handle and save
/datum/chatOutput/proc/sendClientData()
diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm
index 6a3fd56208..7fac7ef9b6 100644
--- a/code/modules/hydroponics/biogenerator.dm
+++ b/code/modules/hydroponics/biogenerator.dm
@@ -311,7 +311,7 @@
else if(href_list["create"])
var/amount = (text2num(href_list["amount"]))
//Can't be outside these (if you change this keep a sane limit)
- amount = CLAMP(amount, 1, 50)
+ amount = clamp(amount, 1, 50)
var/id = href_list["create"]
if(!stored_research.researched_designs.Find(id))
//naughty naughty
diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm
index 1775a1f9b1..a18dbe165d 100644
--- a/code/modules/hydroponics/grown/towercap.dm
+++ b/code/modules/hydroponics/grown/towercap.dm
@@ -199,8 +199,8 @@
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
- W.pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
- W.pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ W.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ W.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
else
return ..()
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index 718033ac56..b7665d7b5d 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -928,26 +928,26 @@
/// Tray Setters - The following procs adjust the tray or plants variables, and make sure that the stat doesn't go out of bounds.///
/obj/machinery/hydroponics/proc/adjustNutri(adjustamt)
- nutrilevel = CLAMP(nutrilevel + adjustamt, 0, maxnutri)
+ nutrilevel = clamp(nutrilevel + adjustamt, 0, maxnutri)
/obj/machinery/hydroponics/proc/adjustWater(adjustamt)
- waterlevel = CLAMP(waterlevel + adjustamt, 0, maxwater)
+ waterlevel = clamp(waterlevel + adjustamt, 0, maxwater)
if(adjustamt>0)
adjustToxic(-round(adjustamt/4))//Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
/obj/machinery/hydroponics/proc/adjustHealth(adjustamt)
if(myseed && !dead)
- plant_health = CLAMP(plant_health + adjustamt, 0, myseed.endurance)
+ plant_health = clamp(plant_health + adjustamt, 0, myseed.endurance)
/obj/machinery/hydroponics/proc/adjustToxic(adjustamt)
- toxic = CLAMP(toxic + adjustamt, 0, 100)
+ toxic = clamp(toxic + adjustamt, 0, 100)
/obj/machinery/hydroponics/proc/adjustPests(adjustamt)
- pestlevel = CLAMP(pestlevel + adjustamt, 0, 10)
+ pestlevel = clamp(pestlevel + adjustamt, 0, 10)
/obj/machinery/hydroponics/proc/adjustWeeds(adjustamt)
- weedlevel = CLAMP(weedlevel + adjustamt, 0, 10)
+ weedlevel = clamp(weedlevel + adjustamt, 0, 10)
/obj/machinery/hydroponics/proc/spawnplant() // why would you put strange reagent in a hydro tray you monster I bet you also feed them blood
var/list/livingplants = list(/mob/living/simple_animal/hostile/tree, /mob/living/simple_animal/hostile/killertomato)
diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm
index aa0e789721..5e49a32a23 100644
--- a/code/modules/hydroponics/seeds.dm
+++ b/code/modules/hydroponics/seeds.dm
@@ -211,7 +211,7 @@ obj/item/seeds/proc/is_gene_forbidden(typepath)
/// Setters procs ///
/obj/item/seeds/proc/adjust_yield(adjustamt)
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
- yield = CLAMP(yield + adjustamt, 0, 10)
+ yield = clamp(yield + adjustamt, 0, 10)
if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
yield = 1 // Mushrooms always have a minimum yield of 1.
@@ -220,39 +220,39 @@ obj/item/seeds/proc/is_gene_forbidden(typepath)
C.value = yield
/obj/item/seeds/proc/adjust_lifespan(adjustamt)
- lifespan = CLAMP(lifespan + adjustamt, 10, 100)
+ lifespan = clamp(lifespan + adjustamt, 10, 100)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan)
if(C)
C.value = lifespan
/obj/item/seeds/proc/adjust_endurance(adjustamt)
- endurance = CLAMP(endurance + adjustamt, 10, 100)
+ endurance = clamp(endurance + adjustamt, 10, 100)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance)
if(C)
C.value = endurance
/obj/item/seeds/proc/adjust_production(adjustamt)
if(yield != -1)
- production = CLAMP(production + adjustamt, 1, 10)
+ production = clamp(production + adjustamt, 1, 10)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
if(C)
C.value = production
/obj/item/seeds/proc/adjust_potency(adjustamt)
if(potency != -1)
- potency = CLAMP(potency + adjustamt, 0, 100)
+ potency = clamp(potency + adjustamt, 0, 100)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency)
if(C)
C.value = potency
/obj/item/seeds/proc/adjust_weed_rate(adjustamt)
- weed_rate = CLAMP(weed_rate + adjustamt, 0, 10)
+ weed_rate = clamp(weed_rate + adjustamt, 0, 10)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate)
if(C)
C.value = weed_rate
/obj/item/seeds/proc/adjust_weed_chance(adjustamt)
- weed_chance = CLAMP(weed_chance + adjustamt, 0, 67)
+ weed_chance = clamp(weed_chance + adjustamt, 0, 67)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance)
if(C)
C.value = weed_chance
@@ -261,7 +261,7 @@ obj/item/seeds/proc/is_gene_forbidden(typepath)
/obj/item/seeds/proc/set_yield(adjustamt)
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
- yield = CLAMP(adjustamt, 0, 10)
+ yield = clamp(adjustamt, 0, 10)
if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
yield = 1 // Mushrooms always have a minimum yield of 1.
@@ -270,39 +270,39 @@ obj/item/seeds/proc/is_gene_forbidden(typepath)
C.value = yield
/obj/item/seeds/proc/set_lifespan(adjustamt)
- lifespan = CLAMP(adjustamt, 10, 100)
+ lifespan = clamp(adjustamt, 10, 100)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan)
if(C)
C.value = lifespan
/obj/item/seeds/proc/set_endurance(adjustamt)
- endurance = CLAMP(adjustamt, 10, 100)
+ endurance = clamp(adjustamt, 10, 100)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance)
if(C)
C.value = endurance
/obj/item/seeds/proc/set_production(adjustamt)
if(yield != -1)
- production = CLAMP(adjustamt, 1, 10)
+ production = clamp(adjustamt, 1, 10)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
if(C)
C.value = production
/obj/item/seeds/proc/set_potency(adjustamt)
if(potency != -1)
- potency = CLAMP(adjustamt, 0, 100)
+ potency = clamp(adjustamt, 0, 100)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency)
if(C)
C.value = potency
/obj/item/seeds/proc/set_weed_rate(adjustamt)
- weed_rate = CLAMP(adjustamt, 0, 10)
+ weed_rate = clamp(adjustamt, 0, 10)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate)
if(C)
C.value = weed_rate
/obj/item/seeds/proc/set_weed_chance(adjustamt)
- weed_chance = CLAMP(adjustamt, 0, 67)
+ weed_chance = clamp(adjustamt, 0, 67)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance)
if(C)
C.value = weed_chance
diff --git a/code/modules/instruments/songs/_song.dm b/code/modules/instruments/songs/_song.dm
index 67feb14457..30d8b7b3a7 100644
--- a/code/modules/instruments/songs/_song.dm
+++ b/code/modules/instruments/songs/_song.dm
@@ -213,7 +213,7 @@
/datum/song/proc/sanitize_tempo(new_tempo)
new_tempo = abs(new_tempo)
- return CLAMP(round(new_tempo, world.tick_lag), world.tick_lag, 5 SECONDS)
+ return clamp(round(new_tempo, world.tick_lag), world.tick_lag, 5 SECONDS)
/datum/song/proc/get_bpm()
return 600 / tempo
@@ -242,22 +242,22 @@
cached_linear_dropoff = volume_decrease_per_decisecond
/datum/song/proc/set_volume(volume)
- src.volume = CLAMP(volume, max(0, min_volume), min(100, max_volume))
+ src.volume = clamp(volume, max(0, min_volume), min(100, max_volume))
update_sustain()
updateDialog()
/datum/song/proc/set_dropoff_volume(volume)
- sustain_dropoff_volume = CLAMP(volume, INSTRUMENT_MIN_SUSTAIN_DROPOFF, 100)
+ sustain_dropoff_volume = clamp(volume, INSTRUMENT_MIN_SUSTAIN_DROPOFF, 100)
update_sustain()
updateDialog()
/datum/song/proc/set_exponential_drop_rate(drop)
- sustain_exponential_dropoff = CLAMP(drop, INSTRUMENT_EXP_FALLOFF_MIN, INSTRUMENT_EXP_FALLOFF_MAX)
+ sustain_exponential_dropoff = clamp(drop, INSTRUMENT_EXP_FALLOFF_MIN, INSTRUMENT_EXP_FALLOFF_MAX)
update_sustain()
updateDialog()
/datum/song/proc/set_linear_falloff_duration(duration)
- sustain_linear_duration = CLAMP(duration, 0.1, INSTRUMENT_MAX_TOTAL_SUSTAIN)
+ sustain_linear_duration = clamp(duration, 0.1, INSTRUMENT_MAX_TOTAL_SUSTAIN)
update_sustain()
updateDialog()
diff --git a/code/modules/instruments/songs/editor.dm b/code/modules/instruments/songs/editor.dm
index 873ff0e1a7..d9595797d7 100644
--- a/code/modules/instruments/songs/editor.dm
+++ b/code/modules/instruments/songs/editor.dm
@@ -230,7 +230,7 @@
else if(href_list["setnoteshift"])
var/amount = input(usr, "Set note shift", "Note Shift") as null|num
if(!isnull(amount))
- note_shift = CLAMP(amount, note_shift_min, note_shift_max)
+ note_shift = clamp(amount, note_shift_min, note_shift_max)
else if(href_list["setsustainmode"])
var/choice = input(usr, "Choose a sustain mode", "Sustain Mode") as null|anything in list("Linear", "Exponential")
diff --git a/code/modules/instruments/songs/play_synthesized.dm b/code/modules/instruments/songs/play_synthesized.dm
index 2573da324a..5e7c5652a0 100644
--- a/code/modules/instruments/songs/play_synthesized.dm
+++ b/code/modules/instruments/songs/play_synthesized.dm
@@ -52,8 +52,8 @@
if(!num) //it's an accidental
accents[key] = oct_acc //if they misspelled it/fucked up that's on them lmao, no safety checks.
else //octave
- octaves[key] = CLAMP(num, octave_min, octave_max)
- compiled_chord += CLAMP((note_offset_lookup[key] + octaves[key] * 12 + accent_lookup[accents[key]]), key_min, key_max)
+ octaves[key] = clamp(num, octave_min, octave_max)
+ compiled_chord += clamp((note_offset_lookup[key] + octaves[key] * 12 + accent_lookup[accents[key]]), key_min, key_max)
compiled_chord += tempodiv //this goes last
if(length(compiled_chord))
compiled_chords[++compiled_chords.len] = compiled_chord
diff --git a/code/modules/integrated_electronics/core/special_pins/index_pin.dm b/code/modules/integrated_electronics/core/special_pins/index_pin.dm
index 06267eec61..e904c4c6d0 100644
--- a/code/modules/integrated_electronics/core/special_pins/index_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/index_pin.dm
@@ -14,7 +14,7 @@
new_data = 0
if(isnum(new_data))
- data = CLAMP(round(new_data), 0, IC_MAX_LIST_LENGTH)
+ data = clamp(round(new_data), 0, IC_MAX_LIST_LENGTH)
holder.on_data_written()
/datum/integrated_io/index/display_pin_type()
diff --git a/code/modules/integrated_electronics/subtypes/atmospherics.dm b/code/modules/integrated_electronics/subtypes/atmospherics.dm
index 6b4f46f83d..219e30c57f 100644
--- a/code/modules/integrated_electronics/subtypes/atmospherics.dm
+++ b/code/modules/integrated_electronics/subtypes/atmospherics.dm
@@ -308,7 +308,7 @@ obj/item/integrated_circuit/atmospherics/connector/portableConnectorReturnAir()
/obj/item/integrated_circuit/atmospherics/pump/filter/on_data_written()
var/amt = get_pin_data(IC_INPUT, 5)
- target_pressure = CLAMP(amt, 0, PUMP_MAX_PRESSURE)
+ target_pressure = clamp(amt, 0, PUMP_MAX_PRESSURE)
/obj/item/integrated_circuit/atmospherics/pump/filter/do_work()
activate_pin(2)
diff --git a/code/modules/integrated_electronics/subtypes/data_transfer.dm b/code/modules/integrated_electronics/subtypes/data_transfer.dm
index 8e1c715d83..8db1db4e00 100644
--- a/code/modules/integrated_electronics/subtypes/data_transfer.dm
+++ b/code/modules/integrated_electronics/subtypes/data_transfer.dm
@@ -125,7 +125,7 @@
/obj/item/integrated_circuit/transfer/pulsedemultiplexer/do_work()
var/output_index = get_pin_data(IC_INPUT, 1)
- if(output_index == CLAMP(output_index, 1, number_of_pins))
+ if(output_index == clamp(output_index, 1, number_of_pins))
activate_pin(round(output_index + 1 ,1))
/obj/item/integrated_circuit/transfer/pulsedemultiplexer/medium
diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm
index 0be6fd8686..49e6855b38 100644
--- a/code/modules/integrated_electronics/subtypes/input.dm
+++ b/code/modules/integrated_electronics/subtypes/input.dm
@@ -389,8 +389,8 @@
activate_pin(3)
return
var/turf/T = get_turf(assembly)
- var/target_x = CLAMP(get_pin_data(IC_INPUT, 1), 0, world.maxx)
- var/target_y = CLAMP(get_pin_data(IC_INPUT, 2), 0, world.maxy)
+ var/target_x = clamp(get_pin_data(IC_INPUT, 1), 0, world.maxx)
+ var/target_y = clamp(get_pin_data(IC_INPUT, 2), 0, world.maxy)
var/turf/A = locate(target_x, target_y, T.z)
set_pin_data(IC_OUTPUT, 1, null)
if(!A || !(A in view(T)))
@@ -532,7 +532,7 @@
var/rad = get_pin_data(IC_INPUT, 2)
if(isnum(rad))
- rad = CLAMP(rad, 0, 8)
+ rad = clamp(rad, 0, 8)
radius = rad
/obj/item/integrated_circuit/input/advanced_locator_list/do_work()
@@ -594,7 +594,7 @@
/obj/item/integrated_circuit/input/advanced_locator/on_data_written()
var/rad = get_pin_data(IC_INPUT, 2)
if(isnum(rad))
- rad = CLAMP(rad, 0, 8)
+ rad = clamp(rad, 0, 8)
radius = rad
/obj/item/integrated_circuit/input/advanced_locator/do_work()
diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm
index d1cd852651..fd4e6abfc5 100644
--- a/code/modules/integrated_electronics/subtypes/manipulation.dm
+++ b/code/modules/integrated_electronics/subtypes/manipulation.dm
@@ -236,7 +236,7 @@
var/mode = get_pin_data(IC_INPUT, 2)
switch(ord)
if(1)
- mode = CLAMP(mode, GRAB_PASSIVE, max_grab)
+ mode = clamp(mode, GRAB_PASSIVE, max_grab)
if(AM)
if(check_target(AM, exclude_contents = TRUE))
acting_object.investigate_log("grabbed ([AM]) using [src].", INVESTIGATE_CIRCUIT)
@@ -329,9 +329,9 @@
// If the item is in a grabber circuit we'll update the grabber's outputs after we've thrown it.
var/obj/item/integrated_circuit/manipulation/grabber/G = A.loc
- var/x_abs = CLAMP(T.x + target_x_rel, 0, world.maxx)
- var/y_abs = CLAMP(T.y + target_y_rel, 0, world.maxy)
- var/range = round(CLAMP(sqrt(target_x_rel*target_x_rel+target_y_rel*target_y_rel),0,8),1)
+ var/x_abs = clamp(T.x + target_x_rel, 0, world.maxx)
+ var/y_abs = clamp(T.y + target_y_rel, 0, world.maxy)
+ var/range = round(clamp(sqrt(target_x_rel*target_x_rel+target_y_rel*target_y_rel),0,8),1)
//remove damage
A.throwforce = 0
A.embedding = list("embed_chance" = 0)
@@ -447,7 +447,7 @@
if(!S)
activate_pin(4)
return
- if(materials.insert_item(S, CLAMP(get_pin_data(IC_INPUT, 2),0,100), multiplier = 1) )
+ if(materials.insert_item(S, clamp(get_pin_data(IC_INPUT, 2),0,100), multiplier = 1) )
AfterMaterialInsert()
activate_pin(3)
else
@@ -458,7 +458,7 @@
for(var/I in 1 to mtypes.len)
var/datum/material/M = materials.materials[mtypes[I]]
if(M)
- var/U = CLAMP(get_pin_data(IC_INPUT, I+2),-100000,100000)
+ var/U = clamp(get_pin_data(IC_INPUT, I+2),-100000,100000)
if(!U)
continue
if(!mt) //Invalid input
diff --git a/code/modules/integrated_electronics/subtypes/output.dm b/code/modules/integrated_electronics/subtypes/output.dm
index 6005709dde..47b6e151cb 100644
--- a/code/modules/integrated_electronics/subtypes/output.dm
+++ b/code/modules/integrated_electronics/subtypes/output.dm
@@ -112,7 +112,7 @@
var/brightness = get_pin_data(IC_INPUT, 2)
if(new_color && isnum(brightness))
- brightness = CLAMP(brightness, 0, 10)
+ brightness = clamp(brightness, 0, 10)
light_rgb = new_color
light_brightness = brightness
@@ -151,7 +151,7 @@
var/selected_sound = sounds[ID]
if(!selected_sound)
return
- vol = CLAMP(vol ,0 , 100)
+ vol = clamp(vol ,0 , 100)
playsound(get_turf(src), selected_sound, vol, freq, -1)
var/atom/A = get_object()
A.investigate_log("played a sound ([selected_sound]) as [type].", INVESTIGATE_CIRCUIT)
diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm
index 0fc9f58db8..663ba9fe16 100644
--- a/code/modules/integrated_electronics/subtypes/reagents.dm
+++ b/code/modules/integrated_electronics/subtypes/reagents.dm
@@ -94,7 +94,7 @@
else
direction_mode = SYRINGE_INJECT
if(isnum(new_amount))
- new_amount = CLAMP(new_amount, 0, volume)
+ new_amount = clamp(new_amount, 0, volume)
transfer_amount = new_amount
@@ -222,7 +222,7 @@
else
direction_mode = SYRINGE_INJECT
if(isnum(new_amount))
- new_amount = CLAMP(new_amount, 0, 50)
+ new_amount = clamp(new_amount, 0, 50)
transfer_amount = new_amount
/obj/item/integrated_circuit/reagent/pump/do_work()
@@ -468,7 +468,7 @@
else
direction_mode = SYRINGE_INJECT
if(isnum(new_amount))
- new_amount = CLAMP(new_amount, 0, 50)
+ new_amount = clamp(new_amount, 0, 50)
transfer_amount = new_amount
/obj/item/integrated_circuit/reagent/filter/do_work()
diff --git a/code/modules/integrated_electronics/subtypes/smart.dm b/code/modules/integrated_electronics/subtypes/smart.dm
index d0c47f0950..5dc866c556 100644
--- a/code/modules/integrated_electronics/subtypes/smart.dm
+++ b/code/modules/integrated_electronics/subtypes/smart.dm
@@ -57,8 +57,8 @@
activate_pin(3)
return
var/turf/T = get_turf(assembly)
- var/target_x = CLAMP(get_pin_data(IC_INPUT, 1), 0, world.maxx)
- var/target_y = CLAMP(get_pin_data(IC_INPUT, 2), 0, world.maxy)
+ var/target_x = clamp(get_pin_data(IC_INPUT, 1), 0, world.maxx)
+ var/target_y = clamp(get_pin_data(IC_INPUT, 2), 0, world.maxy)
var/turf/A = locate(target_x, target_y, T.z)
set_pin_data(IC_OUTPUT, 1, null)
if(!A||A==T)
diff --git a/code/modules/integrated_electronics/subtypes/time.dm b/code/modules/integrated_electronics/subtypes/time.dm
index 1f1d5444bb..cae43718c2 100644
--- a/code/modules/integrated_electronics/subtypes/time.dm
+++ b/code/modules/integrated_electronics/subtypes/time.dm
@@ -64,7 +64,7 @@
/obj/item/integrated_circuit/time/delay/custom/do_work()
var/delay_input = get_pin_data(IC_INPUT, 1)
if(delay_input && isnum(delay_input) )
- var/new_delay = CLAMP(delay_input ,1 ,36000) //An hour.
+ var/new_delay = clamp(delay_input ,1 ,36000) //An hour.
delay = new_delay
..()
@@ -119,7 +119,7 @@
/obj/item/integrated_circuit/time/ticker/custom/on_data_written()
var/delay_input = get_pin_data(IC_INPUT, 2)
if(delay_input && isnum(delay_input) )
- var/new_delay = CLAMP(delay_input ,1 ,1 HOURS)
+ var/new_delay = clamp(delay_input ,1 ,1 HOURS)
delay = new_delay
..()
diff --git a/code/modules/integrated_electronics/subtypes/trig.dm b/code/modules/integrated_electronics/subtypes/trig.dm
index cefa25e945..75580911c3 100644
--- a/code/modules/integrated_electronics/subtypes/trig.dm
+++ b/code/modules/integrated_electronics/subtypes/trig.dm
@@ -71,7 +71,7 @@
var/result = null
var/A = get_pin_data(IC_INPUT, 1)
if(!isnull(A))
- result = TAN(A)
+ result = tan(A)
set_pin_data(IC_OUTPUT, 1, result)
push_data()
diff --git a/code/modules/integrated_electronics/subtypes/weaponized.dm b/code/modules/integrated_electronics/subtypes/weaponized.dm
index 02340970af..2f6a2cd841 100644
--- a/code/modules/integrated_electronics/subtypes/weaponized.dm
+++ b/code/modules/integrated_electronics/subtypes/weaponized.dm
@@ -102,8 +102,8 @@
yo.data = round(yo.data, 1)
var/turf/T = get_turf(assembly)
- var/target_x = CLAMP(T.x + xo.data, 0, world.maxx)
- var/target_y = CLAMP(T.y + yo.data, 0, world.maxy)
+ var/target_x = clamp(T.x + xo.data, 0, world.maxx)
+ var/target_y = clamp(T.y + yo.data, 0, world.maxy)
assembly.visible_message("
[assembly] fires [installed_gun]!")
shootAt(locate(target_x, target_y, T.z))
@@ -191,7 +191,7 @@
var/datum/integrated_io/detonation_time = inputs[1]
var/dt
if(isnum(detonation_time.data) && detonation_time.data > 0)
- dt = CLAMP(detonation_time.data, 1, 12)*10
+ dt = clamp(detonation_time.data, 1, 12)*10
else
dt = 15
addtimer(CALLBACK(attached_grenade, /obj/item/grenade.proc/prime), dt)
@@ -293,9 +293,9 @@
// If the item is in a grabber circuit we'll update the grabber's outputs after we've thrown it.
var/obj/item/integrated_circuit/manipulation/grabber/G = A.loc
- var/x_abs = CLAMP(T.x + target_x_rel, 0, world.maxx)
- var/y_abs = CLAMP(T.y + target_y_rel, 0, world.maxy)
- var/range = round(CLAMP(sqrt(target_x_rel*target_x_rel+target_y_rel*target_y_rel),0,8),1)
+ var/x_abs = clamp(T.x + target_x_rel, 0, world.maxx)
+ var/y_abs = clamp(T.y + target_y_rel, 0, world.maxy)
+ var/range = round(clamp(sqrt(target_x_rel*target_x_rel+target_y_rel*target_y_rel),0,8),1)
assembly.visible_message("
\The [assembly] has thrown [A]!")
log_attack("[assembly] [REF(assembly)] has thrown [A] with lethal force.")
A.forceMove(drop_location())
@@ -324,7 +324,7 @@
/obj/item/integrated_circuit/weaponized/stun/do_work()
- var/stunforce = CLAMP(get_pin_data(IC_INPUT, 1),1,70)
+ var/stunforce = clamp(get_pin_data(IC_INPUT, 1),1,70)
var/mob/living/L = assembly.loc
if(attempt_stun(L,stunforce))
activate_pin(2)
diff --git a/code/modules/language/language_holder.dm b/code/modules/language/language_holder.dm
index b307e66b39..f31ea9022b 100644
--- a/code/modules/language/language_holder.dm
+++ b/code/modules/language/language_holder.dm
@@ -74,7 +74,7 @@
var/datum/language_holder/other
if(istype(thing, /datum/language_holder))
other = thing
- else if(ismovableatom(thing))
+ else if(ismovable(thing))
var/atom/movable/AM = thing
other = AM.get_language_holder()
else if(istype(thing, /datum/mind))
@@ -94,7 +94,7 @@
language_menu.ui_interact(user)
/datum/language_holder/proc/get_atom()
- if(ismovableatom(owner))
+ if(ismovable(owner))
. = owner
else if(istype(owner, /datum/mind))
var/datum/mind/M = owner
diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm
index 008724b10f..144037b3a7 100644
--- a/code/modules/library/lib_machines.dm
+++ b/code/modules/library/lib_machines.dm
@@ -267,7 +267,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
dat += "
(Order book by SS13BN)"
dat += "
"
dat += "| AUTHOR | TITLE | CATEGORY | |
"
- dat += libcomp_menu[CLAMP(page,1,libcomp_menu.len)]
+ dat += libcomp_menu[clamp(page,1,libcomp_menu.len)]
dat += "| <<<< | | | >>>> |
"
dat += "
"
dat += "
(Return to main menu)"
diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm
index 8712a66290..779dd9c3ea 100644
--- a/code/modules/lighting/lighting_atom.dm
+++ b/code/modules/lighting/lighting_atom.dm
@@ -38,7 +38,7 @@
if (!light_power || !light_range) // We won't emit light anyways, destroy the light source.
QDEL_NULL(light)
else
- if (!ismovableatom(loc)) // We choose what atom should be the top atom of the light here.
+ if (!ismovable(loc)) // We choose what atom should be the top atom of the light here.
. = src
else
. = loc
diff --git a/code/modules/mapping/reader.dm b/code/modules/mapping/reader.dm
index 86b501c455..e7d7fd4898 100644
--- a/code/modules/mapping/reader.dm
+++ b/code/modules/mapping/reader.dm
@@ -93,7 +93,7 @@
gridSet.ycrd = text2num(dmmRegex.group[4])
gridSet.zcrd = text2num(dmmRegex.group[5])
- bounds[MAP_MINX] = min(bounds[MAP_MINX], CLAMP(gridSet.xcrd, x_lower, x_upper))
+ bounds[MAP_MINX] = min(bounds[MAP_MINX], clamp(gridSet.xcrd, x_lower, x_upper))
bounds[MAP_MINZ] = min(bounds[MAP_MINZ], gridSet.zcrd)
bounds[MAP_MAXZ] = max(bounds[MAP_MAXZ], gridSet.zcrd)
@@ -113,15 +113,15 @@
if(gridLines.len && gridLines[gridLines.len] == "")
gridLines.Cut(gridLines.len) // Remove only one blank line at the end.
- bounds[MAP_MINY] = min(bounds[MAP_MINY], CLAMP(gridSet.ycrd, y_lower, y_upper))
+ bounds[MAP_MINY] = min(bounds[MAP_MINY], clamp(gridSet.ycrd, y_lower, y_upper))
gridSet.ycrd += gridLines.len - 1 // Start at the top and work down
- bounds[MAP_MAXY] = max(bounds[MAP_MAXY], CLAMP(gridSet.ycrd, y_lower, y_upper))
+ bounds[MAP_MAXY] = max(bounds[MAP_MAXY], clamp(gridSet.ycrd, y_lower, y_upper))
var/maxx = gridSet.xcrd
if(gridLines.len) //Not an empty map
maxx = max(maxx, gridSet.xcrd + length(gridLines[1]) / key_len - 1)
- bounds[MAP_MAXX] = CLAMP(max(bounds[MAP_MAXX], maxx), x_lower, x_upper)
+ bounds[MAP_MAXX] = clamp(max(bounds[MAP_MAXX], maxx), x_lower, x_upper)
CHECK_TICK
// Indicate failure to parse any coordinates by nulling bounds
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index 56e1a04b95..4dd86a847a 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -428,7 +428,7 @@
/obj/item/projectile/hook/on_hit(atom/target)
. = ..()
- if(ismovableatom(target))
+ if(ismovable(target))
var/atom/movable/A = target
if(A.anchored)
return
@@ -833,13 +833,13 @@
force = 0
var/ghost_counter = ghost_check()
- force = CLAMP((ghost_counter * 4), 0, 75)
+ force = clamp((ghost_counter * 4), 0, 75)
user.visible_message("
[user] strikes with the force of [ghost_counter] vengeful spirits!")
return ..()
/obj/item/melee/ghost_sword/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
var/ghost_counter = ghost_check()
- final_block_chance += CLAMP((ghost_counter * 5), 0, 75)
+ final_block_chance += clamp((ghost_counter * 5), 0, 75)
owner.visible_message("
[owner] is protected by a ring of [ghost_counter] ghosts!")
return ..()
diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm
index c0356dd1ab..09246abc46 100644
--- a/code/modules/mining/machine_silo.dm
+++ b/code/modules/mining/machine_silo.dm
@@ -116,7 +116,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
var/list/logs = GLOB.silo_access_logs[REF(src)]
var/len = LAZYLEN(logs)
var/num_pages = 1 + round((len - 1) / 30)
- var/page = CLAMP(log_page, 1, num_pages)
+ var/page = clamp(log_page, 1, num_pages)
if(num_pages > 1)
for(var/i in 1 to num_pages)
if(i == page)
diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm
index d04c0104e5..e89bbef58d 100644
--- a/code/modules/mining/mint.dm
+++ b/code/modules/mining/mint.dm
@@ -87,7 +87,7 @@
if(istype(new_material))
chosen = new_material
if(href_list["chooseAmt"])
- coinsToProduce = CLAMP(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
+ coinsToProduce = clamp(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
updateUsrDialog()
if(href_list["makeCoins"])
var/temp_coins = coinsToProduce
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index b2d02d8fa2..dc7384124d 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -570,7 +570,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
views |= i
var/new_view = input("Choose your new view", "Modify view range", 7) as null|anything in views
if(new_view)
- client.change_view(CLAMP(new_view, 7, max_view))
+ client.change_view(clamp(new_view, 7, max_view))
else
client.change_view(CONFIG_GET(string/default_view))
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index f32d84ae73..4cb93a1b6a 100644
--- a/code/modules/mob/living/brain/brain_item.dm
+++ b/code/modules/mob/living/brain/brain_item.dm
@@ -229,7 +229,7 @@
var/adjusted_amount
if(amount >= 0 && maximum)
var/brainloss = get_brain_damage()
- var/new_brainloss = CLAMP(brainloss + amount, 0, maximum)
+ var/new_brainloss = clamp(brainloss + amount, 0, maximum)
if(brainloss > new_brainloss) //brainloss is over the cap already
return 0
adjusted_amount = new_brainloss - brainloss
diff --git a/code/modules/mob/living/carbon/alien/status_procs.dm b/code/modules/mob/living/carbon/alien/status_procs.dm
index 4a63a72686..71d61cab25 100644
--- a/code/modules/mob/living/carbon/alien/status_procs.dm
+++ b/code/modules/mob/living/carbon/alien/status_procs.dm
@@ -20,5 +20,5 @@
/mob/living/carbon/alien/AdjustStun(amount, updating = 1, ignore_canstun = 0)
. = ..()
if(!.)
- move_delay_add = CLAMP(move_delay_add + round(amount/2), 0, 10)
+ move_delay_add = clamp(move_delay_add + round(amount/2), 0, 10)
*/
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 94aba6851a..29c7321660 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -768,7 +768,7 @@
return
else
if(hud_used.healths)
- var/health_amount = min(health, maxHealth - CLAMP(getStaminaLoss()-50, 0, 80))//CIT CHANGE - makes staminaloss have less of an impact on the health hud
+ var/health_amount = min(health, maxHealth - clamp(getStaminaLoss()-50, 0, 80))//CIT CHANGE - makes staminaloss have less of an impact on the health hud
if(..(health_amount)) //not dead
switch(hal_screwyhud)
if(SCREWYHUD_CRIT)
diff --git a/code/modules/mob/living/carbon/human/species_types/dwarves.dm b/code/modules/mob/living/carbon/human/species_types/dwarves.dm
index 7b43f6d565..50b88579f4 100644
--- a/code/modules/mob/living/carbon/human/species_types/dwarves.dm
+++ b/code/modules/mob/living/carbon/human/species_types/dwarves.dm
@@ -169,7 +169,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
for(var/datum/reagent/R in owner.reagents.reagent_list)
if(istype(R, /datum/reagent/consumable/ethanol))
var/datum/reagent/consumable/ethanol/E = R
- stored_alcohol = CLAMP(stored_alcohol + E.boozepwr / 50, 0, max_alcohol)
+ stored_alcohol = clamp(stored_alcohol + E.boozepwr / 50, 0, max_alcohol)
var/heal_amt = heal_rate
stored_alcohol -= alcohol_rate //Subtracts alcohol_Rate from stored alcohol so EX: 250 - 0.25 per each loop that occurs.
if(stored_alcohol > 400) //If they are over 400 they start regenerating
diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm
index abc2288e9b..7a5e347060 100644
--- a/code/modules/mob/living/carbon/human/species_types/golems.dm
+++ b/code/modules/mob/living/carbon/human/species_types/golems.dm
@@ -397,7 +397,7 @@
var/new_y = P.starting.y + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
var/turf/target = get_turf(P.starting)
// redirect the projectile
- P.preparePixelProjectile(locate(CLAMP(target.x + new_x, 1, world.maxx), CLAMP(target.y + new_y, 1, world.maxy), H.z), H)
+ P.preparePixelProjectile(locate(clamp(target.x + new_x, 1, world.maxx), clamp(target.y + new_y, 1, world.maxy), H.z), H)
return BULLET_ACT_FORCE_PIERCE
return ..()
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index 775f36cfc7..10a29c72c1 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -606,7 +606,7 @@
var/max_D = CONFIG_GET(number/penis_max_inches_prefs)
var/new_length = input(owner, "Penis length in inches:\n([min_D]-[max_D])", "Genital Alteration") as num|null
if(new_length)
- H.dna.features["cock_length"] = CLAMP(round(new_length), min_D, max_D)
+ H.dna.features["cock_length"] = clamp(round(new_length), min_D, max_D)
H.update_genitals()
H.apply_overlay()
H.give_genital(/obj/item/organ/genital/testicles)
diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm
index f37e718462..f720aa7f8a 100644
--- a/code/modules/mob/living/carbon/human/species_types/vampire.dm
+++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm
@@ -106,8 +106,8 @@
to_chat(victim, "
[H] is draining your blood!")
to_chat(H, "
You drain some blood!")
playsound(H, 'sound/items/drink.ogg', 30, 1, -2)
- victim.blood_volume = CLAMP(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
- H.blood_volume = CLAMP(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
+ victim.blood_volume = clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
+ H.blood_volume = clamp(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
if(!victim.blood_volume)
to_chat(H, "
You finish off [victim]'s blood supply!")
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 8097859aac..00a0991e19 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -235,7 +235,7 @@
//TOXINS/PLASMA
if(Toxins_partialpressure > safe_tox_max)
var/ratio = (breath_gases[/datum/gas/plasma]/safe_tox_max) * 10
- adjustToxLoss(CLAMP(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
+ adjustToxLoss(clamp(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
else
clear_alert("too_much_tox")
diff --git a/code/modules/mob/living/carbon/status_procs.dm b/code/modules/mob/living/carbon/status_procs.dm
index 6c497bb8d4..a47bb7fb4a 100644
--- a/code/modules/mob/living/carbon/status_procs.dm
+++ b/code/modules/mob/living/carbon/status_procs.dm
@@ -23,10 +23,10 @@
clear_alert("high")
/mob/living/carbon/adjust_disgust(amount)
- disgust = CLAMP(disgust+amount, 0, DISGUST_LEVEL_MAXEDOUT)
+ disgust = clamp(disgust+amount, 0, DISGUST_LEVEL_MAXEDOUT)
/mob/living/carbon/set_disgust(amount)
- disgust = CLAMP(amount, 0, DISGUST_LEVEL_MAXEDOUT)
+ disgust = clamp(amount, 0, DISGUST_LEVEL_MAXEDOUT)
////////////////////////////////////////TRAUMAS/////////////////////////////////////////
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index d5e1fa6fc4..3257b0e3bf 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -88,7 +88,7 @@
if(EFFECT_STUN)
Stun(effect * hit_percent)
if(EFFECT_KNOCKDOWN)
- DefaultCombatKnockdown(effect * hit_percent, override_stamdmg = knockdown_stammax ? CLAMP(knockdown_stamoverride, 0, knockdown_stammax-getStaminaLoss()) : knockdown_stamoverride)
+ DefaultCombatKnockdown(effect * hit_percent, override_stamdmg = knockdown_stammax ? clamp(knockdown_stamoverride, 0, knockdown_stammax-getStaminaLoss()) : knockdown_stamoverride)
if(EFFECT_UNCONSCIOUS)
Unconscious(effect * hit_percent)
if(EFFECT_IRRADIATE)
@@ -140,7 +140,7 @@
/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
if(!forced && (status_flags & GODMODE))
return FALSE
- bruteloss = CLAMP((bruteloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
+ bruteloss = clamp((bruteloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
if(updating_health)
updatehealth()
return amount
@@ -151,7 +151,7 @@
/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
if(!forced && (status_flags & GODMODE))
return FALSE
- oxyloss = CLAMP((oxyloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
+ oxyloss = clamp((oxyloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
if(updating_health)
updatehealth()
return amount
@@ -170,7 +170,7 @@
/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
if(!forced && (status_flags & GODMODE))
return FALSE
- toxloss = CLAMP((toxloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
+ toxloss = clamp((toxloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
if(updating_health)
updatehealth()
return amount
@@ -189,7 +189,7 @@
/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
if(!forced && (status_flags & GODMODE))
return FALSE
- fireloss = CLAMP((fireloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
+ fireloss = clamp((fireloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
if(updating_health)
updatehealth()
return amount
@@ -200,7 +200,7 @@
/mob/living/proc/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE)
if(!forced && (status_flags & GODMODE))
return FALSE
- cloneloss = CLAMP((cloneloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
+ cloneloss = clamp((cloneloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
if(updating_health)
updatehealth()
return amount
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 22a0da2cf6..89f8381087 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -68,7 +68,7 @@
var/obj/O = A
if(ObjBump(O))
return
- if(ismovableatom(A))
+ if(ismovable(A))
var/atom/movable/AM = A
if(PushAM(AM, move_force))
return
@@ -645,7 +645,7 @@
attempt_resist_grab(FALSE)
// Return as we should only resist one thing at a time. Give clickdelay if the grab wasn't passive.
return old_gs? TRUE : FALSE
-
+
// unbuckling yourself. stops the chain if you try it.
if(buckled && last_special <= world.time)
log_combat(src, buckled, "resisted buckle")
@@ -1030,7 +1030,7 @@
update_fire()
/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
- fire_stacks = CLAMP(fire_stacks + add_fire_stacks, -20, 20)
+ fire_stacks = clamp(fire_stacks + add_fire_stacks, -20, 20)
if(on_fire && fire_stacks <= 0)
ExtinguishMob()
diff --git a/code/modules/mob/living/living_block.dm b/code/modules/mob/living/living_block.dm
index 22940b5846..d39abb1250 100644
--- a/code/modules/mob/living/living_block.dm
+++ b/code/modules/mob/living/living_block.dm
@@ -57,7 +57,7 @@
if(real_attack)
for(var/obj/item/I in tocheck)
// i don't like this too
- var/final_block_chance = I.block_chance - (CLAMP((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
+ var/final_block_chance = I.block_chance - (clamp((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
var/results = I.run_block(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list)
. |= results
if((results & BLOCK_SUCCESS) && !(results & BLOCK_CONTINUE_CHAIN))
@@ -65,7 +65,7 @@
else
for(var/obj/item/I in tocheck)
// i don't like this too
- var/final_block_chance = I.block_chance - (CLAMP((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
+ var/final_block_chance = I.block_chance - (clamp((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
I.check_block(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list)
/// Gets an unsortedlist of objects to run block checks on.
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 7d220739d5..39a94232a3 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -88,9 +88,9 @@
/obj/item/proc/get_volume_by_throwforce_and_or_w_class()
if(throwforce && w_class)
- return CLAMP((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100
+ return clamp((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100
else if(w_class)
- return CLAMP(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100
+ return clamp(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100
else
return 0
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index d178af9fb0..e959144ed5 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -869,7 +869,7 @@
if(istype(A, /obj/machinery/camera))
current = A
if(client)
- if(ismovableatom(A))
+ if(ismovable(A))
if(A != GLOB.ai_camera_room_landmark)
end_multicam()
client.perspective = EYE_PERSPECTIVE
@@ -1016,7 +1016,7 @@
if("Yes.")
src.ghostize(FALSE, penalize = TRUE)
var/announce_rank = "Artificial Intelligence,"
- if(GLOB.announcement_systems.len)
+ if(GLOB.announcement_systems.len)
// Sends an announcement the AI has cryoed.
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
announcer.announce("CRYOSTORAGE", src.real_name, announce_rank, list())
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 26fa3b505d..9eb1bbc9e4 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -154,7 +154,7 @@
/mob/living/silicon/pai/proc/process_hack()
if(cable && cable.machine && istype(cable.machine, /obj/machinery/door) && cable.machine == hackdoor && get_dist(src, hackdoor) <= 1)
- hackprogress = CLAMP(hackprogress + 4, 0, 100)
+ hackprogress = clamp(hackprogress + 4, 0, 100)
else
temp = "Door Jack: Connection to airlock has been lost. Hack aborted."
hackprogress = 0
@@ -301,7 +301,7 @@
update_stat()
/mob/living/silicon/pai/process()
- emitterhealth = CLAMP((emitterhealth + emitterregen), -50, emittermaxhealth)
+ emitterhealth = clamp((emitterhealth + emitterregen), -50, emittermaxhealth)
/obj/item/paicard/attackby(obj/item/W, mob/user, params)
..()
diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm
index 0477492c0a..ba162ecf2c 100644
--- a/code/modules/mob/living/silicon/pai/pai_defense.dm
+++ b/code/modules/mob/living/silicon/pai/pai_defense.dm
@@ -69,7 +69,7 @@
return FALSE //No we're not flammable
/mob/living/silicon/pai/proc/take_holo_damage(amount)
- emitterhealth = CLAMP((emitterhealth - amount), -50, emittermaxhealth)
+ emitterhealth = clamp((emitterhealth - amount), -50, emittermaxhealth)
if(emitterhealth < 0)
fold_in(force = TRUE)
if(amount > 0)
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index cf67517c52..e04943a8c5 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -21,7 +21,7 @@
if(cell && cell.charge)
if(cell.charge <= 100)
uneq_all()
- var/amt = CLAMP((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
+ var/amt = clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
else
uneq_all()
diff --git a/code/modules/mob/living/simple_animal/damage_procs.dm b/code/modules/mob/living/simple_animal/damage_procs.dm
index 0cc097dc08..90fdeb0a62 100644
--- a/code/modules/mob/living/simple_animal/damage_procs.dm
+++ b/code/modules/mob/living/simple_animal/damage_procs.dm
@@ -2,7 +2,7 @@
/mob/living/simple_animal/proc/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
if(!forced && (status_flags & GODMODE))
return FALSE
- bruteloss = round(CLAMP(bruteloss + amount, 0, maxHealth),DAMAGE_PRECISION)
+ bruteloss = round(clamp(bruteloss + amount, 0, maxHealth),DAMAGE_PRECISION)
if(updating_health)
updatehealth()
return amount
diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm
index 3b9700bb58..2045e194d2 100644
--- a/code/modules/mob/living/simple_animal/hostile/alien.dm
+++ b/code/modules/mob/living/simple_animal/hostile/alien.dm
@@ -175,7 +175,7 @@
AddElement(/datum/element/cleaning)
/mob/living/simple_animal/hostile/alien/maid/AttackingTarget()
- if(ismovableatom(target))
+ if(ismovable(target))
if(istype(target, /obj/effect/decal/cleanable))
visible_message("[src] cleans up \the [target].")
qdel(target)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
index 5e75088f53..d2680fbf61 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
@@ -65,10 +65,10 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/bubblegum/Life()
..()
- move_to_delay = CLAMP(round((health/maxHealth) * 10), 3, 10)
+ move_to_delay = clamp(round((health/maxHealth) * 10), 3, 10)
/mob/living/simple_animal/hostile/megafauna/bubblegum/OpenFire()
- anger_modifier = CLAMP(((maxHealth - health)/50),0,20)
+ anger_modifier = clamp(((maxHealth - health)/50),0,20)
if(charging)
return
ranged_cooldown = world.time + ranged_cooldown_time
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
index 83d27e7ea6..73fb9d4e48 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
@@ -56,7 +56,7 @@ Difficulty: Very Hard
L.dust()
/mob/living/simple_animal/hostile/megafauna/colossus/OpenFire()
- anger_modifier = CLAMP(((maxHealth - health)/50),0,20)
+ anger_modifier = clamp(((maxHealth - health)/50),0,20)
ranged_cooldown = world.time + 120
if(enrage(target))
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
index 4644992ad0..159f8a7f5c 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
@@ -105,7 +105,7 @@ Difficulty: Medium
/mob/living/simple_animal/hostile/megafauna/dragon/OpenFire()
if(swooping)
return
- anger_modifier = CLAMP(((maxHealth - health)/50),0,20)
+ anger_modifier = clamp(((maxHealth - health)/50),0,20)
ranged_cooldown = world.time + ranged_cooldown_time
if(prob(15 + anger_modifier) && !client)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
index a9d42373a2..477c2ce3aa 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
@@ -191,7 +191,7 @@ Difficulty: Normal
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/calculate_rage() //how angry we are overall
did_reset = FALSE //oh hey we're doing SOMETHING, clearly we might need to heal if we recall
- anger_modifier = CLAMP(((maxHealth - health) / 42),0,50)
+ anger_modifier = clamp(((maxHealth - health) / 42),0,50)
burst_range = initial(burst_range) + round(anger_modifier * 0.08)
beam_range = initial(beam_range) + round(anger_modifier * 0.12)
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 3feed2129b..230bb9ecb7 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -128,7 +128,7 @@
/mob/living/simple_animal/updatehealth()
..()
- health = CLAMP(health, 0, maxHealth)
+ health = clamp(health, 0, maxHealth)
/mob/living/simple_animal/update_stat()
if(status_flags & GODMODE)
diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm
index 4f8e271d6f..d5da6d76fc 100644
--- a/code/modules/mob/living/simple_animal/slime/powers.dm
+++ b/code/modules/mob/living/simple_animal/slime/powers.dm
@@ -190,7 +190,7 @@
step_away(M,src)
M.Friends = Friends.Copy()
babies += M
- M.mutation_chance = CLAMP(mutation_chance+(rand(5,-5)),0,100)
+ M.mutation_chance = clamp(mutation_chance+(rand(5,-5)),0,100)
SSblackbox.record_feedback("tally", "slime_babies_born", 1, M.colour)
var/mob/living/simple_animal/slime/new_slime = pick(babies)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index fd786c8631..8fa1367aad 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -284,7 +284,7 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
/mob/proc/reset_perspective(atom/A)
if(client)
if(A)
- if(ismovableatom(A))
+ if(ismovable(A))
//Set the the thing unless it's us
if(A != src)
client.perspective = EYE_PERSPECTIVE
diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm
index 10abf460c6..cf86e962bd 100644
--- a/code/modules/mob/status_procs.dm
+++ b/code/modules/mob/status_procs.dm
@@ -20,7 +20,7 @@
dizziness = max(amount, 0)
/**
- * Sets a mob's blindness to an amount if it was not above it already, similar to how status effects work
+ * Sets a mob's blindness to an amount if it was not above it already, similar to how status effects work
*/
/mob/proc/blind_eyes(amount)
var/old_blind = eye_blind || HAS_TRAIT(src, TRAIT_BLIND)
@@ -90,8 +90,8 @@
return
var/obj/screen/plane_master/game_world/GW = locate(/obj/screen/plane_master/game_world) in client.screen
var/obj/screen/plane_master/floor/F = locate(/obj/screen/plane_master/floor) in client.screen
- GW.add_filter("blurry_eyes", 2, EYE_BLUR(CLAMP(eye_blurry*0.1,0.6,3)))
- F.add_filter("blurry_eyes", 2, EYE_BLUR(CLAMP(eye_blurry*0.1,0.6,3)))
+ GW.add_filter("blurry_eyes", 2, EYE_BLUR(clamp(eye_blurry*0.1,0.6,3)))
+ F.add_filter("blurry_eyes", 2, EYE_BLUR(clamp(eye_blurry*0.1,0.6,3)))
/mob/proc/remove_eyeblur()
if(!client)
@@ -120,4 +120,4 @@
///Adjust the body temperature of a mob, with min/max settings
/mob/proc/adjust_bodytemperature(amount,min_temp=0,max_temp=INFINITY)
if(bodytemperature >= min_temp && bodytemperature <= max_temp)
- bodytemperature = CLAMP(bodytemperature + amount,min_temp,max_temp)
+ bodytemperature = clamp(bodytemperature + amount,min_temp,max_temp)
diff --git a/code/modules/photography/camera/camera.dm b/code/modules/photography/camera/camera.dm
index b7b7bc36b7..f039dc32b2 100644
--- a/code/modules/photography/camera/camera.dm
+++ b/code/modules/photography/camera/camera.dm
@@ -53,8 +53,8 @@
return
var/desired_x = input(user, "How high do you want the camera to shoot, between [picture_size_x_min] and [picture_size_x_max]?", "Zoom", picture_size_x) as num
var/desired_y = input(user, "How wide do you want the camera to shoot, between [picture_size_y_min] and [picture_size_y_max]?", "Zoom", picture_size_y) as num
- picture_size_x = min(CLAMP(desired_x, picture_size_x_min, picture_size_x_max), CAMERA_PICTURE_SIZE_HARD_LIMIT)
- picture_size_y = min(CLAMP(desired_y, picture_size_y_min, picture_size_y_max), CAMERA_PICTURE_SIZE_HARD_LIMIT)
+ picture_size_x = min(clamp(desired_x, picture_size_x_min, picture_size_x_max), CAMERA_PICTURE_SIZE_HARD_LIMIT)
+ picture_size_y = min(clamp(desired_y, picture_size_y_min, picture_size_y_max), CAMERA_PICTURE_SIZE_HARD_LIMIT)
return TRUE
/obj/item/camera/attack(mob/living/carbon/human/M, mob/user)
@@ -155,8 +155,8 @@
if(!isturf(target_turf))
blending = FALSE
return FALSE
- size_x = CLAMP(size_x, 0, CAMERA_PICTURE_SIZE_HARD_LIMIT)
- size_y = CLAMP(size_y, 0, CAMERA_PICTURE_SIZE_HARD_LIMIT)
+ size_x = clamp(size_x, 0, CAMERA_PICTURE_SIZE_HARD_LIMIT)
+ size_y = clamp(size_y, 0, CAMERA_PICTURE_SIZE_HARD_LIMIT)
var/list/desc = list("This is a photo of an area of [size_x+1] meters by [size_y+1] meters.")
var/ai_user = isAI(user)
var/list/seen
diff --git a/code/modules/photography/camera/camera_image_capturing.dm b/code/modules/photography/camera/camera_image_capturing.dm
index f25d80c050..5bd9c108d1 100644
--- a/code/modules/photography/camera/camera_image_capturing.dm
+++ b/code/modules/photography/camera/camera_image_capturing.dm
@@ -4,7 +4,7 @@
if(istype(A))
appearance = A.appearance
dir = A.dir
- if(ismovableatom(A))
+ if(ismovable(A))
var/atom/movable/AM = A
step_x = AM.step_x
step_y = AM.step_y
@@ -68,7 +68,7 @@
for(var/atom/A in sorted)
var/xo = (A.x - center.x) * world.icon_size + A.pixel_x + xcomp
var/yo = (A.y - center.y) * world.icon_size + A.pixel_y + ycomp
- if(ismovableatom(A))
+ if(ismovable(A))
var/atom/movable/AM = A
xo += AM.step_x
yo += AM.step_y
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 1b23b1bb5d..7eabeafcb1 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -208,7 +208,7 @@
GLOB.apcs_list -= src
if(malfai && operating)
- malfai.malf_picker.processing_time = CLAMP(malfai.malf_picker.processing_time - 10,0,1000)
+ malfai.malf_picker.processing_time = clamp(malfai.malf_picker.processing_time - 10,0,1000)
area.power_light = FALSE
area.power_equip = FALSE
area.power_environ = FALSE
@@ -1350,7 +1350,7 @@
lighting = autoset(lighting, 0)
environ = autoset(environ, 0)
area.poweralert(0, src)
-
+
else if(cell_percent < 15 && longtermpower < 0) // <15%, turn off lighting & equipment
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 2)
@@ -1447,7 +1447,7 @@
/obj/machinery/power/apc/proc/set_broken()
if(malfai && operating)
- malfai.malf_picker.processing_time = CLAMP(malfai.malf_picker.processing_time - 10,0,1000)
+ malfai.malf_picker.processing_time = clamp(malfai.malf_picker.processing_time - 10,0,1000)
stat |= BROKEN
operating = FALSE
if(occupier)
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index ed90ed407f..aab38c8754 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -217,7 +217,7 @@ By design, d1 is the smallest direction and d2 is the highest
/obj/structure/cable/proc/surplus()
if(powernet)
- return CLAMP(powernet.avail-powernet.load, 0, powernet.avail)
+ return clamp(powernet.avail-powernet.load, 0, powernet.avail)
else
return 0
@@ -233,7 +233,7 @@ By design, d1 is the smallest direction and d2 is the highest
/obj/structure/cable/proc/delayed_surplus()
if(powernet)
- return CLAMP(powernet.newavail - powernet.delayedload, 0, powernet.newavail)
+ return clamp(powernet.newavail - powernet.delayedload, 0, powernet.newavail)
else
return 0
@@ -565,7 +565,7 @@ By design, d1 is the smallest direction and d2 is the highest
return
var/obj/item/restraints/handcuffs/cable/result = new(get_turf(user))
user.put_in_hands(result)
- result.color = color
+ result.color = color
to_chat(user, "
You make some restraints out of cable")
//add cables to the stack
@@ -848,4 +848,4 @@ By design, d1 is the smallest direction and d2 is the highest
. = ..()
var/list/cable_colors = GLOB.cable_colors
color = pick(cable_colors)
-
+
diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm
index 93fe7e8fa6..cc321fdb4d 100644
--- a/code/modules/power/cell.dm
+++ b/code/modules/power/cell.dm
@@ -157,7 +157,7 @@
/obj/item/stock_parts/cell/proc/get_electrocute_damage()
if(charge >= 1000)
- return CLAMP(round(charge/10000), 10, 90) + rand(-5,5)
+ return clamp(round(charge/10000), 10, 90) + rand(-5,5)
else
return 0
@@ -334,7 +334,7 @@
. = ..()
if(. & EMP_PROTECT_SELF)
return
- charge = CLAMP((charge-(10000/severity)),0,maxcharge)
+ charge = clamp((charge-(10000/severity)),0,maxcharge)
/obj/item/stock_parts/cell/emergency_light
name = "miniature power cell"
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 02ff4127eb..7ad9f3a6ce 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -314,7 +314,7 @@
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(on && status == LIGHT_OK)
- SSvis_overlays.add_vis_overlay(src, overlayicon, base_state, EMISSIVE_LAYER, EMISSIVE_PLANE, dir, CLAMP(light_power*250, 30, 200))
+ SSvis_overlays.add_vis_overlay(src, overlayicon, base_state, EMISSIVE_LAYER, EMISSIVE_PLANE, dir, clamp(light_power*250, 30, 200))
// update the icon_state and luminosity of the light depending on its state
diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm
index fba526edbd..4cec49945a 100644
--- a/code/modules/power/power.dm
+++ b/code/modules/power/power.dm
@@ -42,7 +42,7 @@
/obj/machinery/power/proc/surplus()
if(powernet)
- return CLAMP(powernet.avail-powernet.load, 0, powernet.avail)
+ return clamp(powernet.avail-powernet.load, 0, powernet.avail)
else
return 0
@@ -58,7 +58,7 @@
/obj/machinery/power/proc/delayed_surplus()
if(powernet)
- return CLAMP(powernet.newavail - powernet.delayedload, 0, powernet.newavail)
+ return clamp(powernet.newavail - powernet.delayedload, 0, powernet.newavail)
else
return 0
diff --git a/code/modules/power/powernet.dm b/code/modules/power/powernet.dm
index 3b70383bee..65d5202ff4 100644
--- a/code/modules/power/powernet.dm
+++ b/code/modules/power/powernet.dm
@@ -96,6 +96,6 @@
/datum/powernet/proc/get_electrocute_damage()
if(avail >= 1000)
- return CLAMP(round(avail/10000), 10, 90) + rand(-5,5)
+ return clamp(round(avail/10000), 10, 90) + rand(-5,5)
else
return 0
\ No newline at end of file
diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm
index c471047682..ed3a098dae 100644
--- a/code/modules/power/singularity/narsie.dm
+++ b/code/modules/power/singularity/narsie.dm
@@ -201,7 +201,7 @@
// if(defer_powernet_rebuild != 2)
// defer_powernet_rebuild = 1
for(var/atom/X in urange(consume_range,src,1))
- if(isturf(X) || ismovableatom(X))
+ if(isturf(X) || ismovable(X))
consume(X)
// if(defer_powernet_rebuild != 2)
// defer_powernet_rebuild = 0
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index 47de07cd71..41ed28f0a5 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -220,7 +220,7 @@
. += "smes-og[clevel]"
/obj/machinery/power/smes/proc/chargedisplay()
- return CLAMP(round(5.5*charge/capacity),0,5)
+ return clamp(round(5.5*charge/capacity),0,5)
/obj/machinery/power/smes/process()
if(stat & BROKEN)
@@ -372,7 +372,7 @@
target = text2num(target)
. = TRUE
if(.)
- input_level = CLAMP(target, 0, input_level_max)
+ input_level = clamp(target, 0, input_level_max)
log_smes(usr)
if("output")
var/target = params["target"]
@@ -394,7 +394,7 @@
target = text2num(target)
. = TRUE
if(.)
- output_level = CLAMP(target, 0, output_level_max)
+ output_level = clamp(target, 0, output_level_max)
log_smes(usr)
/obj/machinery/power/smes/proc/log_smes(mob/user)
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index 73ea3ccd59..89452affcb 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -28,10 +28,8 @@
/obj/machinery/power/solar/Initialize(mapload, obj/item/solar_assembly/S)
. = ..()
panel = new()
-#if DM_VERSION >= 513
panel.vis_flags = VIS_INHERIT_ID|VIS_INHERIT_ICON|VIS_INHERIT_PLANE
vis_contents += panel
-#endif
panel.icon = icon
panel.icon_state = "solar_panel"
panel.layer = FLY_LAYER
@@ -170,7 +168,7 @@
else
//dot product of sun and panel -- Lambert's Cosine Law
. = cos(azimuth_current - sun_azimuth)
- . = CLAMP(round(., 0.01), 0, 1)
+ . = clamp(round(., 0.01), 0, 1)
sunfrac = .
/obj/machinery/power/solar/process()
@@ -385,7 +383,7 @@
if(adjust)
value = azimuth_rate + adjust
if(value != null)
- azimuth_rate = round(CLAMP(value, -2 * SSsun.base_rotation, 2 * SSsun.base_rotation), 0.01)
+ azimuth_rate = round(clamp(value, -2 * SSsun.base_rotation, 2 * SSsun.base_rotation), 0.01)
return TRUE
return FALSE
if(action == "tracking")
@@ -464,7 +462,7 @@
///Rotates the panel to the passed angles
/obj/machinery/power/solar_control/proc/set_panels(azimuth)
- azimuth = CLAMP(round(azimuth, 0.01), -360, 719.99)
+ azimuth = clamp(round(azimuth, 0.01), -360, 719.99)
if(azimuth >= 360)
azimuth -= 360
if(azimuth < 0)
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index 3ed1ad0e5a..92d97365b3 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -346,7 +346,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
else
if(takes_damage)
//causing damage
- damage = max(damage + (max(CLAMP(removed.total_moles() / 200, 0.5, 1) * removed.temperature - ((T0C + HEAT_PENALTY_THRESHOLD)*dynamic_heat_resistance), 0) * mole_heat_penalty / 150 ) * DAMAGE_INCREASE_MULTIPLIER, 0)
+ damage = max(damage + (max(clamp(removed.total_moles() / 200, 0.5, 1) * removed.temperature - ((T0C + HEAT_PENALTY_THRESHOLD)*dynamic_heat_resistance), 0) * mole_heat_penalty / 150 ) * DAMAGE_INCREASE_MULTIPLIER, 0)
damage = max(damage + (max(power - POWER_PENALTY_THRESHOLD, 0)/500) * DAMAGE_INCREASE_MULTIPLIER, 0)
damage = max(damage + (max(combined_gas - MOLE_PENALTY_THRESHOLD, 0)/80) * DAMAGE_INCREASE_MULTIPLIER, 0)
@@ -389,10 +389,10 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
mole_heat_penalty = max(combined_gas / MOLE_HEAT_PENALTY, 0.25)
if (combined_gas > POWERLOSS_INHIBITION_MOLE_THRESHOLD && co2comp > POWERLOSS_INHIBITION_GAS_THRESHOLD)
- powerloss_dynamic_scaling = CLAMP(powerloss_dynamic_scaling + CLAMP(co2comp - powerloss_dynamic_scaling, -0.02, 0.02), 0, 1)
+ powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling + clamp(co2comp - powerloss_dynamic_scaling, -0.02, 0.02), 0, 1)
else
- powerloss_dynamic_scaling = CLAMP(powerloss_dynamic_scaling - 0.05,0, 1)
- powerloss_inhibitor = CLAMP(1-(powerloss_dynamic_scaling * CLAMP(combined_gas/POWERLOSS_INHIBITION_MOLE_BOOST_THRESHOLD,1 ,1.5)),0 ,1)
+ powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling - 0.05,0, 1)
+ powerloss_inhibitor = clamp(1-(powerloss_dynamic_scaling * clamp(combined_gas/POWERLOSS_INHIBITION_MOLE_BOOST_THRESHOLD,1 ,1.5)),0 ,1)
if(matter_power)
var/removed_matter = max(matter_power/MATTER_POWER_CONVERSION, 40)
@@ -442,7 +442,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
var/D = sqrt(1 / max(1, get_dist(l, src)))
l.hallucination += power_calc * config_hallucination_power * D
- l.hallucination = CLAMP(0, 200, l.hallucination)
+ l.hallucination = clamp(0, 200, l.hallucination)
for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) )
@@ -466,7 +466,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
supermatter_zap(src, 5, min(power*2, 20000))
else if (damage > damage_penalty_point && prob(20))
playsound(src.loc, 'sound/weapons/emitter2.ogg', 100, 1, extrarange = 10)
- supermatter_zap(src, 5, CLAMP(power*2, 4000, 20000))
+ supermatter_zap(src, 5, clamp(power*2, 4000, 20000))
if(prob(15) && power > POWER_PENALTY_THRESHOLD)
supermatter_pull(src, power/750)
@@ -736,7 +736,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/proc/supermatter_pull(turf/center, pull_range = 10)
playsound(src.loc, 'sound/weapons/marauder.ogg', 100, 1, extrarange = 7)
for(var/atom/P in orange(pull_range,center))
- if(ismovableatom(P))
+ if(ismovable(P))
var/atom/movable/pulled_object = P
if(ishuman(P))
var/mob/living/carbon/human/H = P
diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm
index 1b08693d1c..e98fe3c88e 100644
--- a/code/modules/power/tesla/energy_ball.dm
+++ b/code/modules/power/tesla/energy_ball.dm
@@ -65,7 +65,7 @@
pixel_x = -32
pixel_y = -32
for (var/ball in orbiting_balls)
- var/range = rand(1, CLAMP(orbiting_balls.len, 3, 7))
+ var/range = rand(1, clamp(orbiting_balls.len, 3, 7))
tesla_zap(ball, range, TESLA_MINI_POWER/7*range)
else
energy = 0 // ensure we dont have miniballs of miniballs
diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm
index e0c84e7047..ff3f127817 100644
--- a/code/modules/projectiles/guns/energy.dm
+++ b/code/modules/projectiles/guns/energy.dm
@@ -232,7 +232,7 @@
..()
if(!automatic_charge_overlays)
return
- var/ratio = can_shoot() ? CEILING(CLAMP(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0
+ var/ratio = can_shoot() ? CEILING(clamp(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0
// Sets the ratio to 0 if the gun doesn't have enough charge to fire, or if it's power cell is removed.
// TG issues #5361 & #47908
if(ratio == old_ratio && !force_update)
diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm
index f230dc7fea..f8ddcb5aae 100644
--- a/code/modules/projectiles/guns/misc/beam_rifle.dm
+++ b/code/modules/projectiles/guns/misc/beam_rifle.dm
@@ -318,7 +318,7 @@
AC.sync_stats()
/obj/item/gun/energy/beam_rifle/proc/delay_penalty(amount)
- aiming_time_left = CLAMP(aiming_time_left + amount, 0, aiming_time)
+ aiming_time_left = clamp(aiming_time_left + amount, 0, aiming_time)
/obj/item/ammo_casing/energy/beam_rifle
name = "particle acceleration lens"
@@ -369,11 +369,11 @@
HS_BB.stun = projectile_stun
HS_BB.impact_structure_damage = impact_structure_damage
HS_BB.aoe_mob_damage = aoe_mob_damage
- HS_BB.aoe_mob_range = CLAMP(aoe_mob_range, 0, 15) //Badmin safety lock
+ HS_BB.aoe_mob_range = clamp(aoe_mob_range, 0, 15) //Badmin safety lock
HS_BB.aoe_fire_chance = aoe_fire_chance
HS_BB.aoe_fire_range = aoe_fire_range
HS_BB.aoe_structure_damage = aoe_structure_damage
- HS_BB.aoe_structure_range = CLAMP(aoe_structure_range, 0, 15) //Badmin safety lock
+ HS_BB.aoe_structure_range = clamp(aoe_structure_range, 0, 15) //Badmin safety lock
HS_BB.wall_devastate = wall_devastate
HS_BB.wall_pierce_amount = wall_pierce_amount
HS_BB.structure_pierce_amount = structure_piercing
@@ -465,7 +465,7 @@
else
target.ex_act(EXPLODE_HEAVY)
return TRUE
- if(ismovableatom(target))
+ if(ismovable(target))
var/atom/movable/AM = target
if(AM.density && !AM.CanPass(src, get_turf(target)) && !ismob(AM))
if(structure_pierce < structure_pierce_amount)
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index 6094a7aa46..b4303dd5a0 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -224,7 +224,7 @@
/obj/item/projectile/proc/vol_by_damage()
if(src.damage)
- return CLAMP((src.damage) * 0.67, 30, 100)// Multiply projectile damage by 0.67, then CLAMP the value between 30 and 100
+ return clamp((src.damage) * 0.67, 30, 100)// Multiply projectile damage by 0.67, then CLAMP the value between 30 and 100
else
return 50 //if the projectile doesn't do damage, play its hitsound at 50% volume
@@ -255,7 +255,7 @@
def_zone = ran_zone(def_zone, max(100-(7*distance), 5) * zone_accuracy_factor) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use.
if(isturf(A) && hitsound_wall)
- var/volume = CLAMP(vol_by_damage() + 20, 0, 100)
+ var/volume = clamp(vol_by_damage() + 20, 0, 100)
if(suppressed)
volume = 5
playsound(loc, hitsound_wall, volume, 1, -1)
@@ -392,7 +392,7 @@
stack_trace("WARNING: Projectile [type] deleted due to being unable to resolve a target after angle was null!")
qdel(src)
return
- var/turf/target = locate(CLAMP(starting + xo, 1, world.maxx), CLAMP(starting + yo, 1, world.maxy), starting.z)
+ var/turf/target = locate(clamp(starting + xo, 1, world.maxx), clamp(starting + yo, 1, world.maxy), starting.z)
setAngle(Get_Angle(src, target))
original_angle = Angle
if(!nondirectional_sprite)
@@ -525,10 +525,10 @@
if(!homing_target)
return FALSE
var/datum/point/PT = RETURN_PRECISE_POINT(homing_target)
- PT.x += CLAMP(homing_offset_x, 1, world.maxx)
- PT.y += CLAMP(homing_offset_y, 1, world.maxy)
+ PT.x += clamp(homing_offset_x, 1, world.maxx)
+ PT.y += clamp(homing_offset_y, 1, world.maxy)
var/angle = closer_angle_difference(Angle, angle_between_points(RETURN_PRECISE_POINT(src), PT))
- setAngle(Angle + CLAMP(angle, -homing_turn_speed, homing_turn_speed))
+ setAngle(Angle + clamp(angle, -homing_turn_speed, homing_turn_speed))
/obj/item/projectile/proc/set_homing_target(atom/A)
if(!A || (!isturf(A) && !isturf(A.loc)))
@@ -622,7 +622,7 @@
var/ox = round(screenviewX/2) - user.client.pixel_x //"origin" x
var/oy = round(screenviewY/2) - user.client.pixel_y //"origin" y
- angle = ATAN2(y - oy, x - ox)
+ angle = arctan(y - oy, x - ox)
return list(angle, p_x, p_y)
/obj/item/projectile/Crossed(atom/movable/AM) //A mob moving on a tile with a projectile is hit by it.
diff --git a/code/modules/projectiles/projectile/bullets/dart_syringe.dm b/code/modules/projectiles/projectile/bullets/dart_syringe.dm
index 06d94414be..25809cc7ca 100644
--- a/code/modules/projectiles/projectile/bullets/dart_syringe.dm
+++ b/code/modules/projectiles/projectile/bullets/dart_syringe.dm
@@ -60,11 +60,11 @@
if(R.overdose_threshold == 0 || emptrig == TRUE) //Is there a possible OD?
M.reagents.add_reagent(R.type, R.volume)
else
- var/transVol = CLAMP(R.volume, 0, (R.overdose_threshold - M.reagents.get_reagent_amount(R.type)) -1)
+ var/transVol = clamp(R.volume, 0, (R.overdose_threshold - M.reagents.get_reagent_amount(R.type)) -1)
M.reagents.add_reagent(R.type, transVol)
else
if(!R.overdose_threshold == 0)
- var/transVol = CLAMP(R.volume, 0, R.overdose_threshold-1)
+ var/transVol = clamp(R.volume, 0, R.overdose_threshold-1)
M.reagents.add_reagent(R.type, transVol)
else
M.reagents.add_reagent(R.type, R.volume)
diff --git a/code/modules/projectiles/projectile/bullets/shotgun.dm b/code/modules/projectiles/projectile/bullets/shotgun.dm
index 4411334883..ff95b65a49 100644
--- a/code/modules/projectiles/projectile/bullets/shotgun.dm
+++ b/code/modules/projectiles/projectile/bullets/shotgun.dm
@@ -51,7 +51,7 @@
/obj/item/projectile/bullet/shotgun_meteorslug/on_hit(atom/target, blocked = FALSE)
. = ..()
- if(ismovableatom(target))
+ if(ismovable(target))
var/atom/movable/M = target
var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src)))
M.safe_throw_at(throw_target, 3, 2)
diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index 89dd229407..f4c06f39cc 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -728,7 +728,7 @@
return
//Make sure things are limited, but superacids/bases can push forward the reaction
- pH = CLAMP(pH, 0, 14)
+ pH = clamp(pH, 0, 14)
//return said amount to compare for next step.
return (reactedVol)
@@ -849,7 +849,7 @@
/datum/reagents/proc/adjust_thermal_energy(J, min_temp = 2.7, max_temp = 1000)
var/S = specific_heat()
- chem_temp = CLAMP(chem_temp + (J / (S * total_volume)), min_temp, max_temp)
+ chem_temp = clamp(chem_temp + (J / (S * total_volume)), min_temp, max_temp)
if(istype(my_atom, /obj/item/reagent_containers))
var/obj/item/reagent_containers/RC = my_atom
RC.temp_check()
@@ -877,7 +877,7 @@
for (var/datum/reagent/reagentgas in reagent_list)
R.add_reagent(reagentgas, amount/5)
remove_reagent(reagentgas, amount/5)
- s.set_up(R, CLAMP(amount/10, 0, 2), T)
+ s.set_up(R, clamp(amount/10, 0, 2), T)
s.start()
return FALSE
@@ -995,7 +995,7 @@
RC.pH_check()//checks beaker resilience)
//clamp the removal amount to be between current reagent amount
//and zero, to prevent removing more than the holder has stored
- amount = CLAMP(amount, 0, R.volume)
+ amount = clamp(amount, 0, R.volume)
R.volume -= amount
update_total()
if(!safety)//So it does not handle reactions when it need not to
diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm
index 63e9d724a4..8572d30efe 100644
--- a/code/modules/reagents/chemistry/machinery/chem_heater.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm
@@ -151,7 +151,7 @@
target = text2num(target)
. = TRUE
if(.)
- target_temperature = CLAMP(target, 0, 1000)
+ target_temperature = clamp(target, 0, 1000)
if("eject")
on = FALSE
replace_beaker(usr)
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index 5eb5b94de9..725b967a63 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -62,7 +62,7 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
return 0
if(method == VAPOR) //smoke, foam, spray
if(M.reagents)
- var/modifier = CLAMP((1 - touch_protection), 0, 1)
+ var/modifier = clamp((1 - touch_protection), 0, 1)
var/amount = round(reac_volume*modifier, 0.1)
if(amount >= 0.5)
M.reagents.add_reagent(type, amount)
diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
index bff9c8dcef..8194392871 100644
--- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
@@ -1124,7 +1124,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/datum/antagonist/changeling/changeling = M.mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling)
changeling.chem_charges += metabolization_rate
- changeling.chem_charges = CLAMP(changeling.chem_charges, 0, changeling.chem_storage)
+ changeling.chem_charges = clamp(changeling.chem_charges, 0, changeling.chem_storage)
return ..()
/datum/reagent/consumable/ethanol/irishcarbomb
diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
index c96feec4e2..086515d9dd 100644
--- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -196,7 +196,7 @@
. = 1
/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M)
- if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i in 1 to 4)
step(M, pick(GLOB.cardinals))
if(prob(20))
@@ -223,7 +223,7 @@
..()
/datum/reagent/drug/methamphetamine/addiction_act_stage3(mob/living/M)
- if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 4, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(15)
@@ -233,7 +233,7 @@
..()
/datum/reagent/drug/methamphetamine/addiction_act_stage4(mob/living/carbon/human/M)
- if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(20)
@@ -285,7 +285,7 @@
M.adjustStaminaLoss(-5, 0)
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4)
M.hallucination += 5
- if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
step(M, pick(GLOB.cardinals))
step(M, pick(GLOB.cardinals))
..()
@@ -293,7 +293,7 @@
/datum/reagent/drug/bath_salts/overdose_process(mob/living/M)
M.hallucination += 5
- if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i in 1 to 8)
step(M, pick(GLOB.cardinals))
if(prob(20))
@@ -304,7 +304,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage1(mob/living/M)
M.hallucination += 10
- if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(5)
@@ -315,7 +315,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage2(mob/living/M)
M.hallucination += 20
- if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(10)
@@ -327,7 +327,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage3(mob/living/M)
M.hallucination += 30
- if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 12, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(15)
@@ -339,7 +339,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage4(mob/living/carbon/human/M)
M.hallucination += 30
- if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
+ if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 16, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(50)
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index e66ebc5f20..af335359c3 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -2023,9 +2023,9 @@
/datum/reagent/peaceborg_confuse/on_mob_life(mob/living/carbon/M)
if(M.confused < 6)
- M.confused = CLAMP(M.confused + 3, 0, 5)
+ M.confused = clamp(M.confused + 3, 0, 5)
if(M.dizziness < 6)
- M.dizziness = CLAMP(M.dizziness + 3, 0, 5)
+ M.dizziness = clamp(M.dizziness + 3, 0, 5)
if(prob(20))
to_chat(M, "You feel confused and disorientated.")
..()
diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm
index 0b32952d20..9cf9acb424 100644
--- a/code/modules/reagents/chemistry/recipes/medicine.dm
+++ b/code/modules/reagents/chemistry/recipes/medicine.dm
@@ -105,7 +105,7 @@
if(St.purity < 1)
St.volume *= St.purity
St.purity = 1
- var/amount = CLAMP(0.002, 0, N.volume)
+ var/amount = clamp(0.002, 0, N.volume)
N.volume -= amount
St.data["grown_volume"] = St.data["grown_volume"] + added_volume
St.name = "[initial(St.name)] [round(St.data["grown_volume"], 0.1)]u colony"
diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
index 2c8be10ace..8782d65f76 100644
--- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
+++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
@@ -195,7 +195,7 @@
return
holder.remove_reagent(/datum/reagent/sorium, multiplier*4)
var/turf/T = get_turf(holder.my_atom)
- var/range = CLAMP(sqrt(multiplier*4), 1, 6)
+ var/range = clamp(sqrt(multiplier*4), 1, 6)
goonchem_vortex(T, 1, range)
/datum/chemical_reaction/sorium_vortex
@@ -206,7 +206,7 @@
/datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, multiplier)
var/turf/T = get_turf(holder.my_atom)
- var/range = CLAMP(sqrt(multiplier), 1, 6)
+ var/range = clamp(sqrt(multiplier), 1, 6)
goonchem_vortex(T, 1, range)
/datum/chemical_reaction/liquid_dark_matter
@@ -220,7 +220,7 @@
return
holder.remove_reagent(/datum/reagent/liquid_dark_matter, multiplier*3)
var/turf/T = get_turf(holder.my_atom)
- var/range = CLAMP(sqrt(multiplier*3), 1, 6)
+ var/range = clamp(sqrt(multiplier*3), 1, 6)
goonchem_vortex(T, 0, range)
/datum/chemical_reaction/ldm_vortex
@@ -231,7 +231,7 @@
/datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, multiplier)
var/turf/T = get_turf(holder.my_atom)
- var/range = CLAMP(sqrt(multiplier/2), 1, 6)
+ var/range = clamp(sqrt(multiplier/2), 1, 6)
goonchem_vortex(T, 0, range)
/datum/chemical_reaction/flash_powder
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index 89de7c409d..f326b94e44 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -185,7 +185,7 @@
START_PROCESSING(SSobj, src)
else if((reagents.pH < -3) || (reagents.pH > 17))
visible_message("
[icon2html(src, viewers(src))] \The [src] is damaged by the super pH and begins to deform!")
- reagents.pH = CLAMP(reagents.pH, -3, 17)
+ reagents.pH = clamp(reagents.pH, -3, 17)
container_HP -= 1
diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm
index 62ca5d658e..7fea8250d9 100644
--- a/code/modules/reagents/reagent_containers/spray.dm
+++ b/code/modules/reagents/reagent_containers/spray.dm
@@ -66,7 +66,7 @@
/obj/item/reagent_containers/spray/proc/spray(atom/A)
- var/range = CLAMP(get_dist(src, A), 1, current_range)
+ var/range = clamp(get_dist(src, A), 1, current_range)
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
D.create_reagents(amount_per_transfer_from_this, NONE, NO_REAGENTS_VALUE)
var/puff_reagent_left = range //how many turf, mob or dense objet we can react with before we consider the chem puff consumed
diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm
index b8957775b1..1a2742d2a6 100644
--- a/code/modules/reagents/reagent_containers/syringes.dm
+++ b/code/modules/reagents/reagent_containers/syringes.dm
@@ -180,7 +180,7 @@
///Used by update_icon() and update_overlays()
/obj/item/reagent_containers/syringe/proc/get_rounded_vol()
if(reagents && reagents.total_volume)
- return CLAMP(round((reagents.total_volume / volume * 15),5), 1, 15)
+ return clamp(round((reagents.total_volume / volume * 15),5), 1, 15)
else
return 0
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index d6ad1bf042..b47f0de032 100644
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -57,7 +57,7 @@
return ..()
/obj/structure/bigDelivery/relay_container_resist(mob/living/user, obj/O)
- if(ismovableatom(loc))
+ if(ismovable(loc))
var/atom/movable/AM = loc //can't unwrap the wrapped container if it's inside something.
AM.relay_container_resist(user, O)
return
diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm
index 41ed6a556e..bd571607d2 100644
--- a/code/modules/research/machinery/_production.dm
+++ b/code/modules/research/machinery/_production.dm
@@ -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)
diff --git a/code/modules/research/nanites/extra_settings/number.dm b/code/modules/research/nanites/extra_settings/number.dm
index 6e63ae067e..75489635f5 100644
--- a/code/modules/research/nanites/extra_settings/number.dm
+++ b/code/modules/research/nanites/extra_settings/number.dm
@@ -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)
diff --git a/code/modules/research/nanites/nanite_chamber_computer.dm b/code/modules/research/nanites/nanite_chamber_computer.dm
index 0750d3d268..4650af5c80 100644
--- a/code/modules/research/nanites/nanite_chamber_computer.dm
+++ b/code/modules/research/nanites/nanite_chamber_computer.dm
@@ -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
diff --git a/code/modules/research/nanites/nanite_cloud_controller.dm b/code/modules/research/nanites/nanite_cloud_controller.dm
index 439d0c5750..f9d4d71b01 100644
--- a/code/modules/research/nanites/nanite_cloud_controller.dm
+++ b/code/modules/research/nanites/nanite_cloud_controller.dm
@@ -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")
diff --git a/code/modules/research/nanites/nanite_programmer.dm b/code/modules/research/nanites/nanite_programmer.dm
index d81880c6d9..5315a7a507 100644
--- a/code/modules/research/nanites/nanite_programmer.dm
+++ b/code/modules/research/nanites/nanite_programmer.dm
@@ -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
diff --git a/code/modules/research/nanites/nanite_programs/weapon.dm b/code/modules/research/nanites/nanite_programs/weapon.dm
index bd2b9618de..ae0d8d35aa 100644
--- a/code/modules/research/nanites/nanite_programs/weapon.dm
+++ b/code/modules/research/nanites/nanite_programs/weapon.dm
@@ -84,7 +84,7 @@
/datum/nanite_program/explosive/on_trigger(comm_message)
host_mob.visible_message("
[host_mob] starts emitting a high-pitched buzzing, and [host_mob.p_their()] skin begins to glow...",\
"
You start emitting a high-pitched buzzing, and your skin begins to glow...")
- 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
diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm
index 71aecc8f2c..0d9361b534 100644
--- a/code/modules/research/nanites/nanite_remote.dm
+++ b/code/modules/research/nanites/nanite_remote.dm
@@ -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")
diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm
index a346cd697f..dc821886c8 100644
--- a/code/modules/research/xenobiology/xenobiology.dm
+++ b/code/modules/research/xenobiology/xenobiology.dm
@@ -801,7 +801,7 @@
return
to_chat(user, "
You feed the slime the stabilizer. It is now less likely to mutate.")
- 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, "
You feed the slime the mutator. It is now more likely to mutate.")
- 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)
diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm
index 2c466564ff..665361af49 100644
--- a/code/modules/shuttle/shuttle.dm
+++ b/code/modules/shuttle/shuttle.dm
@@ -757,13 +757,13 @@
var/change_per_engine = (1 - ENGINE_COEFF_MIN) / ENGINE_DEFAULT_MAXSPEED_ENGINES // 5 by default
if(initial_engines > 0)
change_per_engine = (1 - ENGINE_COEFF_MIN) / initial_engines // or however many it had
- return CLAMP(1 - delta * change_per_engine,ENGINE_COEFF_MIN,ENGINE_COEFF_MAX)
+ return clamp(1 - delta * change_per_engine,ENGINE_COEFF_MIN,ENGINE_COEFF_MAX)
if(new_value < initial_engines)
var/delta = initial_engines - new_value
var/change_per_engine = 1 //doesn't really matter should not be happening for 0 engine shuttles
if(initial_engines > 0)
change_per_engine = (ENGINE_COEFF_MAX - 1) / initial_engines //just linear drop to max delay
- return CLAMP(1 + delta * change_per_engine,ENGINE_COEFF_MIN,ENGINE_COEFF_MAX)
+ return clamp(1 + delta * change_per_engine,ENGINE_COEFF_MIN,ENGINE_COEFF_MAX)
/obj/docking_port/mobile/proc/in_flight()
diff --git a/code/modules/spells/spell_types/wizard.dm b/code/modules/spells/spell_types/wizard.dm
index ace542126c..e9432e2f58 100644
--- a/code/modules/spells/spell_types/wizard.dm
+++ b/code/modules/spells/spell_types/wizard.dm
@@ -297,7 +297,7 @@
var/mob/living/M = AM
M.DefaultCombatKnockdown(stun_amt, override_hardstun = stun_amt * 0.2)
to_chat(M, "
You're thrown back by [user]!")
- AM.throw_at(throwtarget, ((CLAMP((maxthrow - (CLAMP(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user)//So stuff gets tossed around at the same time.
+ AM.throw_at(throwtarget, ((clamp((maxthrow - (clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user)//So stuff gets tossed around at the same time.
safety--
/obj/effect/proc_holder/spell/aoe_turf/repulse/xeno //i fixed conflicts only to find out that this is in the WIZARD file instead of the xeno file?!
diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm
index d6f0866936..f5b0ed1a75 100644
--- a/code/modules/surgery/bodyparts/bodyparts.dm
+++ b/code/modules/surgery/bodyparts/bodyparts.dm
@@ -183,7 +183,7 @@
//We've dealt the physical damages, if there's room lets apply the stamina damage.
var/current_damage = get_damage(TRUE) //This time around, count stamina loss too.
var/available_damage = max_damage - current_damage
- stamina_dam += round(CLAMP(stamina, 0, min(max_stamina_damage - stamina_dam, available_damage)), DAMAGE_PRECISION)
+ stamina_dam += round(clamp(stamina, 0, min(max_stamina_damage - stamina_dam, available_damage)), DAMAGE_PRECISION)
if(disabled && stamina > 10)
incoming_stam_mult = max(0.01, incoming_stam_mult/(stamina*0.1))
diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm
index 276d4893de..66bca919c4 100644
--- a/code/modules/surgery/bodyparts/dismemberment.dm
+++ b/code/modules/surgery/bodyparts/dismemberment.dm
@@ -16,7 +16,7 @@
return FALSE
var/obj/item/bodypart/affecting = C.get_bodypart(BODY_ZONE_CHEST)
- affecting.receive_damage(CLAMP(brute_dam/2 * affecting.body_damage_coeff, 15, 50), CLAMP(burn_dam/2 * affecting.body_damage_coeff, 0, 50)) //Damage the chest based on limb's existing damage
+ affecting.receive_damage(clamp(brute_dam/2 * affecting.body_damage_coeff, 15, 50), clamp(burn_dam/2 * affecting.body_damage_coeff, 0, 50)) //Damage the chest based on limb's existing damage
C.visible_message("
[C]'s [src.name] has been violently dismembered!")
C.emote("scream")
SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "dismembered", /datum/mood_event/dismembered)
diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm
index 6b93995e62..e5aac2a47d 100644
--- a/code/modules/surgery/organs/eyes.dm
+++ b/code/modules/surgery/organs/eyes.dm
@@ -259,7 +259,7 @@
if(!isnum(range))
return
- set_distance(CLAMP(range, 0, max_light_beam_distance))
+ set_distance(clamp(range, 0, max_light_beam_distance))
assume_rgb(C)
/obj/item/organ/eyes/robotic/glow/proc/assume_rgb(newcolor)
diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm
index ac2b34b855..1b66af6232 100644
--- a/code/modules/surgery/organs/lungs.dm
+++ b/code/modules/surgery/organs/lungs.dm
@@ -146,7 +146,7 @@
if(safe_oxygen_max)
if((O2_pp > safe_oxygen_max) && safe_oxygen_max == 0) //I guess plasma men technically need to have a check.
var/ratio = (breath_gases[/datum/gas/oxygen]/safe_oxygen_max) * 10
- H.apply_damage_type(CLAMP(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type)
+ H.apply_damage_type(clamp(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type)
H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
else if((O2_pp > safe_oxygen_max) && !(safe_oxygen_max == 0)) //Why yes, this is like too much CO2 and spahget. Dirty lizards.
@@ -188,7 +188,7 @@
if(safe_nitro_max)
if(N2_pp > safe_nitro_max)
var/ratio = (breath_gases[/datum/gas/nitrogen]/safe_nitro_max) * 10
- H.apply_damage_type(CLAMP(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type)
+ H.apply_damage_type(clamp(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type)
H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro)
H.losebreath += 2
else
@@ -255,7 +255,7 @@
if(safe_toxins_max)
if(Toxins_pp > safe_toxins_max)
var/ratio = (breath_gases[/datum/gas/plasma]/safe_toxins_max) * 10
- H.apply_damage_type(CLAMP(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type)
+ H.apply_damage_type(clamp(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type)
H.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
else
H.clear_alert("too_much_tox")
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index d95901bdbe..4e4268c5fe 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -209,7 +209,7 @@
return FALSE
if(maximum < damage)
return FALSE
- damage = CLAMP(damage + d, 0, maximum)
+ damage = clamp(damage + d, 0, maximum)
var/mess = check_damage_thresholds()
prev_damage = damage
if(mess && owner)
diff --git a/code/modules/vehicles/secway.dm b/code/modules/vehicles/secway.dm
index 868610a149..8ad8b5f1ee 100644
--- a/code/modules/vehicles/secway.dm
+++ b/code/modules/vehicles/secway.dm
@@ -22,7 +22,7 @@
/obj/vehicle/ridden/secway/process()
var/diff = world.time - last_tick
var/regen = chargerate * diff
- charge = CLAMP(charge + regen, 0, chargemax)
+ charge = clamp(charge + regen, 0, chargemax)
last_tick = world.time
/obj/vehicle/ridden/secway/relaymove(mob/user, direction)
diff --git a/modular_citadel/code/_onclick/hud/sprint.dm b/modular_citadel/code/_onclick/hud/sprint.dm
index 89547c0feb..326bb81745 100644
--- a/modular_citadel/code/_onclick/hud/sprint.dm
+++ b/modular_citadel/code/_onclick/hud/sprint.dm
@@ -54,5 +54,5 @@
/obj/screen/sprint_buffer/proc/update_to_mob(mob/living/L)
var/amount = 0
if(L.sprint_buffer_max > 0)
- amount = round(CLAMP((L.sprint_buffer / L.sprint_buffer_max) * 100, 0, 100), 5)
+ amount = round(clamp((L.sprint_buffer / L.sprint_buffer_max) * 100, 0, 100), 5)
icon_state = "prog_bar_[amount]"
diff --git a/modular_citadel/code/_onclick/hud/stamina.dm b/modular_citadel/code/_onclick/hud/stamina.dm
index a7b9a79ecd..5484014f8f 100644
--- a/modular_citadel/code/_onclick/hud/stamina.dm
+++ b/modular_citadel/code/_onclick/hud/stamina.dm
@@ -22,7 +22,7 @@
else if(user.hal_screwyhud == 5)
icon_state = "stamina0"
else
- icon_state = "stamina[CLAMP(FLOOR(user.getStaminaLoss() /20, 1), 0, 6)]"
+ icon_state = "stamina[clamp(FLOOR(user.getStaminaLoss() /20, 1), 0, 6)]"
//stam buffer
/obj/screen/staminabuffer
diff --git a/modular_citadel/code/modules/arousal/organs/breasts.dm b/modular_citadel/code/modules/arousal/organs/breasts.dm
index c936eb9dc4..213ebb049a 100644
--- a/modular_citadel/code/modules/arousal/organs/breasts.dm
+++ b/modular_citadel/code/modules/arousal/organs/breasts.dm
@@ -54,7 +54,7 @@
desc += " They're leaking [lowertext(R.name)]."
var/datum/sprite_accessory/S = GLOB.breasts_shapes_list[shape]
var/icon_shape = S ? S.icon_state : "pair"
- var/icon_size = CLAMP(breast_values[size], BREASTS_ICON_MIN_SIZE, BREASTS_ICON_MAX_SIZE)
+ var/icon_size = clamp(breast_values[size], BREASTS_ICON_MIN_SIZE, BREASTS_ICON_MAX_SIZE)
icon_state = "breasts_[icon_shape]_[icon_size]"
if(owner)
if(owner.dna.species.use_skintones && owner.dna.features["genitals_use_skintone"])
@@ -73,7 +73,7 @@
//this is far too lewd wah
/obj/item/organ/genital/breasts/modify_size(modifier, min = -INFINITY, max = INFINITY)
- var/new_value = CLAMP(cached_size + modifier, min, max)
+ var/new_value = clamp(cached_size + modifier, min, max)
if(new_value == cached_size)
return
prev_size = cached_size
diff --git a/modular_citadel/code/modules/arousal/organs/penis.dm b/modular_citadel/code/modules/arousal/organs/penis.dm
index c05549aaa0..e1b8dc0dba 100644
--- a/modular_citadel/code/modules/arousal/organs/penis.dm
+++ b/modular_citadel/code/modules/arousal/organs/penis.dm
@@ -21,11 +21,11 @@
var/diameter_ratio = COCK_DIAMETER_RATIO_DEF //0.25; check citadel_defines.dm
/obj/item/organ/genital/penis/modify_size(modifier, min = -INFINITY, max = INFINITY)
- var/new_value = CLAMP(length + modifier, min, max)
+ var/new_value = clamp(length + modifier, min, max)
if(new_value == length)
return
prev_length = length
- length = CLAMP(length + modifier, min, max)
+ length = clamp(length + modifier, min, max)
update()
..()
@@ -60,7 +60,7 @@
else if(!enlargement && status_effect)
owner.remove_status_effect(STATUS_EFFECT_PENIS_ENLARGEMENT)
if(linked_organ)
- linked_organ.size = CLAMP(size + new_size, BALLS_SIZE_MIN, BALLS_SIZE_MAX)
+ linked_organ.size = clamp(size + new_size, BALLS_SIZE_MIN, BALLS_SIZE_MAX)
linked_organ.update()
size = new_size
diff --git a/modular_citadel/code/modules/mob/living/carbon/damage_procs.dm b/modular_citadel/code/modules/mob/living/carbon/damage_procs.dm
index 2e8feb793a..6963714f04 100644
--- a/modular_citadel/code/modules/mob/living/carbon/damage_procs.dm
+++ b/modular_citadel/code/modules/mob/living/carbon/damage_procs.dm
@@ -6,7 +6,7 @@
var/directstamloss = (bufferedstam + amount) - stambuffer
if(directstamloss > 0)
adjustStaminaLoss(directstamloss)
- bufferedstam = CLAMP(bufferedstam + amount, 0, stambuffer)
+ bufferedstam = clamp(bufferedstam + amount, 0, stambuffer)
stambufferregentime = world.time + 10
if(updating_health)
update_health_hud()
diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm
index 742ef6c9aa..f59d18686a 100644
--- a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm
+++ b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm
@@ -438,7 +438,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
DefaultCombatKnockdown(15, 1, 1)
else
L.visible_message("
[src] pounces on [L]!", "
[src] pounces on you!")
- L.DefaultCombatKnockdown(iscarbon(L) ? 60 : 45, override_stamdmg = CLAMP(pounce_stamloss, 0, pounce_stamloss_cap-L.getStaminaLoss())) // Temporary. If someone could rework how dogborg pounces work to accomodate for combat changes, that'd be nice.
+ L.DefaultCombatKnockdown(iscarbon(L) ? 60 : 45, override_stamdmg = clamp(pounce_stamloss, 0, pounce_stamloss_cap-L.getStaminaLoss())) // Temporary. If someone could rework how dogborg pounces work to accomodate for combat changes, that'd be nice.
playsound(src, 'sound/weapons/Egloves.ogg', 50, 1)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
index eb93d273a7..837524d49f 100644
--- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
@@ -95,7 +95,7 @@
if(!ImpureTot == 0) //If impure, v.small emp (0.6 or less)
ImpureTot *= volume
- var/empVol = CLAMP (volume/10, 0, 15)
+ var/empVol = clamp(volume/10, 0, 15)
empulse(T, empVol, ImpureTot/10, 1)
my_atom.reagents.clear_reagents() //just in case
diff --git a/tgstation.dme b/tgstation.dme
index 987b24c7c6..7bfbd2dde2 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -17,7 +17,6 @@
#include "_maps\_basemap.dm"
#include "code\_compile_options.dm"
#include "code\world.dm"
-#include "code\__DEFINES\__513_compatibility.dm"
#include "code\__DEFINES\_globals.dm"
#include "code\__DEFINES\_protect.dm"
#include "code\__DEFINES\_tick.dm"