Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/tg/ Status effects part 1 - fluid status updates #4828

Merged
merged 65 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
aae4b6c
WIP
fira Nov 2, 2023
3266b3e
fixes
fira Nov 2, 2023
39eb055
adjustments
fira Nov 3, 2023
86705c1
more fixes
fira Nov 3, 2023
9249933
srsly CI
fira Nov 3, 2023
e158f90
Merge branch 'master' into tg-effects-1123
fira Nov 4, 2023
b7f5956
conflict fix
fira Nov 4, 2023
8b47687
typo chloroform
fira Nov 4, 2023
d587c68
remove now unused resting procs
fira Nov 5, 2023
cd8e217
move stop pulling logic
fira Nov 5, 2023
af2854c
oopsie
fira Nov 5, 2023
614185d
Merge branch 'master' into tg-effects-1123
fira Nov 7, 2023
f7e0bde
transform fixes
fira Nov 7, 2023
dd9b2dc
AGH
fira Nov 7, 2023
e14781f
fix xeno immobilized overlay bein shown too often
fira Nov 7, 2023
152d696
add snowflake ignore check for projectiles and nests
fira Nov 7, 2023
f8e985f
you can't do this to me
fira Nov 7, 2023
716d9e6
so embarassing
fira Nov 7, 2023
d72fcc9
Refactor Freeze
fira Nov 8, 2023
ee1bc99
small oopsie
fira Nov 8, 2023
fd6a8da
WIP
fira Nov 9, 2023
261d685
comment revert
fira Nov 9, 2023
ecc0fd6
useless src
fira Nov 9, 2023
65be7a2
explicit ui_data
fira Nov 9, 2023
f974e82
Merge branch 'master' into tg-effects-prelude-freeze
fira Nov 9, 2023
e503e46
Merge branch 'master' into tg-effects-1123
fira Nov 9, 2023
fe450ec
minute adjustments
fira Nov 9, 2023
72637f9
merged doubled init
fira Nov 9, 2023
37f3a29
animation fix
fira Nov 9, 2023
9037518
Merge branch 'tg-effects-prelude-freeze' into tg-effects-1123
fira Nov 9, 2023
f26d91b
bugfix
fira Nov 9, 2023
b0a9fe8
Merge branch 'tg-effects-prelude-living' into tg-effects-1123
fira Nov 9, 2023
ee19848
small memory change
fira Nov 9, 2023
2393c4d
fix merge accidents and two bugs
fira Nov 9, 2023
aeb375b
add missing handler
fira Nov 9, 2023
45283be
Merge branch 'master' into tg-effects-prelude-freeze
fira Nov 13, 2023
99491e4
Merge branch 'tg-effects-prelude-freeze' into tg-effects-1123
fira Nov 13, 2023
9425267
WIP
fira Nov 13, 2023
651974a
watch this blow up
fira Nov 13, 2023
54bea03
reverted sent changes
fira Nov 13, 2023
ddb1ff6
missing trait in trait list
fira Nov 13, 2023
084c827
explicit explosion stun
fira Nov 13, 2023
2eaeec0
Merge branch 'master' into tg-effects-1123
fira Nov 16, 2023
b4a7332
double trait
fira Nov 16, 2023
a6ecfcd
review fixes
fira Nov 17, 2023
935d77d
comment removal
fira Nov 17, 2023
f5390a3
fix incorrect logic for welding goggles
fira Nov 19, 2023
7890da1
fix double seats, probably
fira Nov 19, 2023
39af3a7
fix buckled movement probably
fira Nov 19, 2023
617580a
rest cd
fira Nov 20, 2023
7d4a9fa
fix welding mask logic
fira Nov 20, 2023
863589c
bugfixes
fira Nov 20, 2023
f63732c
stasis bag safety check
fira Nov 20, 2023
cef8d44
fix roundstart nesting angle
fira Nov 20, 2023
442a4ff
resting doesnt prevent opening xeno tacmap anymore
fira Nov 20, 2023
62d5b98
fix freeze overlay on nested
fira Nov 20, 2023
e86e71e
Merge branch 'master' into tg-effects-1123
fira Nov 20, 2023
f753342
Merge branch 'master' into tg-effects-1123
fira Nov 20, 2023
3016d51
remove random offset on buckled
fira Nov 21, 2023
0091b02
fix missing animation parallel causing knock to cancel some others
fira Nov 21, 2023
8f794cf
Merge branch 'master' into tg-effects-1123
fira Nov 22, 2023
d5be1f3
fix species limbs and falling over during creation
fira Nov 24, 2023
2122188
consistency fix
fira Nov 24, 2023
30b6443
Merge branch 'master' into tg-effects-1123
fira Nov 25, 2023
bb1226a
a noob, i am
fira Nov 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@
/// From /mob/living/Collide(): (atom/A)
#define COMSIG_LIVING_PRE_COLLIDE "living_pre_collide"
#define COMPONENT_LIVING_COLLIDE_HANDLED (1<<0)

///from base of mob/living/set_buckled(): (new_buckled)
#define COMSIG_LIVING_SET_BUCKLED "living_set_buckled"
///from base of mob/living/set_body_position()
#define COMSIG_LIVING_SET_BODY_POSITION "living_set_body_position"
6 changes: 0 additions & 6 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
#define COMSIG_MOB_FIRED_GUN_ATTACHMENT "mob_fired_gun_attachment"
/// From /mob/proc/death
#define COMSIG_MOB_DEATH "mob_death"
/// From /mob/proc/update_canmove()
#define COMSIG_MOB_GETTING_UP "mob_getting_up"
/// From /mob/proc/update_canmove()
#define COMSIG_MOB_KNOCKED_DOWN "mob_knocked_down"
/// For when a mob is dragged
#define COMSIG_MOB_DRAGGED "mob_dragged"
/// From /obj/item/proc/unequipped()
Expand Down Expand Up @@ -86,8 +82,6 @@
//from /mob/proc/on_deafness_loss()
#define COMSIG_MOB_REGAINED_HEARING "mob_regained_hearing"

#define COMSIG_MOB_POST_UPDATE_CANMOVE "mob_can_move"

#define COMSIG_ATTEMPT_MOB_PULL "attempt_mob_pull"
#define COMPONENT_CANCEL_MOB_PULL (1<<0)

Expand Down
28 changes: 28 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,31 @@ GLOBAL_LIST_INIT(default_xeno_onmob_icons, list(
#define CORE_LIMBS list("chest","head","groin")

#define SYMPTOM_ACTIVATION_PROB 3

// Body position defines.
/// 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

/// Possible value of [/atom/movable/buckle_lying]. If set to a different (positive-or-zero) value than this, the buckling thing will force a lying angle on the buckled.
#define NO_BUCKLE_LYING -1

// ====================================
// /mob/living /tg/ mobility_flags
// These represent in what capacity the mob is capable of moving
// Because porting this is underway, NOT ALL FLAGS ARE CURRENTLY IN.

/// can move
#define MOBILITY_MOVE (1<<0)
/// can, and is, standing up
#define MOBILITY_STAND (1<<1)
/// can rest
#define MOBILITY_REST (1<<7)
/// can lie down
#define MOBILITY_LIEDOWN (1<<8)

#define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND)
#define MOBILITY_FLAGS_CARBON_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_REST | MOBILITY_LIEDOWN)
#define MOBILITY_FLAGS_REST_CAPABLE_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_REST | MOBILITY_LIEDOWN)

45 changes: 41 additions & 4 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,18 @@
// #define TRAIT_X "t_x"

//-- mob traits --
/// Prevents voluntary movement.
#define TRAIT_IMMOBILIZED "immobilized"
/// Apply this to make a mob not dense, and remove it when you want it to no longer make them undense, other sorces of undesity will still apply. Always define a unique source when adding a new instance of this!
#define TRAIT_UNDENSE "undense"
/// 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"
/// Forces user to stay standing
#define TRAIT_FORCED_STANDING "forcedstanding"
/// Stuns preventing movement and using objects but without further impairement
#define TRAIT_INCAPACITATED "incapacitated"
/// Apply this to identify a mob as merged with weeds
#define TRAIT_MERGED_WITH_WEEDS "merged_with_weeds"

Expand Down Expand Up @@ -298,7 +306,10 @@ GLOBAL_LIST_INIT(mob_traits, list(
*/
GLOBAL_LIST_INIT(traits_by_type, list(
/mob = list(
"TRAIT_KNOCKEDOUT" = TRAIT_KNOCKEDOUT,
"TRAIT_IMMOBILIZED" = TRAIT_IMMOBILIZED,
"TRAIT_INCAPACITATED" = TRAIT_INCAPACITATED,
"TRAIT_FLOORED" = TRAIT_FLOORED,
"TRAIT_UNDENSE" = TRAIT_UNDENSE,
"TRAIT_YAUTJA_TECH" = TRAIT_YAUTJA_TECH,
"TRAIT_SUPER_STRONG" = TRAIT_SUPER_STRONG,
Expand Down Expand Up @@ -416,13 +427,39 @@ GLOBAL_LIST(trait_name_map)
//Status trait coming from clothing.
#define TRAIT_SOURCE_CLOTHING "t_s_clothing"

/// traits associated with actively interacted machinery
#define INTERACTION_TRAIT "interaction"
/// trait associated to being buckled
#define BUCKLED_TRAIT "buckled" // Yes the name doesn't conform. /tg/ appears to have changed naming style inbetween
/// trait source when an effect is coming from a fakedeath effect (refactor this)
#define FAKEDEATH_TRAIT "fakedeath"
/// trait source where a condition comes from body state
#define BODY_TRAIT "body"
/// Trait associated to lying down (having a [lying_angle] of a different value than zero).
#define LYING_DOWN_TRAIT "lying-down"
/// trait associated to a stat value or range of
#define STAT_TRAIT "stat"
/// trait effect related to the queen ovipositor
#define OVIPOSITOR_TRAIT "ovipositor"
/// trait associated to being held in a chokehold
#define CHOKEHOLD_TRAIT "chokehold"
/// trait effect related to active specialist gear
#define SPECIALIST_GEAR_TRAIT "specialist_gear"
/// traits associated with usage of snowflake dropship double seats
#define DOUBLE_SEATS_TRAIT "double_seats"
/// traits associated with xeno on-ground weeds
#define XENO_WEED_TRAIT "xeno_weed"
/// traits associated with actively interacted machinery
#define INTERACTION_TRAIT "interaction"
/// traits bound by stunned status effects
#define STUNNED_TRAIT "stunned"
/// traits bound by knocked_down status effect
#define KNOCKEDDOWN_TRAIT "knockeddown"
/// traits bound by knocked_out status effect
#define KNOCKEDOUT_TRAIT "knockedout"
/// traits from being pounced
#define POUNCED_TRAIT "pounced"
/// traits from step_triggers on the map
#define STEP_TRIGGER_TRAIT "step_trigger"
/// traits from hacked machine interactions
#define HACKED_TRAIT "hacked"
/// traits from chloroform usage
#define CHLOROFORM_TRAIT "chloroform"
2 changes: 2 additions & 0 deletions code/__HELPERS/animations.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// The duration of the animate call in mob/living/update_transform
#define UPDATE_TRANSFORM_ANIMATION_TIME (0.2 SECONDS)
1 change: 1 addition & 0 deletions code/__HELPERS/status_effects.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define TRAIT_STATUS_EFFECT(effect_id) "[effect_id]-trait"
16 changes: 8 additions & 8 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1089,15 +1089,15 @@ GLOBAL_DATUM(action_purple_power_up, /image)
target_orig_turf = get_turf(target)
var/obj/user_holding = busy_user.get_active_hand()
var/obj/target_holding
var/cur_user_lying = busy_user.lying
var/cur_user_lying = busy_user.body_position
var/cur_target_lying
var/expected_total_time = delayfraction*numticks
var/time_remaining = expected_total_time

if(has_target && istype(T))
cur_target_zone_sel = T.zone_selected
target_holding = T.get_active_hand()
cur_target_lying = T.lying
cur_target_lying = T.body_position

. = TRUE
for(var/i in 1 to numticks)
Expand All @@ -1121,13 +1121,13 @@ GLOBAL_DATUM(action_purple_power_up, /image)
)
. = FALSE
break
if(user_flags & INTERRUPT_KNOCKED_DOWN && busy_user.knocked_down || \
target_is_mob && (target_flags & INTERRUPT_KNOCKED_DOWN && T.knocked_down)
if(user_flags & INTERRUPT_KNOCKED_DOWN && HAS_TRAIT(busy_user, TRAIT_FLOORED) || \
target_is_mob && (target_flags & INTERRUPT_KNOCKED_DOWN && HAS_TRAIT(T, TRAIT_FLOORED))
)
. = FALSE
break
if(user_flags & INTERRUPT_STUNNED && busy_user.stunned || \
target_is_mob && (target_flags & INTERRUPT_STUNNED && T.stunned)
if(user_flags & INTERRUPT_STUNNED && HAS_TRAIT(busy_user, TRAIT_INCAPACITATED)|| \
target_is_mob && (target_flags & INTERRUPT_STUNNED && HAS_TRAIT(T, TRAIT_INCAPACITATED))
)
. = FALSE
break
Expand Down Expand Up @@ -1201,8 +1201,8 @@ GLOBAL_DATUM(action_purple_power_up, /image)
)
. = FALSE
break
if(user_flags & INTERRUPT_CHANGED_LYING && busy_user.lying != cur_user_lying || \
target_is_mob && (target_flags & INTERRUPT_CHANGED_LYING && T.lying != cur_target_lying)
if(user_flags & INTERRUPT_CHANGED_LYING && busy_user.body_position != cur_user_lying || \
target_is_mob && (target_flags & INTERRUPT_CHANGED_LYING && T.body_position != cur_target_lying)
)
. = FALSE
break
Expand Down
7 changes: 7 additions & 0 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ DEFINE_BITFIELD(mob_flags, list(
"NOBIOSCAN" = NOBIOSCAN,
))

DEFINE_BITFIELD(mobility_flags, list(
"MOVE" = MOBILITY_MOVE,
"STAND" = MOBILITY_STAND,
"REST" = MOBILITY_REST,
"LIEDOWN" = MOBILITY_LIEDOWN
))

DEFINE_BITFIELD(flags, list(
"NO_BLOOD" = NO_BLOOD,
"NO_BREATHE" = NO_BREATHE,
Expand Down
6 changes: 2 additions & 4 deletions code/_onclick/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

/mob/living/carbon/human/UnarmedAttack(atom/A, proximity, click_parameters)

if(lying) //No attacks while laying down
if(body_position == LYING_DOWN) //No attacks while laying down
return 0

var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
Expand All @@ -88,7 +88,7 @@
/atom/proc/attack_hand(mob/user)
return

/mob/living/carbon/human/MouseDrop_T(atom/dropping, mob/user)
/mob/living/carbon/human/MouseDrop_T(atom/dropping, mob/living/user)
if(user != src)
return . = ..()

Expand Down Expand Up @@ -153,6 +153,4 @@
target.Move(user.loc, get_dir(target.loc, user.loc))
target.update_transform(TRUE)

target.update_canmove()


4 changes: 2 additions & 2 deletions code/_onclick/ventcrawl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
to_chat(src, SPAN_WARNING("You must be conscious to do this!"))
return

if(lying)
if(is_mob_incapacitated())
to_chat(src, SPAN_WARNING("You can't vent crawl while you're stunned!"))
return

Expand Down Expand Up @@ -88,7 +88,7 @@
return

updatehealth()
if(stat || stunned || dazed || knocked_down || lying || health < 0 || !client || !ventcrawl_carry())
if(is_mob_incapacitated(src) || health < 0 || !client || !ventcrawl_carry())
vent_found.animate_ventcrawl_reset()
return

Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

/mob/living/carbon/xenomorph/UnarmedAttack(atom/target, proximity, click_parameters, tile_attack = FALSE, ignores_resin = FALSE)
if(lying || HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) //No attacks while laying down
if(body_position == LYING_DOWN || HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) //No attacks while laying down
return FALSE
var/mob/alt

Expand All @@ -21,7 +21,7 @@

if (!L.is_xeno_grabbable() || L == src) //Xenos never attack themselves.
continue
if (L.lying)
if (L.body_position == LYING_DOWN)
alt = L
continue
target = L
Expand Down
6 changes: 4 additions & 2 deletions code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@
I.ui_action_click(owner, holder_item)

/datum/action/item_action/can_use_action()
if(ishuman(owner) && !owner.is_mob_incapacitated() && !owner.lying)
return TRUE
if(ishuman(owner) && !owner.is_mob_incapacitated())
var/mob/living/carbon/human/human = owner
if(human.body_position == STANDING_UP)
return TRUE

/datum/action/item_action/update_button_icon()
button.overlays.Cut()
Expand Down
2 changes: 0 additions & 2 deletions code/datums/agents/tools/chloroform.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
ADD_TRAIT(M, TRAIT_IMMOBILIZED, CHLOROFORM_TRAIT)
ADD_TRAIT(M, TRAIT_UNDENSE, CHLOROFORM_TRAIT)
M.able_to_speak = FALSE
M.update_canmove()

M.drop_inv_item_on_ground(M.wear_mask, force = TRUE)

Expand Down Expand Up @@ -79,7 +78,6 @@
/obj/item/weapon/chloroform/proc/remove_stun(mob/living/M)
animate(M, pixel_x = 0, pixel_y = 0, time = 0.2 SECONDS, easing = QUAD_EASING)
M.anchored = FALSE
M.density = TRUE
M.able_to_speak = TRUE
M.layer = MOB_LAYER
REMOVE_TRAIT(M, TRAIT_IMMOBILIZED, CHLOROFORM_TRAIT)
Expand Down
6 changes: 3 additions & 3 deletions code/datums/ammo/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
/datum/ammo/proc/knockback(mob/living/living_mob, obj/projectile/fired_projectile, max_range = 2)
if(!living_mob || living_mob == fired_projectile.firer)
return
if(fired_projectile.distance_travelled > max_range || living_mob.lying)
if(fired_projectile.distance_travelled > max_range || living_mob.body_position == LYING_DOWN)
return //Two tiles away or more, basically.

if(living_mob.mob_size >= MOB_SIZE_BIG)
Expand Down Expand Up @@ -180,8 +180,8 @@
else
living_mob.apply_stamina_damage(fired_projectile.ammo.damage, fired_projectile.def_zone, ARMOR_BULLET)

/datum/ammo/proc/pushback(mob/target_mob, obj/projectile/fired_projectile, max_range = 2)
if(!target_mob || target_mob == fired_projectile.firer || fired_projectile.distance_travelled > max_range || target_mob.lying)
/datum/ammo/proc/pushback(mob/living/target_mob, obj/projectile/fired_projectile, max_range = 2)
if(!target_mob || target_mob == fired_projectile.firer || fired_projectile.distance_travelled > max_range || target_mob.body_position == LYING_DOWN)
return

if(target_mob.mob_size >= MOB_SIZE_BIG)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ammo/bullet/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
if(P.distance_travelled > 8)
knockback(M, P, 12)

else if(!M || M == P.firer || M.lying) //These checks are included in knockback and would be redundant above.
else if(!M || M == P.firer || M.body_position == LYING_DOWN) //These checks are included in knockback and would be redundant above.
return

shake_camera(M, 3, 4)
Expand Down
8 changes: 4 additions & 4 deletions code/datums/ammo/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@

if(!isxeno(M))
if(insta_neuro)
if(M.knocked_down < 3)
if(M.GetKnockDownValueNotADurationDoNotUse() < 3) // If they have less than somewhere random between 4 and 6 seconds KD left and assuming it doesnt get refreshed itnernally
M.adjust_effect(1 * power, WEAKEN)
return
return

if(ishuman(M))
M.apply_effect(2.5, SUPERSLOW)
Expand All @@ -65,7 +65,7 @@
no_clothes_neuro = TRUE

if(no_clothes_neuro)
if(M.knocked_down < 5)
if(M.GetKnockDownValueNotADurationDoNotUse() < 5) // If they have less than somewhere random between 8 and 10 seconds KD left and assuming it doesnt get refreshed itnernally
M.adjust_effect(1 * power, WEAKEN) // KD them a bit more
M.visible_message(SPAN_DANGER("[M] falls prone."))

Expand All @@ -79,7 +79,7 @@
H.visible_message(SPAN_DANGER("[M] shrugs off the neurotoxin!"))
return

if(M.knocked_down < 0.7) // apply knockdown only if current knockdown is less than 0.7 second
if(M.GetKnockDownValueNotADurationDoNotUse() < 0.7) // basically (knocked_down && prob(90))
M.apply_effect(0.7, WEAKEN)
M.visible_message(SPAN_DANGER("[M] falls prone."))

Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/footstep.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
if(!T)
return
var/mob/living/parent_mob = parent
if(parent_mob.lying && (isfile(drag_sounds) || istext(drag_sounds)))
if(parent_mob.body_position == LYING_DOWN && (isfile(drag_sounds) || istext(drag_sounds)))
playsound(T, drag_sounds, volume, rand(20000, 25000), range, falloff = falloff)
else if(isfile(footstep_sounds) || istext(footstep_sounds))
playsound(T, footstep_sounds, volume, rand(20000, 25000), range, falloff = falloff)
4 changes: 2 additions & 2 deletions code/datums/diseases/cold.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
cure()
return
*/
if(affected_mob.lying && prob(40)) //changed FROM prob(10) until sleeping is fixed
if(affected_mob.body_position == LYING_DOWN && prob(40)) //changed FROM prob(10) until sleeping is fixed
to_chat(affected_mob, SPAN_NOTICE(" You feel better."))
cure()
return
Expand All @@ -43,7 +43,7 @@
cure()
return
*/
if(affected_mob.lying && prob(25)) //changed FROM prob(5) until sleeping is fixed
if(affected_mob.body_position == LYING_DOWN && prob(25)) //changed FROM prob(5) until sleeping is fixed
to_chat(affected_mob, SPAN_NOTICE(" You feel better."))
cure()
return
Expand Down
4 changes: 2 additions & 2 deletions code/datums/diseases/flu.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
stage--
return
*/
if(affected_mob.lying && prob(20)) //added until sleeping is fixed --Blaank
if(affected_mob.body_position == LYING_DOWN && prob(20)) //added until sleeping is fixed --Blaank
to_chat(affected_mob, SPAN_NOTICE(" You feel better."))
stage--
return
Expand All @@ -46,7 +46,7 @@
stage--
return
*/
if(affected_mob.lying && prob(15)) //added until sleeping is fixed
if(affected_mob.body_position == LYING_DOWN && prob(15)) //added until sleeping is fixed
to_chat(affected_mob, SPAN_NOTICE(" You feel better."))
stage--
return
Expand Down
Loading