sigh
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
/obj/screen/mov_intent
|
||||
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
|
||||
|
||||
/obj/screen/sprintbutton
|
||||
name = "toggle sprint"
|
||||
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
|
||||
icon_state = "act_sprint"
|
||||
layer = ABOVE_HUD_LAYER - 0.1
|
||||
var/mutable_appearance/flashy
|
||||
|
||||
/obj/screen/sprintbutton/Click()
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.default_toggle_sprint()
|
||||
|
||||
/obj/screen/sprintbutton/update_icon_state()
|
||||
var/mob/living/user = hud?.mymob
|
||||
if(!istype(user))
|
||||
return
|
||||
if(user.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
|
||||
icon_state = "act_sprint_on"
|
||||
else if(HAS_TRAIT(user, TRAIT_SPRINT_LOCKED))
|
||||
icon_state = "act_sprint_locked"
|
||||
else
|
||||
icon_state = "act_sprint"
|
||||
|
||||
/obj/screen/sprintbutton/update_overlays()
|
||||
. = ..()
|
||||
var/mob/living/carbon/user = hud?.mymob
|
||||
if(!istype(user) || !user.client)
|
||||
return
|
||||
|
||||
if((user.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) && user.client.prefs.hud_toggle_flash)
|
||||
if(!flashy)
|
||||
flashy = mutable_appearance('icons/mob/screen_gen.dmi', "togglehalf_flash")
|
||||
if(flashy.color != user.client.prefs.hud_toggle_color)
|
||||
flashy.color = user.client.prefs.hud_toggle_color
|
||||
. += flashy
|
||||
|
||||
//Sprint buffer onscreen code.
|
||||
/datum/hud/var/obj/screen/sprint_buffer/sprint_buffer
|
||||
|
||||
/obj/screen/sprint_buffer
|
||||
name = "sprint buffer"
|
||||
icon = 'icons/effects/progessbar.dmi'
|
||||
icon_state = "prog_bar_100"
|
||||
|
||||
/obj/screen/sprint_buffer/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
to_chat(L, "<span class='boldnotice'>Your sprint buffer's maximum capacity is [L.sprint_buffer_max]. It is currently at [L.sprint_buffer], regenerating at [L.sprint_buffer_regen_ds * 10] per second. \
|
||||
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)
|
||||
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]"
|
||||
@@ -0,0 +1,61 @@
|
||||
/datum/hud/var/obj/screen/staminas/staminas
|
||||
/datum/hud/var/obj/screen/staminabuffer/staminabuffer
|
||||
|
||||
/obj/screen/staminas
|
||||
icon = 'modular_citadel/icons/ui/screen_gen.dmi'
|
||||
name = "stamina"
|
||||
icon_state = "stamina0"
|
||||
screen_loc = ui_stamina
|
||||
mouse_opacity = 1
|
||||
|
||||
/obj/screen/staminas/Click(location,control,params)
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
to_chat(L, "<span class='notice'>You have <b>[L.getStaminaLoss()]</b> stamina loss.<br>Your stamina buffer can take <b>[L.stambuffer]</b> stamina loss, and recharges at no cost.<br>Your stamina buffer is <b>[(L.stambuffer*(100/L.stambuffer))-(L.bufferedstam*(100/L.stambuffer))]%</b> full.</span>")
|
||||
|
||||
/obj/screen/staminas/update_icon_state()
|
||||
var/mob/living/carbon/user = hud?.mymob
|
||||
if(!user)
|
||||
return
|
||||
if(user.stat == DEAD || (user.combat_flags & COMBAT_FLAG_HARD_STAMCRIT) || (user.hal_screwyhud in 1 to 2))
|
||||
icon_state = "staminacrit"
|
||||
else if(user.hal_screwyhud == 5)
|
||||
icon_state = "stamina0"
|
||||
else
|
||||
icon_state = "stamina[clamp(FLOOR(user.getStaminaLoss() /20, 1), 0, 6)]"
|
||||
|
||||
//stam buffer
|
||||
/obj/screen/staminabuffer
|
||||
icon = 'modular_citadel/icons/ui/screen_gen.dmi'
|
||||
name = "stamina buffer"
|
||||
icon_state = "stambuffer0"
|
||||
screen_loc = ui_stamina
|
||||
layer = ABOVE_HUD_LAYER + 0.1
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/screen/staminabuffer/update_icon_state()
|
||||
var/mob/living/carbon/user = hud?.mymob
|
||||
if(!user)
|
||||
return
|
||||
if(user.stat == DEAD || (user.combat_flags & COMBAT_FLAG_HARD_STAMCRIT) || (user.hal_screwyhud in 1 to 2))
|
||||
icon_state = "stambuffer7"
|
||||
else if(user.hal_screwyhud == 5)
|
||||
icon_state = "stambuffer0"
|
||||
else
|
||||
switch(user.bufferedstam / user.stambuffer)
|
||||
if(0.95 to INFINITY)
|
||||
icon_state = "stambuffer7"
|
||||
if(0.9 to 0.95)
|
||||
icon_state = "stambuffer6"
|
||||
if(0.8 to 0.9)
|
||||
icon_state = "stambuffer5"
|
||||
if(0.6 to 0.8)
|
||||
icon_state = "stambuffer4"
|
||||
if(0.4 to 0.6)
|
||||
icon_state = "stambuffer3"
|
||||
if(0.2 to 0.4)
|
||||
icon_state = "stambuffer2"
|
||||
if(0.05 to 0.2)
|
||||
icon_state = "stambuffer1"
|
||||
else
|
||||
icon_state = "stambuffer0"
|
||||
@@ -0,0 +1,22 @@
|
||||
/obj/screen/voretoggle
|
||||
name = "toggle vore mode"
|
||||
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
|
||||
icon_state = "nom_off"
|
||||
|
||||
/obj/screen/voretoggle/Click()
|
||||
if(usr != hud.mymob)
|
||||
return
|
||||
var/mob/living/carbon/C = usr
|
||||
if(SEND_SIGNAL(usr, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE))
|
||||
to_chat(usr, "<span class='warning'>Disable combat mode first.</span>")
|
||||
return
|
||||
C.toggle_vore_mode()
|
||||
|
||||
/obj/screen/voretoggle/update_icon_state()
|
||||
var/mob/living/carbon/user = hud?.mymob
|
||||
if(!istype(user))
|
||||
return
|
||||
if(user.voremode)
|
||||
icon_state = "nom"
|
||||
else
|
||||
icon_state = "nom_off"
|
||||
Reference in New Issue
Block a user