mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
buffers
This commit is contained in:
@@ -168,6 +168,8 @@
|
|||||||
//UI position overrides for 1:1 screen layout. (default is 7:5)
|
//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_stamina "EAST-1:28,CENTER:17" // replacing internals button
|
||||||
#define ui_overridden_resist "EAST-3:24,SOUTH+1:7"
|
#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_combat_toggle "EAST-4:22,SOUTH:5"
|
#define ui_combat_toggle "EAST-4:22,SOUTH:5"
|
||||||
|
|
||||||
#define ui_boxcraft "EAST-4:22,SOUTH+1:6"
|
#define ui_boxcraft "EAST-4:22,SOUTH+1:6"
|
||||||
|
|||||||
@@ -140,6 +140,17 @@
|
|||||||
sprint_buffer.hud = src
|
sprint_buffer.hud = src
|
||||||
static_inventory += sprint_buffer
|
static_inventory += sprint_buffer
|
||||||
|
|
||||||
|
// clickdelay
|
||||||
|
clickdelay = new
|
||||||
|
clickdelay.hud = src
|
||||||
|
clickdelay.screen_loc = ui_clickdelay
|
||||||
|
static_inventory += clickdelay
|
||||||
|
|
||||||
|
// resistdelay
|
||||||
|
resistdelay = new
|
||||||
|
resistdelay.hud = src
|
||||||
|
resistdelay.screen_loc = ui_resistdelay
|
||||||
|
static_inventory += resistdelay
|
||||||
|
|
||||||
using = new /obj/screen/drop()
|
using = new /obj/screen/drop()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
if(considered_action)
|
if(considered_action)
|
||||||
(immediate? last_action_immediate : last_action) = world.time
|
(immediate? last_action_immediate : last_action) = world.time
|
||||||
(immediate? next_action_immediate : next_action) = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)))
|
(immediate? next_action_immediate : next_action) = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)))
|
||||||
|
hud_used?.clickdelay?.mark_dirty()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get estimated time of next attack.
|
* Get estimated time of next attack.
|
||||||
@@ -66,7 +67,7 @@
|
|||||||
var/obj/item/I = get_active_held_item()
|
var/obj/item/I = get_active_held_item()
|
||||||
if(I)
|
if(I)
|
||||||
attack_speed = I.GetEstimatedAttackSpeed()
|
attack_speed = I.GetEstimatedAttackSpeed()
|
||||||
return max(next_action, last_action + attack_speed)
|
return max(next_action, next_action_immediate, max(last_action, last_action_immediate) + attack_speed)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets our next action to. The difference is DelayNextAction cannot reduce next_action under any circumstances while this can.
|
* Sets our next action to. The difference is DelayNextAction cannot reduce next_action under any circumstances while this can.
|
||||||
@@ -75,6 +76,7 @@
|
|||||||
if(considered_action)
|
if(considered_action)
|
||||||
(immediate? last_action_immediate : last_action) = world.time
|
(immediate? last_action_immediate : last_action) = world.time
|
||||||
(immediate? next_action_immediate : next_action) = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))
|
(immediate? next_action_immediate : next_action) = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))
|
||||||
|
hud_used?.clickdelay?.mark_dirty()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if we can do another action.
|
* Checks if we can do another action.
|
||||||
@@ -97,6 +99,7 @@
|
|||||||
/mob/proc/FlushCurrentAction()
|
/mob/proc/FlushCurrentAction()
|
||||||
last_action = last_action_immediate
|
last_action = last_action_immediate
|
||||||
next_action = next_action_immediate
|
next_action = next_action_immediate
|
||||||
|
hud_used?.clickdelay?.mark_dirty()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Discards last_action and next_action
|
* Discards last_action and next_action
|
||||||
@@ -104,6 +107,7 @@
|
|||||||
/mob/proc/DiscardCurrentAction()
|
/mob/proc/DiscardCurrentAction()
|
||||||
last_action_immediate = last_action
|
last_action_immediate = last_action
|
||||||
next_action_immediate = next_action
|
next_action_immediate = next_action
|
||||||
|
hud_used?.clickdelay?.mark_dirty()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if we can resist again.
|
* Checks if we can resist again.
|
||||||
@@ -121,6 +125,7 @@
|
|||||||
/mob/proc/MarkResistTime(extra_cooldown = resist_cooldown, override = FALSE)
|
/mob/proc/MarkResistTime(extra_cooldown = resist_cooldown, override = FALSE)
|
||||||
last_resist = world.time
|
last_resist = world.time
|
||||||
next_resist = override? (world.time + extra_cooldown) : max(next_resist, world.time + extra_cooldown)
|
next_resist = override? (world.time + extra_cooldown) : max(next_resist, world.time + extra_cooldown)
|
||||||
|
hud_used?.clickdelay?.mark_dirty()
|
||||||
|
|
||||||
/atom
|
/atom
|
||||||
// Standard clickdelay variables
|
// Standard clickdelay variables
|
||||||
|
|||||||
Reference in New Issue
Block a user