why am i doing this
This commit is contained in:
@@ -602,14 +602,27 @@
|
||||
remove_movespeed_modifier(/datum/movespeed_modifier/carbon_softcrit)
|
||||
|
||||
/mob/living/carbon/update_stamina()
|
||||
var/stam = getStaminaLoss()
|
||||
if(stam > DAMAGE_PRECISION)
|
||||
var/total_health = (maxHealth - stam)
|
||||
if(total_health <= crit_threshold && !stat)
|
||||
if(CHECK_MOBILITY(src, MOBILITY_STAND))
|
||||
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
|
||||
KnockToFloor(TRUE)
|
||||
update_health_hud()
|
||||
var/total_health = getStaminaLoss()
|
||||
if(total_health >= STAMINA_SOFTCRIT)
|
||||
if(!(combat_flags & COMBAT_FLAG_SOFT_STAMCRIT))
|
||||
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_SOFT_STAMCRIT)
|
||||
else
|
||||
if(combat_flags & COMBAT_FLAG_SOFT_STAMCRIT)
|
||||
DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_SOFT_STAMCRIT)
|
||||
if(total_health)
|
||||
if(!(combat_flags & COMBAT_FLAG_HARD_STAMCRIT) && total_health >= STAMINA_CRIT && !stat)
|
||||
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
|
||||
set_resting(TRUE, FALSE, FALSE)
|
||||
SEND_SIGNAL(src, COMSIG_DISABLE_COMBAT_MODE)
|
||||
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_HARD_STAMCRIT)
|
||||
filters += CIT_FILTER_STAMINACRIT
|
||||
update_mobility()
|
||||
if((combat_flags & COMBAT_FLAG_HARD_STAMCRIT) && total_health <= STAMINA_SOFTCRIT)
|
||||
to_chat(src, "<span class='notice'>You don't feel nearly as exhausted anymore.</span>")
|
||||
DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_HARD_STAMCRIT | COMBAT_FLAG_SOFT_STAMCRIT)
|
||||
filters -= CIT_FILTER_STAMINACRIT
|
||||
update_mobility()
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/carbon/update_sight()
|
||||
if(!client)
|
||||
|
||||
@@ -1462,9 +1462,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
if(!(attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK))
|
||||
if(HAS_TRAIT(user, TRAIT_PUGILIST))//CITADEL CHANGE - makes punching cause staminaloss but funny martial artist types get a discount
|
||||
user.adjustStaminaLossBuffered(1.5)
|
||||
else
|
||||
user.adjustStaminaLossBuffered(3.5)
|
||||
if(!user.UseStaminaBuffer(1.5, warn = TRUE))
|
||||
return
|
||||
else if(!user.UseStaminaBuffer(3.5, warn = TRUE))
|
||||
return
|
||||
|
||||
if(attacker_style && attacker_style.harm_act(user,target))
|
||||
return TRUE
|
||||
@@ -1592,6 +1593,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
return FALSE
|
||||
|
||||
else if(aim_for_mouth && ( target_on_help || target_restrained || target_aiming_for_mouth))
|
||||
if(!UseStaminaBuffer(3, warn = TRUE))
|
||||
return
|
||||
playsound(target.loc, 'sound/weapons/slap.ogg', 50, 1, -1)
|
||||
|
||||
target.visible_message(\
|
||||
@@ -1599,7 +1602,6 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
"<span class='notice'>[user] slaps you in the face! </span>",\
|
||||
"You hear a slap.", target = user, target_message = "<span class='notice'>You slap [user == target ? "yourself" : "\the [target]"] in the face! </span>")
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_FACE_SLAP)
|
||||
user.adjustStaminaLossBuffered(3)
|
||||
if (!HAS_TRAIT(target, TRAIT_PERMABONER))
|
||||
stop_wagging_tail(target)
|
||||
return FALSE
|
||||
@@ -1607,8 +1609,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(target.client?.prefs.cit_toggles & NO_ASS_SLAP)
|
||||
to_chat(user,"A force stays your hand, preventing you from slapping \the [target]'s ass!")
|
||||
return FALSE
|
||||
if(!user.UseStaminaBuffer(3, warn = TRUE))
|
||||
return FALSE
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_ASS_SLAP)
|
||||
user.adjustStaminaLossBuffered(3)
|
||||
target.adjust_arousal(20,maso = TRUE)
|
||||
if (ishuman(target) && HAS_TRAIT(target, TRAIT_MASO) && target.has_dna() && prob(10))
|
||||
target.mob_climax(forced_climax=TRUE)
|
||||
@@ -1626,9 +1629,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_PUGILIST))//CITADEL CHANGE - makes disarmspam cause staminaloss, pugilists can do it almost effortlessly
|
||||
user.adjustStaminaLossBuffered(1)
|
||||
if(!user.UseStaminaBuffer(1, warn = TRUE))
|
||||
return
|
||||
else
|
||||
user.adjustStaminaLossBuffered(3)
|
||||
if(!user.UseStaminaBuffer(1, warn = TRUE))
|
||||
return
|
||||
|
||||
if(attacker_style && attacker_style.disarm_act(user,target))
|
||||
return TRUE
|
||||
@@ -1890,8 +1895,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
else
|
||||
if(user == target)
|
||||
return
|
||||
if(!user.UseStaminaBuffer(4, warn = TRUE))
|
||||
return
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
|
||||
user.adjustStaminaLossBuffered(4)
|
||||
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
|
||||
if(target.w_uniform)
|
||||
|
||||
@@ -1241,7 +1241,7 @@
|
||||
SetUnconscious(clamp_unconscious_to)
|
||||
HealAllImmobilityUpTo(clamp_immobility_to)
|
||||
adjustStaminaLoss(min(0, -stamina_boost))
|
||||
adjustStaminaLossBuffered(min(0, -stamina_buffer_boost))
|
||||
RechargeStaminaBuffer(stamina_buffer_boost)
|
||||
if(scale_stamina_loss_recovery)
|
||||
adjustStaminaLoss(min(-((getStaminaLoss() - stamina_loss_recovery_bypass) * scale_stamina_loss_recovery), 0))
|
||||
if(put_on_feet)
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
var/held_index = C.get_held_index_of_item(src)
|
||||
var/obj/item/bodypart/BP = C.hand_bodyparts[held_index]
|
||||
if(!BP?.body_zone)
|
||||
return C.adjustStaminaLossBuffered(stamina_amount) //nah
|
||||
return C.adjustStaminaLoss(stamina_amount) //nah
|
||||
var/zone = BP.body_zone
|
||||
var/stamina_to_zone = data.block_stamina_limb_ratio * stamina_amount
|
||||
var/stamina_to_chest = stamina_amount - stamina_to_zone
|
||||
@@ -194,9 +194,9 @@
|
||||
stamina_to_chest -= stamina_buffered
|
||||
C.apply_damage(stamina_to_zone, STAMINA, zone)
|
||||
C.apply_damage(stamina_to_chest, STAMINA, BODY_ZONE_CHEST)
|
||||
C.adjustStaminaLossBuffered(stamina_buffered)
|
||||
C.adjustStaminaLoss(stamina_buffered)
|
||||
else
|
||||
owner.adjustStaminaLossBuffered(stamina_amount)
|
||||
owner.adjustStaminaLoss(stamina_amount)
|
||||
|
||||
/obj/item/proc/on_active_block(mob/living/owner, atom/object, damage, damage_blocked, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction)
|
||||
return
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
|
||||
|
||||
var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out.
|
||||
var/timeofdeath = 0
|
||||
|
||||
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
|
||||
@@ -148,9 +149,6 @@
|
||||
var/combatmessagecooldown = 0
|
||||
|
||||
var/incomingstammult = 1
|
||||
var/bufferedstam = 0
|
||||
var/stambuffer = 20
|
||||
var/stambufferregentime
|
||||
|
||||
//Sprint buffer---
|
||||
var/sprint_buffer = 42 //Tiles
|
||||
@@ -159,3 +157,17 @@
|
||||
var/sprint_buffer_regen_last = 0 //last world.time this was regen'd for math.
|
||||
var/sprint_stamina_cost = 0.70 //stamina loss per tile while insufficient sprint buffer.
|
||||
//---End
|
||||
|
||||
// Stamina Buffer---
|
||||
/// Our maximum stamina buffer
|
||||
var/stamina_buffer_max = STAMINA_BUFFER_CAPACITY
|
||||
/// Our stamina buffer
|
||||
var/stamina_buffer = STAMINA_BUFFER_CAPACITY
|
||||
/// Stamina buffer regen modifier
|
||||
var/stamina_buffer_regen_mod = 1
|
||||
/// Standard stamina buffer regen per second
|
||||
var/stamina_buffer_regen = STAMINA_BUFFER_REGEN_PER_SECOND
|
||||
/// Standard stamina buffer regen per second with combat mode
|
||||
var/stamina_buffer_regen_combat = STAMINA_BUFFER_REGEN_PER_SECOND_COMBAT
|
||||
/// Last time stamina buffer regen was done
|
||||
var/stamina_buffer_regen_last = 0
|
||||
|
||||
@@ -1114,10 +1114,6 @@
|
||||
bellyup = 1
|
||||
update_icons()
|
||||
|
||||
/mob/living/silicon/robot/adjustStaminaLossBuffered(amount, updating_health = 1)
|
||||
if(istype(cell))
|
||||
cell.charge -= amount*5
|
||||
|
||||
/mob/living/silicon/robot/verb/viewmanifest()
|
||||
set category = "Robot Commands"
|
||||
set name = "View Crew Manifest"
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Attempts to use an amount of stamina from our stamina buffer.
|
||||
* Does not use anything if we don't have enough.
|
||||
*
|
||||
* Returns TRUE or FALSE based on if we have it.
|
||||
*/
|
||||
/mob/living/proc/UseStaminaBuffer(amount, warn = FALSE)
|
||||
if(!(combat_flags & COMBAT_FLAG_STAMINA_BUFFER))
|
||||
return TRUE
|
||||
if(stamina_buffer < amount)
|
||||
if(warn)
|
||||
to_chat(src, "<span class='warning'>You do not have enough action stamina to do that!</span>")
|
||||
return
|
||||
return FALSE
|
||||
stamina_buffer -= amount
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Updates our stamina buffer amount.
|
||||
*/
|
||||
/mob/living/proc/UpdateStaminaBuffer(updating_hud = TRUE)
|
||||
var/time = world.time - stamina_buffer_regen_last
|
||||
if(time <= 0)
|
||||
return
|
||||
stamina_buffer_regen_last = time
|
||||
var/penalized
|
||||
@@ -153,8 +153,8 @@
|
||||
shake_camera(user, recoil + 1, recoil)
|
||||
|
||||
if(stam_cost) //CIT CHANGE - makes gun recoil cause staminaloss
|
||||
var/safe_cost = clamp(stam_cost, 0, STAMINA_NEAR_CRIT - user.getStaminaLoss())*(firing && burst_size >= 2 ? 1/burst_size : 1)
|
||||
user.adjustStaminaLossBuffered(safe_cost) //CIT CHANGE - ditto
|
||||
var/safe_cost = clamp(stam_cost, 0, user.stamina_buffer)*(firing && burst_size >= 2 ? 1/burst_size : 1)
|
||||
user.UseStaminaBuffer(safe_cost)
|
||||
|
||||
if(suppressed)
|
||||
playsound(user, fire_sound, 10, 1)
|
||||
|
||||
@@ -44,10 +44,9 @@
|
||||
if(HAS_TRAIT(user, TRAIT_FAST_PUMP))
|
||||
recentpump = world.time + 2
|
||||
else
|
||||
if(!user.UseStaminaBuffer(2, warn = TRUE))
|
||||
return
|
||||
recentpump = world.time + 10
|
||||
if(istype(user))//CIT CHANGE - makes pumping shotguns cost a lil bit of stamina.
|
||||
user.adjustStaminaLossBuffered(2) //CIT CHANGE - DITTO. make this scale inversely to the strength stat when stats/skills are added
|
||||
return
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/blow_up(mob/user)
|
||||
. = 0
|
||||
|
||||
Reference in New Issue
Block a user