This commit is contained in:
kevinz000
2020-01-06 03:57:58 -08:00
parent 7378d91684
commit a8cc37eaf0
10 changed files with 55 additions and 50 deletions
@@ -12,7 +12,7 @@
else
icon_state = "alien[caste]_dead"
else if((stat == UNCONSCIOUS && !asleep) || stat == SOFT_CRIT || IsKnockdown())
else if((stat == UNCONSCIOUS && !asleep) || stat == SOFT_CRIT || _MOBILITYFLAGTEMPORARY_IsParalyzed())
icon_state = "alien[caste]_unconscious"
else if(leap_on_click)
icon_state = "alien[caste]_pounce"
+1 -1
View File
@@ -182,7 +182,7 @@
if(HAS_TRAIT(src, TRAIT_PACIFISM))
to_chat(src, "<span class='notice'>You gently let go of [throwable_mob].</span>")
return
adjustStaminaLossBuffered(25)//CIT CHANGE - throwing an entire person shall be very tiring
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
var/turf/end_T = get_turf(target)
@@ -342,16 +342,14 @@
else if (mood.sanity >= SANITY_DISTURBED)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M)
AdjustStun(-60)
AdjustKnockdown(-60)
AdjustUnconscious(-60)
AdjustSleeping(-100)
AdjustAllImmobility(-60, FALSE)
AdjustUnconscious(-60, FALSE)
AdjustSleeping(-100, FALSE)
if(recoveringstam)
adjustStaminaLoss(-15)
else if(resting)
resting = 0
update_canmove()
set_resting(FALSE, FALSE)
update_mobility()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
@@ -31,7 +31,7 @@
/mob/living/carbon/monkey/handle_mutations_and_radiation()
if(radiation)
if(radiation > RAD_MOB_KNOCKDOWN && prob(RAD_MOB_KNOCKDOWN_PROB))
if(!IsKnockdown())
if(!recoveringstam)
emote("collapse")
DefaultCombatKnockdown(RAD_MOB_KNOCKDOWN_AMOUNT)
to_chat(src, "<span class='danger'>You feel weak.</span>")
+5 -3
View File
@@ -18,7 +18,7 @@
icon_state = "ai"
anchored = TRUE
density = TRUE
canmove = FALSE
mobility_flags = NONE
status_flags = CANSTUN|CANPUSH
a_intent = INTENT_HARM //so we always get pushed instead of trying to swap
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS
@@ -316,8 +316,10 @@
to_chat(src, "<b>You are now [anchored ? "" : "un"]anchored.</b>")
// the message in the [] will change depending whether or not the AI is anchored
/mob/living/silicon/ai/update_canmove() //If the AI dies, mobs won't go through it anymore
return 0
// AIs are immobile
/mob/living/silicon/ai/update_mobility()
mobility_flags = NONE
return NONE
/mob/living/silicon/ai/proc/ai_cancel_call()
set category = "Malfunction"
@@ -91,12 +91,3 @@
add_overlay(fire_overlay)
else
cut_overlay(fire_overlay)
/mob/living/silicon/robot/update_canmove()
if(stat || buckled || lockcharge || resting) //CITADEL EDIT resting dogborg-os
canmove = 0
else
canmove = 1
update_transform()
update_action_buttons_icon()
return canmove
@@ -36,7 +36,7 @@
"<span class='userdanger'>[M] has disabled [src]'s active module!</span>", null, COMBAT_MESSAGE_RANGE)
log_combat(M, src, "disarmed", "[I ? " removing \the [I]" : ""]")
else
Stun(40)
_MOBILITYFLAGTEMPORARY_Paralyze(40)
step(src,get_dir(M,src))
log_combat(M, src, "pushed")
visible_message("<span class='danger'>[M] has forced back [src]!</span>", \
@@ -86,9 +86,9 @@
return
switch(severity)
if(1)
Stun(160)
_MOBILITYFLAGTEMPORARY_Paralyze(160)
if(2)
Stun(60)
_MOBILITYFLAGTEMPORARY_Paralyze(60)
/mob/living/silicon/robot/emag_act(mob/user)
@@ -0,0 +1,14 @@
/mob/living/silicon/robot/update_mobility()
var/newflags = NONE
if(!stat)
if(!resting)
newflags |= MOBILITY_STAND
if(!lockcharge)
newflags |= MOBILITY_MOVE
newflags |= MOBILITY_PULL
if(!lockcharge)
newflags |= (MOBILITY_UI | MOBILITY_STORAGE)
mobility_flags = newflags
update_transform()
update_action_buttons_icon()
return canmove
+24 -24
View File
@@ -235,32 +235,32 @@
return P
//Blanket
/mob/living/proc/AllImmobility(amount, updating)
Paralyze(amount, FALSE)
DefaultCombatKnockdown(amount, FALSE)
Stun(amount, FALSE)
Immobilize(amount, FALSE)
/mob/living/proc/AllImmobility(amount, updating, ignore_canstun = FALSE)
_MOBILITYFLAGTEMPORARY_Paralyze(amount, FALSE, ignore_canstun)
_MOBILITYFLAGTEMPORARY_Knockdown(amount, FALSE, ignore_canstun)
_MOBILITYFLAGTEMPORARY_Stun(amount, FALSE, ignore_canstun)
_MOBILITYFLAGTEMPORARY_Immobilize(amount, FALSE, ignore_canstun)
if(updating)
update_mobility()
/mob/living/proc/SetAllImmobility(amount, updating)
SetParalyzed(amount, FALSE)
SetKnockdown(amount, FALSE)
SetStun(amount, FALSE)
SetImmobilized(amount, FALSE)
/mob/living/proc/SetAllImmobility(amount, updating, ignore_canstun = FALSE)
_MOBILITYFLAGTEMPORARY_SetParalyzed(amount, FALSE, ignore_canstun)
_MOBILITYFLAGTEMPORARY_SetKnockdown(amount, FALSE, ignore_canstun)
_MOBILITYFLAGTEMPORARY_SetStun(amount, FALSE, ignore_canstun)
_MOBILITYFLAGTEMPORARY_SetImmobilized(amount, FALSE, ignore_canstun)
if(updating)
update_mobility()
/mob/living/proc/AdjustAllImmobility(amount, updating)
AdjustParalyzed(amount, FALSE)
AdjustKnockdown(amount, FALSE)
AdjustStun(amount, FALSE)
AdjustImmobilized(amount, FALSE)
/mob/living/proc/AdjustAllImmobility(amount, updating, ignore_canstun = FALSE)
_MOBILITYFLAGTEMPORARY_AdjustParalyzed(amount, FALSE, ignore_canstun)
_MOBILITYFLAGTEMPORARY_AdjustKnockdown(amount, FALSE, ignore_canstun)
_MOBILITYFLAGTEMPORARY_AdjustStun(amount, FALSE, ignore_canstun)
_MOBILITYFLAGTEMPORARY_AdjustImmobilized(amount, FALSE, ignore_canstun)
if(updating)
update_mobility()
//////////////////UNCONSCIOUS
/mob/living/proc/_MOBILITYFLAGTEMPORARY_IsUnconscious() //If we're unconscious
/mob/living/proc/IsUnconscious() //If we're unconscious
return has_status_effect(STATUS_EFFECT_UNCONSCIOUS)
/mob/living/proc/_MOBILITYFLAGTEMPORARY_AmountUnconscious() //How many deciseconds remain in our unconsciousness
@@ -269,7 +269,7 @@
return U.duration - world.time
return 0
/mob/living/proc/_MOBILITYFLAGTEMPORARY_Unconscious(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
/mob/living/proc/Unconscious(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
@@ -280,7 +280,7 @@
U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount, updating)
return U
/mob/living/proc/_MOBILITYFLAGTEMPORARY_SetUnconscious(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
/mob/living/proc/SetUnconscious(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
@@ -294,7 +294,7 @@
U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount, updating)
return U
/mob/living/proc/_MOBILITYFLAGTEMPORARY_AdjustUnconscious(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
/mob/living/proc/AdjustUnconscious(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
@@ -307,16 +307,16 @@
/////////////////////////////////// SLEEPING ////////////////////////////////////
/mob/living/proc/_MOBILITYFLAGTEMPORARY_IsSleeping() //If we're asleep
/mob/living/proc/IsSleeping() //If we're asleep
return has_status_effect(STATUS_EFFECT_SLEEPING)
/mob/living/proc/_MOBILITYFLAGTEMPORARY_AmountSleeping() //How many deciseconds remain in our sleep
/mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S)
return S.duration - world.time
return 0
/mob/living/proc/_MOBILITYFLAGTEMPORARY_Sleeping(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
/mob/living/proc/Sleeping(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun)
@@ -327,7 +327,7 @@
S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount, updating)
return S
/mob/living/proc/_MOBILITYFLAGTEMPORARY_SetSleeping(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
/mob/living/proc/SetSleeping(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun)
@@ -341,7 +341,7 @@
S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount, updating)
return S
/mob/living/proc/_MOBILITYFLAGTEMPORARY_AdjustSleeping(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
/mob/living/proc/AdjustSleeping(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
return
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun)