Adds crawling. (#17899)

* crawling?

* knockdown. CONTAINS CHANGES THAT NEED REVERTING

* plotting can_moves death

* CANMOVE IS DEAD

* mappers are insane

* removes todos as the are todone

* decreases crawling speed

* silly-con fixes

* surgery fixes

* fixes death

* pAI fixes

* removes var/lying

* runtime fix

* decreases default crawling speed

* correct crawling dir

* some more fixes

* stunbaton tweak, revert later

* rejuv fix

* restraint and incapacitated refactor

* crawling dir in line with TG

* fixes vehicle movement and grabs

* alien rest fixes

* antistun fixes

* fixed fall sounds

* forgor to stage this

* first review

* canmove zombie dispersal

* fix

* lots of fixes

* defines

* fixes the trait helper

* if you got no legs you can still crawl

* sillyconfix

* no reverty keepy

* jaunt fix

* hopefully fixes perma sleepy zzz

* admin rejuv temp fix

* rest canceling

* antistun chems now remove knockdown

* buckle offset fix

* fixes some stuff

* crawling delay = 4

* descuffs bed

* sleeping hotfix

* fixes simple mob resting

* V is the macro for resting

* projectiles no dodgy

* refines the projectile check

* god I hate strings

* MORE FIXES

* I hate buckling

* fixes capulettium plus

* winding down

* farie review

* bugs did stop showing up

* SEAN

* todo

* sean review

* ed209

* i HATE cyborgs

* steel review

* laaaaaast things

* reverts stun baton changes

* and done
This commit is contained in:
Charlie
2022-06-30 11:57:52 -05:00
committed by GitHub
parent 5e2f62800c
commit bead47ea29
190 changed files with 1012 additions and 725 deletions
@@ -211,9 +211,7 @@
id = null
},
/obj/machinery/gibber/autogibber,
/obj/structure/plasticflaps{
canmove = 0
},
/obj/structure/plasticflaps,
/turf/simulated/floor/plasteel/airless,
/area/ruin/space/unpowered)
"wB" = (
+2
View File
@@ -148,3 +148,5 @@
* this is needed as many functions for stun durations used to output cycles as values, but we now track stun times in deciseconds.
*/
#define STATUS_EFFECT_CONSTANT * 20
#define IS_HORIZONTAL(x) x.body_position
+14
View File
@@ -168,3 +168,17 @@
#define ZAP_SUPERMATTER_FLAGS ZAP_GENERATES_POWER
GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768))
//Mob mobility var flags
/// can move
#define MOBILITY_MOVE (1<<0)
/// can, and is, standing up
#define MOBILITY_STAND (1<<1)
/// can pickup items
#define MOBILITY_PICKUP (1<<2)
/// can hold and use items
#define MOBILITY_USE (1<<3)
/// can pull things
#define MOBILITY_PULL (1<<4)
#define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_PICKUP | MOBILITY_USE | MOBILITY_PULL)
+7
View File
@@ -35,6 +35,13 @@
#define AGE_MIN 17 //youngest a character can be
#define AGE_MAX 85 //oldest a character can be
/// Mob is standing up, usually associated with lying_angle value of 0.
#define STANDING_UP 0
/// Mob is lying down, usually associated with lying_angle values of 90 or 270.
#define LYING_DOWN 1
///How much a mob's sprite should be moved when they're lying down
#define PIXEL_Y_OFFSET_LYING -6
#define LEFT 1
#define RIGHT 2
+1
View File
@@ -91,6 +91,7 @@
#define STATUS_EFFECT_SLEEPING /datum/status_effect/incapacitating/sleeping
#define STATUS_EFFECT_SLOWED /datum/status_effect/incapacitating/slowed
#define STATUS_EFFECT_PARALYZED /datum/status_effect/incapacitating/paralyzed
#define STATUS_EFFECT_FLOORED /datum/status_effect/incapacitating/floored
// transient
#define STATUS_EFFECT_CONFUSION /datum/status_effect/transient/confusion
+7 -1
View File
@@ -354,6 +354,11 @@
var/endtime = world.time+time
var/starttime = world.time
. = 1
var/mob/living/L
if(isliving(user))
L = user
while(world.time < endtime)
sleep(1)
if(progress)
@@ -363,6 +368,7 @@
break
if(only_use_extra_checks)
if(check_for_true_callbacks(extra_checks))
. = 0
break
continue
@@ -370,7 +376,7 @@
drifting = 0
user_loc = user.loc
if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying || check_for_true_callbacks(extra_checks))
if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || (L && IS_HORIZONTAL(L)) || check_for_true_callbacks(extra_checks))
. = 0
break
if(progress)
+31
View File
@@ -68,10 +68,14 @@
} \
\
for(var/TRAIT in target.status_traits) { \
if(!target.status_traits[TRAIT]) \
continue; \
target.status_traits[TRAIT] &= SOURCES; \
if(!length(target.status_traits[TRAIT])) { \
target.status_traits -= TRAIT; \
SEND_SIGNAL(target, SIGNAL_REMOVETRAIT(TRAIT), TRAIT); \
if(!target.status_traits) \
break; \
} \
} \
if(!length(target.status_traits)) { \
@@ -96,10 +100,14 @@
} \
\
for(var/TRAIT in target.status_traits) { \
if(!target.status_traits[TRAIT]) \
continue; \
target.status_traits[TRAIT] -= SOURCES; \
if(!length(target.status_traits[TRAIT])) { \
target.status_traits -= TRAIT; \
SEND_SIGNAL(target, SIGNAL_REMOVETRAIT(TRAIT)); \
if(!target.status_traits) \
break; \
} \
} \
if(!length(target.status_traits)) { \
@@ -206,6 +214,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define INNATE_TRAIT "innate"
#define VAMPIRE_TRAIT "vampire"
#define CHANGELING_TRAIT "changeling"
#define LYING_DOWN_TRAIT "lying_down"
#define SLIME_TRAIT "slime"
// unique trait sources
#define STATUE_MUTE "statue"
@@ -216,9 +226,30 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define CULT_EYES "cult_eyes"
#define DOGGO_SPACESUIT "doggo_spacesuit"
#define FLOORCLUWNE "floorcluwne"
#define LOCKDOWN_TRAIT "lockdown"
#define STAT_TRAIT "stat_trait"
#define TRANSFORMING_TRAIT "transforming"
#define BUCKLING_TRAIT "buckled"
//quirk traits
#define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance"
//traits that should be properly converted to genetic mutations one day
#define TRAIT_LASEREYES "laser_eyes"
//status effec traits
/// Forces the user to stay unconscious.
#define TRAIT_KNOCKEDOUT "knockedout"
/// Prevents voluntary movement.
#define TRAIT_IMMOBILIZED "immobilized"
/// Prevents voluntary standing or staying up on its own.
#define TRAIT_FLOORED "floored"
/// Prevents usage of manipulation appendages (picking, holding or using items, manipulating storage).
#define TRAIT_HANDS_BLOCKED "handsblocked"
/// Inability to access UI hud elements.
#define TRAIT_UI_BLOCKED "uiblocked"
/// Inability to pull things.
#define TRAIT_CANNOT_PULL "pullblocked"
/// Abstract condition that prevents movement if being pulled and might be resisted against. Handcuffs and straight jackets, basically.
#define TRAIT_RESTRAINED "restrained"
+2 -3
View File
@@ -1330,7 +1330,7 @@ Standard way to write links -Sayu
/*This can be used to add additional effects on interactions between mobs depending on how the mobs are facing each other, such as adding a crit damage to blows to the back of a guy's head.
Given how click code currently works (Nov '13), the initiating mob will be facing the target mob most of the time
That said, this proc should not be used if the change facing proc of the click code is overriden at the same time*/
if(!ismob(target) || target.lying)
if(!ismob(target) || IS_HORIZONTAL(target))
//Make sure we are not doing this for things that can't have a logical direction to the players given that the target would be on their side
return FACING_FAILED
if(initator.dir == target.dir) //mobs are facing the same direction
@@ -1421,7 +1421,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
pull_force = 0
move_resist = INFINITY
simulated = 0
canmove = FALSE
see_in_dark = 1e6
/mob/dview/New() //For whatever reason, if this isn't called, then BYOND will throw a type mismatch runtime when attempting to add this to the mobs list. -Fox
@@ -1493,7 +1492,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
return 0
if(isliving(A))
var/mob/living/LA = A
if(LA.lying)
if(IS_HORIZONTAL(LA))
return 0
var/goal_dir = angle2dir(dir2angle(get_dir(B, A)+180))
var/clockwise_A_dir = get_clockwise_dir(A.dir)
+1 -1
View File
@@ -101,7 +101,7 @@
CtrlClickOn(A)
return
if(incapacitated(ignore_restraints = 1, ignore_grab = 1, ignore_lying = 1))
if(incapacitated(ignore_restraints = 1, ignore_grab = 1))
return
face_atom(A)
+2 -2
View File
@@ -154,7 +154,7 @@
/obj/screen/storage/Click(location, control, params)
if(world.time <= usr.next_move)
return TRUE
if(usr.incapacitated(ignore_restraints = TRUE, ignore_lying = TRUE))
if(usr.incapacitated(ignore_restraints = TRUE))
return TRUE
if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return TRUE
@@ -182,7 +182,7 @@
return FALSE
/obj/screen/storage/MouseDrop_T(obj/item/I, mob/user)
if(!user || !istype(I) || user.incapacitated(ignore_restraints = TRUE, ignore_lying = TRUE) || istype(user.loc, /obj/mecha) || !master)
if(!user || !istype(I) || user.incapacitated(ignore_restraints = TRUE) || istype(user.loc, /obj/mecha) || !master)
return
var/obj/item/storage/S = master
@@ -4,6 +4,8 @@
var/base_run_speed = 1
/// Base walk speed before modifiers
var/base_walk_speed = 4
///crawling speed modifier
var/crawling_speed_reduction = 4
/// Move delay for humanoids
var/human_delay = 1.5
/// Move delay for cyborgs
@@ -19,6 +21,7 @@
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
CONFIG_LOAD_NUM(base_run_speed, data["base_run_speed"])
CONFIG_LOAD_NUM(base_walk_speed, data["base_walk_speed"])
CONFIG_LOAD_NUM(crawling_speed_reduction, data["crawling_speed_reduction"])
CONFIG_LOAD_NUM(human_delay, data["human_delay"])
CONFIG_LOAD_NUM(robot_delay, data["robot_delay"])
CONFIG_LOAD_NUM(alien_delay, data["alien_delay"])
+4 -2
View File
@@ -81,8 +81,10 @@
if(L.IsStunned() || L.IsWeakened())
return FALSE
if(check_flags & AB_CHECK_LYING)
if(owner.lying)
return FALSE
if(isliving(owner))
var/mob/living/L = owner
if(IS_HORIZONTAL(L))
return FALSE
if(check_flags & AB_CHECK_CONSCIOUS)
if(owner.stat)
return FALSE
+1 -1
View File
@@ -53,7 +53,7 @@
return
var/mob/living/LM = parent
if(!T.footstep || LM.lying || !LM.canmove || LM.resting || LM.buckled || LM.throwing || LM.flying || istype(LM.loc, /obj/machinery/atmospherics))
if(!T.footstep || IS_HORIZONTAL(LM) || !(LM.mobility_flags & MOBILITY_MOVE) || LM.buckled || LM.throwing || LM.flying || istype(LM.loc, /obj/machinery/atmospherics))
return
if(ishuman(LM))
+5 -5
View File
@@ -10,8 +10,8 @@
/datum/component/slippery
/// Text that gets displayed in the slip proc, i.e. "user slips on [description]"
var/description
/// The amount of weaken to apply after slip.
var/weaken
/// The amount of knockdown to apply after slip.
var/knockdown
/// The chance that walking over the parent will slip you.
var/slip_chance
/// The amount of tiles someone will be moved after slip.
@@ -23,12 +23,12 @@
/// The verb that players will see when someone slips on the parent. In the form of "You [slip_verb]ped on".
var/slip_verb
/datum/component/slippery/Initialize(_description, _weaken = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _slip_always = FALSE, _slip_verb = "slip")
/datum/component/slippery/Initialize(_description, _knockdown = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _slip_always = FALSE, _slip_verb = "slip")
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
description = _description
weaken = max(0, _weaken)
knockdown = max(0, _knockdown)
slip_chance = max(0, _slip_chance)
slip_tiles = max(0, _slip_tiles)
walking_is_safe = _walking_is_safe
@@ -48,6 +48,6 @@
Additionally calls the parent's `after_slip()` proc on the `victim`.
*/
/datum/component/slippery/proc/Slip(datum/source, mob/living/carbon/human/victim)
if(istype(victim) && !victim.flying && prob(slip_chance) && victim.slip(description, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb))
if(istype(victim) && !victim.flying && prob(slip_chance) && victim.slip(description, knockdown, slip_tiles, walking_is_safe, slip_always, slip_verb))
var/atom/movable/owner = parent
owner.after_slip(victim)
+2 -2
View File
@@ -20,7 +20,7 @@
cure()
return
*/
if(affected_mob.lying && prob(40)) //changed FROM prob(10) until sleeping is fixed
if(IS_HORIZONTAL(affected_mob) && prob(40)) //changed FROM prob(10) until sleeping is fixed
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
@@ -43,7 +43,7 @@
cure()
return
*/
if(affected_mob.lying && prob(25)) //changed FROM prob(5) until sleeping is fixed
if(IS_HORIZONTAL(affected_mob) && prob(25)) //changed FROM prob(5) until sleeping is fixed
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
+2 -2
View File
@@ -15,7 +15,7 @@
..()
switch(stage)
if(2)
if(affected_mob.lying && prob(20))
if(IS_HORIZONTAL(affected_mob) && prob(20))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
stage--
return
@@ -33,7 +33,7 @@
affected_mob.adjustToxLoss(1)
if(3)
if(affected_mob.lying && prob(15))
if(IS_HORIZONTAL(affected_mob) && prob(15))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
stage--
return
+4 -4
View File
@@ -30,7 +30,7 @@
switch(stage)
if(1)
if(restcure)
if(affected_mob.lying && prob(30))
if(IS_HORIZONTAL(affected_mob) && prob(30))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
@@ -42,7 +42,7 @@
to_chat(affected_mob, "<span class='danger'>You feel angry.</span>")
if(2)
if(restcure)
if(affected_mob.lying && prob(20))
if(IS_HORIZONTAL(affected_mob) && prob(20))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
@@ -57,7 +57,7 @@
to_chat(affected_mob, "<span class='danger'>Your stomach churns.</span>")
if(3)
if(restcure)
if(affected_mob.lying && prob(20))
if(IS_HORIZONTAL(affected_mob) && prob(20))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
@@ -72,7 +72,7 @@
if(4)
if(restcure)
if(affected_mob.lying && prob(5))
if(IS_HORIZONTAL(affected_mob) && prob(5))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
+1 -2
View File
@@ -48,8 +48,7 @@
return
if(transformation_text)
to_chat(affected_mob, transformation_text)
affected_mob.notransform = 1
affected_mob.canmove = 0
affected_mob.notransform = TRUE
affected_mob.icon = null
affected_mob.overlays.Cut()
affected_mob.invisibility = 101
+1 -1
View File
@@ -14,7 +14,7 @@
UnregisterSignal(source, COMSIG_MOVABLE_MOVED)
/datum/element/waddling/proc/LivingWaddle(mob/living/target)
if(target.incapacitated() || target.lying)
if(target.incapacitated() || IS_HORIZONTAL(target))
return
Waddle(target)
+1 -1
View File
@@ -20,7 +20,7 @@
item_state = "banana_touch"
/obj/item/melee/touch_attack/banana/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || user.lying || user.handcuffed)
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
var/datum/effect_system/smoke_spread/s = new
+3 -1
View File
@@ -51,7 +51,7 @@
mobloc = get_turf(target.loc)
if(jaunt_water_effect)
jaunt_steam(mobloc)
target.canmove = 0
ADD_TRAIT(target, TRAIT_IMMOBILIZED, "jaunt")
holder.reappearing = 1
playsound(get_turf(target), 'sound/magic/ethereal_exit.ogg', 50, 1, -1)
sleep(jaunt_in_time * 4)
@@ -66,10 +66,12 @@
continue
if(target.Move(T))
target.remove_CC()
REMOVE_TRAIT(target, TRAIT_IMMOBILIZED, "jaunt")
return
for(var/turf/space/S in orange(7))
if(target.Move(S))
break
REMOVE_TRAIT(target, TRAIT_IMMOBILIZED, "jaunt")
target.remove_CC()
/obj/effect/proc_holder/spell/ethereal_jaunt/proc/jaunt_steam(mobloc)
+1 -1
View File
@@ -20,7 +20,7 @@
item_state = "fleshtostone"
/obj/item/melee/touch_attack/mime_malaise/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || user.lying || user.handcuffed)
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
var/datum/effect_system/smoke_spread/s = new
+75 -6
View File
@@ -214,7 +214,7 @@
owner.client?.pixel_y = py_diff
/datum/status_effect/transient/dizziness/calc_decay()
return (-0.2 + (owner.resting ? -0.8 : 0)) SECONDS
return (-0.2 + (IS_HORIZONTAL(owner) ? -0.8 : 0)) SECONDS
/**
* # Drowsiness
@@ -235,7 +235,7 @@
owner.Paralyse(10 SECONDS)
/datum/status_effect/transient/drowsiness/calc_decay()
return (-0.2 + (owner.resting ? -0.8 : 0)) SECONDS
return (-0.2 + (IS_HORIZONTAL(owner) ? -0.8 : 0)) SECONDS
/**
* # Drukenness
@@ -371,32 +371,91 @@
. = ..()
if(. && (needs_update_stat || issilicon(owner)))
owner.update_stat()
owner.update_canmove()
/datum/status_effect/incapacitating/on_remove()
if(needs_update_stat || issilicon(owner)) //silicons need stat updates in addition to normal canmove updates
if(needs_update_stat || issilicon(owner)) //silicons need stat updates
owner.update_stat()
owner.update_canmove()
return ..()
//FLOORED - forces the victim prone.
/datum/status_effect/incapacitating/floored
id = "floored"
/datum/status_effect/incapacitating/floored/on_apply()
. = ..()
if(!.)
return
ADD_TRAIT(owner, TRAIT_FLOORED, "[id]")
/datum/status_effect/incapacitating/floored/on_remove()
REMOVE_TRAIT(owner, TRAIT_FLOORED, "[id]")
return ..()
//STUN - prevents movement and actions, victim stays standing
/datum/status_effect/incapacitating/stun
id = "stun"
/datum/status_effect/incapacitating/stun/on_apply()
. = ..()
if(!.)
return
ADD_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
ADD_TRAIT(owner, TRAIT_HANDS_BLOCKED, "[id]")
/datum/status_effect/incapacitating/stun/on_remove()
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
REMOVE_TRAIT(owner, TRAIT_HANDS_BLOCKED, "[id]")
return ..()
//IMMOBILIZED - prevents movement, victim can still stand and act
/datum/status_effect/incapacitating/immobilized
id = "immobilized"
/datum/status_effect/incapacitating/immobilized/on_apply()
. = ..()
if(!.)
return
ADD_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
/datum/status_effect/incapacitating/immobilized/on_remove()
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
return ..()
//WEAKENED - prevents movement and action, victim falls over
/datum/status_effect/incapacitating/weakened
id = "weakened"
/datum/status_effect/incapacitating/weakened/on_apply()
. = ..()
if(!.)
return
ADD_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
ADD_TRAIT(owner, TRAIT_FLOORED, "[id]")
ADD_TRAIT(owner, TRAIT_HANDS_BLOCKED, "[id]")
/datum/status_effect/incapacitating/weakened/on_remove()
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
REMOVE_TRAIT(owner, TRAIT_FLOORED, "[id]")
REMOVE_TRAIT(owner, TRAIT_HANDS_BLOCKED, "[id]")
return ..()
//PARALYZED - prevents movement and action, victim falls over, victim cannot hear or see.
/datum/status_effect/incapacitating/paralyzed
id = "paralyzed"
needs_update_stat = TRUE
/datum/status_effect/incapacitating/paralyzed/on_apply()
. = ..()
if(!.)
return
ADD_TRAIT(owner, TRAIT_KNOCKEDOUT, "[id]")
/datum/status_effect/incapacitating/paralyzed/on_remove()
REMOVE_TRAIT(owner, TRAIT_KNOCKEDOUT, "[id]")
return ..()
//SLEEPING - victim falls over, cannot act, cannot see or hear, heals under certain conditions.
/datum/status_effect/incapacitating/sleeping
id = "sleeping"
@@ -410,6 +469,16 @@
..()
src.voluntary = voluntary
/datum/status_effect/incapacitating/sleeping/on_apply()
. = ..()
if(!.)
return
ADD_TRAIT(src, TRAIT_KNOCKEDOUT, "[id]")
/datum/status_effect/incapacitating/sleeping/on_remove()
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, "[id]")
return ..()
/datum/status_effect/incapacitating/sleeping/tick()
if(!iscarbon(owner))
return
@@ -477,7 +546,7 @@
owner.do_jitter_animation(strength / 20, 1)
/datum/status_effect/transient/jittery/calc_decay()
return (-0.2 + (owner.resting ? -0.8 : 0)) SECONDS
return (-0.2 + (IS_HORIZONTAL(owner) ? -0.8 : 0)) SECONDS
/datum/status_effect/transient/stammering
id = "stammer"
+3 -5
View File
@@ -17,11 +17,10 @@
to_chat(owner, "<span class='userdanger'>You become frozen in a cube!</span>")
cube = icon('icons/effects/freeze.dmi', "ice_cube")
owner.add_overlay(cube)
owner.update_canmove()
ADD_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
return ..()
/datum/status_effect/freon/tick()
owner.update_canmove()
if(can_melt && owner.bodytemperature >= BODYTEMP_NORMAL)
qdel(src)
@@ -30,15 +29,14 @@
if(do_mob(owner, owner, 40))
if(!QDELETED(src))
to_chat(owner, "You break out of the ice cube!")
owner.remove_status_effect(/datum/status_effect/freon)
owner.update_canmove()
qdel(src)
/datum/status_effect/freon/on_remove()
if(!owner.stat)
to_chat(owner, "The cube melts!")
owner.cut_overlay(cube)
owner.adjust_bodytemperature(100)
owner.update_canmove()
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
/datum/status_effect/freon/watcher
+2 -2
View File
@@ -1116,7 +1116,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
// Sanity check that the user can, indeed, rename the thing.
// This, sadly, means you can't rename things with a telekinetic pen, but that's
// too much of a hassle to make work nicely.
if((implement && implement.loc != user) || !in_range(src, user) || user.incapacitated(ignore_lying = TRUE))
if((implement && implement.loc != user) || !in_range(src, user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return null
var/prefix = ""
@@ -1149,7 +1149,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
else if(!in_range(src, user))
to_chat(user, "<span class='warning'>You cannot rename [src] from here.</span>")
return null
else if (user.incapacitated(ignore_lying = TRUE))
else if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
to_chat(user, "<span class='warning'>You cannot rename [src] in your current state.</span>")
return null
-5
View File
@@ -21,7 +21,6 @@
/// Face towards the atom while pulling it
var/face_while_pulling = FALSE
var/throwforce = 0
var/canmove = TRUE
var/inertia_dir = 0
var/atom/inertia_last_loc
@@ -120,11 +119,8 @@
/atom/movable/proc/stop_pulling()
if(pulling)
var/mob/living/ex_pulled = pulling
pulling.pulledby = null
pulling = null
if(!QDELETED(ex_pulled) && istype(ex_pulled))
ex_pulled.update_canmove()// mob gets up if it was lyng down in a chokehold
/atom/movable/proc/check_pulling()
if(pulling)
@@ -334,7 +330,6 @@
reset_perspective(destination)
if(hud_used && length(client.parallax_layers))
hud_used.update_parallax()
update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
update_runechat_msg_location()
+6 -8
View File
@@ -20,8 +20,8 @@
H.unEquip(W)
H.regenerate_icons()
H.SetStunned(1)
H.canmove = FALSE
ADD_TRAIT(H, TRAIT_IMMOBILIZED, TRANSFORMING_TRAIT)
ADD_TRAIT(H, TRAIT_HANDS_BLOCKED, TRANSFORMING_TRAIT)
H.icon = null
H.invisibility = 101
var/has_primitive_form = H.dna.species.primitive_form // cache this
@@ -31,13 +31,12 @@
new /obj/effect/temp_visual/monkeyify(H.loc)
sleep(22)
H.SetStunned(0)
H.invisibility = initial(H.invisibility)
if(!has_primitive_form) //If the pre-change mob in question has no primitive set, this is going to be messy.
H.gib()
return
REMOVE_TRAITS_IN(H, TRANSFORMING_TRAIT)
to_chat(H, "<B>You are now a [H.dna.species.name].</B>")
return H
@@ -55,8 +54,8 @@
continue
H.unEquip(W)
H.regenerate_icons()
H.SetStunned(1)
H.canmove = 0
ADD_TRAIT(H, TRAIT_IMMOBILIZED, TRANSFORMING_TRAIT)
ADD_TRAIT(H, TRAIT_HANDS_BLOCKED, TRANSFORMING_TRAIT)
H.icon = null
H.invisibility = 101
var/has_greater_form = H.dna.species.greater_form //cache this
@@ -65,8 +64,7 @@
new /obj/effect/temp_visual/monkeyify/humanify(H.loc)
sleep(22)
H.SetStunned(0)
REMOVE_TRAITS_IN(H, TRANSFORMING_TRAIT)
H.invisibility = initial(H.invisibility)
if(!has_greater_form) //If the pre-change mob in question has no primitive set, this is going to be messy.
+5 -5
View File
@@ -254,8 +254,8 @@
..()
block = GLOB.chameleonblock
/datum/mutation/stealth/chameleon/on_life(mob/M)
if((world.time - M.last_movement) >= 30 && !M.stat && M.canmove && !M.restrained())
/datum/mutation/stealth/chameleon/on_life(mob/living/M) //look if a ghost gets this, its an admins problem
if((world.time - M.last_movement) >= 30 && !M.stat && (M.mobility_flags & MOBILITY_STAND) && !M.restrained())
if(M.invisibility != INVISIBILITY_OBSERVER)
M.alpha -= 25
else
@@ -491,15 +491,15 @@
/obj/effect/proc_holder/spell/leap/cast(list/targets, mob/living/user = usr)
var/failure = FALSE
if(istype(user.loc,/mob/) || user.lying || user.IsStunned() || user.buckled || user.stat)
if(istype(user.loc,/mob/) || IS_HORIZONTAL(user) || user.IsStunned() || user.buckled || user.stat)
to_chat(user, "<span class='warning'>You can't jump right now!</span>")
return
if(istype(user.loc,/turf/))
if(user.restrained())//Why being pulled while cuffed prevents you from moving
for(var/mob/M in range(user, 1))
for(var/mob/living/M in range(user, 1))
if(M.pulling == user)
if(!M.restrained() && M.stat == 0 && M.canmove && user.Adjacent(M))
if(!M.restrained() && M.stat == 0 && !(M.mobility_flags & MOBILITY_STAND) && user.Adjacent(M))
failure = TRUE
else
M.stop_pulling()
@@ -112,6 +112,7 @@
M.SetParalysis(0)
M.SetStunned(0)
M.SetWeakened(0)
M.SetKnockDown(0)
combat_cooldown = 0
START_PROCESSING(SSobj, src)
@@ -18,7 +18,7 @@
return ..()
/obj/machinery/abductor/experiment/MouseDrop_T(mob/living/carbon/human/target, mob/user)
if(user.stat || user.lying || !Adjacent(user) || !target.Adjacent(user) || !ishuman(target))
if(user.stat || HAS_TRAIT(user, TRAIT_UI_BLOCKED) || !Adjacent(user) || !target.Adjacent(user) || !ishuman(target))
return
if(isabductor(target))
return
+5 -8
View File
@@ -20,7 +20,7 @@
/obj/item/melee/touch_attack/attack(mob/target, mob/living/carbon/user)
if(!iscarbon(user)) //Look ma, no hands
return
if(user.lying || user.handcuffed)
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
to_chat(user, "<span class='warning'>You can't reach out!</span>")
return
..()
@@ -45,7 +45,7 @@
item_state = "disintegrate"
/obj/item/melee/touch_attack/disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //exploding after touching yourself would be bad
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //exploding after touching yourself would be bad
return
var/mob/M = target
do_sparks(4, 0, M.loc) //no idea what the 0 is
@@ -61,10 +61,7 @@
item_state = "fleshtostone"
/obj/item/melee/touch_attack/fleshtostone/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !isliving(target) || !iscarbon(user) || user.lying || user.handcuffed) //getting hard after touching yourself would also be bad
return
if(user.lying || user.handcuffed)
to_chat(user, "<span class='warning'>You can't reach out!</span>")
if(!proximity || target == user || !isliving(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //getting hard after touching yourself would also be bad
return
var/mob/living/L = target
L.Stun(4 SECONDS)
@@ -81,7 +78,7 @@
needs_permit = FALSE
/obj/item/melee/touch_attack/fake_disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //not exploding after touching yourself would be bad
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //not exploding after touching yourself would be bad
return
do_sparks(4, 0, target.loc)
playsound(target.loc, 'sound/goonstation/effects/gib.ogg', 50, 1)
@@ -96,7 +93,7 @@
item_state = "cluwnecurse"
/obj/item/melee/touch_attack/cluwne/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || user.lying || user.handcuffed) //clowning around after touching yourself would unsurprisingly, be bad
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //clowning around after touching yourself would unsurprisingly, be bad
return
if(iswizard(target))
-2
View File
@@ -308,7 +308,6 @@
to_chat(user, "<span class='danger'>Capture failed!</span>: The soul stone is full! Use or free an existing soul to make room.")
else
T.forceMove(src) // Put the shade into the stone.
T.canmove = 0
T.health = T.maxHealth
icon_state = icon_state_full
name = "soulstone : [T.name]"
@@ -388,7 +387,6 @@
/obj/item/soulstone/proc/init_shade(mob/living/M, mob/user, forced = FALSE)
var/type = get_shade_type()
var/mob/living/simple_animal/shade/S = new type(src)
S.canmove = FALSE // Can't move out of the soul stone
S.name = "Shade of [M.real_name]"
S.real_name = "Shade of [M.real_name]"
S.key = M.key
+2 -2
View File
@@ -65,7 +65,7 @@
*/
/obj/machinery/optable/proc/update_patient()
var/mob/living/carbon/human/M = locate(/mob/living/carbon/human, loc)
if(M && M.lying)
if(M && IS_HORIZONTAL(M))
patient = M
else
patient = null
@@ -94,7 +94,7 @@
else
visible_message("<span class='alert'>[new_patient] has been laid on the operating table by [user].</span>")
new_patient.resting = TRUE
new_patient.update_canmove()
new_patient.lay_down()
new_patient.forceMove(loc)
if(user.pulling == new_patient)
user.stop_pulling()
-1
View File
@@ -86,7 +86,6 @@
occupant.updatehealth()
if(occupant.health >= 0 && occupant.stat == DEAD)
occupant.update_revive()
occupant.lying = FALSE
update_icon()
sleep(10)
active = FALSE
+1 -1
View File
@@ -16,7 +16,7 @@
set category = "Object"
set name = "Access Computer's Internals"
set src in oview(1)
if(get_dist(src, usr) > 1 || usr.restrained() || usr.lying || usr.stat || istype(usr, /mob/living/silicon))
if(get_dist(src, usr) > 1 || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.stat || istype(usr, /mob/living/silicon))
return
opened = !opened
+6 -4
View File
@@ -401,8 +401,10 @@
sleep(speed)
for(var/i in 1 to speed)
M.setDir(pick(GLOB.cardinal))
M.resting = !M.resting
M.update_canmove()
if(IS_HORIZONTAL(M))
M.stand_up()
else
M.lay_down()
time--
/obj/machinery/disco/proc/dance5(mob/living/M)
@@ -468,13 +470,13 @@
if(!(M in rangers))
rangers[M] = TRUE
M.playsound_local(get_turf(M), null, 100, channel = CHANNEL_JUKEBOX, S = song_played, use_reverb = FALSE)
for(var/mob/L in rangers)
for(var/mob/living/L in rangers)
if(get_dist(src, L) > 10)
rangers -= L
if(!L || !L.client)
continue
L.stop_sound_channel(CHANNEL_JUKEBOX)
else if(prob(9) && L.canmove && isliving(L))
else if(prob(9) && (L.mobility_flags & MOBILITY_STAND) && isliving(L))
dance(L)
else if(active)
active = FALSE
+1 -1
View File
@@ -112,7 +112,7 @@
if(!drownee)
return
if(drownee && ((drownee.lying && !drownee.player_logged) || deep_water)) //Mob lying down and not SSD or water is deep (determined by controller)
if(drownee && ((IS_HORIZONTAL(drownee) && !drownee.player_logged) || deep_water)) //Mob lying down and not SSD or water is deep (determined by controller)
if(drownee.internal)
return //Has internals, no drowning
if(HAS_TRAIT(drownee, TRAIT_NOBREATH))
+1 -1
View File
@@ -75,7 +75,7 @@
if(!L)
return TURRET_NOT_TARGET
if(L.lying)
if(IS_HORIZONTAL(L))
return TURRET_NOT_TARGET
var/target_suit
+7 -4
View File
@@ -584,8 +584,8 @@ GLOBAL_LIST_EMPTY(turret_icons)
return TURRET_NOT_TARGET
if(check_synth) //If it's set to attack all non-silicons, target them!
if(L.lying)
return lethal ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
if(IS_HORIZONTAL(L))
return TURRET_SECONDARY_TARGET
return TURRET_PRIORITY_TARGET
if(iscuffed(L)) // If the target is handcuffed, leave it alone
@@ -601,8 +601,11 @@ GLOBAL_LIST_EMPTY(turret_icons)
if(assess_perp(L, check_access, check_weapons, check_records, check_arrest) < 4)
return TURRET_NOT_TARGET //if threat level < 4, keep going
if(L.lying) //if the perp is lying down, it's still a target but a less-important target
return lethal ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
if(HAS_TRAIT(L, TRAIT_FLOORED)) // if the perp is floored, they aren't a threat. unless we are putting them down for good
if(lethal)
return TURRET_SECONDARY_TARGET
else
return TURRET_NOT_TARGET
return TURRET_PRIORITY_TARGET //if the perp has passed all previous tests, congrats, it is now a "shoot-me!" nominee
+1 -4
View File
@@ -423,7 +423,7 @@
qdel(src)
/obj/machinery/suit_storage_unit/MouseDrop_T(atom/A, mob/user)
if(user.stat || user.lying || !Adjacent(user) || !Adjacent(A) || !isliving(A))
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user) || !Adjacent(A) || !isliving(A))
return
var/mob/living/target = A
if(!state_open)
@@ -552,9 +552,6 @@
var/turf/T = get_turf(src)
for(var/atom/movable/A in contents)
A.forceMove(T)
if(isliving(A))
var/mob/living/L = A
L.update_canmove()
occupant = null
/obj/machinery/suit_storage_unit/proc/close_machine(atom/movable/target = null)
+2 -2
View File
@@ -76,7 +76,7 @@
var/mob/living/carbon/human/H = AM
var/move_dir = get_dir(loc, H.loc)
if((transform_standing || H.lying) && move_dir == acceptdir)
if((transform_standing || IS_HORIZONTAL(H)) && move_dir == acceptdir)
H.forceMove(drop_location())
do_transform(H)
@@ -186,7 +186,7 @@
var/mob/living/carbon/human/H = AM
var/move_dir = get_dir(loc, H.loc)
if(H.lying && move_dir == acceptdir)
if(IS_HORIZONTAL(H) && move_dir == acceptdir)
H.forceMove(drop_location())
irradiate(H)
-3
View File
@@ -965,7 +965,6 @@
AI.cancel_camera()
AI.controlled_mech = src
AI.remote_control = src
AI.canmove = 1 //Much easier than adding AI checks! Be sure to set this back to 0 if you decide to allow an AI to leave a mech somehow.
AI.can_shunt = 0 //ONE AI ENTERS. NO AI LEAVES.
to_chat(AI, "[AI.can_dominate_mechs ? "<span class='announce'>Takeover of [name] complete! You are now permanently loaded onto the onboard computer. Do not attempt to leave the station sector!</span>" \
: "<span class='notice'>You have been uploaded to a mech's onboard computer."]")
@@ -1169,7 +1168,6 @@
brainmob.reset_perspective(src)
occupant = brainmob
brainmob.forceMove(src) //should allow relaymove
brainmob.canmove = TRUE
if(istype(mmi_as_oc, /obj/item/mmi/robotic_brain))
var/obj/item/mmi/robotic_brain/R = mmi_as_oc
if(R.imprinted_master)
@@ -1255,7 +1253,6 @@
L.reset_perspective()
mmi.mecha = null
mmi.update_icon()
L.canmove = 0
if(istype(mmi, /obj/item/mmi/robotic_brain))
var/obj/item/mmi/robotic_brain/R = mmi
if(R.imprinted_master)
+10 -3
View File
@@ -73,14 +73,17 @@
if(!check_loc && M.loc != loc)
M.forceMove(loc)
if(!buckle_lying)
M.set_body_position(STANDING_UP)
else
M.set_body_position(LYING_DOWN)
M.buckling = null
M.buckled = src
M.setDir(dir)
buckled_mobs |= M
M.update_canmove()
ADD_TRAIT(M, TRAIT_IMMOBILIZED, BUCKLING_TRAIT)
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
post_buckle_mob(M)
SEND_SIGNAL(src, COMSIG_MOVABLE_BUCKLE, M, force)
return TRUE
@@ -96,10 +99,14 @@
. = buckled_mob
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
REMOVE_TRAIT(buckled_mob, TRAIT_IMMOBILIZED, BUCKLING_TRAIT)
buckled_mob.clear_alert("buckled")
buckled_mobs -= buckled_mob
SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force)
if((buckled_mob.mobility_flags & MOBILITY_STAND) && !buckled_mob.resting)
buckled_mob.stand_up()
else if(!buckle_lying)
buckled_mob.fall()
post_unbuckle_mob(.)
+3 -11
View File
@@ -60,10 +60,8 @@
if(AM in T.affecting)
return
if(isliving(AM))
var/mob/living/M = AM
if(immobilize)
M.canmove = FALSE
if(immobilize)
ADD_TRAIT(A, TRAIT_IMMOBILIZED, "[UID()]")
affecting.Add(AM)
while(AM && !stopthrow)
@@ -94,13 +92,7 @@
AM.setDir(predir)
affecting.Remove(AM)
if(isliving(AM))
var/mob/living/M = AM
if(immobilize)
M.canmove = TRUE
REMOVE_TRAIT(A, TRAIT_IMMOBILIZED, "[UID()]")
/* Stops things thrown by a thrower, doesn't do anything */
+2 -2
View File
@@ -723,7 +723,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
var/mob/living/L = user
if(!(user.client.prefs.toggles2 & PREFTOGGLE_2_SEE_ITEM_OUTLINES))
return
if(istype(L) && L.incapacitated(ignore_lying = TRUE))
if(istype(L) && HAS_TRAIT(L, TRAIT_HANDS_BLOCKED))
apply_outline(L, COLOR_RED_GRAY) //if they're dead or handcuffed, let's show the outline as red to indicate that they can't interact with that right now
else
apply_outline(L) //if the player's alive and well we send the command with no color set, so it uses the theme's color
@@ -734,7 +734,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
remove_outline()
/obj/item/MouseDrop_T(obj/item/I, mob/user)
if(!user || user.incapacitated(ignore_lying = TRUE) || src == I)
if(!user || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || src == I)
return
if(loc && I.loc == loc && istype(loc, /obj/item/storage) && loc.Adjacent(user)) // Are we trying to swap two items in the storage?
+1 -1
View File
@@ -268,7 +268,7 @@
to_chat(M, "<font color = #ffc4c4><h5>oblivion... </h5></font>")
var/mob/living/silicon/pai/P = M
if(istype(P))
if(P.resting || P.canmove)
if(IS_HORIZONTAL(P))
P.close_up()
M.death(0, 1)
removePersonality()
@@ -21,7 +21,7 @@
icon_state = "pizzabox_bomb"
timer_set = 1
timer = (input(user, "Set a timer, from one second to ten seconds.", "Timer", "[timer]") as num) * 10
if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained())
if(!in_range(src, usr) || issilicon(usr) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || usr.restrained())
timer_set = 0
name = "pizza box"
desc = "A box suited for pizzas."
@@ -61,7 +61,7 @@
if(istype(I, /obj/item/wirecutters) && primed)
to_chat(user, "<span class='danger'>Oh God, what wire do you cut?!</span>")
var/chosen_wire = input(user, "OH GOD OH GOD", "WHAT WIRE?!") in wires
if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained())
if(!in_range(src, usr) || issilicon(usr) || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.restrained())
return
playsound(src, I.usesound, 50, 1, 1)
user.visible_message("<span class='warning'>[user] cuts the [chosen_wire] wire!</span>", "<span class='danger'>You cut the [chosen_wire] wire!</span>")
+5 -8
View File
@@ -81,29 +81,26 @@
user.do_attack_animation(M, ATTACK_EFFECT_BOOP)
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE, -1)
else if(ishuman(M))
if(user.lying)
if(M.resting)
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", "<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
M.stand_up()
else
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", "<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
if(M.resting)
M.resting = FALSE
M.update_canmove()
else
user.visible_message("<span class='notice'>[user] pets [M]!</span>", "<span class='notice'>You pet [M]!</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
if(CYBORG_HUG)
if(M.health >= 0)
if(ishuman(M))
if(M.lying)
if(M.resting)
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", "<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
M.resting = FALSE
M.stand_up()
else if(user.zone_selected == BODY_ZONE_HEAD)
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", "<span class='warning'>You bop [M] on the head!</span>")
user.do_attack_animation(M, ATTACK_EFFECT_PUNCH)
else
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", "<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
if(M.resting)
M.resting = FALSE
M.update_canmove()
else
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", "<span class='warning'>You bop [M] on the head!</span>")
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE, -1)
+1 -2
View File
@@ -313,7 +313,6 @@
if(!locomotion)
O.lockcharge = 1
O.update_canmove()
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
else
@@ -337,7 +336,7 @@
/obj/item/robot_parts/robot_suit/Topic(href, href_list)
var/mob/living/living_user = usr
if(living_user.lying || living_user.stat || living_user.IsStunned() || !Adjacent(living_user))
if(HAS_TRAIT(living_user, TRAIT_HANDS_BLOCKED) || living_user.stat || !Adjacent(living_user))
return
var/obj/item/item_in_hand = living_user.get_active_hand()
if(!istype(item_in_hand, /obj/item/multitool))
+1 -1
View File
@@ -274,7 +274,7 @@
set category = "Object"
set src in range(0)
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.stat || HAS_TRAIT(usr, TRAIT_UI_BLOCKED) || usr.restrained())
return
if(guest_pass)
@@ -108,7 +108,7 @@
if(field == F)
var/turf/currentpos = get_turf(src)
var/mob/living/user = src.loc
if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && !user.lying && (user.stat == CONSCIOUS))
if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && !IS_HORIZONTAL(user) && (user.stat == CONSCIOUS))
return 1
field_disconnect(F)
return 0
@@ -13,7 +13,7 @@
update_mob()
var/turf/epicenter = get_turf(src)
for(var/mob/living/carbon/human/H in epicenter)
if(H.resting) //grenade is jumped on but get real fucked up
if(IS_HORIZONTAL(H)) //grenade is jumped on but get real fucked up
embed_shrapnel(H, max_shrapnel)
range = 1
explosion(loc, 0, 1, range, breach = FALSE)
@@ -37,10 +37,10 @@
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
imp_in.SetStunned(0)
imp_in.SetWeakened(0)
imp_in.SetKnockDown(0)
imp_in.SetParalysis(0)
imp_in.adjustStaminaLoss(-75)
imp_in.lying = 0
imp_in.update_canmove()
imp_in.stand_up(TRUE)
imp_in.reagents.add_reagent("synaptizine", 10)
imp_in.reagents.add_reagent("omnizine", 10)
+1 -1
View File
@@ -112,7 +112,7 @@
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.lying)
if(IS_HORIZONTAL(H))
H.apply_damage(trap_damage, BRUTE,"chest")
else
H.apply_damage(trap_damage, BRUTE,(pick("l_leg", "r_leg")))
-2
View File
@@ -37,8 +37,6 @@
animate(user, pixel_y = pixel_y + 10 , time = 1, loop = 1)
animate(user, pixel_y = pixel_y, time = 10, loop = 1, easing = SINE_EASING)
animate(user)
if(user.lying)//aka. if they have just been stunned
user.pixel_y -= 6
else
if(wielded)
to_chat(user, "<span class='notice'>You hold \the [src] between your legs.</span>")
@@ -98,7 +98,7 @@
return
var/mob/M = usr
if(istype(M.loc, /obj/mecha) || M.incapacitated(FALSE, TRUE, TRUE)) // Stops inventory actions in a mech as well as while being incapacitated
if(istype(M.loc, /obj/mecha) || M.incapacitated(FALSE, TRUE)) // Stops inventory actions in a mech as well as while being incapacitated
return
if(over_object == M && Adjacent(M)) // this must come before the screen objects only block
@@ -108,14 +108,14 @@
return
if((istype(over_object, /obj/structure/table) || isfloorturf(over_object)) && length(contents) \
&& loc == M && !M.stat && !M.restrained() && M.canmove && over_object.Adjacent(M) && !istype(src, /obj/item/storage/lockbox)) // Worlds longest `if()`
&& loc == M && !M.stat && !M.restrained() && !HAS_TRAIT(M, TRAIT_HANDS_BLOCKED) && over_object.Adjacent(M) && !istype(src, /obj/item/storage/lockbox)) // Worlds longest `if()`
var/turf/T = get_turf(over_object)
if(isfloorturf(over_object))
if(get_turf(M) != T)
return // Can only empty containers onto the floor under you
if(alert(M, "Empty [src] onto [T]?", "Confirm", "Yes", "No") != "Yes")
return
if(!(M && over_object && length(contents) && loc == M && !M.stat && !M.restrained() && M.canmove && get_turf(M) == T))
if(!(M && over_object && length(contents) && loc == M && !M.stat && !M.restrained() && !HAS_TRAIT(M, TRAIT_HANDS_BLOCKED) && get_turf(M) == T))
return // Something happened while the player was thinking
hide_from(M)
M.face_atom(over_object)
@@ -150,7 +150,7 @@
/obj/item/storage/AltClick(mob/user)
. = ..()
if(ishuman(user) && Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
if(ishuman(user) && Adjacent(user) && !user.incapacitated(FALSE, TRUE))
show_to(user)
playsound(loc, "rustle", 50, TRUE, -5)
add_fingerprint(user)
@@ -197,6 +197,7 @@
L.Weaken(stunforce)
L.Stuttering(stunforce)
if(user)
L.lastattacker = user.real_name
L.lastattackerckey = user.ckey
+3 -2
View File
@@ -92,7 +92,8 @@
for(var/mob/living/M in get_turf(src))
if(M.lying) return //No spamming this on people.
if(IS_HORIZONTAL(M))
return //No spamming this on people.
M.Weaken(10 SECONDS)
to_chat(M, "<span class='warning'>You topple as \the [src] moves under you!</span>")
@@ -140,7 +141,7 @@
if(user.restrained() || user.buckled)
to_chat(user, "<span class='notice'>You need your hands and legs free for this.</span>")
return 0
if(user.stat || user.IsParalyzed() || user.IsSleeping() || user.lying || user.IsWeakened())
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return 0
if(issilicon(user))
to_chat(user, "<span class='notice'>You need hands for this.</span>")
@@ -236,7 +236,7 @@
return
if(O.loc == user)
return
if(user.restrained() || user.stat || user.IsWeakened() || user.IsStunned() || user.IsParalyzed() || user.lying)
if(user.restrained() || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
return
@@ -223,7 +223,7 @@
set category = null
set name = "Toggle Lock"
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
if(HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
return
if(ishuman(usr) || isrobot(usr))
@@ -40,7 +40,7 @@
set name = "Activate Electric Chair"
set category = "Object"
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.stat || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.restrained())
return
if(last_time + delay_time > world.time)
to_chat(usr, "<span class='warning'>\The [src] is not ready yet!</span>")
+2 -2
View File
@@ -207,7 +207,7 @@
return
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if(!ismob(user) || user.stat || user.lying || user.IsStunned())
if(!ismob(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
O.forceMove(loc)
if(user != O)
@@ -430,7 +430,7 @@
return
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if(!ismob(user) || user.stat || user.lying || user.IsStunned())
if(!ismob(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
O.forceMove(loc)
if(user != O)
+1 -1
View File
@@ -71,7 +71,7 @@
return TRUE
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
return TRUE
if(!M.lying && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
if(!IS_HORIZONTAL(M) && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
return FALSE
return ..()
@@ -72,8 +72,8 @@
add_overlay(nest_overlay)
/obj/structure/bed/nest/post_unbuckle_mob(mob/living/M)
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
M.pixel_x = M.get_standard_pixel_x_offset()
M.pixel_y = M.get_standard_pixel_y_offset()
M.layer = initial(M.layer)
cut_overlay(nest_overlay)
@@ -62,6 +62,12 @@
new buildstacktype(loc, buildstackamount)
..()
/obj/structure/bed/post_buckle_mob(mob/living/M)
M.pixel_y = M.get_standard_pixel_y_offset()
/obj/structure/bed/post_unbuckle_mob(mob/living/M)
M.pixel_y = M.get_standard_pixel_y_offset()
/*
* Roller beds
*/
@@ -70,6 +76,7 @@
name = "roller bed"
icon = 'icons/obj/rollerbed.dmi'
icon_state = "down"
buckle_offset = 0
face_while_pulling = FALSE
resistance_flags = NONE
anchored = FALSE
@@ -93,13 +100,12 @@
/obj/structure/bed/roller/post_buckle_mob(mob/living/M)
density = TRUE
icon_state = "up"
M.pixel_y = initial(M.pixel_y)
..()
/obj/structure/bed/roller/post_unbuckle_mob(mob/living/M)
density = FALSE
icon_state = "down"
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
..()
/obj/item/roller
name = "roller bed"
+1 -1
View File
@@ -761,7 +761,7 @@
deconstruct(TRUE)
/obj/structure/rack/attack_hand(mob/living/user)
if(user.IsWeakened() || user.resting || user.lying)
if(user.IsWeakened())
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
@@ -306,7 +306,7 @@
set name = "Rotate Windoor Assembly"
set category = "Object"
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.stat || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.restrained())
return
if(anchored)
to_chat(usr, "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>")
@@ -338,7 +338,7 @@
set name = "Flip Windoor Assembly"
set category = "Object"
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.stat || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.restrained())
return
if(facing == "l")
+1 -1
View File
@@ -74,7 +74,7 @@
if(!ignoreRest)
if(ishuman(A))
var/mob/living/carbon/human/M = A
if(M.lying)
if(IS_HORIZONTAL(M))
return 1
if(M.flying)
+1 -2
View File
@@ -150,8 +150,7 @@
if(isliving(AM))
var/mob/living/L = AM
L.notransform = TRUE
L.Stun(400 SECONDS)
L.resting = TRUE
L.Weaken(400 SECONDS)
var/oldtransform = AM.transform
var/oldcolor = AM.color
var/oldalpha = AM.alpha
+1 -4
View File
@@ -488,10 +488,7 @@
/turf/proc/acid_melt()
return
/turf/handle_fall(mob/faller, forced)
faller.lying = pick(90, 270)
if(!forced)
return
/turf/handle_fall()
if(has_gravity(src))
playsound(src, "bodyfall", 50, TRUE)
+1 -1
View File
@@ -179,7 +179,7 @@
set name = "pAI Suicide"
var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list ("Yes", "No")
if(answer == "Yes")
if(canmove || resting)
if(mobility_flags & MOBILITY_MOVE)
close_up()
var/obj/item/paicard/card = loc
card.removePersonality()
+1 -3
View File
@@ -42,10 +42,9 @@ GLOBAL_LIST_EMPTY(frozen_atom_list) // A list of admin-frozen atoms.
overlays += AO
anchored = TRUE
canmove = FALSE
admin_prev_sleeping = AmountSleeping()
PermaSleeping()
frozen = AO
PermaSleeping()
else
GLOB.frozen_atom_list -= src
@@ -54,7 +53,6 @@ GLOBAL_LIST_EMPTY(frozen_atom_list) // A list of admin-frozen atoms.
overlays -= frozen
anchored = FALSE
canmove = TRUE
frozen = null
SetSleeping(admin_prev_sleeping, TRUE)
admin_prev_sleeping = null
@@ -11,7 +11,7 @@
//Recover from stuns.
/datum/action/changeling/epinephrine/sting_action(mob/living/user)
if(user.lying)
if(IS_HORIZONTAL(user))
to_chat(user, "<span class='notice'>We arise.</span>")
else
to_chat(user, "<span class='notice'>Adrenaline rushes through us.</span>")
@@ -21,8 +21,7 @@
user.SetStunned(0)
user.SetWeakened(0)
user.setStaminaLoss(0)
user.lying = FALSE
user.update_canmove()
user.SetKnockDown(0)
user.reagents.add_reagent("synaptizine", 15)
user.reagents.add_reagent("stimulative_agent", 1)
@@ -17,7 +17,6 @@
user.timeofdeath = world.time
ADD_TRAIT(user, TRAIT_FAKEDEATH, CHANGELING_TRAIT) //play dead
user.updatehealth("fakedeath sting")
user.update_canmove()
cling.regenerating = TRUE
addtimer(CALLBACK(src, .proc/ready_to_regenerate, user), LING_FAKEDEATH_TIME)
@@ -61,7 +61,7 @@
/obj/effect/proc_holder/spell/vampire/charge/can_cast(mob/user, charge_check, show_message)
var/mob/living/L = user
if(L.IsWeakened() || L.resting)
if(L.IsWeakened() || IS_HORIZONTAL(L))
return FALSE
return ..()
@@ -236,6 +236,7 @@
owner.adjustStaminaLoss(-15)
owner.AdjustStunned(-2 SECONDS)
owner.AdjustWeakened(-2 SECONDS)
owner.AdjustKnockDown(-2 SECONDS)
if(drain_amount == 10)
to_chat(H, "<span class='warning'>You feel your life force draining!</b></span>")
@@ -59,6 +59,7 @@
U.SetWeakened(0)
U.SetStunned(0)
U.SetKnockDown(0)
U.SetParalysis(0)
U.SetSleeping(0)
U.SetConfused(0)
@@ -186,7 +187,7 @@
continue
var/deviation
if(user.IsWeakened() || user.resting)
if(user.IsWeakened() || IS_HORIZONTAL(user))
deviation = DEVIATION_PARTIAL
else
deviation = calculate_deviation(target, user)
+1 -1
View File
@@ -91,7 +91,7 @@
var/mob/user = usr
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
if(HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.stat || usr.restrained() || !in_range(loc, usr))
usr << browse(null, "window=hscan")
onclose(usr, "hscan")
return
+2 -2
View File
@@ -151,7 +151,7 @@
/obj/item/assembly/infra/Topic(href, href_list)
..()
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
if(HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.stat || usr.restrained() || !in_range(loc, usr))
usr << browse(null, "window=infra")
onclose(usr, "infra")
return
@@ -175,7 +175,7 @@
set category = "Object"
set src in usr
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.stat || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.restrained())
return
dir = turn(dir, 90)
+1 -1
View File
@@ -112,7 +112,7 @@
/obj/item/assembly/prox_sensor/Topic(href, href_list)
..()
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
if(HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.stat || usr.restrained() || !in_range(loc, usr))
usr << browse(null, "window=prox")
onclose(usr, "prox")
return
+1 -1
View File
@@ -87,7 +87,7 @@
/obj/item/assembly/signaler/Topic(href, href_list)
..()
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
if(HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED)|| usr.stat || usr.restrained() || !in_range(loc, usr))
usr << browse(null, "window=radio")
onclose(usr, "radio")
return
@@ -309,9 +309,9 @@ Pipelines + Other Objects -> Pipe network
user.loc = target_move.loc
user.Moved(old_loc, get_dir(old_loc, user.loc), FALSE)
user.visible_message("You hear something squeezing through the pipes.", "You climb out of the ventilation system.")
user.canmove = 0
spawn(1)
user.canmove = 1
ADD_TRAIT(user, TRAIT_IMMOBILIZED, "ventcrawling")
spawn(1) // this is awful
REMOVE_TRAIT(user, TRAIT_IMMOBILIZED, "ventcrawling")
/obj/machinery/atmospherics/AltClick(mob/living/L)
if(is_type_in_list(src, GLOB.ventcrawl_machinery))
+14 -12
View File
@@ -523,15 +523,17 @@
toggle_veil()
/obj/item/clothing/glasses/proc/toggle_veil()
if(usr.canmove && !usr.incapacitated())
if(up)
up = !up
tint = initial(tint)
to_chat(usr, "You activate [src], allowing you to see.")
else
up = !up
tint = 3
to_chat(usr, "You deactivate [src], obscuring your vision.")
var/mob/living/carbon/user = usr
user.update_tint()
user.update_inv_glasses()
if(HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.incapacitated())
return
if(up)
up = !up
tint = initial(tint)
to_chat(usr, "You activate [src], allowing you to see.")
else
up = !up
tint = 3
to_chat(usr, "You deactivate [src], obscuring your vision.")
var/mob/living/carbon/user = usr
user.update_tint()
user.update_inv_glasses()
@@ -16,7 +16,7 @@
. = TRUE
if(isliving(mover) && mover == target)
var/mob/living/M = mover
if(M.lying || !prob(trip_chance))
if(!(M.mobility_flags & MOBILITY_MOVE) || !prob(trip_chance))
return
M.Weaken(weaken)
on_crossed()
+1 -1
View File
@@ -114,7 +114,7 @@
return connected
/obj/machinery/hydroponics/AltClick()
if(wrenchable && !usr.stat && !usr.lying && Adjacent(usr))
if(wrenchable && !HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) && Adjacent(usr))
toggle_lid(usr)
return
return ..()
+21 -73
View File
@@ -1,80 +1,28 @@
/mob/living/carbon/human/key_down(_key, client/user)
if(_key == "H")
var/obj/item/clothing/accessory/holster/H = null
if(istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/S = w_uniform
if(S.accessories.len)
H = locate() in S.accessories
if (!H)
return
if(!H.holstered)
if(!istype(get_active_hand(), /obj/item/gun))
to_chat(usr, "<span class='warning'>You need your gun equiped to holster it.</span>")
switch(_key)
if("V")
if(!client.keys_held["Ctrl"] && !client.keys_held["Shift"])
rest()
if("H")
var/obj/item/clothing/accessory/holster/H = null
if(istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/S = w_uniform
if(S.accessories.len)
H = locate() in S.accessories
if (!H)
return
var/obj/item/gun/W = get_active_hand()
H.holster(W, usr)
else
H.unholster(usr)
if(!H.holstered)
if(!istype(get_active_hand(), /obj/item/gun))
to_chat(usr, "<span class='warning'>You need your gun equiped to holster it.</span>")
return
var/obj/item/gun/W = get_active_hand()
H.holster(W, usr)
else
H.unholster(usr)
if(client.keys_held["Shift"])
switch(_key)
if("E") // Put held thing in belt or take out most recent thing from belt
quick_equip() // Implementing the storage component is going to take way too long
// var/obj/item/thing = get_active_hand()
// var/obj/item/equipped_belt = get_item_by_slot(slot_belt)
// if(!equipped_belt) // We also let you equip a belt like this
// if(!thing)
// to_chat(user, "<span class='notice'>You have no belt to take something out of.</span>")
// return
// if(equip_to_slot_if_possible(thing, slot_belt))
// update_inv_r_hand()
// update_inv_l_hand()
// return
// if(!SEND_SIGNAL(equipped_belt, COMSIG_CONTAINS_STORAGE)) // not a storage item
// if(!thing)
// equipped_belt.attack_hand(src)
// else
// to_chat(user, "<span class='notice'>You can't fit anything in.</span>")
// return
// if(thing) // put thing in belt
// if(!SEND_SIGNAL(equipped_belt, COMSIG_TRY_STORAGE_INSERT, thing, user.mob))
// to_chat(user, "<span class='notice'>You can't fit anything in.</span>")
// return
// if(!equipped_belt.contents.len) // nothing to take out
// to_chat(user, "<span class='notice'>There's nothing in your belt to take out.</span>")
// return
// var/obj/item/stored = equipped_belt.contents[equipped_belt.contents.len]
// if(!stored || stored.on_found(src))
// return
// stored.attack_hand(src) // take out thing from belt
// return
quick_equip()
/* if("B") // Put held thing in backpack or take out most recent thing from backpack
var/obj/item/thing = get_active_hand()
var/obj/item/equipped_back = get_item_by_slot(slot_back)
if(!equipped_back) // We also let you equip a backpack like this
if(!thing)
to_chat(user, "<span class='notice'>You have no backpack to take something out of.</span>")
return
if(equip_to_slot_if_possible(thing, slot_back))
update_inv_r_hand()
update_inv_l_hand()
return
if(!SEND_SIGNAL(equipped_back, COMSIG_CONTAINS_STORAGE)) // not a storage item
if(!thing)
equipped_back.attack_hand(src)
else
to_chat(user, "<span class='notice'>You can't fit anything in.</span>")
return
if(thing) // put thing in backpack
if(!SEND_SIGNAL(equipped_back, COMSIG_TRY_STORAGE_INSERT, thing, user.mob))
to_chat(user, "<span class='notice'>You can't fit anything in.</span>")
return
if(!equipped_back.contents.len) // nothing to take out
to_chat(user, "<span class='notice'>There's nothing in your backpack to take out.</span>")
return
var/obj/item/stored = equipped_back.contents[equipped_back.contents.len]
if(!stored || stored.on_found(src))
return
stored.attack_hand(src) // take out thing from backpack
return */
return ..()
+2 -2
View File
@@ -70,11 +70,11 @@
else
return ..()
/obj/structure/bookcase/attack_hand(mob/user as mob)
/obj/structure/bookcase/attack_hand(mob/living/user)
if(contents.len)
var/obj/item/book/choice = input("Which book would you like to remove from [src]?") as null|anything in contents
if(choice)
if(user.incapacitated() || user.lying || !Adjacent(user))
if(user.incapacitated() || IS_HORIZONTAL(user) || !Adjacent(user))
return
if(!user.get_active_hand())
user.put_in_hands(choice)
+2 -2
View File
@@ -40,7 +40,7 @@
"<span class='userdanger'>[A] has knocked [D] out with a haymaker!</span>")
D.Weaken(10 SECONDS)
D.forcesay(GLOB.hit_appends)
else if(D.lying)
else if(IS_HORIZONTAL(D))
D.forcesay(GLOB.hit_appends)
return 1
@@ -98,6 +98,6 @@
"<span class='userdanger'>[A] has knocked [D] out with a haymaker!</span>")
D.Paralyse(10 SECONDS)
D.forcesay(GLOB.hit_appends)
else if(D.lying)
else if(IS_HORIZONTAL(D))
D.forcesay(GLOB.hit_appends)
return 1
+10 -9
View File
@@ -5,12 +5,13 @@
combo_text_override = "Grab, switch hands, Harm"
/datum/martial_combo/cqc/slam/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA)
if(!target.IsWeakened() && !target.resting && !target.lying)
target.visible_message("<span class='warning'>[user] slams [target] into the ground!</span>", \
"<span class='userdanger'>[user] slams you into the ground!</span>")
playsound(get_turf(user), 'sound/weapons/slam.ogg', 50, 1, -1)
target.apply_damage(10, BRUTE)
target.Weaken(12 SECONDS)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Slam", ATKLOG_ALL)
return MARTIAL_COMBO_DONE
return MARTIAL_COMBO_FAIL
if(target.IsWeakened() || IS_HORIZONTAL(target))
return MARTIAL_COMBO_FAIL
target.visible_message("<span class='warning'>[user] slams [target] into the ground!</span>", \
"<span class='userdanger'>[user] slams you into the ground!</span>")
playsound(get_turf(user), 'sound/weapons/slam.ogg', 50, 1, -1)
target.apply_damage(10, BRUTE)
target.Weaken(12 SECONDS)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Slam", ATKLOG_ALL)
return MARTIAL_COMBO_DONE
@@ -6,7 +6,7 @@
/datum/martial_combo/sleeping_carp/keelhaul/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA)
user.do_attack_animation(target, ATTACK_EFFECT_KICK)
playsound(get_turf(target), 'sound/effects/hit_kick.ogg', 50, TRUE, -1)
if(!target.IsWeakened() && !target.resting && !target.stat)
if(!target.IsWeakened() && !IS_HORIZONTAL(target) && !target.stat)
target.apply_damage(10, BRUTE, BODY_ZONE_HEAD)
target.Weaken(4 SECONDS)
target.visible_message("<span class='warning'>[user] kicks [target] in the head, sending them face first into the floor!</span>",
+2 -2
View File
@@ -35,7 +35,7 @@
A.do_attack_animation(D)
var/picked_hit_type = pick("CQC'd", "neck chopped", "gut punched", "Big Bossed")
var/bonus_damage = 13
if(D.IsWeakened() || D.resting || D.lying)
if(D.IsWeakened() || IS_HORIZONTAL(D))
bonus_damage += 5
picked_hit_type = "stomps on"
D.apply_damage(bonus_damage, BRUTE)
@@ -46,7 +46,7 @@
D.visible_message("<span class='danger'>[A] [picked_hit_type] [D]!</span>", \
"<span class='userdanger'>[A] [picked_hit_type] you!</span>")
add_attack_logs(A, D, "Melee attacked with martial-art [src] : [picked_hit_type]", ATKLOG_ALL)
if(A.resting && !D.stat && !D.IsWeakened())
if(IS_HORIZONTAL(A) && !D.stat && !D.IsWeakened())
D.visible_message("<span class='warning'>[A] leg sweeps [D]!", \
"<span class='userdanger'>[A] leg sweeps you!</span>")
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
+1 -1
View File
@@ -6,7 +6,7 @@
add_attack_logs(A, D, "Melee attacked with [src]")
var/picked_hit_type = "kicks"
var/bonus_damage = 10
if(D.IsWeakened() || D.resting || D.lying)
if(D.IsWeakened() || IS_HORIZONTAL(D))
bonus_damage = 15
picked_hit_type = "stomps on"
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
+1 -1
View File
@@ -94,7 +94,7 @@
add_attack_logs(A, D, "Melee attacked with [src]")
var/picked_hit_type = pick("punches", "kicks")
var/bonus_damage = 10
if(D.IsWeakened() || D.resting || D.lying)
if(D.IsWeakened() || IS_HORIZONTAL(D))
bonus_damage += 5
picked_hit_type = "stomps on"
D.apply_damage(bonus_damage, BRUTE)
+2 -2
View File
@@ -100,7 +100,7 @@
var/datum/unarmed_attack/attack = A.dna.species.unarmed
var/atk_verb = "[pick(attack.attack_verb)]"
if(D.lying)
if(IS_HORIZONTAL(D))
atk_verb = "kick"
switch(atk_verb)
@@ -130,7 +130,7 @@
"<span class='userdanger'>[A] has weakened [D]!</span>")
D.apply_effect(8 SECONDS, WEAKEN, armor_block)
D.forcesay(GLOB.hit_appends)
else if(D.lying)
else if(IS_HORIZONTAL(D))
D.forcesay(GLOB.hit_appends)
return TRUE
+1 -2
View File
@@ -13,7 +13,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
layer = GHOST_LAYER
stat = DEAD
density = FALSE
canmove = FALSE
alpha = 127
move_resist = INFINITY // don't get pushed around
invisibility = INVISIBILITY_OBSERVER
@@ -739,7 +738,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return FALSE
/mob/dead/observer/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, ignore_lying = FALSE)
/mob/dead/observer/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE)
return TRUE
//this is a mob verb instead of atom for performance reasons
+13 -8
View File
@@ -40,8 +40,8 @@
return null
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
/mob/proc/put_in_l_hand(obj/item/W, skip_lying_check = FALSE)
if(!put_in_hand_check(W, skip_lying_check))
/mob/proc/put_in_l_hand(obj/item/W, skip_blocked_hands_check = FALSE)
if(!put_in_hand_check(W, skip_blocked_hands_check))
return 0
if(!l_hand && has_left_hand())
W.forceMove(src) //TODO: move to equipped?
@@ -56,8 +56,8 @@
return 0
//Puts the item into your r_hand if possible and calls all necessary triggers/updates. returns 1 on success.
/mob/proc/put_in_r_hand(obj/item/W, skip_lying_check = FALSE)
if(!put_in_hand_check(W, skip_lying_check))
/mob/proc/put_in_r_hand(obj/item/W, skip_blocked_hands_check = FALSE)
if(!put_in_hand_check(W, skip_blocked_hands_check))
return 0
if(!r_hand && has_right_hand())
W.forceMove(src)
@@ -71,10 +71,15 @@
return 1
return 0
/mob/proc/put_in_hand_check(obj/item/W, skip_lying_check)
if(!skip_lying_check && lying && !(W.flags & ABSTRACT)) return 0
if(!istype(W)) return 0
return 1
/mob/proc/put_in_hand_check(obj/item/W, skip_blocked_hands_check)
if(!istype(W))
return FALSE
return TRUE
/mob/living/put_in_hand_check(obj/item/W, skip_blocked_hands_check)
. = ..()
if(!skip_blocked_hands_check && HAS_TRAIT(src, TRAIT_HANDS_BLOCKED) && !(W.flags & ABSTRACT))
. = FALSE
//Puts the item into our active hand if possible. returns 1 on success.
/mob/proc/put_in_active_hand(obj/item/W)
+1 -1
View File
@@ -327,7 +327,7 @@
if((!rhand || !rhand.is_usable()) && (!lhand || !lhand.is_usable()))
to_chat(speaker,"<span class='warning'>You can't communicate without the ability to use your hands!</span>")
return FALSE
if(speaker.incapacitated(ignore_lying = 1))
if(HAS_TRAIT(speaker, TRAIT_HANDS_BLOCKED))
to_chat(speaker,"<span class='warning'>You can't communicate while unable to move your hands to your head!</span>")
return FALSE
@@ -17,7 +17,6 @@
status_flags = CANPARALYSE|CANPUSH
var/heal_rate = 5
var/large = FALSE
var/heat_protection = 0.5
var/leaping = FALSE
@@ -30,7 +29,7 @@
..()
create_reagents(1000)
verbs += /mob/living/verb/mob_sleep
verbs += /mob/living/verb/lay_down
verbs += /mob/living/verb/rest
alien_organs += new /obj/item/organ/internal/brain/xeno
alien_organs += new /obj/item/organ/internal/xenos/hivenode
alien_organs += new /obj/item/organ/internal/ears
@@ -255,3 +254,7 @@ Des: Removes all infected images from the alien.
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
sync_lighting_plane_alpha()
/mob/living/carbon/alien/on_lying_down(new_lying_angle)
. = ..()
ADD_TRAIT(src, TRAIT_IMMOBILIZED, LYING_DOWN_TRAIT) //Xenos can't crawl
@@ -13,10 +13,11 @@ In all, this is a lot like the monkey code. /N
switch(M.a_intent)
if(INTENT_HELP)
AdjustSleeping(-10 SECONDS)
StopResting()
AdjustParalysis(-6 SECONDS)
AdjustStunned(-6 SECONDS)
AdjustWeakened(-6 SECONDS)
AdjustKnockDown(-6 SECONDS)
stand_up()
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
if(INTENT_GRAB)
@@ -3,8 +3,7 @@
return FALSE
death(1)
var/atom/movable/overlay/animation = null
notransform = 1
canmove = 0
notransform = TRUE
icon = null
invisibility = 101
@@ -26,8 +25,7 @@
/mob/living/carbon/alien/dust()
if(!death(TRUE) && stat != DEAD)
return FALSE
notransform = 1
canmove = 0
notransform = TRUE
icon = null
invisibility = 101
dust_animation()

Some files were not shown because too many files have changed in this diff Show More