This commit is contained in:
silicons
2020-07-23 10:12:34 -07:00
parent 2eb6f0467d
commit 89a1fa544e
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -168,8 +168,8 @@
//UI position overrides for 1:1 screen layout. (default is 7:5)
#define ui_stamina "EAST-1:28,CENTER:17" // replacing internals button
#define ui_overridden_resist "EAST-3:24,SOUTH+1:7"
#define ui_clickdelay "CENTER:16,SOUTH:5"
#define ui_resistdelay "EAST-3:24,SOUTH+1:15"
#define ui_clickdelay "CENTER,SOUTH+1:-28"
#define ui_resistdelay "EAST-3:24,SOUTH+1:4"
#define ui_combat_toggle "EAST-4:22,SOUTH:5"
#define ui_boxcraft "EAST-4:22,SOUTH+1:6"
@@ -26,12 +26,12 @@
/obj/screen/action_bar/clickdelay/update_to_mob(mob/living/L)
var/estimated = L.EstimatedNextActionTime()
var/diff = L.last_action - estimated
var/diff = estimated - L.last_action
var/left = estimated - world.time
if(left < 0 || diff < 0)
icon_state = "prog_bar_100"
return FALSE
icon_state = "prog_bar_[round(clamp((left/diff) * 100, 0, 100), 5)]"
icon_state = "prog_bar_[round(clamp(((diff - left)/diff) * 100, 0, 100), 5)]"
return TRUE
/datum/hud/var/obj/screen/action_bar/resistdelay/resistdelay
@@ -47,5 +47,5 @@
if(left < 0 || diff < 0)
icon_state = "prog_bar_100"
return FALSE
icon_state = "prog_bar[round(clamp((left/diff) * 100, 0, 100), 5)]"
icon_state = "prog_bar[round(clamp(((diff - left)/diff) * 100, 0, 100), 5)]"
return TRUE
+1 -1
View File
@@ -676,7 +676,7 @@
..(pressure_difference, direction, pressure_resistance_prob_delta)
/mob/living/can_resist()
return !CheckResistCooldown() && CHECK_MOBILITY(src, MOBILITY_RESIST)
return CheckResistCooldown() && CHECK_MOBILITY(src, MOBILITY_RESIST)
/// Resist verb for attempting to get out of whatever is restraining your motion. Gives you resist clickdelay if do_resist() returns true.
/mob/living/verb/resist()