compile
This commit is contained in:
@@ -359,7 +359,7 @@ GLOBAL_LIST_EMPTY(species_list)
|
||||
checked_health["health"] = health
|
||||
return ..()
|
||||
|
||||
/proc/do_after(mob/user, var/delay, needhand = 1, atom/target = null, progress = 1, datum/callback/extra_checks = null)
|
||||
/proc/do_after(mob/user, var/delay, needhand = 1, atom/target = null, progress = 1, datum/callback/extra_checks = null, required_mobility_flags = (MOBILITY_STAND|MOBILITY_USE|MOBILITY_MOVE))
|
||||
if(!user)
|
||||
return 0
|
||||
var/atom/Tloc = null
|
||||
@@ -396,7 +396,7 @@ GLOBAL_LIST_EMPTY(species_list)
|
||||
drifting = 0
|
||||
Uloc = user.loc
|
||||
|
||||
if(QDELETED(user) || user.stat || user.IsKnockdown() || user.IsStun() || (!drifting && user.loc != Uloc) || (extra_checks && !extra_checks.Invoke()))
|
||||
if(QDELETED(user) || user.stat || !CHECK_ALL_MOBILITY(user, required_mobility_flags) || (!drifting && user.loc != Uloc) || (extra_checks && !extra_checks.Invoke()))
|
||||
. = 0
|
||||
break
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
if(DEAD)
|
||||
to_chat(user, "<span class='notice'>You cannot [key] while dead.</span>")
|
||||
return FALSE
|
||||
if(restraint_check && (user.IsStun() || user.IsKnockdown()))
|
||||
if(restraint_check && !CHECK_MOBILITY(user, MOBILITY_MOVE))
|
||||
if(!intentional)
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You cannot [key] while stunned.</span>")
|
||||
|
||||
@@ -91,7 +91,8 @@ Buildable meters
|
||||
set name = "Flip Pipe"
|
||||
set src in view(1)
|
||||
|
||||
if ( usr.stat || usr.restrained() || !usr.canmove )
|
||||
var/mob/living/L = usr
|
||||
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||
return
|
||||
|
||||
do_a_flip()
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
M.buckled = src
|
||||
M.setDir(dir)
|
||||
buckled_mobs |= M
|
||||
M.update_canmove()
|
||||
M.update_mobility()
|
||||
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
|
||||
post_buckle_mob(M)
|
||||
|
||||
|
||||
@@ -177,14 +177,13 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!isturf(loc) || usr.stat || usr.restrained() || !usr.canmove)
|
||||
var/mob/living/L = usr
|
||||
if(!istype(L) || !isturf(loc) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||
return
|
||||
|
||||
var/turf/T = src.loc
|
||||
|
||||
src.loc = null
|
||||
|
||||
src.loc = T
|
||||
var/turf/T = loc
|
||||
loc = null
|
||||
loc = T
|
||||
|
||||
/obj/item/examine(mob/user) //This might be spammy. Remove?
|
||||
. = ..()
|
||||
|
||||
@@ -64,8 +64,7 @@
|
||||
/obj/item/banner/proc/inspiration(mob/living/carbon/human/H)
|
||||
H.adjustBruteLoss(-15)
|
||||
H.adjustFireLoss(-15)
|
||||
H.AdjustStun(-40)
|
||||
H.AdjustKnockdown(-40)
|
||||
H.AdjustAllImmobility(-40)
|
||||
H.AdjustUnconscious(-40)
|
||||
playsound(H, 'sound/magic/staff_healing.ogg', 25, FALSE)
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", \
|
||||
"<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
|
||||
if(M.resting && !M.recoveringstam)
|
||||
if(!CHECK_MOBILITY(M, MOBILITY_STAND) && !M.recoveringstam)
|
||||
M.set_resting(FALSE, TRUE)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
if(!climbable)
|
||||
return
|
||||
if(user == O && iscarbon(O))
|
||||
if(user.canmove)
|
||||
var/mob/living/L = O
|
||||
if(CHECK_MOBILITY(O, MOBILITY_MOVE))
|
||||
climb_structure(user)
|
||||
return
|
||||
if(!istype(O, /obj/item) || user.get_active_held_item() != O)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
//pod insertion
|
||||
/obj/structure/transit_tube/station/MouseDrop_T(obj/structure/c_transit_tube_pod/R, mob/living/user)
|
||||
if(!istype(user) || !CHECK_MOBILLITY(user, MOBILITY_USE))
|
||||
if(!istype(user) || !CHECK_MOBILITY(user, MOBILITY_USE))
|
||||
return
|
||||
if(!istype(R) || get_dist(user, src) > 1 || get_dist(src,R) > 1)
|
||||
return
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
// Incap?
|
||||
if(must_be_capacitated)
|
||||
var/mob/living/L = owner
|
||||
if (L.incapacitated(TRUE, TRUE) || L.resting && !can_be_immobilized)
|
||||
if (L.incapacitated(TRUE, TRUE) || !CHECK_MOBILITY(L, MOBILITY_STAND) && !can_be_immobilized)
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>Not while you're incapacitated!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -96,9 +96,9 @@
|
||||
// TELEPORT: Move to Coffin & Close it!
|
||||
do_teleport(owner, bloodsuckerdatum.coffin, no_effects = TRUE, forced = TRUE, channel = TELEPORT_CHANNEL_QUANTUM) // in teleport.dm?
|
||||
// SLEEP
|
||||
user.resting = TRUE
|
||||
user.set_resting(TRUE, TRUE, FALSE)
|
||||
//user.Unconscious(30,0)
|
||||
user.Stun(30,1)
|
||||
user.Stun(30, TRUE)
|
||||
// CLOSE LID: If fail, force me in.
|
||||
if (!bloodsuckerdatum.coffin.close(owner))
|
||||
bloodsuckerdatum.coffin.insert(owner) // Puts me inside.
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
to_chat(owner, "<span class='warning'>You must be facing your victim.</span>")
|
||||
return FALSE
|
||||
// Check: Target facing me?
|
||||
if (!target.resting && !is_A_facing_B(target,owner))
|
||||
if (CHECK_MOBILITY(target, MOBILITY_STAND) && !is_A_facing_B(target,owner))
|
||||
if (display_error)
|
||||
to_chat(owner, "<span class='warning'>Your victim must be facing you to see into your eyes.</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
user.tod = STATION_TIME_TIMESTAMP("hh:mm:ss")
|
||||
user.fakedeath("changeling") //play dead
|
||||
user.update_stat()
|
||||
user.update_canmove()
|
||||
|
||||
addtimer(CALLBACK(src, .proc/ready_to_regenerate, user), LING_FAKEDEATH_TIME, TIMER_UNIQUE)
|
||||
return TRUE
|
||||
|
||||
@@ -965,7 +965,7 @@
|
||||
return FALSE
|
||||
if(hallucinating())
|
||||
return TRUE
|
||||
if(IsSleeping())
|
||||
if(_REFACTORING_IsSleeping())
|
||||
return TRUE
|
||||
if(HAS_TRAIT(src, TRAIT_DUMB))
|
||||
return TRUE
|
||||
|
||||
@@ -1843,8 +1843,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
to_chat(user, "<span class='notice'>You can only force yourself up if you're on the ground.</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] forces [p_them()]self up to [p_their()] feet!</span>", "<span class='notice'>You force yourself up to your feet!</span>")
|
||||
user.resting = 0
|
||||
user.update_canmove()
|
||||
user.set_resting(FALSE, TRUE)
|
||||
user.adjustStaminaLossBuffered(user.stambuffer) //Rewards good stamina management by making it easier to instantly get up from resting
|
||||
playsound(user, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
@@ -1884,7 +1883,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
//Thank you based whoneedsspace
|
||||
target_collateral_human = locate(/mob/living/carbon/human) in target_shove_turf.contents
|
||||
if(target_collateral_human && !target_collateral_human.resting)
|
||||
if(target_collateral_human && CHECK_MOBILITY(target_collateral_human, MOBILITY_STAND))
|
||||
shove_blocked = TRUE
|
||||
else
|
||||
target_collateral_human = null
|
||||
|
||||
@@ -506,7 +506,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
|
||||
/mob/living/carbon/handle_status_effects()
|
||||
..()
|
||||
if(getStaminaLoss() && !combatmode)//CIT CHANGE - prevents stamina regen while combat mode is active
|
||||
adjustStaminaLoss(resting ? (recoveringstam ? -7.5 : -6) : -3)//CIT CHANGE - decreases adjuststaminaloss to stop stamina damage from being such a joke
|
||||
adjustStaminaLoss(!CHECK_MOBILITY(src, MOBILITY_STAND) ? (recoveringstam ? -7.5 : -6) : -3)//CIT CHANGE - decreases adjuststaminaloss to stop stamina damage from being such a joke
|
||||
|
||||
if(!recoveringstam && incomingstammult != 1)
|
||||
incomingstammult = max(0.01, incomingstammult)
|
||||
@@ -519,7 +519,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
|
||||
adjustStaminaLoss(drainrate*0.5)
|
||||
//END OF CIT CHANGES
|
||||
|
||||
var/restingpwr = 1 + 4 * resting
|
||||
var/restingpwr = 1 + 4 * !CHECK_MOBILITY(src, MOBILITY_STAND)
|
||||
|
||||
//Dizziness
|
||||
if(dizziness)
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
return TRUE
|
||||
attemptingcrawl = TRUE
|
||||
visible_message("<span class='notice'>[src] is attempting to crawl under [L].</span>", "<span class='notice'>You are now attempting to crawl under [L].</span>")
|
||||
if(!do_after(src, CRAWLUNDER_DELAY, target = src) || !resting)
|
||||
if(!do_after(src, CRAWLUNDER_DELAY, target = src) || CHECK_MOBILITY(src, MOBILITY_STAND))
|
||||
attemptingcrawl = FALSE
|
||||
return TRUE
|
||||
var/src_passmob = (pass_flags & PASSMOB)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
|
||||
var/restrained = restrained()
|
||||
var/pinned = _REFACTORING_resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
|
||||
var/canmove = !IsImmobilized() && !stun && conscious && !paralyze && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && (has_arms || ignore_legs || has_legs) && !pinned
|
||||
var/canmove = !immobilize && !stun && conscious && !paralyze && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && (has_arms || ignore_legs || has_legs) && !pinned
|
||||
|
||||
if(canmove)
|
||||
mobility_flags |= MOBILITY_MOVE
|
||||
|
||||
@@ -213,7 +213,7 @@ Auto Patrol: []"},
|
||||
return
|
||||
if(iscarbon(A))
|
||||
var/mob/living/carbon/C = A
|
||||
if(C.canmove || arrest_type) // CIT CHANGE - makes sentient secbots check for canmove rather than !isstun.
|
||||
if(CHECK_MOBILITY(C, MOBILITY_MOVE|MOBILITY_USE|MOBILITY_STAND) || arrest_type) // CIT CHANGE - makes sentient secbots check for canmove rather than !isstun.
|
||||
stun_attack(A)
|
||||
else if(C.canBeHandcuffed() && !C.handcuffed)
|
||||
cuff(A)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/simple_animal/slime/proc/update_mobility()
|
||||
/mob/living/simple_animal/slime/update_mobility()
|
||||
. = ..()
|
||||
if(Tempstun && !buckled)
|
||||
DISABLE_BITFIELD(., MOBILITY_MOVE)
|
||||
|
||||
@@ -29,9 +29,8 @@
|
||||
dropItemToGround(W)
|
||||
|
||||
//Make mob invisible and spawn animation
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
Stun(22, ignore_canstun = TRUE)
|
||||
notransform = TRUE
|
||||
Stun(INFINITY, ignore_canstun = TRUE)
|
||||
icon = null
|
||||
cut_overlays()
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
addiction_tick++
|
||||
if(C && need_mob_update) //some of the metabolized reagents had effects on the mob that requires some updates.
|
||||
C.updatehealth()
|
||||
C.update_canmove()
|
||||
C.update_mobility()
|
||||
C.update_stamina()
|
||||
update_total()
|
||||
|
||||
|
||||
@@ -243,8 +243,7 @@
|
||||
/datum/reagent/teslium/energized_jelly/on_mob_life(mob/living/carbon/M)
|
||||
if(isjellyperson(M))
|
||||
shock_timer = 0 //immune to shocks
|
||||
M.AdjustStun(-40, 0)
|
||||
M.AdjustKnockdown(-40, 0)
|
||||
M.AdjustAllImmobility(-40, 0)
|
||||
M.AdjustUnconscious(-40, 0)
|
||||
M.adjustStaminaLoss(-2, 0)
|
||||
if(isluminescent(M))
|
||||
|
||||
Reference in New Issue
Block a user