patches
This commit is contained in:
@@ -221,7 +221,7 @@
|
||||
/mob/living/carbon/canSuicide()
|
||||
if(!..())
|
||||
return
|
||||
if(IsStun() || IsKnockdown()) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
|
||||
if(!CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_MOVE|MOBILITY_USE)) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
|
||||
to_chat(src, "You can't commit suicide while stunned! ((You can type Ghost instead however.))")
|
||||
return
|
||||
if(restrained())
|
||||
|
||||
@@ -23,8 +23,7 @@ In all, this is a lot like the monkey code. /N
|
||||
if (INTENT_HELP)
|
||||
if(!recoveringstam)
|
||||
resting = 0
|
||||
AdjustStun(-60)
|
||||
AdjustKnockdown(-60)
|
||||
AdjustAllImmobility(-60)
|
||||
AdjustUnconscious(-60)
|
||||
AdjustSleeping(-100)
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake [p_them()] up!</span>")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
for(var/I in overlays_standing)
|
||||
add_overlay(I)
|
||||
|
||||
var/asleep = IsSleeping()
|
||||
var/asleep = _MOBILITYFLAGTEMPORARY_IsSleeping()
|
||||
if(stat == DEAD)
|
||||
//If we mostly took damage from fire
|
||||
if(fireloss > 125)
|
||||
@@ -17,7 +17,7 @@
|
||||
else if(leap_on_click)
|
||||
icon_state = "alien[caste]_pounce"
|
||||
|
||||
else if(lying || resting || asleep)
|
||||
else if(lying || !CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) || asleep)
|
||||
icon_state = "alien[caste]_sleep"
|
||||
else if(mob_size == MOB_SIZE_LARGE)
|
||||
icon_state = "alien[caste]"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
icon_state = "larva[state]_cuff"
|
||||
else if(stat == UNCONSCIOUS || lying || resting)
|
||||
icon_state = "larva[state]_sleep"
|
||||
else if(IsStun())
|
||||
else if(_MOBILTIYFLAGTEMPORARY_IsStun() || _MOBILITYFLAGTEMPORARY_IsParalyzed())
|
||||
icon_state = "larva[state]_stun"
|
||||
else
|
||||
icon_state = "larva[state]"
|
||||
|
||||
@@ -803,7 +803,7 @@
|
||||
if(health <= HEALTH_THRESHOLD_DEAD && !HAS_TRAIT(src, TRAIT_NODEATH))
|
||||
death()
|
||||
return
|
||||
if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT)))
|
||||
if(_MOBILITYFLAGTEMPORARY_IsUnconscious() || _MOBILITYFLAGTEMPORARY_IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT)))
|
||||
stat = UNCONSCIOUS
|
||||
blind_eyes(1)
|
||||
if(combatmode)
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
AdjustSleeping(-100, FALSE)
|
||||
if(recoveringstam)
|
||||
adjustStaminaLoss(-15)
|
||||
else if(resting)
|
||||
else
|
||||
set_resting(FALSE, FALSE)
|
||||
update_mobility()
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
@@ -359,6 +359,12 @@
|
||||
|
||||
|
||||
/mob/living/incapacitated(ignore_restraints, ignore_grab)
|
||||
if(stat)
|
||||
return TRUE
|
||||
if(!CHECK_BITFIELD(mobility_flags, MOBILITY_FLAGS_ANY_INTERACTION))
|
||||
if(!ignore_restraints && restrained(ignore_grab))
|
||||
return TRUE
|
||||
return FALSE
|
||||
if(stat || IsUnconscious() || IsStun() || IsKnockdown() || recoveringstam || (!ignore_restraints && restrained(ignore_grab))) // CIT CHANGE - adds recoveringstam check here
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -88,11 +88,10 @@
|
||||
playsound(src, "bodyfall", 20, 1)
|
||||
return FALSE
|
||||
|
||||
|
||||
/*
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
//Robots, animals and brains have their own version so don't worry about them
|
||||
/mob/living/proc/update_mobility()
|
||||
/*
|
||||
var/stat_softcrit = stat == SOFT_CRIT
|
||||
var/stat_conscious = (stat == CONSCIOUS) || stat_softcrit
|
||||
var/conscious = !IsUnconscious() && stat_conscious && !HAS_TRAIT(src, TRAIT_DEATHCOMA)
|
||||
|
||||
@@ -67,8 +67,7 @@
|
||||
density = FALSE
|
||||
set_light(0)
|
||||
holoform = FALSE
|
||||
if(resting)
|
||||
lay_down()
|
||||
set_resting(FALSE, TRUE)
|
||||
|
||||
/mob/living/silicon/pai/proc/choose_chassis()
|
||||
if(!isturf(loc) && loc != card)
|
||||
|
||||
@@ -1021,7 +1021,7 @@
|
||||
if(health <= -maxHealth) //die only once
|
||||
death()
|
||||
return
|
||||
if(IsUnconscious() || _MOBILITYFLAGTEMPORARY_IsStun() || IsParalyze() || getOxyLoss() > maxHealth*0.5)
|
||||
if(_MOBILITYFLAGTEMPORARY_IsUnconscious() || _MOBILITYFLAGTEMPORARY_IsStun() || _MOBILITYFLAGTEMPORARY_IsParalyze() || getOxyLoss() > maxHealth*0.5)
|
||||
if(stat == CONSCIOUS)
|
||||
stat = UNCONSCIOUS
|
||||
blind_eyes(1)
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
/mob/living/simple_animal/astral/death()
|
||||
icon_state = "shade_dead"
|
||||
Stun(1000)
|
||||
canmove = 0
|
||||
friendly = "deads at"
|
||||
pseudo_death = TRUE
|
||||
incorporeal_move = 0
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/mob/living/simple_animal/pet/cat/update_canmove()
|
||||
..()
|
||||
if(client && stat != DEAD)
|
||||
if (resting)
|
||||
if(!CHECK_BITFIELD(mobility_flags, MOBILITY_STAND))
|
||||
icon_state = "[icon_living]_rest"
|
||||
collar_type = "[initial(collar_type)]_rest"
|
||||
else
|
||||
@@ -173,27 +173,24 @@
|
||||
emote("me", EMOTE_VISIBLE, pick("stretches out for a belly rub.", "wags its tail.", "lies down."))
|
||||
icon_state = "[icon_living]_rest"
|
||||
collar_type = "[initial(collar_type)]_rest"
|
||||
resting = 1
|
||||
update_canmove()
|
||||
set_resting(TRUE)
|
||||
else if (prob(1))
|
||||
emote("me", EMOTE_VISIBLE, pick("sits down.", "crouches on its hind legs.", "looks alert."))
|
||||
icon_state = "[icon_living]_sit"
|
||||
collar_type = "[initial(collar_type)]_sit"
|
||||
resting = 1
|
||||
update_canmove()
|
||||
set_resting(TRUE)
|
||||
else if (prob(1))
|
||||
if (resting)
|
||||
emote("me", EMOTE_VISIBLE, pick("gets up and meows.", "walks around.", "stops resting."))
|
||||
icon_state = "[icon_living]"
|
||||
collar_type = "[initial(collar_type)]"
|
||||
resting = 0
|
||||
update_canmove()
|
||||
set_resting(FALSE)
|
||||
else
|
||||
emote("me", EMOTE_VISIBLE, pick("grooms its fur.", "twitches its whiskers.", "shakes out its coat."))
|
||||
|
||||
//MICE!
|
||||
if((src.loc) && isturf(src.loc))
|
||||
if(!stat && !resting && !buckled)
|
||||
if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled)
|
||||
for(var/mob/living/simple_animal/mouse/M in view(1,src))
|
||||
if(!M.stat && Adjacent(M))
|
||||
emote("me", EMOTE_VISIBLE, "splats \the [M]!")
|
||||
@@ -210,7 +207,7 @@
|
||||
|
||||
make_babies()
|
||||
|
||||
if(!stat && !resting && !buckled)
|
||||
if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 5)
|
||||
walk_to(src,0)
|
||||
@@ -320,7 +317,6 @@
|
||||
if (pseudo_death == TRUE) //secret cat chem
|
||||
icon_state = "custom_cat_dead"
|
||||
Stun(1000)
|
||||
canmove = 0
|
||||
friendly = "deads at"
|
||||
return
|
||||
else
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
..()
|
||||
|
||||
//Feeding, chasing food, FOOOOODDDD
|
||||
if(!stat && !resting && !buckled)
|
||||
if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 5)
|
||||
turns_since_scan = 0
|
||||
@@ -621,7 +621,7 @@
|
||||
|
||||
make_babies()
|
||||
|
||||
if(!stat && !resting && !buckled)
|
||||
if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled)
|
||||
if(prob(1))
|
||||
emote("me", EMOTE_VISIBLE, pick("dances around.","chases her tail."))
|
||||
spawn(0)
|
||||
@@ -631,8 +631,7 @@
|
||||
|
||||
/mob/living/simple_animal/pet/dog/pug/Life()
|
||||
..()
|
||||
|
||||
if(!stat && !resting && !buckled)
|
||||
if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled)
|
||||
if(prob(1))
|
||||
emote("me", EMOTE_VISIBLE, pick("chases its tail."))
|
||||
spawn(0)
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/handle_automated_movement()
|
||||
if(!isturf(src.loc) || !canmove || buckled)
|
||||
if(!isturf(loc) || !CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) || buckled)
|
||||
return //If it can't move, dont let it move. (The buckled check probably isn't necessary thanks to canmove)
|
||||
|
||||
if(client && stat == CONSCIOUS && parrot_state != icon_living)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
/mob/living/simple_animal/proc/handle_automated_movement()
|
||||
set waitfor = FALSE
|
||||
if(!stop_automated_movement && wander)
|
||||
if((isturf(src.loc) || allow_movement_on_non_turfs) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
|
||||
if((isturf(src.loc) || allow_movement_on_non_turfs) && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
|
||||
turns_since_move++
|
||||
if(turns_since_move >= turns_per_move)
|
||||
if(!(stop_automated_movement_when_pulled && pulledby)) //Some animals don't move when pulled
|
||||
|
||||
@@ -236,10 +236,10 @@
|
||||
|
||||
//Blanket
|
||||
/mob/living/proc/AllImmobility(amount, updating, ignore_canstun = FALSE)
|
||||
_MOBILITYFLAGTEMPORARY_Paralyze(amount, FALSE, ignore_canstun)
|
||||
Paralyze(amount, FALSE, ignore_canstun)
|
||||
_MOBILITYFLAGTEMPORARY_Knockdown(amount, FALSE, ignore_canstun)
|
||||
_MOBILITYFLAGTEMPORARY_Stun(amount, FALSE, ignore_canstun)
|
||||
_MOBILITYFLAGTEMPORARY_Immobilize(amount, FALSE, ignore_canstun)
|
||||
Stun(amount, FALSE, ignore_canstun)
|
||||
Immobilize(amount, FALSE, ignore_canstun)
|
||||
if(updating)
|
||||
update_mobility()
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
return has_status_effect(STATUS_EFFECT_UNCONSCIOUS)
|
||||
|
||||
/mob/living/proc/AmountUnconscious() //How many deciseconds remain in our unconsciousness
|
||||
var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
|
||||
var/datum/status_effect/incapacitating/unconscious/U = _MOBILITYFLAGTEMPORARY_IsUnconscious()
|
||||
if(U)
|
||||
return U.duration - world.time
|
||||
return 0
|
||||
@@ -297,7 +297,7 @@
|
||||
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)
|
||||
var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
|
||||
var/datum/status_effect/incapacitating/unconscious/U = _MOBILITYFLAGTEMPORARY_IsUnconscious()
|
||||
if(amount <= 0)
|
||||
if(U)
|
||||
qdel(U)
|
||||
@@ -311,7 +311,7 @@
|
||||
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)
|
||||
var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
|
||||
var/datum/status_effect/incapacitating/unconscious/U = _MOBILITYFLAGTEMPORARY_IsUnconscious()
|
||||
if(U)
|
||||
U.duration += amount
|
||||
else if(amount > 0)
|
||||
@@ -324,7 +324,7 @@
|
||||
return has_status_effect(STATUS_EFFECT_SLEEPING)
|
||||
|
||||
/mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep
|
||||
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
|
||||
var/datum/status_effect/incapacitating/sleeping/S = _MOBILITYFLAGTEMPORARY_IsSleeping()
|
||||
if(S)
|
||||
return S.duration - world.time
|
||||
return 0
|
||||
@@ -333,7 +333,7 @@
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun)
|
||||
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
|
||||
var/datum/status_effect/incapacitating/sleeping/S = _MOBILITYFLAGTEMPORARY_IsSleeping()
|
||||
if(S)
|
||||
S.duration = max(world.time + amount, S.duration)
|
||||
else if(amount > 0)
|
||||
@@ -358,7 +358,7 @@
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
|
||||
return
|
||||
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun)
|
||||
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
|
||||
var/datum/status_effect/incapacitating/sleeping/S = _MOBILITYFLAGTEMPORARY_IsSleeping()
|
||||
if(S)
|
||||
S.duration += amount
|
||||
else if(amount > 0)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/eye_blurry = 0 //Carbon
|
||||
var/real_name = null
|
||||
var/spacewalk = FALSE
|
||||
var/resting = 0 //Carbon
|
||||
var/_MOBILITYFLAGTEMPORARY_resting = 0 //Carbon
|
||||
var/lying = 0
|
||||
var/lying_prev = 0
|
||||
|
||||
|
||||
@@ -72,9 +72,9 @@
|
||||
///Set the mobs blurriness of vision to an amount
|
||||
/mob/proc/set_blurriness(amount)
|
||||
eye_blurry = max(amount, 0)
|
||||
update_eye_blur()
|
||||
update_eyeblur()
|
||||
|
||||
/mob/proc/update_eye_blur()
|
||||
/mob/proc/update_eyeblur()
|
||||
remove_eyeblur()
|
||||
add_eyeblur()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user