diff --git a/code/__defines/_tick.dm b/code/__defines/_tick.dm index 7d8bbd2c1d..54ac7d398d 100644 --- a/code/__defines/_tick.dm +++ b/code/__defines/_tick.dm @@ -1,14 +1,15 @@ + #define TICK_LIMIT_RUNNING 80 #define TICK_LIMIT_TO_RUN 70 #define TICK_LIMIT_MC 70 #define TICK_LIMIT_MC_INIT_DEFAULT 98 -#define TICK_CHECK ( TICK_USAGE > GLOB.CURRENT_TICKLIMIT ) -#define CHECK_TICK if TICK_CHECK stoplag() - #define TICK_USAGE world.tick_usage +#define TICK_CHECK ( TICK_USAGE > Master.current_ticklimit ) +#define CHECK_TICK ( TICK_CHECK ? stoplag() : 0 ) + #define TICK_CHECK_HIGH_PRIORITY ( TICK_USAGE > 95 ) #define CHECK_TICK_HIGH_PRIORITY ( TICK_CHECK_HIGH_PRIORITY? stoplag() : 0 ) -#define UNTIL(X) while(!(X)) stoplag() +#define UNTIL(X) while(!(X)) stoplag() \ No newline at end of file diff --git a/code/game/machinery/bomb_tester_vr.dm b/code/game/machinery/bomb_tester_vr.dm index 66d71f923d..224885d9ca 100644 --- a/code/game/machinery/bomb_tester_vr.dm +++ b/code/game/machinery/bomb_tester_vr.dm @@ -201,7 +201,7 @@ if(href_list["set_can_pressure"]) var/change = text2num(href_list["set_can_pressure"]) - sim_canister_output = Clamp(sim_canister_output+change, ONE_ATMOSPHERE/10, ONE_ATMOSPHERE*10) + sim_canister_output = CLAMP(sim_canister_output+change, ONE_ATMOSPHERE/10, ONE_ATMOSPHERE*10) if(href_list["start_sim"]) start_simulating() diff --git a/code/game/objects/items/weapons/implants/implant_vr.dm b/code/game/objects/items/weapons/implants/implant_vr.dm index 006c4884e1..bf67f83953 100644 --- a/code/game/objects/items/weapons/implants/implant_vr.dm +++ b/code/game/objects/items/weapons/implants/implant_vr.dm @@ -105,9 +105,9 @@ if(size_mult.Find(msg)) var/resizing_value = text2num(size_mult.match) if(findtext(msg, "centimeter")) //Because metric system rules - H.resize(Clamp(resizing_value/170 , 0.25, 2)) //170 cm is average crewmember, I think + H.resize(CLAMP(resizing_value/170 , 0.25, 2)) //170 cm is average crewmember, I think else - H.resize(Clamp(resizing_value , 0.25, 2)) + H.resize(CLAMP(resizing_value , 0.25, 2)) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index e2e6c4603b..c57b0ff80a 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -215,9 +215,8 @@ var/list/admin_verbs_debug = list( /client/proc/show_plant_genes, /client/proc/enable_debug_verbs, /client/proc/callproc, - /client/proc/callproc_target, - /client/proc/debug_process, //VOREStation Add, /client/proc/callproc_datum, + /client/proc/debug_process, //VOREStation Add, /client/proc/SDQL2_query, /client/proc/Jump, /client/proc/debug_rogueminer, @@ -236,9 +235,8 @@ var/list/admin_verbs_debug = list( var/list/admin_verbs_paranoid_debug = list( /client/proc/callproc, - /client/proc/callproc_target, - /client/proc/debug_process, //VOREStation Add, /client/proc/callproc_datum, + /client/proc/debug_process, //VOREStation Add, /client/proc/debug_controller ) @@ -306,9 +304,8 @@ var/list/admin_verbs_hideable = list( /client/proc/restart_controller, /client/proc/cmd_admin_list_open_jobs, /client/proc/callproc, - /client/proc/callproc_target, - /client/proc/debug_process, //VOREStation Add, /client/proc/callproc_datum, + /client/proc/debug_process, //VOREStation Add, /client/proc/Debug2, /client/proc/reload_admins, /client/proc/kill_air, diff --git a/code/modules/client/preference_setup/global/05_media.dm b/code/modules/client/preference_setup/global/05_media.dm index 3551735bb9..7ae263d9ea 100644 --- a/code/modules/client/preference_setup/global/05_media.dm +++ b/code/modules/client/preference_setup/global/05_media.dm @@ -15,7 +15,7 @@ S["media_player"] << pref.media_player /datum/category_item/player_setup_item/player_global/media/sanitize_preferences() - pref.media_volume = isnum(pref.media_volume) ? Clamp(pref.media_volume, 0, 1) : initial(pref.media_volume) + pref.media_volume = isnum(pref.media_volume) ? CLAMP(pref.media_volume, 0, 1) : initial(pref.media_volume) pref.media_player = sanitize_inlist(pref.media_player, list(0, 1, 2), initial(pref.media_player)) /datum/category_item/player_setup_item/player_global/media/content(var/mob/user) @@ -35,7 +35,7 @@ if(CanUseTopic(user)) var/value = input("Choose your Jukebox volume (0-100%)", "Jukebox volume", round(pref.media_volume * 100)) if(isnum(value)) - value = Clamp(value, 0, 100) + value = CLAMP(value, 0, 100) pref.media_volume = value/100.0 if(user.client && user.client.media) user.client.media.update_volume(pref.media_volume) diff --git a/code/modules/media/mediamanager.dm b/code/modules/media/mediamanager.dm index 83da1250a7..c1cd4897ca 100644 --- a/code/modules/media/mediamanager.dm +++ b/code/modules/media/mediamanager.dm @@ -149,7 +149,7 @@ if (url != targetURL || abs(targetStartTime - start_time) > 1 || abs(targetVolume - source_volume) > 0.1 /* 10% */) url = targetURL start_time = targetStartTime - source_volume = Clamp(targetVolume, 0, 1) + source_volume = CLAMP(targetVolume, 0, 1) send_update() /datum/media_manager/proc/stop_music() diff --git a/code/modules/mob/living/carbon/human/species/species_attack_vr.dm b/code/modules/mob/living/carbon/human/species/species_attack_vr.dm index f7e1e43e31..658a453afc 100644 --- a/code/modules/mob/living/carbon/human/species/species_attack_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_attack_vr.dm @@ -9,7 +9,7 @@ /datum/unarmed_attack/bite/sharp/numbing/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage) var/obj/item/organ/external/affecting = target.get_organ(zone) - attack_damage = Clamp(attack_damage, 1, 5) + attack_damage = CLAMP(attack_damage, 1, 5) if(target == user) user.visible_message("[user] [pick(attack_verb)] \himself in the [affecting.name]!") return 0 //No venom for you. diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm index 8b5099b222..62273016c6 100644 --- a/code/modules/mob/living/carbon/human/species/station/alraune.dm +++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm @@ -207,7 +207,7 @@ var/co2buff = 0 if(inhaling) - co2buff = (Clamp(inhale_pp, 0, minimum_breath_pressure))/minimum_breath_pressure //returns a value between 0 and 1. + co2buff = (CLAMP(inhale_pp, 0, minimum_breath_pressure))/minimum_breath_pressure //returns a value between 0 and 1. var/light_amount = fullysealed ? H.getlightlevel() : H.getlightlevel()/5 // if they're covered, they're not going to get much light on them. @@ -222,7 +222,7 @@ if(toxins_pp > safe_toxins_max) var/ratio = (poison/safe_toxins_max) * 10 if(H.reagents) - H.reagents.add_reagent("toxin", Clamp(ratio, MIN_TOXIN_DAMAGE, MAX_TOXIN_DAMAGE)) + H.reagents.add_reagent("toxin", CLAMP(ratio, MIN_TOXIN_DAMAGE, MAX_TOXIN_DAMAGE)) breath.adjust_gas(poison_type, -poison/6, update = 0) //update after H.phoron_alert = max(H.phoron_alert, 1) else diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 43784ef42a..277463bddc 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -173,7 +173,7 @@ return if(telepad) - var/trueDistance = Clamp(distance + distance_off, 1, get_max_allowed_distance()) + var/trueDistance = CLAMP(distance + distance_off, 1, get_max_allowed_distance()) var/trueRotation = rotation + rotation_off var/datum/projectile_data/proj_data = simple_projectile_trajectory(telepad.x, telepad.y, trueRotation, trueDistance) @@ -283,7 +283,7 @@ updateDialog() /obj/machinery/computer/telescience/proc/teleport(mob/user) - distance = Clamp(distance, 0, get_max_allowed_distance()) + distance = CLAMP(distance, 0, get_max_allowed_distance()) if(rotation == null || distance == null || z_co == null) temp_msg = "ERROR!
Set a distance, rotation and sector." return @@ -320,14 +320,14 @@ var/new_rot = input("Please input desired bearing in degrees.", name, rotation) as num if(..()) // Check after we input a value, as they could've moved after they entered something return - rotation = Clamp(new_rot, -900, 900) + rotation = CLAMP(new_rot, -900, 900) rotation = round(rotation, 0.01) if(href_list["setdistance"]) var/new_pow = input("Please input desired distance in meters.", name, rotation) as num if(..()) // Check after we input a value, as they could've moved after they entered something return - distance = Clamp(new_pow, 1, get_max_allowed_distance()) + distance = CLAMP(new_pow, 1, get_max_allowed_distance()) distance = FLOOR(distance, 1) if(href_list["setz"]) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 772d008dd0..26c03300a2 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -71,12 +71,12 @@ // // Hide vore organs in contents // -/mob/living/view_variables_filter_contents(list/L) - . = ..() - var/len_before = L.len - L -= vore_organs - . += len_before - L.len - +///mob/living/view_variables_filter_contents(list/L) +// . = ..() +// var/len_before = L.len +// L -= vore_organs +// . += len_before - L.len +// // // Handle being clicked, perhaps with something to devour // diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 679fe389de..336b86b5a4 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -654,14 +654,14 @@ var/new_damage = input(user, "Choose the amount of burn damage prey will take per tick. Ranges from 0 to 6.", "Set Belly Burn Damage.", selected.digest_burn) as num|null if(new_damage == null) return - var/new_new_damage = Clamp(new_damage, 0, 6) + var/new_new_damage = CLAMP(new_damage, 0, 6) selected.digest_burn = new_new_damage if(href_list["b_brute_dmg"]) var/new_damage = input(user, "Choose the amount of brute damage prey will take per tick. Ranges from 0 to 6", "Set Belly Brute Damage.", selected.digest_brute) as num|null if(new_damage == null) return - var/new_new_damage = Clamp(new_damage, 0, 6) + var/new_new_damage = CLAMP(new_damage, 0, 6) selected.digest_brute = new_new_damage if(href_list["b_escapable"])