Conflict Resolution Part 2

This commit is contained in:
Unknown
2019-03-27 15:51:05 -04:00
parent 55b4d304f5
commit 6636f1ba37
11 changed files with 29 additions and 31 deletions

View File

@@ -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()

View File

@@ -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()

View File

@@ -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))

View File

@@ -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,

View File

@@ -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)

View File

@@ -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()

View File

@@ -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("<span class='danger'>[user] [pick(attack_verb)] \himself in the [affecting.name]!</span>")
return 0 //No venom for you.

View File

@@ -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

View File

@@ -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!<BR>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"])

View File

@@ -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
//

View File

@@ -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"])