Merge pull request #10451 from kevinz000/mobility_flags

Mobility flags + combat rework stuff refactoring, fixes a few edge cases including the Oh Dreaded Xenomorph Hardstuns, etc etc time to break the game
This commit is contained in:
deathride58
2020-03-05 20:03:56 -05:00
committed by GitHub
290 changed files with 2244 additions and 1819 deletions

View File

@@ -256,7 +256,7 @@
disabled = new_disabled
owner.update_health_hud() //update the healthdoll
owner.update_body()
owner.update_canmove()
owner.update_mobility()
if(!disabled)
incoming_stam_mult = 1
return TRUE

View File

@@ -124,7 +124,7 @@
C.update_health_hud() //update the healthdoll
C.update_body()
C.update_hair()
C.update_canmove()
C.update_mobility()
if(!Tsec) // Tsec = null happens when a "dummy human" used for rendering icons on prefs screen gets its limbs replaced.
qdel(src)
@@ -298,7 +298,7 @@
C.update_body()
C.update_hair()
C.update_damage_overlays()
C.update_canmove()
C.update_mobility()
/obj/item/bodypart/head/attach_limb(mob/living/carbon/C, special)

View File

@@ -105,11 +105,8 @@
..()
if(crit_fail || !(organ_flags & ORGAN_FAILING))
return
owner.adjustStaminaLoss(-3.5) //Citadel edit, makes it more useful in Stamina based combat
if(owner.AmountStun() > STUN_SET_AMOUNT)
owner.SetStun(STUN_SET_AMOUNT)
if(owner.AmountKnockdown() > STUN_SET_AMOUNT)
owner.SetKnockdown(STUN_SET_AMOUNT)
owner.adjustStaminaLoss(-3.5, FALSE) //Citadel edit, makes it more useful in Stamina based combat
owner.HealAllImmobilityUpTo(STUN_SET_AMOUNT)
/obj/item/organ/cyberimp/brain/anti_stun/emp_act(severity)
. = ..()

View File

@@ -272,7 +272,7 @@
cooldown = COOLDOWN_STUN
for(var/V in listeners)
var/mob/living/L = V
L.Knockdown(60 * power_multiplier)
L.DefaultCombatKnockdown(60 * power_multiplier)
//SLEEP
else if((findtext(message, sleep_words)))
@@ -492,10 +492,10 @@
for(var/V in listeners)
var/mob/living/L = V
if(L.resting)
L.lay_down() //aka get up
L.SetStun(0)
L.SetKnockdown(0)
L.SetUnconscious(0) //i said get up i don't care if you're being tased
L.set_resting(FALSE, FALSE, FALSE)
L.SetAllImmobility(0, FALSE)
L.SetUnconscious(0, FALSE) //i said get up i don't care if you're being tased
L.update_mobility()
//SIT
else if((findtext(message, sit_words)))
@@ -1205,7 +1205,7 @@
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(2 to INFINITY)
L.Knockdown(30 * power_multiplier * E.phase)
L.DefaultCombatKnockdown(30 * power_multiplier * E.phase)
E.cooldown += 8
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You suddenly drop to the ground!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You encourage [L] to drop down to the ground.</i></span>")
@@ -1422,10 +1422,8 @@
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(3 to INFINITY)//Tier 3 only
if(L.resting)
L.lay_down() //aka get up
L.SetStun(0)
L.SetKnockdown(0)
L.set_resting(FALSE, TRUE, FALSE)
L.SetAllImmobility(0)
L.SetUnconscious(0) //i said get up i don't care if you're being tased
E.cooldown += 10 //This could be really strong
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You jump to your feet from sheer willpower!</b></span>"), 5)