This commit is contained in:
Ghommie
2019-12-09 00:04:22 +01:00
375 changed files with 11630 additions and 8094 deletions
@@ -18,30 +18,32 @@
return FALSE
return .
/mob/living/carbon/proc/toggle_combat_mode(forced)
if(recoveringstam)
return TRUE
/mob/living/carbon/proc/toggle_combat_mode(forced, silent)
if(!forced)
for(var/datum/status_effect/S in status_effects)
if(recoveringstam || stat != CONSCIOUS)
return TRUE
for(var/i in status_effects)
var/datum/status_effect/S = i
if(S.blocks_combatmode)
return TRUE
combatmode = !combatmode
if(voremode)
toggle_vore_mode()
if(combatmode)
playsound_local(src, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay!
else
playsound_local(src, 'sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the above!
if(!silent)
if(combatmode)
if(world.time >= combatmessagecooldown)
if(a_intent != INTENT_HELP)
visible_message("<span class='warning'>[src] [resting ? "tenses up" : (prob(95)? "drops into a combative stance" : (prob(95)? "poses aggressively" : "asserts dominance with their pose"))].</span>")
else
visible_message("<span class='notice'>[src] [pick("looks","seems","goes")] [pick("alert","attentive","vigilant")].</span>")
playsound_local(src, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay!
else
playsound_local(src, 'sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the above!
if(client)
client.show_popup_menus = !combatmode // So we can right-click for alternate actions and all that other good shit. Also moves examine to shift+rightclick to make it possible to attack while sprinting
if(hud_used && hud_used.static_inventory)
for(var/obj/screen/combattoggle/selector in hud_used.static_inventory)
selector.rebasetointerbay(src)
if(world.time >= combatmessagecooldown && combatmode)
if(a_intent != INTENT_HELP)
visible_message("<span class='warning'>[src] [resting ? "tenses up" : (prob(95)? "drops into a combative stance" : (prob(95)? "poses aggressively" : "asserts dominance with their pose"))].</span>")
else
visible_message("<span class='notice'>[src] [pick("looks","seems","goes")] [pick("alert","attentive","vigilant")].</span>")
combatmessagecooldown = 10 SECONDS + world.time //This is set 100% of the time to make sure squeezing regen out of process cycles doesn't result in the combat mode message getting spammed
SEND_SIGNAL(src, COMSIG_COMBAT_TOGGLED, src, combatmode)
return TRUE
@@ -1,4 +1,4 @@
/mob/living/carbon/adjustStaminaLossBuffered(amount, updating_stamina = 1)
/mob/living/carbon/adjustStaminaLossBuffered(amount, updating_health = 1)
if(status_flags & GODMODE)
return 0
if(CONFIG_GET(flag/disable_stambuffer))
@@ -8,7 +8,7 @@
adjustStaminaLoss(directstamloss)
bufferedstam = CLAMP(bufferedstam + amount, 0, stambuffer)
stambufferregentime = world.time + 10
if(updating_stamina)
if(updating_health)
update_health_hud()
/mob/living/carbon/adjustStaminaLoss(amount, updating_health = TRUE, forced = FALSE, affected_zone = BODY_ZONE_CHEST)
@@ -5,7 +5,8 @@
var/oldpseudoheight = pseudo_z_axis
. = ..()
if(. && sprinting && !(movement_type & FLYING) && canmove && !resting && m_intent == MOVE_INTENT_RUN && has_gravity(loc) && !pulledby)
doSprintLossTiles(1)
if(!HAS_TRAIT(src, TRAIT_FREESPRINT))
doSprintLossTiles(1)
if((oldpseudoheight - pseudo_z_axis) >= 8)
to_chat(src, "<span class='warning'>You trip off of the elevated surface!</span>")
for(var/obj/item/I in held_items)
@@ -1,4 +1,4 @@
/mob/living/proc/adjustStaminaLossBuffered(amount, updating_stamina = TRUE, forced = FALSE)
/mob/living/proc/adjustStaminaLossBuffered(amount, updating_health = TRUE, forced = FALSE)
return
/mob/living/proc/doSprintLossTiles(amount)