mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:19:02 +00:00
adjustments
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
#define ui_drop_throw "EAST-1:28,SOUTH+1:7"
|
||||
#define ui_pull_resist "EAST-2:26,SOUTH+1:7"
|
||||
#define ui_movi "EAST-2:26,SOUTH:5"
|
||||
#define ui_sprintbufferloc "EAST-2:26,SOUTH+1:5"
|
||||
#define ui_acti "EAST-3:24,SOUTH:5"
|
||||
#define ui_zonesel "EAST-1:28,SOUTH:5"
|
||||
#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12)
|
||||
|
||||
@@ -134,6 +134,13 @@
|
||||
static_inventory += using
|
||||
//END OF CITADEL CHANGES
|
||||
|
||||
//same as above but buffer.
|
||||
using = new /obj/screen/sprint_buffer
|
||||
using.screen_loc = ui_sprintbufferloc
|
||||
sprint_buffer = using
|
||||
static_inventory += using
|
||||
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
@@ -319,9 +326,6 @@
|
||||
staminas = new /obj/screen/staminas()
|
||||
infodisplay += staminas
|
||||
|
||||
sprint_buffer = new
|
||||
infodisplay += sprint_buffer
|
||||
|
||||
if(!CONFIG_GET(flag/disable_stambuffer))
|
||||
staminabuffer = new /obj/screen/staminabuffer()
|
||||
infodisplay += staminabuffer
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/datum/hud/var/obj/screen/sprint_buffer/sprint_buffer
|
||||
|
||||
/obj/screen/sprint_buffer
|
||||
name = "sprint ubffer"
|
||||
name = "sprint buffer"
|
||||
icon = 'icons/effects/progessbar.dmi'
|
||||
icon_state = "prog_bar_100"
|
||||
|
||||
@@ -35,4 +35,7 @@
|
||||
Sprinting while this is empty will incur a [L.sprint_stamina_cost] stamina cost per tile.</span>")
|
||||
|
||||
/obj/screen/sprint_buffer/proc/update_to_mob(mob/living/L)
|
||||
icon_state = "prog_bar_[round(min((L.sprint_buffer / L.sprint_buffer_max) * 100, 100), 5)]"
|
||||
var/amount = 0
|
||||
if(L.sprint_buffer_max > 0)
|
||||
amount = round(CLAMP((L.sprint_buffer / L.sprint_buffer_max) * 100, 0, 100), 5)
|
||||
icon_state = "prog_bar_[amount]"
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
|
||||
/mob/living/carbon/doSprintLossTiles(tiles)
|
||||
doSprintBufferRegen(FALSE) //first regen.
|
||||
if(sprint_buffer >= 1)
|
||||
if(sprint_buffer)
|
||||
var/use = min(tiles, sprint_buffer)
|
||||
sprint_buffer -= use
|
||||
tiles -= use
|
||||
update_hud_sprint_bar()
|
||||
if(!tiles) //we had enough, we're done!
|
||||
return
|
||||
adjustStaminaLoss(tiles * sprint_stamina_cost) //use stamina to cover deficit.
|
||||
update_hud_sprint_bar()
|
||||
|
||||
/mob/living/carbon/proc/doSprintBufferRegen(updating = TRUE)
|
||||
var/diff = world.time - sprint_buffer_regen_last
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
/mob/living/carbon/Life()
|
||||
. = ..()
|
||||
doSprintBufferRegen()
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
|
||||
//Sprint buffer---
|
||||
var/sprint_buffer = 35 //Tiles
|
||||
var/sprint_buffer_max
|
||||
var/sprint_buffer_max = 35
|
||||
var/sprint_buffer_regen_ds = 0.2 //Tiles per world.time decisecond
|
||||
var/sprint_buffer_regen_last = 0 //last world.time this was regen'd for math.
|
||||
var/sprint_stamina_cost = 0.3 //stamina loss per tile while insufficient sprint buffer.
|
||||
var/sprint_stamina_cost = 0.55 //stamina loss per tile while insufficient sprint buffer.
|
||||
//---End
|
||||
|
||||
/mob/living/movement_delay(ignorewalk = 0)
|
||||
|
||||
Reference in New Issue
Block a user