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:
@@ -21,6 +21,6 @@
|
||||
target.gib(1, 1)
|
||||
else
|
||||
target.adjustBruteLoss(min(99,(target.health - 1)))
|
||||
target.Knockdown(400)
|
||||
target.DefaultCombatKnockdown(400)
|
||||
target.stuttering = 20
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"emagged" = borg.emagged,
|
||||
"active_module" = "[borg.module.type]",
|
||||
"lawupdate" = borg.lawupdate,
|
||||
"lockdown" = borg.lockcharge,
|
||||
"lockdown" = borg.locked_down,
|
||||
"scrambledcodes" = borg.scrambledcodes
|
||||
)
|
||||
.["upgrades"] = list()
|
||||
@@ -122,8 +122,8 @@
|
||||
message_admins("[key_name_admin(user)] disabled lawsync on [ADMIN_LOOKUPFLW(borg)].")
|
||||
log_admin("[key_name(user)] disabled lawsync on [key_name(borg)].")
|
||||
if ("toggle_lockdown")
|
||||
borg.SetLockdown(!borg.lockcharge)
|
||||
if (borg.lockcharge)
|
||||
borg.SetLockdown(!borg.locked_down)
|
||||
if (borg.locked_down)
|
||||
message_admins("[key_name_admin(user)] locked down [ADMIN_LOOKUPFLW(borg)].")
|
||||
log_admin("[key_name(user)] locked down [key_name(borg)].")
|
||||
else
|
||||
|
||||
@@ -116,14 +116,13 @@
|
||||
var/mob/living/carbon/human/M = loc
|
||||
M.adjustStaminaLoss(-75)
|
||||
M.SetUnconscious(0)
|
||||
M.SetStun(0)
|
||||
M.SetKnockdown(0)
|
||||
M.SetAllImmobility(0)
|
||||
combat_cooldown = 0
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/vest/process()
|
||||
combat_cooldown++
|
||||
if(combat_cooldown==initial(combat_cooldown))
|
||||
if(combat_cooldown == initial(combat_cooldown))
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/Destroy()
|
||||
@@ -512,7 +511,7 @@
|
||||
L.lastattackerckey = user.ckey
|
||||
|
||||
L.adjustStaminaLoss(35) //because previously it took 5-6 hits to actually "incapacitate" someone for the purposes of the sleep inducement
|
||||
L.Knockdown(140)
|
||||
L.DefaultCombatKnockdown(140)
|
||||
L.apply_effect(EFFECT_STUTTER, 7)
|
||||
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
|
||||
|
||||
// organ_internal.dm -- /obj/item/organ
|
||||
|
||||
|
||||
|
||||
// Do I have a stake in my heart?
|
||||
/mob/living/AmStaked()
|
||||
var/obj/item/bodypart/BP = get_bodypart("chest")
|
||||
@@ -13,16 +9,14 @@
|
||||
if (istype(I,/obj/item/stake/))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/proc/AmStaked()
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/living/proc/StakeCanKillMe()
|
||||
return IsSleeping() || stat >= UNCONSCIOUS || blood_volume <= 0 || HAS_TRAIT(src, TRAIT_DEATHCOMA) // NOTE: You can't go to sleep in a coffin with a stake in you.
|
||||
|
||||
|
||||
///obj/item/weapon/melee/stake
|
||||
/obj/item/stake/
|
||||
/obj/item/stake
|
||||
name = "wooden stake"
|
||||
desc = "A simple wooden stake carved to a sharp point."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
@@ -112,8 +106,7 @@
|
||||
|
||||
// Can this target be staked? If someone stands up before this is complete, it fails. Best used on someone stationary.
|
||||
/mob/living/carbon/proc/can_be_staked()
|
||||
//return resting || IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (has_trait(TRAIT_FAKEDEATH)) || resting || IsStun() || IsFrozen() || (pulledby && pulledby.grab_state >= GRAB_NECK)
|
||||
return (resting || lying || IsUnconscious() || pulledby && pulledby.grab_state >= GRAB_NECK)
|
||||
return !CHECK_MOBILITY(src, MOBILITY_STAND)
|
||||
// ABOVE: Taken from update_mobility() in living.dm
|
||||
|
||||
/obj/item/stake/hardened
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
buckled_mob.pixel_y = buckled_mob.get_standard_pixel_y_offset(180)
|
||||
src.visible_message(text("<span class='danger'>[buckled_mob][buckled_mob.stat==DEAD?"'s corpse":""] slides off of the rack.</span>"))
|
||||
density = FALSE
|
||||
buckled_mob.AdjustKnockdown(30)
|
||||
buckled_mob.DefaultCombatKnockdown(30)
|
||||
update_icon()
|
||||
useLock = FALSE // Failsafe
|
||||
|
||||
|
||||
@@ -72,8 +72,7 @@
|
||||
if(rand(5 + powerlevel) >= 5)
|
||||
target.visible_message("<span class='danger'>[user] lands a vicious punch, sending [target] away!</span>", \
|
||||
"<span class='userdanger'>[user] has landed a horrifying punch on you, sending you flying!!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.Knockdown(min(5, rand(10, 10 * powerlevel)) )
|
||||
|
||||
target.DefaultCombatKnockdown(min(5, rand(10, 10 * powerlevel)) )
|
||||
// Attack!
|
||||
playsound(get_turf(target), 'sound/weapons/punch4.ogg', 60, 1, -1)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_SMASH)
|
||||
@@ -145,7 +144,7 @@
|
||||
// Knock Down (if Living)
|
||||
if (isliving(M))
|
||||
var/mob/living/L = M
|
||||
L.Knockdown(pull_power * 10 + 20)
|
||||
L.DefaultCombatKnockdown(pull_power * 10 + 20)
|
||||
// Knock Back (before Knockdown, which probably cancels pull)
|
||||
var/send_dir = get_dir(owner, M)
|
||||
var/turf/T = get_ranged_target_turf(M, send_dir, pull_power)
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
// Bloodsuckers not affected by "the Kiss" of another vampire
|
||||
if(!target.mind || !target.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||
target.Unconscious(50,0)
|
||||
target.Knockdown(40 + 5 * level_current,1)
|
||||
target.DefaultCombatKnockdown(40 + 5 * level_current,1)
|
||||
// NOTE: THis is based on level of power!
|
||||
if(ishuman(target))
|
||||
target.adjustStaminaLoss(5, forced = TRUE)// Base Stamina Damage
|
||||
@@ -321,4 +321,4 @@
|
||||
// My mouth is no longer full
|
||||
REMOVE_TRAIT(owner, TRAIT_MUTE, "bloodsucker_feed")
|
||||
// Let me move immediately
|
||||
user.update_canmove()
|
||||
user.update_mobility()
|
||||
|
||||
@@ -100,8 +100,8 @@
|
||||
var/mob/living/simple_animal/SA = pick(/mob/living/simple_animal/mouse,/mob/living/simple_animal/mouse,/mob/living/simple_animal/mouse, /mob/living/simple_animal/hostile/retaliate/bat) //prob(300) /mob/living/simple_animal/mouse,
|
||||
new SA (owner.loc)
|
||||
// TELEPORT: Move to Coffin & Close it!
|
||||
user.set_resting(TRUE, TRUE, FALSE)
|
||||
do_teleport(owner, bloodsuckerdatum.coffin, no_effects = TRUE, forced = TRUE, channel = TELEPORT_CHANNEL_QUANTUM)
|
||||
user.resting = TRUE
|
||||
user.Stun(30,1)
|
||||
// CLOSE LID: If fail, force me in.
|
||||
if(!bloodsuckerdatum.coffin.close(owner))
|
||||
|
||||
@@ -76,16 +76,17 @@
|
||||
sleep(speed)
|
||||
UnregisterSignal(owner, COMSIG_MOVABLE_MOVED)
|
||||
hit = null
|
||||
user.update_canmove()
|
||||
user.update_mobility()
|
||||
|
||||
/datum/action/bloodsucker/targeted/haste/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||
..() // activate = FALSE
|
||||
user.update_canmove()
|
||||
user.update_mobility()
|
||||
|
||||
/datum/action/bloodsucker/targeted/haste/proc/on_move()
|
||||
for(var/mob/living/L in dview(1, get_turf(owner)))
|
||||
if(!hit[L] && (L != owner))
|
||||
hit[L] = TRUE
|
||||
playsound(L, "sound/weapons/punch[rand(1,4)].ogg", 15, 1, -1)
|
||||
L.Knockdown(10 + level_current * 5, override_hardstun = 0.1)
|
||||
L.DefaultCombatKnockdown(10 + level_current * 5)
|
||||
L.Paralyze(0.1)
|
||||
L.spin(10, 1)
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done.
|
||||
var/mob/living/carbon/target = A
|
||||
var/turf/T = get_turf(target)
|
||||
var/mob/living/L = owner
|
||||
// Clear Vars
|
||||
owner.pulling = null
|
||||
// Will we Knock them Down?
|
||||
@@ -63,7 +64,7 @@
|
||||
owner.playsound_local(owner, 'sound/bloodsucker/lunge_warn.ogg', 60, FALSE, pressure_affected = FALSE) // audio feedback to the user
|
||||
if(do_mob(owner, owner, 7, TRUE, TRUE))
|
||||
walk_towards(owner, T, 0.1, 10) // yes i know i shouldn't use this but i don't know how to work in anything better
|
||||
if(get_turf(owner) != T && !(isliving(target) && target.Adjacent(owner)) && owner.incapacitated() && owner.resting)
|
||||
if(get_turf(owner) != T && !(isliving(target) && target.Adjacent(owner)) && owner.incapacitated() && !CHECK_MOBILITY(L, MOBILITY_STAND))
|
||||
var/send_dir = get_dir(owner, T)
|
||||
new /datum/forced_movement(owner, get_ranged_target_turf(owner, send_dir, 1), 1, FALSE)
|
||||
owner.spin(10)
|
||||
@@ -84,4 +85,4 @@
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||
..() // activate = FALSE
|
||||
user.update_canmove()
|
||||
user.update_mobility()
|
||||
|
||||
@@ -82,7 +82,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", world.time)
|
||||
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
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
H.confused += 3
|
||||
for(var/mob/living/silicon/S in range(2,user))
|
||||
to_chat(S, "<span class='userdanger'>Your sensors are disabled by a shower of blood!</span>")
|
||||
S.Knockdown(60)
|
||||
S.DefaultCombatKnockdown(60)
|
||||
var/turf = get_turf(user)
|
||||
user.gib()
|
||||
. = TRUE
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
if(issilicon(M))
|
||||
SEND_SOUND(M, sound('sound/weapons/flash.ogg'))
|
||||
M.Knockdown(rand(100,200))
|
||||
M.DefaultCombatKnockdown(rand(100,200))
|
||||
|
||||
for(var/obj/machinery/light/L in range(4, user))
|
||||
L.on = 1
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
changeling.chem_recharge_slowdown -= 0.5
|
||||
if(stacks >= 20)
|
||||
to_chat(user, "<span class='danger'>We collapse in exhaustion.</span>")
|
||||
user.Knockdown(60)
|
||||
user.DefaultCombatKnockdown(60)
|
||||
user.emote("gasp")
|
||||
|
||||
INVOKE_ASYNC(src, .proc/muscle_loop, user)
|
||||
@@ -40,7 +40,7 @@
|
||||
if(user.stat != CONSCIOUS || user.staminaloss >= 90)
|
||||
active = !active
|
||||
to_chat(user, "<span class='notice'>Our muscles relax without the energy to strengthen them.</span>")
|
||||
user.Knockdown(40)
|
||||
user.DefaultCombatKnockdown(40)
|
||||
user.remove_movespeed_modifier(MOVESPEED_ID_CHANGELING_MUSCLES)
|
||||
changeling.chem_recharge_slowdown -= 0.5
|
||||
break
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
if(iscultist(L)) //No longer stuns cultists, instead sets them on fire and burns them
|
||||
to_chat(L, "<span class='heavy_brass'>\"Watch your step, wretch.\"</span>")
|
||||
L.adjustFireLoss(10)
|
||||
L.Knockdown(20, FALSE)
|
||||
L.DefaultCombatKnockdown(20, FALSE)
|
||||
L.adjust_fire_stacks(5) //Burn!
|
||||
L.IgniteMob()
|
||||
else
|
||||
@@ -155,7 +155,7 @@
|
||||
if(brutedamage || burndamage)
|
||||
L.adjustBruteLoss(-(brutedamage * 0.25))
|
||||
L.adjustFireLoss(-(burndamage * 0.25))
|
||||
L.Knockdown(50) //Completely defenseless for five seconds - mainly to give them time to read over the information they've just been presented with
|
||||
L.DefaultCombatKnockdown(50) //Completely defenseless for five seconds - mainly to give them time to read over the information they've just been presented with
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
C.silent += 5
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
if(!iscultist(L))
|
||||
L.visible_message("<span class='warning'>[L]'s eyes blaze with brilliant light!</span>", \
|
||||
"<span class='userdanger'>Your vision suddenly screams with white-hot light!</span>")
|
||||
L.Knockdown(15, TRUE, FALSE, 15)
|
||||
L.DefaultCombatKnockdown(15, TRUE, FALSE, 15)
|
||||
L.apply_status_effect(STATUS_EFFECT_KINDLE)
|
||||
L.flash_act(1, 1)
|
||||
if(issilicon(target))
|
||||
|
||||
@@ -57,15 +57,15 @@
|
||||
else if(!..())
|
||||
if(!L.anti_magic_check())
|
||||
if(issilicon(L))
|
||||
L.Knockdown(100)
|
||||
L.DefaultCombatKnockdown(100)
|
||||
else if(iscultist(L))
|
||||
L.confused += CLAMP(10 - L.confused, 0, 5) // Spearthrow now confuses enemy cultists + just deals extra damage / sets on fire instead of hardstunning + damage
|
||||
to_chat(L, "<span class ='userdanger'>[src] crashes into you with burning force, sending you reeling!</span>")
|
||||
L.adjust_fire_stacks(2)
|
||||
L.Knockdown(1)
|
||||
L.DefaultCombatKnockdown(1)
|
||||
L.IgniteMob()
|
||||
else
|
||||
L.Knockdown(40)
|
||||
L.DefaultCombatKnockdown(40)
|
||||
GLOB.clockwork_vitality += L.adjustFireLoss(bonus_burn * 3) //normally a total of 40 damage, 70 with ratvar
|
||||
break_spear(T)
|
||||
else
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
var/datum/status_effect/belligerent/B = C.apply_status_effect(STATUS_EFFECT_BELLIGERENT)
|
||||
if(!QDELETED(B))
|
||||
B.duration = world.time + 30
|
||||
C.Knockdown(5) //knocks down for half a second if affected
|
||||
C.DefaultCombatKnockdown(5) //knocks down for half a second if affected
|
||||
sleep(!GLOB.ratvar_approaches ? 16 : 10)
|
||||
name = "judicial blast"
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
@@ -196,7 +196,7 @@
|
||||
L.visible_message("<span class='warning'>Strange energy flows into [L]'s [I.name]!</span>", \
|
||||
"<span class='userdanger'>Your [I.name] shields you from [src]!</span>")
|
||||
continue
|
||||
L.Knockdown(15) //knocks down briefly when exploding
|
||||
L.DefaultCombatKnockdown(15) //knocks down briefly when exploding
|
||||
if(!iscultist(L))
|
||||
L.visible_message("<span class='warning'>[L] is struck by a judicial explosion!</span>", \
|
||||
"<span class='userdanger'>[!issilicon(L) ? "An unseen force slams you into the ground!" : "ERROR: Motor servos disabled by external source!"]</span>")
|
||||
|
||||
@@ -57,5 +57,5 @@
|
||||
L.confused = min(L.confused + 15, 50)
|
||||
L.dizziness = min(L.dizziness + 15, 50)
|
||||
if(L.confused >= 25)
|
||||
L.Knockdown(FLOOR(L.confused * 0.8, 1))
|
||||
L.DefaultCombatKnockdown(FLOOR(L.confused * 0.8, 1))
|
||||
take_damage(max_integrity)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(buckled_mobs && LAZYLEN(buckled_mobs))
|
||||
var/mob/living/L = buckled_mobs[1]
|
||||
if(iscarbon(L))
|
||||
L.Knockdown(100)
|
||||
L.DefaultCombatKnockdown(100)
|
||||
L.visible_message("<span class='warning'>[L] is maimed as the skewer shatters while still in [L.p_their()] body!</span>")
|
||||
L.adjustBruteLoss(15)
|
||||
unbuckle_mob(L)
|
||||
@@ -117,6 +117,6 @@
|
||||
return
|
||||
skewee.visible_message("<span class='danger'>[skewee] comes free of [src] with a squelching pop!</span>", \
|
||||
"<span class='boldannounce'>You come free of [src]!</span>")
|
||||
skewee.Knockdown(30)
|
||||
skewee.DefaultCombatKnockdown(30)
|
||||
playsound(skewee, 'sound/misc/desceration-03.ogg', 50, TRUE)
|
||||
unbuckle_mob(skewee)
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
var/atom/throw_target = get_edge_target_turf(L, user.dir)
|
||||
L.throw_at(throw_target, 7, 1, user)
|
||||
else if(!iscultist(L))
|
||||
L.Knockdown(160)
|
||||
L.DefaultCombatKnockdown(160)
|
||||
L.adjustStaminaLoss(140) //Ensures hard stamcrit
|
||||
L.flash_act(1,1)
|
||||
if(issilicon(target))
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
/obj/item/melee/cultblade/attack(mob/living/target, mob/living/carbon/human/user)
|
||||
if(!iscultist(user))
|
||||
user.Knockdown(100)
|
||||
user.DefaultCombatKnockdown(100)
|
||||
user.dropItemToGround(src, TRUE)
|
||||
user.visible_message("<span class='warning'>A powerful force shoves [user] away from [target]!</span>", \
|
||||
"<span class='cultlarge'>\"You shouldn't play with sharp things. You'll poke someone's eye out.\"</span>")
|
||||
@@ -149,7 +149,7 @@
|
||||
user.emote("scream")
|
||||
user.apply_damage(30, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
user.dropItemToGround(src, TRUE)
|
||||
user.Knockdown(50)
|
||||
user.DefaultCombatKnockdown(50)
|
||||
return
|
||||
force = initial(force)
|
||||
jaunt.Grant(user, src)
|
||||
@@ -406,7 +406,7 @@
|
||||
to_chat(user, "<span class='warning'>An overwhelming sense of nausea overpowers you!</span>")
|
||||
user.dropItemToGround(src, TRUE)
|
||||
user.Dizzy(30)
|
||||
user.Knockdown(100)
|
||||
user.DefaultCombatKnockdown(100)
|
||||
else
|
||||
to_chat(user, "<span class='cultlarge'>\"Trying to use things you don't own is bad, you know.\"</span>")
|
||||
to_chat(user, "<span class='userdanger'>The armor squeezes at your body!</span>")
|
||||
@@ -458,7 +458,7 @@
|
||||
to_chat(user, "<span class='warning'>An overwhelming sense of nausea overpowers you!</span>")
|
||||
user.dropItemToGround(src, TRUE)
|
||||
user.Dizzy(30)
|
||||
user.Knockdown(100)
|
||||
user.DefaultCombatKnockdown(100)
|
||||
else
|
||||
to_chat(user, "<span class='cultlarge'>\"Trying to use things you don't own is bad, you know.\"</span>")
|
||||
to_chat(user, "<span class='userdanger'>The robes squeeze at your body!</span>")
|
||||
@@ -479,7 +479,7 @@
|
||||
to_chat(user, "<span class='cultlarge'>\"You want to be blind, do you?\"</span>")
|
||||
user.dropItemToGround(src, TRUE)
|
||||
user.Dizzy(30)
|
||||
user.Knockdown(100)
|
||||
user.DefaultCombatKnockdown(100)
|
||||
user.blind_eyes(30)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/unholywater
|
||||
@@ -500,7 +500,7 @@
|
||||
/obj/item/shuttle_curse/attack_self(mob/living/user)
|
||||
if(!iscultist(user))
|
||||
user.dropItemToGround(src, TRUE)
|
||||
user.Knockdown(100)
|
||||
user.DefaultCombatKnockdown(100)
|
||||
to_chat(user, "<span class='warning'>A powerful force shoves you away from [src]!</span>")
|
||||
return
|
||||
if(curselimit > 1)
|
||||
@@ -706,10 +706,10 @@
|
||||
if(is_servant_of_ratvar(L))
|
||||
to_chat(L, "<span class='cultlarge'>\"Kneel for me, scum\"</span>")
|
||||
L.confused += CLAMP(10 - L.confused, 0, 5) //confuses and lightly knockdowns + damages hostile cultists instead of hardstunning like before
|
||||
L.Knockdown(15)
|
||||
L.DefaultCombatKnockdown(15)
|
||||
L.adjustBruteLoss(10)
|
||||
else
|
||||
L.Knockdown(50)
|
||||
L.DefaultCombatKnockdown(50)
|
||||
break_spear(T)
|
||||
else
|
||||
..()
|
||||
@@ -844,7 +844,7 @@
|
||||
INVOKE_ASYNC(src, .proc/pewpew, user, params)
|
||||
var/obj/structure/emergency_shield/invoker/N = new(user.loc)
|
||||
if(do_after(user, 90, target = user))
|
||||
user.Knockdown(40)
|
||||
user.DefaultCombatKnockdown(40)
|
||||
to_chat(user, "<span class='cult italic'>You have exhausted the power of this spell!</span>")
|
||||
firing = FALSE
|
||||
if(N)
|
||||
@@ -909,7 +909,7 @@
|
||||
else
|
||||
var/mob/living/L = target
|
||||
if(L.density)
|
||||
L.Knockdown(20)
|
||||
L.DefaultCombatKnockdown(20)
|
||||
L.adjustBruteLoss(45)
|
||||
playsound(L, 'sound/hallucinations/wail.ogg', 50, 1)
|
||||
L.emote("scream")
|
||||
@@ -945,7 +945,7 @@
|
||||
T.visible_message("<span class='warning'>The sheer force from [P] shatters the mirror shield!</span>")
|
||||
new /obj/effect/temp_visual/cult/sparks(T)
|
||||
playsound(T, 'sound/effects/glassbr3.ogg', 100)
|
||||
owner.Knockdown(25)
|
||||
owner.DefaultCombatKnockdown(25)
|
||||
qdel(src)
|
||||
return FALSE
|
||||
if(P.is_reflectable)
|
||||
@@ -1002,9 +1002,9 @@
|
||||
else if(!..())
|
||||
if(!L.anti_magic_check())
|
||||
if(is_servant_of_ratvar(L))
|
||||
L.Knockdown(60)
|
||||
L.DefaultCombatKnockdown(60)
|
||||
else
|
||||
L.Knockdown(30)
|
||||
L.DefaultCombatKnockdown(30)
|
||||
if(D.thrower)
|
||||
for(var/mob/living/Next in orange(2, T))
|
||||
if(!Next.density || iscultist(Next))
|
||||
|
||||
@@ -219,7 +219,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
L.visible_message("<span class='warning'>[L]'s eyes glow a defiant yellow!</span>", \
|
||||
"<span class='cultlarge'>\"Stop resisting. You <i>will</i> be mi-\"</span>\n\
|
||||
<span class='large_brass'>\"Give up and you will feel pain unlike anything you've ever felt!\"</span>")
|
||||
L.Knockdown(80)
|
||||
L.DefaultCombatKnockdown(80)
|
||||
else if(is_convertable)
|
||||
do_convert(L, invokers)
|
||||
else
|
||||
@@ -908,7 +908,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
if(affecting.key)
|
||||
affecting.visible_message("<span class='warning'>[affecting] slowly relaxes, the glow around [affecting.p_them()] dimming.</span>", \
|
||||
"<span class='danger'>You are re-united with your physical form. [src] releases its hold over you.</span>")
|
||||
affecting.Knockdown(40)
|
||||
affecting.DefaultCombatKnockdown(40)
|
||||
break
|
||||
if(affecting.health <= 10)
|
||||
to_chat(G, "<span class='cultitalic'>Your body can no longer sustain the connection!</span>")
|
||||
@@ -970,7 +970,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
playsound(T, 'sound/magic/enter_blood.ogg', 100, 1)
|
||||
visible_message("<span class='warning'>A colossal shockwave of energy bursts from the rune, disintegrating it in the process!</span>")
|
||||
for(var/mob/living/L in range(src, 3))
|
||||
L.Knockdown(30)
|
||||
L.DefaultCombatKnockdown(30)
|
||||
empulse(T, 0.42*(intensity), 1)
|
||||
var/list/images = list()
|
||||
var/zmatch = T.z
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(BANE_HARVEST)
|
||||
if(istype(weapon, /obj/item/reagent_containers/food/snacks/grown/))
|
||||
visible_message("<span class='warning'>The spirits of the harvest aid in the exorcism.</span>", "<span class='notice'>The harvest spirits are harming you.</span>")
|
||||
Knockdown(40)
|
||||
DefaultCombatKnockdown(40)
|
||||
qdel(weapon)
|
||||
return 2
|
||||
return 1
|
||||
@@ -586,7 +586,7 @@
|
||||
playsound(loc,'sound/effects/snap.ogg',50, 1, -1)
|
||||
L.electrocute_act(0, src, 1, 1, 1)
|
||||
if(iscyborg(L))
|
||||
L.Knockdown(100)
|
||||
L.DefaultCombatKnockdown(100)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
GiveHint(target)
|
||||
else if(is_pointed(I))
|
||||
to_chat(target, "<span class='userdanger'>You feel a stabbing pain in [parse_zone(user.zone_selected)]!</span>")
|
||||
target.Knockdown(40)
|
||||
target.DefaultCombatKnockdown(40)
|
||||
GiveHint(target)
|
||||
else if(istype(I, /obj/item/bikehorn))
|
||||
to_chat(target, "<span class='userdanger'>HONK</span>")
|
||||
@@ -377,7 +377,10 @@
|
||||
/obj/item/warpwhistle/proc/end_effect(mob/living/carbon/user)
|
||||
user.invisibility = initial(user.invisibility)
|
||||
user.status_flags &= ~GODMODE
|
||||
user.canmove = TRUE
|
||||
REMOVE_TRAIT(user, TRAIT_MOBILITY_NOMOVE, src)
|
||||
REMOVE_TRAIT(user, TRAIT_MOBILITY_NOUSE, src)
|
||||
REMOVE_TRAIT(user, TRAIT_MOBILITY_NOPICKUP, src)
|
||||
user.update_mobility()
|
||||
|
||||
/obj/item/warpwhistle/attack_self(mob/living/carbon/user)
|
||||
if(!istype(user) || on_cooldown)
|
||||
@@ -390,7 +393,10 @@
|
||||
on_cooldown = TRUE
|
||||
last_user = user
|
||||
playsound(T,'sound/magic/warpwhistle.ogg', 200, 1)
|
||||
user.canmove = FALSE
|
||||
ADD_TRAIT(user, TRAIT_MOBILITY_NOMOVE, src)
|
||||
ADD_TRAIT(user, TRAIT_MOBILITY_NOUSE, src)
|
||||
ADD_TRAIT(user, TRAIT_MOBILITY_NOPICKUP, src)
|
||||
user.update_mobility()
|
||||
new /obj/effect/temp_visual/tornado(T)
|
||||
sleep(20)
|
||||
if(interrupted(user))
|
||||
@@ -412,7 +418,6 @@
|
||||
return
|
||||
if(T.z != potential_T.z || abs(get_dist_euclidian(potential_T,T)) > 50 - breakout)
|
||||
do_teleport(user, potential_T, channel = TELEPORT_CHANNEL_MAGIC)
|
||||
user.canmove = 0
|
||||
T = potential_T
|
||||
break
|
||||
breakout += 1
|
||||
|
||||
@@ -83,8 +83,8 @@
|
||||
/obj/item/soulstone/proc/release_shades(mob/user)
|
||||
for(var/mob/living/simple_animal/shade/A in src)
|
||||
A.status_flags &= ~GODMODE
|
||||
A.canmove = TRUE
|
||||
A.forceMove(get_turf(user))
|
||||
A.mobility_flags = MOBILITY_FLAGS_DEFAULT
|
||||
A.cancel_camera()
|
||||
icon_state = "soulstone"
|
||||
name = initial(name)
|
||||
@@ -173,7 +173,7 @@
|
||||
else
|
||||
T.forceMove(src) //put shade in stone
|
||||
T.status_flags |= GODMODE
|
||||
T.canmove = FALSE
|
||||
T.mobility_flags = NONE
|
||||
T.health = T.maxHealth
|
||||
icon_state = "soulstone2"
|
||||
name = "soulstone: Shade of [T.real_name]"
|
||||
@@ -240,8 +240,8 @@
|
||||
T.dust_animation()
|
||||
QDEL_IN(T, 5)
|
||||
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade(src)
|
||||
S.status_flags |= GODMODE //So they won't die inside the stone somehow
|
||||
S.canmove = FALSE//Can't move out of the soul stone
|
||||
S.status_flags |= GODMODE //So they won't die inside the stone somehow
|
||||
S.mobility_flags = NONE //Can't move out of the soul stone
|
||||
S.name = "Shade of [T.real_name]"
|
||||
S.real_name = "Shade of [T.real_name]"
|
||||
T.transfer_ckey(S)
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
var/mob/living/silicon/robot/R = M
|
||||
log_combat(user, R, "flashed", src)
|
||||
update_icon(1)
|
||||
R.Knockdown(rand(80,120))
|
||||
R.DefaultCombatKnockdown(rand(80,120))
|
||||
var/diff = 5 * CONFUSION_STACK_MAX_MULTIPLIER - M.confused
|
||||
R.confused += min(5, diff)
|
||||
R.flash_act(affect_silicon = 1)
|
||||
@@ -197,14 +197,13 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This mind seems resistant to the flash!</span>")
|
||||
|
||||
|
||||
/obj/item/assembly/flash/cyborg
|
||||
|
||||
/obj/item/assembly/flash/cyborg/attack(mob/living/M, mob/user)
|
||||
. = ..()
|
||||
new /obj/effect/temp_visual/borgflash(get_turf(src))
|
||||
if(. && !CONFIG_GET(flag/disable_borg_flash_knockdown) && iscarbon(M) && !M.resting && !M.get_eye_protection())
|
||||
M.Knockdown(80)
|
||||
if(. && !CONFIG_GET(flag/disable_borg_flash_knockdown) && iscarbon(M) && CHECK_MOBILITY(M, MOBILITY_STAND) && !M.get_eye_protection())
|
||||
M.DefaultCombatKnockdown(80)
|
||||
|
||||
/obj/item/assembly/flash/cyborg/attack_self(mob/user)
|
||||
..()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if("feet")
|
||||
if(!H.shoes || !(H.shoes.body_parts_covered & FEET))
|
||||
affecting = H.get_bodypart(pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
H.Knockdown(60)
|
||||
H.DefaultCombatKnockdown(60)
|
||||
if(BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND)
|
||||
if(!H.gloves)
|
||||
affecting = H.get_bodypart(type)
|
||||
|
||||
@@ -314,10 +314,6 @@
|
||||
user.forceMove(loc)
|
||||
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>", "<span class='notice'>You climb out the ventilation system.")
|
||||
|
||||
user.canmove = FALSE
|
||||
addtimer(VARSET_CALLBACK(user, canmove, TRUE), 1)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/AltClick(mob/living/L)
|
||||
if(is_type_in_typecache(src, GLOB.ventcrawl_machinery))
|
||||
return L.handle_ventcrawl(src)
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
M.forceMove(get_turf(src))
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
L.update_canmove()
|
||||
L.update_mobility()
|
||||
occupant = null
|
||||
update_icon()
|
||||
|
||||
@@ -277,10 +277,10 @@
|
||||
else
|
||||
. += "[src] seems empty."
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/target, mob/user)
|
||||
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/living/carbon/target, mob/user)
|
||||
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !istype(target) || !user.IsAdvancedToolUser())
|
||||
return
|
||||
if (target.IsKnockdown() || target.IsStun() || target.IsSleeping() || target.IsUnconscious())
|
||||
if(!CHECK_MOBILITY(target, MOBILITY_MOVE))
|
||||
close_machine(target)
|
||||
else
|
||||
user.visible_message("<b>[user]</b> starts shoving [target] inside [src].", "<span class='notice'>You start shoving [target] inside [src].</span>")
|
||||
|
||||
@@ -224,7 +224,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())
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
if(user.wear_suit == src)
|
||||
if(hard_landing)
|
||||
user.electrocute_act(35, src, safety = 1)
|
||||
user.Knockdown(200)
|
||||
user.DefaultCombatKnockdown(200)
|
||||
if(!silent)
|
||||
to_chat(user, "\nroot@ChronosuitMK4# chronowalk4 --stop\n")
|
||||
if(camera)
|
||||
|
||||
@@ -481,7 +481,7 @@
|
||||
adjust_momentum(0, 0, 10)
|
||||
wearer.visible_message("<span class='warning'>[wearer]'s flight suit crashes into the ground!</span>")
|
||||
if(knockdown)
|
||||
wearer.Knockdown(80)
|
||||
wearer.DefaultCombatKnockdown(80)
|
||||
momentum_x = 0
|
||||
momentum_y = 0
|
||||
calculate_momentum_speed()
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
return
|
||||
owner.visible_message("<span class='danger'>The reactive teleport system flings [H] clear of [attack_text] and slams [H.p_them()] into a fabricated table!</span>")
|
||||
owner.visible_message("<font color='red' size='3'>[H] GOES ON THE TABLE!!!</font>")
|
||||
owner.Knockdown(40)
|
||||
owner.DefaultCombatKnockdown(40)
|
||||
var/list/turfs = new/list()
|
||||
for(var/turf/T in orange(tele_range, H))
|
||||
if(T.density)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if(R.has_buckled_mobs())
|
||||
for(var/mob/living/L in R.buckled_mobs)
|
||||
L.visible_message("<span class='warning'>[L] is knocked off of [R] by the charge in [R]'s chassis induced by [name]!</span>") //I know it's bad.
|
||||
L.Knockdown(10)
|
||||
L.DefaultCombatKnockdown(10)
|
||||
R.unbuckle_mob(L)
|
||||
do_sparks(5, 0, L)
|
||||
..()
|
||||
|
||||
@@ -220,8 +220,8 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
|
||||
/obj/effect/hallucination/simple/xeno/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
update_icon("alienh_pounce")
|
||||
if(hit_atom == target && target.stat!=DEAD)
|
||||
target.Knockdown(100)
|
||||
if(hit_atom == target && target.stat != DEAD)
|
||||
target.DefaultCombatKnockdown(100)
|
||||
target.visible_message("<span class='danger'>[target] flails around wildly.</span>","<span class ='userdanger'>[name] pounces on you!</span>")
|
||||
|
||||
/datum/hallucination/xeno_attack
|
||||
@@ -308,7 +308,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
shake_camera(target, 2, 1)
|
||||
if(bubblegum.Adjacent(target) && !charged)
|
||||
charged = TRUE
|
||||
target.Knockdown(80)
|
||||
target.DefaultCombatKnockdown(80)
|
||||
target.adjustStaminaLoss(40)
|
||||
step_away(target, bubblegum)
|
||||
shake_camera(target, 4, 3)
|
||||
@@ -1106,7 +1106,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
if(istype(target, /obj/effect/dummy/phased_mob))
|
||||
return
|
||||
to_chat(target, "<span class='userdanger'>You fall into the chasm!</span>")
|
||||
target.Knockdown(40)
|
||||
target.DefaultCombatKnockdown(40)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, target, "<span class='notice'>It's surprisingly shallow.</span>"), 15)
|
||||
QDEL_IN(src, 30)
|
||||
|
||||
@@ -1245,7 +1245,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
|
||||
/datum/hallucination/shock/proc/shock_drop()
|
||||
target.jitteriness = max(target.jitteriness - 990, 10) //Still jittery, but vastly less
|
||||
target.Knockdown(60)
|
||||
target.DefaultCombatKnockdown(60)
|
||||
|
||||
/datum/hallucination/husks
|
||||
|
||||
@@ -1318,7 +1318,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
"<span class='userdanger'>[G] grabs your wrist and violently wrenches it to the side!</span>")
|
||||
C.emote("scream")
|
||||
C.dropItemToGround(C.get_active_held_item())
|
||||
C.Knockdown(60)
|
||||
C.DefaultCombatKnockdown(60)
|
||||
else
|
||||
to_chat(C,"<span class='userdanger'>[G] violently grabs you!</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
head_attack_message = " on the head"
|
||||
//Knockdown the target for the duration that we calculated and divide it by 5.
|
||||
if(armor_duration)
|
||||
target.Knockdown(min(armor_duration, 200)) // Never knockdown more than a flash!
|
||||
target.DefaultCombatKnockdown(min(armor_duration, 200)) // Never knockdown more than a flash!
|
||||
|
||||
//Display an attack message.
|
||||
if(target != user)
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
if(iscarbon(M))
|
||||
M.visible_message("[src] bursts out of [M]!</span>")
|
||||
M.emote("scream")
|
||||
M.Knockdown(40)
|
||||
M.DefaultCombatKnockdown(40)
|
||||
M.adjustBruteLoss(60)
|
||||
Expand()
|
||||
return ..()
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
else
|
||||
creamoverlay.icon_state = "creampie_human"
|
||||
if(stunning)
|
||||
H.Knockdown(20) //splat!
|
||||
H.DefaultCombatKnockdown(20) //splat!
|
||||
H.adjust_blurriness(1)
|
||||
H.visible_message("<span class='warning'>[H] is creamed by [src]!</span>", "<span class='userdanger'>You've been creamed by [src]!</span>")
|
||||
playsound(H, "desceration", 50, TRUE)
|
||||
@@ -83,7 +83,7 @@
|
||||
A.throw_at(T, 1, 1)
|
||||
M.visible_message("[src] bursts out of [M]!</span>")
|
||||
M.emote("scream")
|
||||
M.Knockdown(40)
|
||||
M.DefaultCombatKnockdown(40)
|
||||
M.adjustBruteLoss(60)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -152,6 +152,6 @@ God bless America.
|
||||
reagents.reaction(C, TOUCH)
|
||||
C.apply_damage(min(30, reagents.total_volume), BURN, BODY_ZONE_HEAD)
|
||||
reagents.remove_any((reagents.total_volume/2))
|
||||
C.Knockdown(60)
|
||||
C.DefaultCombatKnockdown(60)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
return ..()
|
||||
|
||||
@@ -132,7 +132,8 @@
|
||||
set name = "Eject Contents"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
var/mob/living/L = usr
|
||||
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||
return
|
||||
empty()
|
||||
add_fingerprint(usr)
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
var/progression = list() //Keep track of where people are in the story.
|
||||
var/active = TRUE //Turn this to false to keep normal mob behavour
|
||||
var/cached_z
|
||||
/// I'm busy chatting, don't move.
|
||||
var/busy_chatting = FALSE
|
||||
|
||||
/mob/living/simple_animal/jacq/Initialize()
|
||||
..()
|
||||
@@ -76,9 +78,9 @@
|
||||
say("Hello there [gender_check(M)]!")
|
||||
return ..()
|
||||
if(!ckey)
|
||||
canmove = FALSE
|
||||
busy_chatting = FALSE
|
||||
chit_chat(M)
|
||||
canmove = TRUE
|
||||
busy_chatting = TRUE
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/jacq/attack_paw(mob/living/carbon/monkey/M)
|
||||
@@ -86,9 +88,9 @@
|
||||
say("Hello there [gender_check(M)]!")
|
||||
return ..()
|
||||
if(!ckey)
|
||||
canmove = FALSE
|
||||
busy_chatting = FALSE
|
||||
chit_chat(M)
|
||||
canmove = TRUE
|
||||
busy_chatting = TRUE
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/jacq/proc/poof()
|
||||
@@ -99,7 +101,7 @@
|
||||
s.set_up(R, 0, loc)
|
||||
s.start()
|
||||
visible_message("<b>[src]</b> disappears in a puff of smoke!")
|
||||
canmove = TRUE
|
||||
busy_chatting = TRUE
|
||||
health = 25
|
||||
|
||||
//Try to go to populated areas
|
||||
@@ -377,6 +379,12 @@
|
||||
sleep(20)
|
||||
poof()
|
||||
|
||||
/mob/living/simple_animal/jacq/update_mobility()
|
||||
. = ..()
|
||||
if(busy_chatting)
|
||||
DISABLE_BITFIELD(., MOBILITY_MOVE)
|
||||
mobility_flags = .
|
||||
|
||||
/obj/item/clothing/head/hardhat/pumpkinhead/jaqc
|
||||
name = "Jacq o' latern"
|
||||
desc = "A jacqueline o' lantern! You can't seem to get rid of it."
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
playsound(src, 'sound/items/dodgeball.ogg', 50, 1)
|
||||
M.apply_damage(10, STAMINA)
|
||||
if(prob(5))
|
||||
M.Knockdown(60)
|
||||
M.DefaultCombatKnockdown(60)
|
||||
visible_message("<span class='danger'>[M] is knocked right off [M.p_their()] feet!</span>")
|
||||
|
||||
//
|
||||
@@ -117,7 +117,7 @@
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
L.forceMove(loc)
|
||||
L.Knockdown(100)
|
||||
L.DefaultCombatKnockdown(100)
|
||||
visible_message("<span class='danger'>[user] dunks [L] into \the [src]!</span>")
|
||||
user.stop_pulling()
|
||||
else
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/grown/nettle/death/pickup(mob/living/carbon/user)
|
||||
if(..())
|
||||
if(prob(50))
|
||||
user.Knockdown(100)
|
||||
user.DefaultCombatKnockdown(100)
|
||||
to_chat(user, "<span class='userdanger'>You are stunned by the Deathnettle as you try picking it up!</span>")
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/nettle/death/attack(mob/living/carbon/M, mob/user)
|
||||
@@ -111,5 +111,5 @@
|
||||
M.adjust_blurriness(force/7)
|
||||
if(prob(20))
|
||||
M.Unconscious(force / 0.3)
|
||||
M.Knockdown(force / 0.75)
|
||||
M.DefaultCombatKnockdown(force / 0.75)
|
||||
M.drop_all_held_items()
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
if(!L || !isliving(L))
|
||||
return 0
|
||||
|
||||
L.Knockdown(stunforce)
|
||||
L.DefaultCombatKnockdown(stunforce)
|
||||
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
|
||||
|
||||
message_admins("stunned someone with an assembly. Last touches: Assembly: [assembly.fingerprintslast] Circuit: [fingerprintslast]")
|
||||
|
||||
@@ -112,14 +112,14 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/bookcase/attack_hand(mob/user)
|
||||
/obj/structure/bookcase/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(. || !istype(user))
|
||||
return
|
||||
if(contents.len)
|
||||
var/obj/item/book/choice = input("Which book would you like to remove from the shelf?") as null|obj in contents
|
||||
if(choice)
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
if(!CHECK_MOBILITY(user, MOBILITY_USE) || !in_range(loc, user))
|
||||
return
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_held_item())
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
playsound(M,'sound/weapons/resonator_blast.ogg',50,1)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/L = M
|
||||
L.Knockdown(60)
|
||||
L.DefaultCombatKnockdown(60)
|
||||
if(ishuman(L))
|
||||
shake_camera(L, 20, 1)
|
||||
addtimer(CALLBACK(L, /mob/living/carbon.proc/vomit), 20)
|
||||
|
||||
@@ -74,7 +74,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
var/mutable_appearance/balloon3
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
M.Knockdown(320) // Keep them from moving during the duration of the extraction
|
||||
M.DefaultCombatKnockdown(320) // Keep them from moving during the duration of the extraction
|
||||
M.buckled = 0 // Unbuckle them to prevent anchoring problems
|
||||
else
|
||||
A.anchored = TRUE
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
density = FALSE
|
||||
stat = DEAD
|
||||
canmove = FALSE
|
||||
|
||||
var/mob/living/new_character //for instant transfer once the round is set up
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
layer = GHOST_LAYER
|
||||
stat = DEAD
|
||||
density = FALSE
|
||||
canmove = 0
|
||||
move_resist = INFINITY
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
see_in_dark = 100
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
|
||||
@@ -39,12 +39,8 @@
|
||||
container = null
|
||||
return ..()
|
||||
|
||||
/mob/living/brain/update_canmove()
|
||||
if(in_contents_of(/obj/mecha))
|
||||
canmove = 1
|
||||
else
|
||||
canmove = 0
|
||||
return canmove
|
||||
/mob/living/brain/update_mobility()
|
||||
return ((mobility_flags = (in_contents_of(/obj/mecha)? MOBILITY_FLAGS_DEFAULT : NONE)))
|
||||
|
||||
/mob/living/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
|
||||
return
|
||||
|
||||
@@ -22,11 +22,11 @@ In all, this is a lot like the monkey code. /N
|
||||
switch(M.a_intent)
|
||||
if (INTENT_HELP)
|
||||
if(!recoveringstam)
|
||||
resting = 0
|
||||
AdjustStun(-60)
|
||||
AdjustKnockdown(-60)
|
||||
AdjustUnconscious(-60)
|
||||
AdjustSleeping(-100)
|
||||
set_resting(FALSE, TRUE, FALSE)
|
||||
AdjustAllImmobility(-60, FALSE)
|
||||
AdjustUnconscious(-60, FALSE)
|
||||
AdjustSleeping(-100, FALSE)
|
||||
update_mobility()
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake [p_them()] up!</span>")
|
||||
if(INTENT_DISARM, INTENT_HARM)
|
||||
if(health > 0)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define MAX_ALIEN_LEAP_DIST 7
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/proc/leap_at(atom/A)
|
||||
if(!canmove || leaping)
|
||||
if(!CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND | MOBILITY_MOVE) || leaping)
|
||||
return
|
||||
|
||||
if(pounce_cooldown > world.time)
|
||||
@@ -65,21 +65,21 @@
|
||||
var/mob/living/L = hit_atom
|
||||
if(!L.check_shields(src, 0, "the [name]", attack_type = LEAP_ATTACK))
|
||||
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
|
||||
L.Knockdown(100)
|
||||
L.DefaultCombatKnockdown(100)
|
||||
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
|
||||
step_towards(src,L)
|
||||
else
|
||||
Knockdown(40, 1, 1)
|
||||
DefaultCombatKnockdown(40, 1, 1)
|
||||
|
||||
toggle_leap(0)
|
||||
else if(hit_atom.density && !hit_atom.CanPass(src))
|
||||
visible_message("<span class ='danger'>[src] smashes into [hit_atom]!</span>", "<span class ='alertalien'>[src] smashes into [hit_atom]!</span>")
|
||||
Knockdown(40, 1, 1)
|
||||
Paralyze(40, TRUE, TRUE)
|
||||
|
||||
if(leaping)
|
||||
leaping = 0
|
||||
update_icons()
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/float(on)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
. = ..()
|
||||
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
update_icons()
|
||||
status_flags |= CANPUSH
|
||||
|
||||
|
||||
@@ -69,11 +69,11 @@
|
||||
playsound(src, 'sound/voice/hiss5.ogg', 40, 1, 1) //Alien roars when starting to break free
|
||||
..(I, cuff_break = INSTANT_CUFFBREAK)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/resist_grab(moving_resist)
|
||||
if(pulledby.grab_state)
|
||||
/mob/living/carbon/alien/humanoid/do_resist_grab(moving_resist, forced, silent = FALSE)
|
||||
if(pulledby.grab_state && !silent)
|
||||
visible_message("<span class='danger'>[src] has broken free of [pulledby]'s grip!</span>")
|
||||
pulledby.stop_pulling()
|
||||
. = 0
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/alien/humanoid/get_standard_pixel_y_offset(lying = 0)
|
||||
if(leaping)
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
else
|
||||
icon_state = "alien[caste]_dead"
|
||||
|
||||
else if((stat == UNCONSCIOUS && !asleep) || stat == SOFT_CRIT || IsKnockdown())
|
||||
else if((stat == UNCONSCIOUS && !asleep) || stat == SOFT_CRIT || IsParalyzed())
|
||||
icon_state = "alien[caste]_unconscious"
|
||||
else if(leap_on_click)
|
||||
icon_state = "alien[caste]_pounce"
|
||||
|
||||
else if(lying || resting || asleep)
|
||||
else if(lying || !CHECK_MOBILITY(src, MOBILITY_STAND) || asleep)
|
||||
icon_state = "alien[caste]_sleep"
|
||||
else if(mob_size == MOB_SIZE_LARGE)
|
||||
icon_state = "alien[caste]"
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
if(stat == CONSCIOUS)
|
||||
stat = UNCONSCIOUS
|
||||
blind_eyes(1)
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
else
|
||||
if(stat == UNCONSCIOUS)
|
||||
stat = CONSCIOUS
|
||||
if(!recoveringstam)
|
||||
resting = 0
|
||||
set_resting(FALSE, TRUE)
|
||||
adjust_blindness(-1)
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
update_damage_hud()
|
||||
update_health_hud()
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
icon_state = "larva[state]_dead"
|
||||
else if(handcuffed || legcuffed) //This should be an overlay. Who made this an icon_state?
|
||||
icon_state = "larva[state]_cuff"
|
||||
else if(stat == UNCONSCIOUS || lying || resting)
|
||||
else if(stat == UNCONSCIOUS || !CHECK_MOBILITY(src, MOBILITY_STAND))
|
||||
icon_state = "larva[state]_sleep"
|
||||
else if(IsStun())
|
||||
else if(IsStun() || IsParalyzed())
|
||||
icon_state = "larva[state]_stun"
|
||||
else
|
||||
icon_state = "larva[state]"
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
else if(ishuman(owner)) //Humans, being more fragile, are more overwhelmed by the mental backlash.
|
||||
to_chat(owner, "<span class='danger'>You feel a splitting pain in your head, and are struck with a wave of nausea. You cannot hear the hivemind anymore!</span>")
|
||||
owner.emote("scream")
|
||||
owner.Knockdown(100)
|
||||
owner.DefaultCombatKnockdown(100)
|
||||
|
||||
owner.jitteriness += 30
|
||||
owner.confused += 30
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(xeno_loc)
|
||||
ghost.transfer_ckey(new_xeno, FALSE)
|
||||
SEND_SOUND(new_xeno, sound('sound/voice/hiss5.ogg',0,0,0,100)) //To get the player's attention
|
||||
new_xeno.canmove = 0 //so we don't move during the bursting animation
|
||||
new_xeno.notransform = 1
|
||||
new_xeno.Paralyze(6)
|
||||
new_xeno.notransform = TRUE
|
||||
new_xeno.invisibility = INVISIBILITY_MAXIMUM
|
||||
|
||||
sleep(6)
|
||||
@@ -99,8 +99,8 @@
|
||||
return
|
||||
|
||||
if(new_xeno)
|
||||
new_xeno.canmove = 1
|
||||
new_xeno.notransform = 0
|
||||
new_xeno.SetParalyzed(0)
|
||||
new_xeno.notransform = FALSE
|
||||
new_xeno.invisibility = 0
|
||||
|
||||
var/mob/living/carbon/old_owner = owner
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
hurt = FALSE
|
||||
if(hit_atom.density && isturf(hit_atom))
|
||||
if(hurt)
|
||||
Knockdown(20)
|
||||
DefaultCombatKnockdown(20)
|
||||
take_bodypart_damage(10)
|
||||
if(iscarbon(hit_atom) && hit_atom != src)
|
||||
var/mob/living/carbon/victim = hit_atom
|
||||
@@ -112,8 +112,8 @@
|
||||
if(hurt)
|
||||
victim.take_bodypart_damage(10)
|
||||
take_bodypart_damage(10)
|
||||
victim.Knockdown(20)
|
||||
Knockdown(20)
|
||||
victim.DefaultCombatKnockdown(20)
|
||||
DefaultCombatKnockdown(20)
|
||||
visible_message("<span class='danger'>[src] crashes into [victim], knocking them both over!</span>",\
|
||||
"<span class='userdanger'>You violently crash into [victim]!</span>")
|
||||
playsound(src,'sound/weapons/punch1.ogg',50,1)
|
||||
@@ -281,19 +281,23 @@
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/resist_buckle()
|
||||
. = FALSE
|
||||
if(restrained())
|
||||
changeNext_move(CLICK_CD_BREAKOUT)
|
||||
last_special = world.time + CLICK_CD_BREAKOUT
|
||||
// too soon.
|
||||
if(last_special > world.time)
|
||||
return
|
||||
var/buckle_cd = 600
|
||||
if(handcuffed)
|
||||
var/obj/item/restraints/O = src.get_item_by_slot(SLOT_HANDCUFFED)
|
||||
buckle_cd = O.breakouttime
|
||||
changeNext_move(min(CLICK_CD_BREAKOUT, buckle_cd))
|
||||
last_special = world.time + min(CLICK_CD_BREAKOUT, buckle_cd)
|
||||
visible_message("<span class='warning'>[src] attempts to unbuckle [p_them()]self!</span>", \
|
||||
"<span class='notice'>You attempt to unbuckle yourself... (This will take around [round(buckle_cd/600,1)] minute\s, and you need to stay still.)</span>")
|
||||
if(do_after(src, buckle_cd, 0, target = src))
|
||||
if(do_after(src, buckle_cd, 0, target = src, required_mobility_flags = MOBILITY_RESIST))
|
||||
if(!buckled)
|
||||
return
|
||||
buckled.user_unbuckle_mob(src,src)
|
||||
buckled.user_unbuckle_mob(src, src)
|
||||
else
|
||||
if(src && buckled)
|
||||
to_chat(src, "<span class='warning'>You fail to unbuckle yourself!</span>")
|
||||
@@ -301,21 +305,26 @@
|
||||
buckled.user_unbuckle_mob(src,src)
|
||||
|
||||
/mob/living/carbon/resist_fire()
|
||||
if(last_special > world.time)
|
||||
return
|
||||
fire_stacks -= 5
|
||||
Knockdown(60, TRUE, TRUE)
|
||||
DefaultCombatKnockdown(60, TRUE, TRUE)
|
||||
spin(32,2)
|
||||
visible_message("<span class='danger'>[src] rolls on the floor, trying to put [p_them()]self out!</span>", \
|
||||
"<span class='notice'>You stop, drop, and roll!</span>")
|
||||
last_special = world.time + 30
|
||||
sleep(30)
|
||||
if(fire_stacks <= 0)
|
||||
visible_message("<span class='danger'>[src] has successfully extinguished [p_them()]self!</span>", \
|
||||
"<span class='notice'>You extinguish yourself.</span>")
|
||||
ExtinguishMob()
|
||||
return
|
||||
|
||||
/mob/living/carbon/resist_restraints()
|
||||
/mob/living/carbon/resist_restraints(ignore_delay = FALSE)
|
||||
var/obj/item/I = null
|
||||
var/type = 0
|
||||
if(!ignore_delay && (last_special > world.time))
|
||||
to_chat(src, "<span class='warning'>You don't have the energy to resist your restraints that fast!</span>")
|
||||
return
|
||||
if(handcuffed)
|
||||
I = handcuffed
|
||||
type = 1
|
||||
@@ -324,14 +333,13 @@
|
||||
type = 2
|
||||
if(I)
|
||||
if(type == 1)
|
||||
changeNext_move(CLICK_CD_BREAKOUT)
|
||||
changeNext_move(min(CLICK_CD_BREAKOUT, I.breakouttime))
|
||||
last_special = world.time + CLICK_CD_BREAKOUT
|
||||
if(type == 2)
|
||||
changeNext_move(CLICK_CD_RANGE)
|
||||
changeNext_move(min(CLICK_CD_RANGE, I.breakouttime))
|
||||
last_special = world.time + CLICK_CD_RANGE
|
||||
cuff_resist(I)
|
||||
|
||||
|
||||
/mob/living/carbon/proc/cuff_resist(obj/item/I, breakouttime = 600, cuff_break = 0)
|
||||
if(I.item_flags & BEING_REMOVED)
|
||||
to_chat(src, "<span class='warning'>You're already attempting to remove [I]!</span>")
|
||||
@@ -341,7 +349,7 @@
|
||||
if(!cuff_break)
|
||||
visible_message("<span class='warning'>[src] attempts to remove [I]!</span>")
|
||||
to_chat(src, "<span class='notice'>You attempt to remove [I]... (This will take around [DisplayTimeText(breakouttime)] and you need to stand still.)</span>")
|
||||
if(do_after(src, breakouttime, 0, target = src))
|
||||
if(do_after(src, breakouttime, 0, target = src, required_mobility_flags = MOBILITY_RESIST))
|
||||
clear_cuffs(I, cuff_break)
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You fail to remove [I]!</span>")
|
||||
@@ -488,7 +496,7 @@
|
||||
visible_message("<span class='warning'>[src] dry heaves!</span>", \
|
||||
"<span class='userdanger'>You try to throw up, but there's nothing in your stomach!</span>")
|
||||
if(stun)
|
||||
Knockdown(200)
|
||||
DefaultCombatKnockdown(200)
|
||||
return 1
|
||||
|
||||
if(is_mouth_covered()) //make this add a blood/vomit overlay later it'll be hilarious
|
||||
@@ -572,9 +580,9 @@
|
||||
if(stam > DAMAGE_PRECISION)
|
||||
var/total_health = (health - stam)
|
||||
if(total_health <= crit_threshold && !stat)
|
||||
if(!IsKnockdown())
|
||||
if(CHECK_MOBILITY(src, MOBILITY_STAND))
|
||||
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
|
||||
Knockdown(100)
|
||||
KnockToFloor(TRUE)
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/carbon/update_sight()
|
||||
@@ -814,7 +822,7 @@
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
adjust_blindness(-1)
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
update_damage_hud()
|
||||
update_health_hud()
|
||||
med_hud_set_status()
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
var/mob/living/carbon/tempcarb = user
|
||||
if(!tempcarb.combatmode)
|
||||
totitemdamage *= 0.5
|
||||
if(user.resting)
|
||||
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
|
||||
totitemdamage *= 0.5
|
||||
if(!combatmode)
|
||||
totitemdamage *= 1.5
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
do_sparks(5, TRUE, src)
|
||||
var/power = M.powerlevel + rand(0,3)
|
||||
Knockdown(power*20)
|
||||
DefaultCombatKnockdown(power*20)
|
||||
if(stuttering < power)
|
||||
stuttering = power
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
@@ -267,7 +267,7 @@
|
||||
spawn(20)
|
||||
jitteriness = max(jitteriness - 990, 10) //Still jittery, but vastly less
|
||||
if((!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) && stun)
|
||||
Knockdown(60)
|
||||
DefaultCombatKnockdown(60)
|
||||
if(override)
|
||||
return override
|
||||
else
|
||||
@@ -346,16 +346,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()
|
||||
|
||||
else
|
||||
set_resting(FALSE, FALSE)
|
||||
update_mobility()
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
|
||||
@@ -419,7 +417,7 @@
|
||||
var/effect_amount = intensity - ear_safety
|
||||
if(effect_amount > 0)
|
||||
if(stun_pwr)
|
||||
Knockdown(stun_pwr*effect_amount)
|
||||
DefaultCombatKnockdown(stun_pwr*effect_amount)
|
||||
|
||||
if(istype(ears) && (deafen_pwr || damage_pwr))
|
||||
var/ear_damage = damage_pwr * effect_amount
|
||||
|
||||
@@ -41,3 +41,10 @@
|
||||
nutrition -= HUNGER_FACTOR/10
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
nutrition -= HUNGER_FACTOR/10
|
||||
|
||||
/mob/living/carbon/can_move_under_living(mob/living/other)
|
||||
. = ..()
|
||||
if(!.) //we failed earlier don't need to fail again
|
||||
return
|
||||
if(!other.lying && lying) //they're up, we're down.
|
||||
return FALSE
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
. += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly unsimian manner."
|
||||
|
||||
if(combatmode)
|
||||
. += "[t_He] [t_is] visibly tense[resting ? "." : ", and [t_is] standing in combative stance."]"
|
||||
. += "[t_He] [t_is] visibly tense[CHECK_MOBILITY(src, MOBILITY_STAND) ? "." : ", and [t_is] standing in combative stance."]"
|
||||
|
||||
var/trait_exam = common_trait_examine()
|
||||
if (!isnull(trait_exam))
|
||||
|
||||
@@ -491,7 +491,7 @@
|
||||
to_chat(usr, "<span class='warning'>Unable to locate a data core entry for this person.</span>")
|
||||
|
||||
/mob/living/carbon/human/proc/canUseHUD()
|
||||
return !(src.stat || IsKnockdown() || IsStun() || src.restrained())
|
||||
return CHECK_MOBILITY(src, MOBILITY_UI)
|
||||
|
||||
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, penetrate_thick = FALSE, bypass_immunity = FALSE)
|
||||
. = 1 // Default to returning true.
|
||||
@@ -724,8 +724,8 @@
|
||||
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#000000")
|
||||
cut_overlay(MA)
|
||||
|
||||
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
if(incapacitated() || lying )
|
||||
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE, check_resting = TRUE)
|
||||
if(incapacitated() || (check_resting && !CHECK_MOBILITY(src, MOBILITY_STAND)))
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
if(!Adjacent(M) && (M.loc != src))
|
||||
@@ -836,7 +836,7 @@
|
||||
visible_message("<span class='warning'>[src] dry heaves!</span>", \
|
||||
"<span class='userdanger'>You try to throw up, but there's nothing in your stomach!</span>")
|
||||
if(stun)
|
||||
Knockdown(200)
|
||||
DefaultCombatKnockdown(200)
|
||||
return 1
|
||||
..()
|
||||
|
||||
@@ -870,7 +870,7 @@
|
||||
return (istype(target) && target.stat == CONSCIOUS)
|
||||
|
||||
/mob/living/carbon/human/proc/can_be_firemanned(mob/living/carbon/target)
|
||||
return (ishuman(target) && target.lying)
|
||||
return (ishuman(target) && !CHECK_MOBILITY(target, MOBILITY_STAND))
|
||||
|
||||
/mob/living/carbon/human/proc/fireman_carry(mob/living/carbon/target)
|
||||
if(can_be_firemanned(target))
|
||||
@@ -879,7 +879,7 @@
|
||||
if(do_after(src, 30, TRUE, target))
|
||||
//Second check to make sure they're still valid to be carried
|
||||
if(can_be_firemanned(target) && !incapacitated(FALSE, TRUE))
|
||||
target.resting = FALSE
|
||||
target.set_resting(FALSE, TRUE)
|
||||
buckle_mob(target, TRUE, TRUE, 90, 1, 0)
|
||||
return
|
||||
visible_message("<span class='warning'>[src] fails to fireman carry [target]!")
|
||||
@@ -892,7 +892,7 @@
|
||||
/mob/living/carbon/human/proc/piggyback(mob/living/carbon/target)
|
||||
if(can_piggyback(target))
|
||||
visible_message("<span class='notice'>[target] starts to climb onto [src]...</span>")
|
||||
if(do_after(target, 15, target = src))
|
||||
if(do_after(target, 15, target = src, required_mobility_flags = MOBILITY_STAND))
|
||||
if(can_piggyback(target))
|
||||
if(target.incapacitated(FALSE, TRUE) || incapacitated(FALSE, TRUE))
|
||||
target.visible_message("<span class='warning'>[target] can't hang onto [src]!</span>")
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
"<span class='userdanger'>[M] disarmed [src]!</span>")
|
||||
else if(!M.client || prob(5)) // only natural monkeys get to stun reliably, (they only do it occasionaly)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
Knockdown(100)
|
||||
DefaultCombatKnockdown(100)
|
||||
log_combat(M, src, "tackled")
|
||||
visible_message("<span class='danger'>[M] has tackled down [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has tackled down [src]!</span>")
|
||||
@@ -228,9 +228,9 @@
|
||||
else
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
if(!lying) //CITADEL EDIT
|
||||
Knockdown(100, TRUE, FALSE, 30, 25)
|
||||
DefaultCombatKnockdown(100, TRUE, FALSE, 30, 25)
|
||||
else
|
||||
Knockdown(100)
|
||||
DefaultCombatKnockdown(100)
|
||||
log_combat(M, src, "tackled")
|
||||
visible_message("<span class='danger'>[M] has tackled down [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has tackled down [src]!</span>")
|
||||
@@ -297,10 +297,10 @@
|
||||
switch(M.damtype)
|
||||
if("brute")
|
||||
if(M.force > 35) // durand and other heavy mechas
|
||||
Knockdown(50)
|
||||
DefaultCombatKnockdown(50)
|
||||
src.throw_at(throw_target, rand(1,5), 7)
|
||||
else if(M.force >= 20 && !IsKnockdown()) // lightweight mechas like gygax
|
||||
Knockdown(30)
|
||||
else if(M.force >= 20 && CHECK_MOBILITY(src, MOBILITY_STAND)) // lightweight mechas like gygax
|
||||
DefaultCombatKnockdown(30)
|
||||
src.throw_at(throw_target, rand(1,3), 7)
|
||||
update |= temp.receive_damage(dmg, 0)
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
|
||||
48
code/modules/mob/living/carbon/human/human_mobility.dm
Normal file
48
code/modules/mob/living/carbon/human/human_mobility.dm
Normal file
@@ -0,0 +1,48 @@
|
||||
/mob/living/carbon/human/resist_a_rest(automatic = FALSE, ignoretimer = FALSE)
|
||||
if(!resting || stat || attemptingstandup)
|
||||
return FALSE
|
||||
if(ignoretimer)
|
||||
set_resting(FALSE, FALSE)
|
||||
return TRUE
|
||||
if(!lying) //if they're in a chair or something they don't need to force themselves off the ground.
|
||||
set_resting(FALSE, FALSE)
|
||||
return TRUE
|
||||
else if(!CHECK_MOBILITY(src, MOBILITY_RESIST))
|
||||
if(!automatic)
|
||||
to_chat(src, "<span class='warning'>You are unable to stand up right now.</span>")
|
||||
return FALSE
|
||||
else
|
||||
var/totaldelay = 3 //A little bit less than half of a second as a baseline for getting up from a rest
|
||||
if(getStaminaLoss() >= STAMINA_SOFTCRIT)
|
||||
to_chat(src, "<span class='warning'>You're too exhausted to get up!")
|
||||
return FALSE
|
||||
attemptingstandup = TRUE
|
||||
var/health_deficiency = max((maxHealth - (health - getStaminaLoss()))*0.5, 0)
|
||||
if(!has_gravity())
|
||||
health_deficiency = health_deficiency*0.2
|
||||
totaldelay += health_deficiency
|
||||
var/standupwarning = "[src] and everyone around them should probably yell at the dev team"
|
||||
switch(health_deficiency)
|
||||
if(-INFINITY to 10)
|
||||
standupwarning = "[src] stands right up!"
|
||||
if(10 to 35)
|
||||
standupwarning = "[src] tries to stand up."
|
||||
if(35 to 60)
|
||||
standupwarning = "[src] slowly pushes [p_them()]self upright."
|
||||
if(60 to 80)
|
||||
standupwarning = "[src] weakly attempts to stand up."
|
||||
if(80 to INFINITY)
|
||||
standupwarning = "[src] struggles to stand up."
|
||||
var/usernotice = automatic ? "<span class='notice'>You are now getting up. (Auto)</span>" : "<span class='notice'>You are now getting up.</span>"
|
||||
visible_message("<span class='notice'>[standupwarning]</span>", usernotice, vision_distance = 5)
|
||||
if(do_after(src, totaldelay, target = src, required_mobility_flags = MOBILITY_RESIST))
|
||||
set_resting(FALSE, TRUE)
|
||||
attemptingstandup = FALSE
|
||||
return TRUE
|
||||
else
|
||||
attemptingstandup = FALSE
|
||||
if(resting) //we didn't shove ourselves up or something
|
||||
visible_message("<span class='notice'>[src] falls right back down.</span>", "<span class='notice'>You fall right back down.</span>")
|
||||
if(has_gravity())
|
||||
playsound(src, "bodyfall", 20, 1)
|
||||
return FALSE
|
||||
@@ -1364,9 +1364,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
return TRUE
|
||||
|
||||
if(radiation > RAD_MOB_KNOCKDOWN && prob(RAD_MOB_KNOCKDOWN_PROB))
|
||||
if(!H.IsKnockdown())
|
||||
if(CHECK_MOBILITY(H, MOBILITY_STAND))
|
||||
H.emote("collapse")
|
||||
H.Knockdown(RAD_MOB_KNOCKDOWN_AMOUNT)
|
||||
H.DefaultCombatKnockdown(RAD_MOB_KNOCKDOWN_AMOUNT)
|
||||
to_chat(H, "<span class='danger'>You feel weak.</span>")
|
||||
|
||||
if(radiation > RAD_MOB_VOMIT && prob(RAD_MOB_VOMIT_PROB))
|
||||
@@ -1514,7 +1514,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
//CITADEL CHANGES - makes resting and disabled combat mode reduce punch damage, makes being out of combat mode result in you taking more damage
|
||||
if(!target.combatmode && damage < user.dna.species.punchstunthreshold)
|
||||
damage = user.dna.species.punchstunthreshold - 1
|
||||
if(user.resting)
|
||||
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
|
||||
damage *= 0.5
|
||||
if(!user.combatmode)
|
||||
damage *= 0.25
|
||||
@@ -1632,7 +1632,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
return*/
|
||||
if(!target.combatmode) // CITADEL CHANGE
|
||||
randn += -10 //CITADEL CHANGE - being out of combat mode makes it easier for you to get disarmed
|
||||
if(user.resting) //CITADEL CHANGE
|
||||
if(!CHECK_MOBILITY(user, MOBILITY_STAND)) //CITADEL CHANGE
|
||||
randn += 100 //CITADEL CHANGE - No kosher disarming if you're resting
|
||||
if(!user.combatmode) //CITADEL CHANGE
|
||||
randn += 25 //CITADEL CHANGE - Makes it harder to disarm outside of combat mode
|
||||
@@ -1715,7 +1715,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/mob/living/carbon/tempcarb = user
|
||||
if(!tempcarb.combatmode)
|
||||
totitemdamage *= 0.5
|
||||
if(user.resting)
|
||||
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
|
||||
totitemdamage *= 0.5
|
||||
if(istype(H))
|
||||
if(!H.combatmode)
|
||||
@@ -1831,12 +1831,14 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
|
||||
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")
|
||||
return
|
||||
if(!user.resting)
|
||||
if(user.IsKnockdown() || user.IsParalyzed() || user.IsStun())
|
||||
to_chat(user, "<span class='warning'>You can't seem to force yourself up right now!</span>")
|
||||
return
|
||||
if(CHECK_MOBILITY(user, MOBILITY_STAND))
|
||||
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)
|
||||
|
||||
@@ -1849,7 +1851,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
return FALSE
|
||||
if(attacker_style && attacker_style.disarm_act(user,target))
|
||||
return TRUE
|
||||
if(user.resting)
|
||||
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
|
||||
return FALSE
|
||||
else
|
||||
if(user == target)
|
||||
@@ -1862,7 +1864,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
target.w_uniform.add_fingerprint(user)
|
||||
SEND_SIGNAL(target, COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected)
|
||||
|
||||
if(!target.resting)
|
||||
if(CHECK_MOBILITY(target, MOBILITY_STAND))
|
||||
target.adjustStaminaLoss(5)
|
||||
|
||||
if(target.is_shove_knockdown_blocked())
|
||||
@@ -1876,7 +1878,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
|
||||
@@ -1887,15 +1889,15 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/append_message = ""
|
||||
if(shove_blocked && !target.buckled)
|
||||
var/directional_blocked = !target.Adjacent(target_shove_turf)
|
||||
var/targetatrest = target.resting
|
||||
var/targetatrest = !CHECK_MOBILITY(target, MOBILITY_STAND)
|
||||
if((directional_blocked || !(target_collateral_human || target_shove_turf.shove_act(target, user))) && !targetatrest)
|
||||
target.Knockdown(SHOVE_KNOCKDOWN_SOLID)
|
||||
target.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_SOLID)
|
||||
user.visible_message("<span class='danger'>[user.name] shoves [target.name], knocking them down!</span>",
|
||||
"<span class='danger'>You shove [target.name], knocking them down!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
log_combat(user, target, "shoved", "knocking them down")
|
||||
else if(target_collateral_human && !targetatrest)
|
||||
target.Knockdown(SHOVE_KNOCKDOWN_HUMAN)
|
||||
target_collateral_human.Knockdown(SHOVE_KNOCKDOWN_COLLATERAL)
|
||||
target.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_HUMAN)
|
||||
target_collateral_human.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_COLLATERAL)
|
||||
user.visible_message("<span class='danger'>[user.name] shoves [target.name] into [target_collateral_human.name]!</span>",
|
||||
"<span class='danger'>You shove [target.name] into [target_collateral_human.name]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
append_message += ", into [target_collateral_human.name]"
|
||||
|
||||
@@ -52,21 +52,20 @@
|
||||
return 0
|
||||
|
||||
/datum/species/angel/proc/CanFly(mob/living/carbon/human/H)
|
||||
if(H.stat || H.IsStun() || H.IsKnockdown())
|
||||
return 0
|
||||
if(!CHECK_MOBILITY(H, MOBILITY_MOVE))
|
||||
return FALSE
|
||||
if(H.wear_suit && ((H.wear_suit.flags_inv & HIDEJUMPSUIT) && (!H.wear_suit.species_exception || !is_type_in_list(src, H.wear_suit.species_exception)))) //Jumpsuits have tail holes, so it makes sense they have wing holes too
|
||||
to_chat(H, "Your suit blocks your wings from extending!")
|
||||
return 0
|
||||
return FALSE
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
if(environment && !(environment.return_pressure() > 30))
|
||||
to_chat(H, "<span class='warning'>The atmosphere is too thin for you to fly!</span>")
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/flight
|
||||
name = "Toggle Flight"
|
||||
@@ -81,12 +80,12 @@
|
||||
if(H.movement_type & FLYING)
|
||||
to_chat(H, "<span class='notice'>You settle gently back onto the ground...</span>")
|
||||
A.ToggleFlight(H,0)
|
||||
H.update_canmove()
|
||||
H.update_mobility()
|
||||
else
|
||||
to_chat(H, "<span class='notice'>You beat your wings and begin to hover gently above the ground...</span>")
|
||||
H.resting = 0
|
||||
H.set_resting(FALSE, TRUE)
|
||||
A.ToggleFlight(H,1)
|
||||
H.update_canmove()
|
||||
H.update_mobility()
|
||||
|
||||
/datum/species/angel/proc/flyslip(mob/living/carbon/human/H)
|
||||
var/obj/buckled_obj
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
button_icon_state = "slimeheal"
|
||||
icon_icon = 'icons/mob/actions/actions_slime.dmi'
|
||||
background_icon_state = "bg_alien"
|
||||
required_mobility_flags = NONE
|
||||
|
||||
/datum/action/innate/regenerate_limbs/IsAvailable()
|
||||
if(..())
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
if(/obj/item/projectile/energy/floramut)
|
||||
if(prob(15))
|
||||
H.rad_act(rand(30,80))
|
||||
H.Knockdown(100)
|
||||
H.DefaultCombatKnockdown(100)
|
||||
H.visible_message("<span class='warning'>[H] writhes in pain as [H.p_their()] vacuoles boil.</span>", "<span class='userdanger'>You writhe in pain as your vacuoles boil!</span>", "<span class='italics'>You hear the crunching of leaves.</span>")
|
||||
if(prob(80))
|
||||
H.randmutb()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
amount = dna.species.spec_stun(src,amount)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg)
|
||||
/mob/living/carbon/human/DefaultCombatKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg)
|
||||
amount = dna.species.spec_stun(src,amount)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -509,7 +509,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)
|
||||
@@ -521,7 +521,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
|
||||
bufferedstam = max(bufferedstam - drainrate, 0)
|
||||
//END OF CIT CHANGES
|
||||
|
||||
var/restingpwr = 1 + 4 * resting
|
||||
var/restingpwr = 1 + 4 * !CHECK_MOBILITY(src, MOBILITY_STAND)
|
||||
|
||||
//Dizziness
|
||||
if(dizziness)
|
||||
|
||||
@@ -50,17 +50,11 @@
|
||||
|
||||
// taken from /mob/living/carbon/human/interactive/
|
||||
/mob/living/carbon/monkey/proc/IsDeadOrIncap(checkDead = TRUE)
|
||||
if(!canmove)
|
||||
return 1
|
||||
if(!CHECK_MOBILITY(src, MOBILITY_MOVE))
|
||||
return TRUE
|
||||
if(health <= 0 && checkDead)
|
||||
return 1
|
||||
if(IsUnconscious())
|
||||
return 1
|
||||
if(IsStun() || IsKnockdown())
|
||||
return 1
|
||||
if(stat)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/monkey/proc/battle_screech()
|
||||
if(next_battle_screech < world.time)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
if(!client)
|
||||
if(stat == CONSCIOUS)
|
||||
if(on_fire || buckled || restrained() || (resting && canmove)) //CIT CHANGE - makes it so monkeys attempt to resist if they're resting)
|
||||
if(on_fire || buckled || restrained() || (!CHECK_MOBILITY(src, MOBILITY_STAND) && CHECK_MOBILITY(src, MOBILITY_MOVE))) //CIT CHANGE - makes it so monkeys attempt to resist if they're resting)
|
||||
if(!resisting && prob(MONKEY_RESIST_PROB))
|
||||
resisting = TRUE
|
||||
walk_to(src,0)
|
||||
@@ -21,7 +21,7 @@
|
||||
else if(resisting)
|
||||
resisting = FALSE
|
||||
else if((mode == MONKEY_IDLE && !pickupTarget && !prob(MONKEY_SHENANIGAN_PROB)) || !handle_combat())
|
||||
if(prob(25) && canmove && isturf(loc) && !pulledby)
|
||||
if(prob(25) && CHECK_MOBILITY(src, MOBILITY_MOVE) && isturf(loc) && !pulledby)
|
||||
step(src, pick(GLOB.cardinals))
|
||||
else if(prob(1))
|
||||
emote(pick("scratch","jump","roll","tail"))
|
||||
@@ -34,9 +34,9 @@
|
||||
gorillize()
|
||||
return
|
||||
if(radiation > RAD_MOB_KNOCKDOWN && prob(RAD_MOB_KNOCKDOWN_PROB))
|
||||
if(!IsKnockdown())
|
||||
if(!recoveringstam)
|
||||
emote("collapse")
|
||||
Knockdown(RAD_MOB_KNOCKDOWN_AMOUNT)
|
||||
DefaultCombatKnockdown(RAD_MOB_KNOCKDOWN_AMOUNT)
|
||||
to_chat(src, "<span class='danger'>You feel weak.</span>")
|
||||
if(radiation > RAD_MOB_MUTATE)
|
||||
if(prob(1))
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
if(!IsUnconscious())
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
if (prob(25))
|
||||
Knockdown(40)
|
||||
DefaultCombatKnockdown(40)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
log_combat(M, src, "pushed")
|
||||
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
|
||||
@@ -126,7 +126,7 @@
|
||||
var/obj/item/I = null
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
if(prob(95))
|
||||
Knockdown(20)
|
||||
DefaultCombatKnockdown(20)
|
||||
visible_message("<span class='danger'>[M] has tackled down [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has tackled down [name]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
else
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if(EFFECT_STUN)
|
||||
Stun(effect * hit_percent)
|
||||
if(EFFECT_KNOCKDOWN)
|
||||
Knockdown(effect * hit_percent, override_stamdmg = knockdown_stammax ? CLAMP(knockdown_stamoverride, 0, knockdown_stammax-getStaminaLoss()) : knockdown_stamoverride)
|
||||
DefaultCombatKnockdown(effect * hit_percent, override_stamdmg = knockdown_stammax ? CLAMP(knockdown_stamoverride, 0, knockdown_stammax-getStaminaLoss()) : knockdown_stamoverride)
|
||||
if(EFFECT_UNCONSCIOUS)
|
||||
Unconscious(effect * hit_percent)
|
||||
if(EFFECT_IRRADIATE)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
update_action_buttons_icon()
|
||||
update_damage_hud()
|
||||
update_health_hud()
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
if(!gibbed && !QDELETED(src))
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
if(H.get_num_arms() == 0)
|
||||
if(H.get_num_legs() != 0)
|
||||
message_param = "tries to point at %t with a leg, <span class='userdanger'>falling down</span> in the process!"
|
||||
H.Knockdown(20)
|
||||
H.DefaultCombatKnockdown(20)
|
||||
else
|
||||
message_param = "<span class='userdanger'>bumps [user.p_their()] head on the ground</span> trying to motion towards %t."
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5)
|
||||
@@ -377,7 +377,7 @@
|
||||
. = ..()
|
||||
if(. && isliving(user))
|
||||
var/mob/living/L = user
|
||||
L.Knockdown(200)
|
||||
L.DefaultCombatKnockdown(200)
|
||||
|
||||
/datum/emote/living/sway
|
||||
key = "sway"
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
/mob/living/proc/ZImpactDamage(turf/T, levels)
|
||||
visible_message("<span class='danger'>[src] crashes into [T] with a sickening noise!</span>")
|
||||
adjustBruteLoss((levels * 5) ** 1.5)
|
||||
Knockdown(levels * 50)
|
||||
DefaultCombatKnockdown(levels * 50)
|
||||
|
||||
|
||||
/mob/living/proc/OpenCraftingMenu()
|
||||
@@ -88,7 +88,7 @@
|
||||
var/they_can_move = TRUE
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
they_can_move = L.canmove //L.mobility_flags & MOBILITY_MOVE
|
||||
they_can_move = CHECK_MOBILITY(L, MOBILITY_MOVE)
|
||||
//Also spread diseases
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
@@ -115,7 +115,7 @@
|
||||
return 1
|
||||
|
||||
//CIT CHANGES START HERE - makes it so resting stops you from moving through standing folks without a short delay
|
||||
if(resting && !L.resting)
|
||||
if(!CHECK_MOBILITY(src, MOBILITY_STAND) && CHECK_MOBILITY(L, MOBILITY_STAND))
|
||||
var/origtargetloc = L.loc
|
||||
if(!pulledby)
|
||||
if(attemptingcrawl)
|
||||
@@ -125,7 +125,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)
|
||||
@@ -369,8 +369,8 @@
|
||||
death()
|
||||
|
||||
|
||||
/mob/living/incapacitated(ignore_restraints, ignore_grab)
|
||||
if(stat || IsUnconscious() || IsStun() || IsKnockdown() || recoveringstam || (!ignore_restraints && restrained(ignore_grab))) // CIT CHANGE - adds recoveringstam check here
|
||||
/mob/living/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, check_immobilized = FALSE)
|
||||
if(stat || IsUnconscious() || IsStun() || IsParalyzed() || recoveringstam || (check_immobilized && IsImmobilized()) || (!ignore_restraints && restrained(ignore_grab)))
|
||||
return TRUE
|
||||
|
||||
/mob/living/canUseStorage()
|
||||
@@ -428,7 +428,6 @@
|
||||
else
|
||||
if(alert(src, "You sure you want to sleep for a while?", "Sleep", "Yes", "No") == "Yes")
|
||||
SetSleeping(400) //Short nap
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/get_contents()
|
||||
|
||||
@@ -493,7 +492,7 @@
|
||||
stat = UNCONSCIOUS //the mob starts unconscious,
|
||||
blind_eyes(1)
|
||||
updatehealth() //then we check if the mob should wake up.
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
update_sight()
|
||||
clear_alert("not_enough_oxy")
|
||||
reload_fullscreen()
|
||||
@@ -512,8 +511,7 @@
|
||||
setStaminaLoss(0, 0)
|
||||
SetUnconscious(0, FALSE)
|
||||
set_disgust(0)
|
||||
SetStun(0, FALSE)
|
||||
SetKnockdown(0, FALSE)
|
||||
SetAllImmobility(0, FALSE)
|
||||
SetSleeping(0, FALSE)
|
||||
radiation = 0
|
||||
nutrition = NUTRITION_LEVEL_FED + 50
|
||||
@@ -528,7 +526,7 @@
|
||||
ExtinguishMob()
|
||||
fire_stacks = 0
|
||||
confused = 0
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
//Heal all organs
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
@@ -552,30 +550,6 @@
|
||||
var/obj/item/item = i
|
||||
SEND_SIGNAL(item, COMSIG_ITEM_WEARERCROSSED, AM)
|
||||
|
||||
/mob/living/Move(atom/newloc, direct)
|
||||
if (buckled && buckled.loc != newloc) //not updating position
|
||||
if (!buckled.anchored)
|
||||
return buckled.Move(newloc, direct)
|
||||
else
|
||||
return 0
|
||||
|
||||
var/old_direction = dir
|
||||
var/turf/T = loc
|
||||
|
||||
if(pulling)
|
||||
update_pull_movespeed()
|
||||
|
||||
. = ..()
|
||||
|
||||
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1)//separated from our puller and not in the middle of a diagonal move.
|
||||
pulledby.stop_pulling()
|
||||
|
||||
if(active_storage && !(CanReach(active_storage.parent,view_only = TRUE)))
|
||||
active_storage.close(src)
|
||||
|
||||
if(lying && !buckled && prob(getBruteLoss()*200/maxHealth))
|
||||
makeTrail(newloc, T, old_direction)
|
||||
|
||||
/mob/living/proc/makeTrail(turf/target_turf, turf/start, direction)
|
||||
if(!has_gravity())
|
||||
return
|
||||
@@ -648,66 +622,97 @@
|
||||
..(pressure_difference, direction, pressure_resistance_prob_delta)
|
||||
|
||||
/mob/living/can_resist()
|
||||
return !((next_move > world.time) || incapacitated(ignore_restraints = TRUE))
|
||||
return !((next_move > world.time) || !CHECK_MOBILITY(src, MOBILITY_RESIST))
|
||||
|
||||
/// Resist verb for attempting to get out of whatever is restraining your motion. Gives you resist clickdelay if do_resist() returns true.
|
||||
/mob/living/verb/resist()
|
||||
set name = "Resist"
|
||||
set category = "IC"
|
||||
|
||||
if(!can_resist())
|
||||
return
|
||||
changeNext_move(CLICK_CD_RESIST)
|
||||
|
||||
if(do_resist())
|
||||
changeNext_move(CLICK_CD_RESIST)
|
||||
|
||||
/// The actual proc for resisting. Return TRUE to give clickdelay.
|
||||
/mob/living/proc/do_resist()
|
||||
SEND_SIGNAL(src, COMSIG_LIVING_RESIST, src)
|
||||
//resisting grabs (as if it helps anyone...)
|
||||
if(!restrained(ignore_grab = 1) && pulledby)
|
||||
visible_message("<span class='danger'>[src] resists against [pulledby]'s grip!</span>")
|
||||
log_combat(src, pulledby, "resisted grab")
|
||||
resist_grab()
|
||||
return
|
||||
// only works if you're not cuffed.
|
||||
if(!restrained(ignore_grab = TRUE) && pulledby)
|
||||
var/old_gs = pulledby.grab_state
|
||||
attempt_resist_grab(FALSE)
|
||||
// Return as we should only resist one thing at a time. Give clickdelay if the grab wasn't passive.
|
||||
return old_gs? TRUE : FALSE
|
||||
|
||||
//unbuckling yourself
|
||||
// unbuckling yourself. stops the chain if you try it.
|
||||
if(buckled && last_special <= world.time)
|
||||
resist_buckle()
|
||||
log_combat(src, buckled, "resisted buckle")
|
||||
return resist_buckle()
|
||||
|
||||
// CIT CHANGE - climbing out of a gut
|
||||
if(attempt_vr(src,"vore_process_resist",args)) return TRUE
|
||||
// CIT CHANGE - climbing out of a gut.
|
||||
if(attempt_vr(src,"vore_process_resist",args))
|
||||
//Sure, give clickdelay for anti spam. shouldn't be combat voring anyways.
|
||||
return TRUE
|
||||
|
||||
//Breaking out of a container (Locker, sleeper, cryo...)
|
||||
else if(isobj(loc))
|
||||
if(isobj(loc))
|
||||
var/obj/C = loc
|
||||
C.container_resist(src)
|
||||
// This shouldn't give clickdelays sometime (e.g. going out of a mech/unwelded and unlocked locker/disposals bin/etc) but there's so many overrides that I am not going to bother right now.
|
||||
return TRUE
|
||||
|
||||
else if(canmove)
|
||||
if(CHECK_MOBILITY(src, MOBILITY_MOVE))
|
||||
if(on_fire)
|
||||
resist_fire() //stop, drop, and roll
|
||||
return
|
||||
if(resting) //cit change - allows resisting out of resting
|
||||
resist_a_rest() // ditto
|
||||
return
|
||||
if(resist_embedded()) //Citadel Change for embedded removal memes
|
||||
return
|
||||
if(last_special <= world.time)
|
||||
resist_restraints() //trying to remove cuffs.
|
||||
return
|
||||
// Give clickdelay
|
||||
return TRUE
|
||||
if(resting) //cit change - allows resisting out of resting
|
||||
resist_a_rest() // ditto
|
||||
// DO NOT GIVE CLCIKDELAY - resist_a_rest() handles spam prevention. Somewhat.
|
||||
return FALSE
|
||||
if(last_special <= world.time)
|
||||
resist_restraints() //trying to remove cuffs.
|
||||
// DO NOT GIVE CLICKDELAY - last_special handles this.
|
||||
return FALSE
|
||||
if(CHECK_MOBILITY(src, MOBILITY_USE) && resist_embedded()) //Citadel Change for embedded removal memes - requires being able to use items.
|
||||
// DO NOT GIVE DEFAULT CLICKDELAY - This is a combat action.
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
return FALSE
|
||||
|
||||
/// Proc to resist a grab. moving_resist is TRUE if this began by someone attempting to move. Return FALSE if still grabbed/failed to break out. Use this instead of resist_grab() directly.
|
||||
/mob/proc/attempt_resist_grab(moving_resist, forced, log = TRUE)
|
||||
if(!pulledby) //not being grabbed
|
||||
return TRUE
|
||||
var/old_gs = pulledby.grab_state //how strong the grab is
|
||||
var/old_pulled = pulledby
|
||||
var/success = do_resist_grab(moving_resist, forced)
|
||||
if(log)
|
||||
log_combat(src, old_pulled, "[success? "successfully broke free of" : "failed to resist"] a grab of strength [old_gs][moving_resist? " (moving)":""][forced? " (forced)":""]")
|
||||
return success
|
||||
|
||||
/mob/proc/resist_grab(moving_resist)
|
||||
return 1 //returning 0 means we successfully broke free
|
||||
/*!
|
||||
* Proc that actually does the grab resisting. Return TRUE if successful. Does not check that a grab exists! Use attempt_resist_grab() instead of this in general!
|
||||
* Forced is if something other than the user mashing movement keys/pressing resist button did it, silent is if it makes messages (like "attempted to resist" and "broken free").
|
||||
* Forced does NOT force success!
|
||||
*/
|
||||
/mob/proc/do_resist_grab(moving_resist, forced, silent = FALSE)
|
||||
return FALSE
|
||||
|
||||
/mob/living/resist_grab(moving_resist)
|
||||
. = 1
|
||||
/mob/living/do_resist_grab(moving_resist, forced, silent = FALSE)
|
||||
. = ..()
|
||||
if(pulledby.grab_state)
|
||||
if(!resting && prob(30/pulledby.grab_state))
|
||||
if(CHECK_MOBILITY(src, MOBILITY_STAND) && prob(30/pulledby.grab_state))
|
||||
visible_message("<span class='danger'>[src] has broken free of [pulledby]'s grip!</span>")
|
||||
log_combat(pulledby, src, "broke grab")
|
||||
pulledby.stop_pulling()
|
||||
return 0
|
||||
if(moving_resist && client) //we resisted by trying to move
|
||||
return TRUE
|
||||
else if(moving_resist && client) //we resisted by trying to move // this is a horrible system and whoever thought using client instead of mob is okay is not an okay person
|
||||
client.move_delay = world.time + 20
|
||||
visible_message("<span class='danger'>[src] resists against [pulledby]'s grip!</span>")
|
||||
else
|
||||
pulledby.stop_pulling()
|
||||
return 0
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/resist_buckle()
|
||||
buckled.user_unbuckle_mob(src,src)
|
||||
@@ -1048,7 +1053,7 @@
|
||||
"[C] trips over [src] and falls!", \
|
||||
"[C] topples over [src]!", \
|
||||
"[C] leaps out of [src]'s way!")]</span>")
|
||||
C.Knockdown(40)
|
||||
C.DefaultCombatKnockdown(40)
|
||||
|
||||
/mob/living/ConveyorMove()
|
||||
if((movement_type & FLYING) && !stat)
|
||||
@@ -1058,61 +1063,6 @@
|
||||
/mob/living/can_be_pulled()
|
||||
return ..() && !(buckled && buckled.buckle_prevents_pull)
|
||||
|
||||
//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_canmove()
|
||||
var/ko = IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (HAS_TRAIT(src, TRAIT_DEATHCOMA))
|
||||
var/move_and_fall = stat == SOFT_CRIT && !pulledby
|
||||
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
|
||||
var/buckle_lying = !(buckled && !buckled.buckle_lying)
|
||||
var/has_legs = get_num_legs()
|
||||
var/has_arms = get_num_arms()
|
||||
var/ignore_legs = get_leg_ignore()
|
||||
var/pinned = resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
|
||||
if(ko || move_and_fall || IsStun() || chokehold) // Cit change - makes resting not force you to drop everything
|
||||
drop_all_held_items()
|
||||
unset_machine()
|
||||
if(pulling)
|
||||
stop_pulling()
|
||||
else if(resting) //CIT CHANGE - makes resting make you stop pulling and interacting with machines
|
||||
unset_machine() //CIT CHANGE - Ditto!
|
||||
if(pulling) //CIT CHANGE - Ditto.
|
||||
stop_pulling() //CIT CHANGE - Ditto...
|
||||
else if(has_legs || ignore_legs)
|
||||
lying = 0
|
||||
if (pulledby && isliving(pulledby))
|
||||
var/mob/living/L = pulledby
|
||||
L.update_pull_movespeed()
|
||||
if(buckled)
|
||||
lying = 90*buckle_lying
|
||||
else if(!lying)
|
||||
if(resting)
|
||||
lying = pick(90, 270) // Cit change - makes resting not force you to drop your held items
|
||||
if(has_gravity()) // Cit change - Ditto
|
||||
playsound(src, "bodyfall", 50, 1) // Cit change - Ditto!
|
||||
else if(ko || move_and_fall || (!has_legs && !ignore_legs) || chokehold)
|
||||
fall(forced = 1)
|
||||
canmove = !(ko || recoveringstam || pinned || IsStun() || IsFrozen() || chokehold || buckled || (!has_legs && !ignore_legs && !has_arms)) //Cit change - makes it plausible to move while resting, adds pinning and stamina crit
|
||||
density = !lying
|
||||
if(resting)
|
||||
ENABLE_BITFIELD(movement_type, CRAWLING)
|
||||
else
|
||||
DISABLE_BITFIELD(movement_type, CRAWLING)
|
||||
if(lying)
|
||||
if(layer == initial(layer)) //to avoid special cases like hiding larvas.
|
||||
layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
|
||||
else
|
||||
if(layer == LYING_MOB_LAYER)
|
||||
layer = initial(layer)
|
||||
update_transform()
|
||||
if(!lying && lying_prev)
|
||||
if(client)
|
||||
client.move_delay = world.time + movement_delay()
|
||||
lying_prev = lying
|
||||
if(canmove && !intentionalresting && iscarbon(src) && client && client.prefs && client.prefs.autostand)//CIT CHANGE - adds autostanding as a preference
|
||||
addtimer(CALLBACK(src, .proc/resist_a_rest, TRUE), 0) //CIT CHANGE - ditto
|
||||
return canmove
|
||||
|
||||
/mob/living/proc/AddAbility(obj/effect/proc_holder/A)
|
||||
abilities.Add(A)
|
||||
A.on_gain(src)
|
||||
@@ -1140,42 +1090,6 @@
|
||||
return LINGHIVE_LINK
|
||||
return LINGHIVE_NONE
|
||||
|
||||
/mob/living/forceMove(atom/destination)
|
||||
stop_pulling()
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob(src, force = TRUE)
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs(force = TRUE)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(client)
|
||||
reset_perspective()
|
||||
update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
|
||||
|
||||
/mob/living/proc/update_z(new_z) // 1+ to register, null to unregister
|
||||
if(isnull(new_z) && audiovisual_redirect)
|
||||
return
|
||||
if (registered_z != new_z)
|
||||
if (registered_z)
|
||||
SSmobs.clients_by_zlevel[registered_z] -= src
|
||||
if (client || audiovisual_redirect)
|
||||
if (new_z)
|
||||
SSmobs.clients_by_zlevel[new_z] += src
|
||||
for (var/I in length(SSidlenpcpool.idle_mobs_by_zlevel[new_z]) to 1 step -1) //Backwards loop because we're removing (guarantees optimal rather than worst-case performance), it's fine to use .len here but doesn't compile on 511
|
||||
var/mob/living/simple_animal/SA = SSidlenpcpool.idle_mobs_by_zlevel[new_z][I]
|
||||
if (SA)
|
||||
SA.toggle_ai(AI_ON) // Guarantees responsiveness for when appearing right next to mobs
|
||||
else
|
||||
SSidlenpcpool.idle_mobs_by_zlevel[new_z] -= SA
|
||||
|
||||
registered_z = new_z
|
||||
else
|
||||
registered_z = null
|
||||
|
||||
/mob/living/onTransitZ(old_z,new_z)
|
||||
..()
|
||||
update_z(new_z)
|
||||
|
||||
/mob/living/MouseDrop(mob/over)
|
||||
. = ..()
|
||||
var/mob/living/user = usr
|
||||
@@ -1222,14 +1136,6 @@
|
||||
GLOB.dead_mob_list += src
|
||||
. = ..()
|
||||
switch(var_name)
|
||||
if("knockdown")
|
||||
SetKnockdown(var_value)
|
||||
if("stun")
|
||||
SetStun(var_value)
|
||||
if("unconscious")
|
||||
SetUnconscious(var_value)
|
||||
if("sleeping")
|
||||
SetSleeping(var_value)
|
||||
if("eye_blind")
|
||||
set_blindness(var_value)
|
||||
if("eye_damage")
|
||||
@@ -1261,21 +1167,20 @@
|
||||
SetSleeping(clamp_unconscious_to)
|
||||
if(AmountUnconscious() > clamp_unconscious_to)
|
||||
SetUnconscious(clamp_unconscious_to)
|
||||
if(AmountStun() > clamp_immobility_to)
|
||||
SetStun(clamp_immobility_to)
|
||||
if(AmountKnockdown() > clamp_immobility_to)
|
||||
SetKnockdown(clamp_immobility_to)
|
||||
HealAllImmobilityUpTo(clamp_immobility_to)
|
||||
adjustStaminaLoss(min(0, -stamina_boost))
|
||||
adjustStaminaLossBuffered(min(0, -stamina_buffer_boost))
|
||||
if(scale_stamina_loss_recovery)
|
||||
adjustStaminaLoss(min(-((getStaminaLoss() - stamina_loss_recovery_bypass) * scale_stamina_loss_recovery), 0))
|
||||
if(put_on_feet)
|
||||
resting = FALSE
|
||||
lying = FALSE
|
||||
set_resting(FALSE, TRUE, FALSE)
|
||||
if(reset_misc)
|
||||
stuttering = 0
|
||||
updatehealth()
|
||||
update_stamina()
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
if(healing_chems)
|
||||
reagents.add_reagent_list(healing_chems)
|
||||
|
||||
/mob/living/canface()
|
||||
return ..() && CHECK_MOBILITY(src, MOBILITY_MOVE)
|
||||
|
||||
@@ -261,21 +261,21 @@
|
||||
else
|
||||
visible_message("<span class='danger'>[user] has grabbed [src] aggressively!</span>", \
|
||||
"<span class='userdanger'>[user] has grabbed you aggressively!</span>")
|
||||
drop_all_held_items()
|
||||
update_mobility()
|
||||
stop_pulling()
|
||||
log_combat(user, src, "grabbed", addition="aggressive grab[add_log]")
|
||||
if(GRAB_NECK)
|
||||
log_combat(user, src, "grabbed", addition="neck grab")
|
||||
visible_message("<span class='danger'>[user] has grabbed [src] by the neck!</span>",\
|
||||
"<span class='userdanger'>[user] has grabbed you by the neck!</span>")
|
||||
update_canmove() //we fall down
|
||||
update_mobility() //we fall down
|
||||
if(!buckled && !density)
|
||||
Move(user.loc)
|
||||
if(GRAB_KILL)
|
||||
log_combat(user, src, "strangled", addition="kill grab")
|
||||
visible_message("<span class='danger'>[user] is strangling [src]!</span>", \
|
||||
"<span class='userdanger'>[user] is strangling you!</span>")
|
||||
update_canmove() //we fall down
|
||||
update_mobility() //we fall down
|
||||
if(!buckled && !density)
|
||||
Move(user.loc)
|
||||
return 1
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are knocked down if it gets too high. Holodeck and hallucinations deal this.
|
||||
var/crit_threshold = HEALTH_THRESHOLD_CRIT // when the mob goes from "normal" to crit
|
||||
|
||||
var/mobility_flags = MOBILITY_FLAGS_DEFAULT
|
||||
|
||||
var/confused = 0 //Makes the mob move in random directions.
|
||||
|
||||
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
|
||||
@@ -112,4 +114,7 @@
|
||||
|
||||
var/drag_slowdown = TRUE //Whether the mob is slowed down when dragging another prone mob
|
||||
|
||||
var/rotate_on_lying = FALSE
|
||||
var/rotate_on_lying = FALSE
|
||||
|
||||
/// Next world.time when we can get the "you can't move while buckled to [thing]" message.
|
||||
var/buckle_message_cooldown = 0
|
||||
|
||||
155
code/modules/mob/living/living_mobility.dm
Normal file
155
code/modules/mob/living/living_mobility.dm
Normal file
@@ -0,0 +1,155 @@
|
||||
/// IN THE FUTURE, WE WILL PROBABLY REFACTOR TO LESSEN THE NEED FOR UPDATE_MOBILITY, BUT FOR NOW.. WE CAN START DOING THIS.
|
||||
/// FOR BLOCKING MOVEMENT, USE TRAIT_MOBILITY_NOMOVE AS MUCH AS POSSIBLE. IT WILL MAKE REFACTORS IN THE FUTURE EASIER.
|
||||
/mob/living/ComponentInitialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, SIGNAL_TRAIT(TRAIT_MOBILITY_NOMOVE), .proc/update_mobility)
|
||||
RegisterSignal(src, SIGNAL_TRAIT(TRAIT_MOBILITY_NOPICKUP), .proc/update_mobility)
|
||||
RegisterSignal(src, SIGNAL_TRAIT(TRAIT_MOBILITY_NOUSE), .proc/update_mobility)
|
||||
|
||||
//Stuff like mobility flag updates, resting updates, etc.
|
||||
|
||||
//Force-set resting variable, without needing to resist/etc.
|
||||
/mob/living/proc/set_resting(new_resting, silent = FALSE, updating = TRUE)
|
||||
if(new_resting != resting)
|
||||
resting = new_resting
|
||||
if(!silent)
|
||||
to_chat(src, "<span class='notice'>You are now [resting? "resting" : "getting up"].</span>")
|
||||
update_resting(updating)
|
||||
|
||||
/mob/living/proc/update_resting(update_mobility = TRUE)
|
||||
if(update_mobility)
|
||||
update_mobility()
|
||||
|
||||
//Force mob to rest, does NOT do stamina damage.
|
||||
//It's really not recommended to use this proc to give feedback, hence why silent is defaulting to true.
|
||||
/mob/living/proc/KnockToFloor(disarm_items = FALSE, silent = TRUE, updating = TRUE)
|
||||
if(!silent && !resting)
|
||||
to_chat(src, "<span class='warning'>You are knocked to the floor!</span>")
|
||||
set_resting(TRUE, TRUE, updating)
|
||||
if(disarm_items)
|
||||
drop_all_held_items()
|
||||
|
||||
/mob/living/proc/lay_down()
|
||||
set name = "Rest"
|
||||
set category = "IC"
|
||||
if(client?.prefs?.autostand)
|
||||
intentionalresting = !intentionalresting
|
||||
to_chat(src, "<span class='notice'>You are now attempting to [intentionalresting ? "[!resting ? "lay down and ": ""]stay down" : "[resting ? "get up and ": ""]stay up"].</span>")
|
||||
if(intentionalresting && !resting)
|
||||
set_resting(TRUE, FALSE)
|
||||
else
|
||||
resist_a_rest()
|
||||
else
|
||||
if(!resting)
|
||||
set_resting(TRUE, FALSE)
|
||||
to_chat(src, "<span class='notice'>You are now laying down.</span>")
|
||||
else
|
||||
resist_a_rest()
|
||||
|
||||
/mob/living/proc/resist_a_rest(automatic = FALSE, ignoretimer = FALSE) //Lets mobs resist out of resting. Major QOL change with combat reworks.
|
||||
set_resting(FALSE, TRUE)
|
||||
return TRUE
|
||||
|
||||
//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)
|
||||
|
||||
var/has_arms = get_num_arms()
|
||||
var/has_legs = get_num_legs()
|
||||
var/ignore_legs = get_leg_ignore()
|
||||
var/stun = IsStun()
|
||||
var/paralyze = IsParalyzed()
|
||||
var/knockdown = IsKnockdown()
|
||||
var/daze = IsDazed()
|
||||
var/immobilize = IsImmobilized()
|
||||
|
||||
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
|
||||
var/restrained = restrained()
|
||||
var/pinned = resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
|
||||
var/has_limbs = has_arms || ignore_legs || has_legs
|
||||
var/canmove = !immobilize && !stun && conscious && !paralyze && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && has_limbs && !pinned && !recoveringstam
|
||||
var/canresist = !stun && conscious && !stat_softcrit && !paralyze && has_limbs && !recoveringstam
|
||||
|
||||
if(canmove)
|
||||
mobility_flags |= MOBILITY_MOVE
|
||||
else
|
||||
mobility_flags &= ~MOBILITY_MOVE
|
||||
|
||||
if(canresist)
|
||||
mobility_flags |= MOBILITY_RESIST
|
||||
else
|
||||
mobility_flags &= ~MOBILITY_RESIST
|
||||
|
||||
var/canstand_involuntary = conscious && !stat_softcrit && !knockdown && !chokehold && !paralyze && (ignore_legs || has_legs) && !(buckled && buckled.buckle_lying) && !recoveringstam
|
||||
var/canstand = canstand_involuntary && !resting
|
||||
|
||||
var/should_be_lying = !canstand
|
||||
if(buckled)
|
||||
if(buckled.buckle_lying != -1)
|
||||
should_be_lying = buckled.buckle_lying
|
||||
|
||||
if(should_be_lying)
|
||||
mobility_flags &= ~MOBILITY_STAND
|
||||
if(!lying) //force them on the ground
|
||||
lying = pick(90, 270)
|
||||
if(has_gravity() && !buckled)
|
||||
playsound(src, "bodyfall", 20, 1)
|
||||
else
|
||||
mobility_flags |= MOBILITY_STAND
|
||||
lying = 0
|
||||
|
||||
if(should_be_lying || restrained || incapacitated())
|
||||
mobility_flags &= ~(MOBILITY_UI|MOBILITY_PULL)
|
||||
else
|
||||
mobility_flags |= MOBILITY_UI|MOBILITY_PULL
|
||||
|
||||
var/canitem_general = !paralyze && !stun && conscious && !(stat_softcrit) && !chokehold && !restrained && has_arms && !recoveringstam
|
||||
if(canitem_general)
|
||||
mobility_flags |= (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_STORAGE | MOBILITY_HOLD)
|
||||
else
|
||||
mobility_flags &= ~(MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_STORAGE | MOBILITY_HOLD)
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_MOBILITY_NOMOVE))
|
||||
DISABLE_BITFIELD(mobility_flags, MOBILITY_MOVE)
|
||||
if(HAS_TRAIT(src, TRAIT_MOBILITY_NOPICKUP))
|
||||
DISABLE_BITFIELD(mobility_flags, MOBILITY_PICKUP)
|
||||
if(HAS_TRAIT(src, TRAIT_MOBILITY_NOUSE))
|
||||
DISABLE_BITFIELD(mobility_flags, MOBILITY_USE)
|
||||
|
||||
if(daze)
|
||||
DISABLE_BITFIELD(mobility_flags, MOBILITY_USE)
|
||||
|
||||
//Handle update-effects.
|
||||
if(!CHECK_MOBILITY(src, MOBILITY_HOLD))
|
||||
drop_all_held_items()
|
||||
if(!CHECK_MOBILITY(src, MOBILITY_PULL))
|
||||
if(pulling)
|
||||
stop_pulling()
|
||||
if(!CHECK_MOBILITY(src, MOBILITY_UI))
|
||||
unset_machine()
|
||||
|
||||
if(isliving(pulledby))
|
||||
var/mob/living/L = pulledby
|
||||
L.update_pull_movespeed()
|
||||
|
||||
//Handle lying down, voluntary or involuntary
|
||||
density = !lying
|
||||
if(lying)
|
||||
set_resting(TRUE, TRUE, FALSE)
|
||||
if(layer == initial(layer)) //to avoid special cases like hiding larvas.
|
||||
layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
|
||||
else
|
||||
if(layer == LYING_MOB_LAYER)
|
||||
layer = initial(layer)
|
||||
update_transform()
|
||||
lying_prev = lying
|
||||
|
||||
//Handle citadel autoresist
|
||||
if(CHECK_MOBILITY(src, MOBILITY_MOVE) && !intentionalresting && canstand_involuntary && iscarbon(src) && client?.prefs?.autostand)//CIT CHANGE - adds autostanding as a preference
|
||||
addtimer(CALLBACK(src, .proc/resist_a_rest, TRUE), 0) //CIT CHANGE - ditto
|
||||
|
||||
return mobility_flags
|
||||
@@ -12,10 +12,14 @@
|
||||
return (!density || lying)
|
||||
if(buckled == mover)
|
||||
return TRUE
|
||||
if(ismob(mover))
|
||||
if (mover in buckled_mobs)
|
||||
if(!ismob(mover))
|
||||
if(mover.throwing?.thrower == src)
|
||||
return TRUE
|
||||
return (!mover.density || !density || lying || (mover.throwing && mover.throwing.thrower == src && !ismob(mover)))
|
||||
if(ismob(mover))
|
||||
if(mover in buckled_mobs)
|
||||
return TRUE
|
||||
var/mob/living/L = mover //typecast first, check isliving and only check this if living using short circuit
|
||||
return (!density || (isliving(mover)? L.can_move_under_living(src) : !mover.density))
|
||||
|
||||
/mob/living/toggle_move_intent()
|
||||
. = ..()
|
||||
@@ -25,6 +29,10 @@
|
||||
update_move_intent_slowdown()
|
||||
return ..()
|
||||
|
||||
/// whether or not we can slide under another living mob. defaults to if we're not dense. CanPass should check "overriding circumstances" like buckled mobs/having PASSMOB flag, etc.
|
||||
/mob/living/proc/can_move_under_living(mob/living/other)
|
||||
return !density
|
||||
|
||||
/mob/living/proc/update_move_intent_slowdown()
|
||||
var/mod = 0
|
||||
if(m_intent == MOVE_INTENT_WALK)
|
||||
@@ -50,4 +58,69 @@
|
||||
remove_movespeed_modifier(MOVESPEED_ID_PRONE_DRAGGING)
|
||||
|
||||
/mob/living/canZMove(dir, turf/target)
|
||||
return can_zTravel(target, dir) && (movement_type & FLYING)
|
||||
return can_zTravel(target, dir) && (movement_type & FLYING)
|
||||
|
||||
/mob/living/Move(atom/newloc, direct)
|
||||
if (buckled && buckled.loc != newloc) //not updating position
|
||||
if (!buckled.anchored)
|
||||
return buckled.Move(newloc, direct)
|
||||
else
|
||||
return 0
|
||||
|
||||
var/old_direction = dir
|
||||
var/turf/T = loc
|
||||
|
||||
if(pulling)
|
||||
update_pull_movespeed()
|
||||
|
||||
. = ..()
|
||||
|
||||
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1)//separated from our puller and not in the middle of a diagonal move.
|
||||
pulledby.stop_pulling()
|
||||
|
||||
if(active_storage && !(CanReach(active_storage.parent,view_only = TRUE)))
|
||||
active_storage.close(src)
|
||||
|
||||
if(lying && !buckled && prob(getBruteLoss()*200/maxHealth))
|
||||
makeTrail(newloc, T, old_direction)
|
||||
|
||||
/mob/living/forceMove(atom/destination)
|
||||
stop_pulling()
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob(src, force = TRUE)
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs(force = TRUE)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(client)
|
||||
reset_perspective()
|
||||
update_mobility() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
|
||||
|
||||
/mob/living/proc/update_z(new_z) // 1+ to register, null to unregister
|
||||
if(isnull(new_z) && audiovisual_redirect)
|
||||
return
|
||||
if (registered_z != new_z)
|
||||
if (registered_z)
|
||||
SSmobs.clients_by_zlevel[registered_z] -= src
|
||||
if (client || audiovisual_redirect)
|
||||
if (new_z)
|
||||
SSmobs.clients_by_zlevel[new_z] += src
|
||||
for (var/I in length(SSidlenpcpool.idle_mobs_by_zlevel[new_z]) to 1 step -1) //Backwards loop because we're removing (guarantees optimal rather than worst-case performance), it's fine to use .len here but doesn't compile on 511
|
||||
var/mob/living/simple_animal/SA = SSidlenpcpool.idle_mobs_by_zlevel[new_z][I]
|
||||
if (SA)
|
||||
SA.toggle_ai(AI_ON) // Guarantees responsiveness for when appearing right next to mobs
|
||||
else
|
||||
SSidlenpcpool.idle_mobs_by_zlevel[new_z] -= SA
|
||||
|
||||
registered_z = new_z
|
||||
else
|
||||
registered_z = null
|
||||
|
||||
/mob/living/onTransitZ(old_z,new_z)
|
||||
..()
|
||||
update_z(new_z)
|
||||
|
||||
/mob/living/canface()
|
||||
if(!CHECK_MOBILITY(src, MOBILITY_MOVE))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
icon_state = "ai"
|
||||
move_resist = MOVE_FORCE_OVERPOWERING
|
||||
density = TRUE
|
||||
canmove = FALSE
|
||||
mobility_flags = ALL
|
||||
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
|
||||
@@ -324,8 +324,10 @@
|
||||
to_chat(src, "<b>You are now [is_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 = ALL
|
||||
return ALL
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_cancel_call()
|
||||
set category = "Malfunction"
|
||||
@@ -987,7 +989,7 @@
|
||||
deployed_shell.undeploy()
|
||||
diag_hud_set_deployed()
|
||||
|
||||
/mob/living/silicon/ai/resist()
|
||||
/mob/living/silicon/ai/do_resist()
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/spawned/Initialize(mapload, datum/ai_laws/L, mob/target_ai)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
cameraFollow = null
|
||||
|
||||
move_resist = MOVE_FORCE_NORMAL
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
if(eyeobj)
|
||||
eyeobj.setLoc(get_turf(src))
|
||||
set_eyeobj_visible(FALSE)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if(stat == DEAD)
|
||||
return
|
||||
stat = DEAD
|
||||
canmove = 0
|
||||
update_mobility()
|
||||
update_sight()
|
||||
clear_fullscreens()
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
var/radio_short_cooldown = 3 MINUTES
|
||||
var/radio_short_timerid
|
||||
|
||||
canmove = FALSE
|
||||
mobility_flags = NONE
|
||||
var/silent = FALSE
|
||||
var/brightness_power = 5
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
GLOB.pai_list += src
|
||||
make_laws()
|
||||
canmove = 0
|
||||
if(!istype(P)) //when manually spawning a pai, we create a card to put it into.
|
||||
var/newcardloc = P
|
||||
P = new /obj/item/paicard(newcardloc)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
take_holo_damage(50/severity)
|
||||
Knockdown(400/severity)
|
||||
DefaultCombatKnockdown(400/severity)
|
||||
silent = max(silent, (PAI_EMP_SILENCE_DURATION) / SSmobs.wait / severity)
|
||||
if(holoform)
|
||||
fold_in(force = TRUE)
|
||||
@@ -23,10 +23,10 @@
|
||||
qdel(src)
|
||||
if(2)
|
||||
fold_in(force = 1)
|
||||
Knockdown(400)
|
||||
DefaultCombatKnockdown(400)
|
||||
if(3)
|
||||
fold_in(force = 1)
|
||||
Knockdown(200)
|
||||
DefaultCombatKnockdown(200)
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/user)
|
||||
@@ -98,7 +98,7 @@
|
||||
take_holo_damage(amount * 0.25)
|
||||
|
||||
/mob/living/silicon/pai/adjustOrganLoss(slot, amount, maximum = 500) //I kept this in, unlike tg
|
||||
Knockdown(amount * 0.2)
|
||||
DefaultCombatKnockdown(amount * 0.2)
|
||||
|
||||
/mob/living/silicon/pai/getBruteLoss()
|
||||
return emittermaxhealth - emitterhealth
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
return FALSE
|
||||
|
||||
emitter_next_use = world.time + emittercd
|
||||
canmove = TRUE
|
||||
density = TRUE
|
||||
if(istype(card.loc, /obj/item/pda))
|
||||
var/obj/item/pda/P = card.loc
|
||||
@@ -37,6 +36,7 @@
|
||||
C.push_data()
|
||||
forceMove(get_turf(card))
|
||||
card.forceMove(src)
|
||||
update_mobility()
|
||||
if(client)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = src
|
||||
@@ -63,12 +63,11 @@
|
||||
var/turf/T = drop_location()
|
||||
card.forceMove(T)
|
||||
forceMove(card)
|
||||
canmove = FALSE
|
||||
density = FALSE
|
||||
set_light(0)
|
||||
holoform = FALSE
|
||||
if(resting)
|
||||
lay_down()
|
||||
set_resting(FALSE, TRUE, FALSE)
|
||||
update_mobility()
|
||||
|
||||
/mob/living/silicon/pai/proc/choose_chassis()
|
||||
if(!isturf(loc) && loc != card)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
locked = FALSE //unlock cover
|
||||
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
if(!QDELETED(builtInCamera) && builtInCamera.status)
|
||||
builtInCamera.toggle_cam(src,0)
|
||||
update_headlamp(1) //So borg lights are disabled when killed.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
|
||||
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
|
||||
var/lockcharge //Boolean of whether the borg is locked down or not
|
||||
var/locked_down //Boolean of whether the borg is locked down or not
|
||||
|
||||
var/toner = 0
|
||||
var/tonermax = 40
|
||||
@@ -493,7 +493,7 @@
|
||||
update_icons()
|
||||
|
||||
else if(istype(W, /obj/item/wrench) && opened && !cell) //Deconstruction. The flashes break from the fall, to prevent this from being a ghetto reset module.
|
||||
if(!lockcharge)
|
||||
if(!locked_down)
|
||||
to_chat(user, "<span class='boldannounce'>[src]'s bolts spark! Maybe you should lock them down first!</span>")
|
||||
spark_system.start()
|
||||
return
|
||||
@@ -655,65 +655,6 @@
|
||||
/mob/living/silicon/robot/regenerate_icons()
|
||||
return update_icons()
|
||||
|
||||
/mob/living/silicon/robot/update_icons()
|
||||
cut_overlays()
|
||||
icon_state = module.cyborg_base_icon
|
||||
//Citadel changes start here - Allows modules to use different icon files, and allows modules to specify a pixel offset
|
||||
icon = (module.cyborg_icon_override ? module.cyborg_icon_override : initial(icon))
|
||||
if(laser)
|
||||
add_overlay("laser")//Is this even used??? - Yes borg/inventory.dm
|
||||
if(disabler)
|
||||
add_overlay("disabler")//ditto
|
||||
|
||||
if(sleeper_g && module.sleeper_overlay)
|
||||
add_overlay("[module.sleeper_overlay]_g[sleeper_nv ? "_nv" : ""]")
|
||||
if(sleeper_r && module.sleeper_overlay)
|
||||
add_overlay("[module.sleeper_overlay]_r[sleeper_nv ? "_nv" : ""]")
|
||||
if(stat == DEAD && module.has_snowflake_deadsprite)
|
||||
icon_state = "[module.cyborg_base_icon]-wreck"
|
||||
|
||||
if(module.cyborg_pixel_offset)
|
||||
pixel_x = module.cyborg_pixel_offset
|
||||
//End of citadel changes
|
||||
|
||||
if(module.cyborg_base_icon == "robot")
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
pixel_x = initial(pixel_x)
|
||||
if(stat != DEAD && !(IsUnconscious() || IsStun() || IsKnockdown() || low_power_mode)) //Not dead, not stunned.
|
||||
if(!eye_lights)
|
||||
eye_lights = new()
|
||||
if(lamp_intensity > 2)
|
||||
eye_lights.icon_state = "[module.special_light_key ? "[module.special_light_key]":"[module.cyborg_base_icon]"]_l"
|
||||
else
|
||||
eye_lights.icon_state = "[module.special_light_key ? "[module.special_light_key]":"[module.cyborg_base_icon]"]_e[is_servant_of_ratvar(src) ? "_r" : ""]"
|
||||
eye_lights.icon = icon
|
||||
add_overlay(eye_lights)
|
||||
|
||||
if(opened)
|
||||
if(wiresexposed)
|
||||
add_overlay("ov-opencover +w")
|
||||
else if(cell)
|
||||
add_overlay("ov-opencover +c")
|
||||
else
|
||||
add_overlay("ov-opencover -c")
|
||||
if(hat)
|
||||
var/mutable_appearance/head_overlay = hat.build_worn_icon(state = hat.icon_state, default_layer = 20, default_icon_file = 'icons/mob/head.dmi')
|
||||
head_overlay.pixel_y += hat_offset
|
||||
add_overlay(head_overlay)
|
||||
update_fire()
|
||||
|
||||
if(client && stat != DEAD && module.dogborg == TRUE)
|
||||
if(resting)
|
||||
if(sitting)
|
||||
icon_state = "[module.cyborg_base_icon]-sit"
|
||||
if(bellyup)
|
||||
icon_state = "[module.cyborg_base_icon]-bellyup"
|
||||
else if(!sitting && !bellyup)
|
||||
icon_state = "[module.cyborg_base_icon]-rest"
|
||||
cut_overlays()
|
||||
else
|
||||
icon_state = "[module.cyborg_base_icon]"
|
||||
|
||||
/mob/living/silicon/robot/proc/self_destruct()
|
||||
if(emagged)
|
||||
if(mmi)
|
||||
@@ -728,8 +669,6 @@
|
||||
connected_ai.connected_robots -= src
|
||||
src.connected_ai = null
|
||||
lawupdate = 0
|
||||
lockcharge = 0
|
||||
canmove = 1
|
||||
scrambledcodes = 1
|
||||
//Disconnect it's camera so it's not so easily tracked.
|
||||
if(!QDELETED(builtInCamera))
|
||||
@@ -738,6 +677,7 @@
|
||||
// Instead of being listed as "deactivated". The downside is that I'm going
|
||||
// to have to check if every camera is null or not before doing anything, to prevent runtime errors.
|
||||
// I could change the network to null but I don't know what would happen, and it seems too hacky for me.
|
||||
update_mobility()
|
||||
|
||||
/mob/living/silicon/robot/mode()
|
||||
set name = "Activate Held Object"
|
||||
@@ -759,8 +699,8 @@
|
||||
throw_alert("locked", /obj/screen/alert/locked)
|
||||
else
|
||||
clear_alert("locked")
|
||||
lockcharge = state
|
||||
update_canmove()
|
||||
locked_down = state
|
||||
update_mobility()
|
||||
|
||||
/mob/living/silicon/robot/proc/SetEmagged(new_state)
|
||||
emagged = new_state
|
||||
@@ -949,7 +889,7 @@
|
||||
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - Remote telemetry lost with [name].</span><br>")
|
||||
|
||||
/mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
if(stat || lockcharge || low_power_mode)
|
||||
if(stat || locked_down || low_power_mode)
|
||||
to_chat(src, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
if(be_close && !in_range(M, src))
|
||||
@@ -1025,17 +965,17 @@
|
||||
if(health <= -maxHealth) //die only once
|
||||
death()
|
||||
return
|
||||
if(IsUnconscious() || IsStun() || IsKnockdown() || getOxyLoss() > maxHealth*0.5)
|
||||
if(IsUnconscious() || IsStun() || IsParalyzed() || getOxyLoss() > maxHealth*0.5)
|
||||
if(stat == CONSCIOUS)
|
||||
stat = UNCONSCIOUS
|
||||
blind_eyes(1)
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
update_headlamp()
|
||||
else
|
||||
if(stat == UNCONSCIOUS)
|
||||
stat = CONSCIOUS
|
||||
adjust_blindness(-1)
|
||||
update_canmove()
|
||||
update_mobility()
|
||||
update_headlamp()
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
@@ -1269,20 +1209,6 @@
|
||||
for(var/i in connected_ai.aicamera.stored)
|
||||
aicamera.stored[i] = TRUE
|
||||
|
||||
/mob/living/silicon/robot/lay_down()
|
||||
..()
|
||||
update_canmove()
|
||||
|
||||
/mob/living/silicon/robot/update_canmove()
|
||||
..()
|
||||
if(client && stat != DEAD && dogborg == FALSE)
|
||||
if(resting)
|
||||
cut_overlays()
|
||||
icon_state = "[module.cyborg_base_icon]-rest"
|
||||
else
|
||||
icon_state = "[module.cyborg_base_icon]"
|
||||
update_icons()
|
||||
|
||||
/mob/living/silicon/robot/proc/rest_style()
|
||||
set name = "Switch Rest Style"
|
||||
set category = "Robot Commands"
|
||||
|
||||
@@ -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)
|
||||
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)
|
||||
Paralyze(160)
|
||||
if(2)
|
||||
Stun(60)
|
||||
Paralyze(60)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/emag_act(mob/user)
|
||||
|
||||
15
code/modules/mob/living/silicon/robot/robot_mobility.dm
Normal file
15
code/modules/mob/living/silicon/robot/robot_mobility.dm
Normal file
@@ -0,0 +1,15 @@
|
||||
/mob/living/silicon/robot/update_mobility()
|
||||
var/newflags = NONE
|
||||
if(!stat)
|
||||
if(!resting)
|
||||
newflags |= (MOBILITY_STAND | MOBILITY_RESIST)
|
||||
if(!locked_down)
|
||||
newflags |= MOBILITY_MOVE
|
||||
newflags |= MOBILITY_PULL
|
||||
if(!locked_down)
|
||||
newflags |= MOBILITY_FLAGS_ANY_INTERACTION
|
||||
mobility_flags = newflags
|
||||
update_transform()
|
||||
update_action_buttons_icon()
|
||||
update_icons()
|
||||
return mobility_flags
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
/obj/item/robot_module/proc/do_transform_delay()
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
var/prev_lockcharge = R.lockcharge
|
||||
var/prev_locked_down = R.locked_down
|
||||
sleep(1)
|
||||
flick("[cyborg_base_icon]_transform", R)
|
||||
R.notransform = TRUE
|
||||
@@ -267,7 +267,7 @@
|
||||
for(var/i in 1 to 4)
|
||||
playsound(R, pick('sound/items/drill_use.ogg', 'sound/items/jaws_cut.ogg', 'sound/items/jaws_pry.ogg', 'sound/items/welder.ogg', 'sound/items/ratchet.ogg'), 80, 1, -1)
|
||||
sleep(7)
|
||||
if(!prev_lockcharge)
|
||||
if(!prev_locked_down)
|
||||
R.SetLockdown(0)
|
||||
R.setDir(SOUTH)
|
||||
R.anchored = FALSE
|
||||
|
||||
59
code/modules/mob/living/silicon/robot/update_icons.dm
Normal file
59
code/modules/mob/living/silicon/robot/update_icons.dm
Normal file
@@ -0,0 +1,59 @@
|
||||
/// this is bad code
|
||||
/mob/living/silicon/robot/update_icons()
|
||||
cut_overlays()
|
||||
icon_state = module.cyborg_base_icon
|
||||
//Citadel changes start here - Allows modules to use different icon files, and allows modules to specify a pixel offset
|
||||
icon = (module.cyborg_icon_override ? module.cyborg_icon_override : initial(icon))
|
||||
if(laser)
|
||||
add_overlay("laser")//Is this even used??? - Yes borg/inventory.dm
|
||||
if(disabler)
|
||||
add_overlay("disabler")//ditto
|
||||
|
||||
if(sleeper_g && module.sleeper_overlay)
|
||||
add_overlay("[module.sleeper_overlay]_g[sleeper_nv ? "_nv" : ""]")
|
||||
if(sleeper_r && module.sleeper_overlay)
|
||||
add_overlay("[module.sleeper_overlay]_r[sleeper_nv ? "_nv" : ""]")
|
||||
if(stat == DEAD && module.has_snowflake_deadsprite)
|
||||
icon_state = "[module.cyborg_base_icon]-wreck"
|
||||
|
||||
if(module.cyborg_pixel_offset)
|
||||
pixel_x = module.cyborg_pixel_offset
|
||||
//End of citadel changes
|
||||
|
||||
if(module.cyborg_base_icon == "robot")
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
pixel_x = initial(pixel_x)
|
||||
if(stat != DEAD && !(IsUnconscious() ||IsStun() || IsKnockdown() || IsParalyzed() || low_power_mode)) //Not dead, not stunned.
|
||||
if(!eye_lights)
|
||||
eye_lights = new()
|
||||
if(lamp_intensity > 2)
|
||||
eye_lights.icon_state = "[module.special_light_key ? "[module.special_light_key]":"[module.cyborg_base_icon]"]_l"
|
||||
else
|
||||
eye_lights.icon_state = "[module.special_light_key ? "[module.special_light_key]":"[module.cyborg_base_icon]"]_e[is_servant_of_ratvar(src) ? "_r" : ""]"
|
||||
eye_lights.icon = icon
|
||||
add_overlay(eye_lights)
|
||||
|
||||
if(opened)
|
||||
if(wiresexposed)
|
||||
add_overlay("ov-opencover +w")
|
||||
else if(cell)
|
||||
add_overlay("ov-opencover +c")
|
||||
else
|
||||
add_overlay("ov-opencover -c")
|
||||
if(hat)
|
||||
var/mutable_appearance/head_overlay = hat.build_worn_icon(state = hat.icon_state, default_layer = 20, default_icon_file = 'icons/mob/head.dmi')
|
||||
head_overlay.pixel_y += hat_offset
|
||||
add_overlay(head_overlay)
|
||||
update_fire()
|
||||
|
||||
if(client && stat != DEAD && module.dogborg == TRUE)
|
||||
if(resting)
|
||||
if(sitting)
|
||||
icon_state = "[module.cyborg_base_icon]-sit"
|
||||
if(bellyup)
|
||||
icon_state = "[module.cyborg_base_icon]-bellyup"
|
||||
else if(!sitting && !bellyup)
|
||||
icon_state = "[module.cyborg_base_icon]-rest"
|
||||
cut_overlays()
|
||||
else
|
||||
icon_state = "[module.cyborg_base_icon]"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user