From 4c7d9a4b542bb64ebb35127e94bab4cbbb1dbb6f Mon Sep 17 00:00:00 2001 From: private-tristan <54422837+private-tristan@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:54:05 -0500 Subject: [PATCH 1/4] Dorms Room Changes (#91) A few more flavor things for the dorms. Small map change only for the ship. --- maps/map_files/golden_arrow/golden_arrow.dmm | 66 +++++++++++++++----- 1 file changed, 51 insertions(+), 15 deletions(-) diff --git a/maps/map_files/golden_arrow/golden_arrow.dmm b/maps/map_files/golden_arrow/golden_arrow.dmm index c00c87e116..c819dc28b2 100644 --- a/maps/map_files/golden_arrow/golden_arrow.dmm +++ b/maps/map_files/golden_arrow/golden_arrow.dmm @@ -156,6 +156,11 @@ icon_state = "cargo_arrow" }, /area/golden_arrow/hangar) +"aO" = ( +/obj/item/prop/colony/game, +/obj/structure/surface/table/almayer, +/turf/open/floor/almayer, +/area/golden_arrow/dorms) "aQ" = ( /obj/structure/sign/safety/galley{ pixel_y = 29 @@ -1193,10 +1198,10 @@ }, /area/golden_arrow/cryo_cells) "gL" = ( -/obj/effect/decal/cleanable/dirt, /obj/structure/machinery/light{ dir = 8 }, +/obj/effect/decal/cleanable/dirt, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -3036,6 +3041,9 @@ /obj/structure/machinery/power/apc/almayer{ dir = 8 }, +/obj/structure/bed/chair{ + dir = 4 + }, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -3108,6 +3116,9 @@ /area/golden_arrow/canteen) "sR" = ( /obj/structure/pipes/standard/simple/hidden/supply, +/obj/structure/bed/chair{ + dir = 8 + }, /turf/open/floor/plating/plating_catwalk, /area/golden_arrow/dorms) "sS" = ( @@ -3379,11 +3390,6 @@ /turf/open/floor/almayer, /area/golden_arrow/hangar) "uH" = ( -/obj/structure/largecrate/random/case/small, -/obj/item/toy/deck{ - pixel_x = -6; - pixel_y = 6 - }, /obj/structure/sign/poster{ desc = "One of those hot, tanned babes back the beaches of good ol' Earth."; icon_state = "poster12"; @@ -3393,6 +3399,9 @@ serial_number = 12 }, /obj/effect/decal/cleanable/dirt, +/obj/structure/bed/chair{ + dir = 4 + }, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -3618,6 +3627,9 @@ /obj/structure/pipes/standard/simple/hidden/supply{ dir = 6 }, +/obj/structure/bed/chair{ + dir = 8 + }, /turf/open/floor/plating/plating_catwalk, /area/golden_arrow/dorms) "wa" = ( @@ -3964,11 +3976,17 @@ icon_state = "plate" }, /area/golden_arrow/briefing) +"yw" = ( +/obj/item/toy/deck/uno, +/obj/structure/surface/table/almayer, +/turf/open/floor/almayer, +/area/golden_arrow/dorms) "yx" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/machinery/firealarm{ pixel_y = 28 }, +/obj/structure/machinery/computer/arcade, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -5945,6 +5963,10 @@ icon_state = "test_floor4" }, /area/golden_arrow/medical) +"JL" = ( +/obj/structure/bed/chair, +/turf/open/floor/almayer, +/area/golden_arrow/dorms) "JP" = ( /obj/effect/decal/warning_stripes{ icon_state = "W" @@ -6082,6 +6104,7 @@ /area/golden_arrow/hangar) "KK" = ( /obj/effect/decal/cleanable/dirt, +/obj/structure/surface/table/almayer, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -6475,6 +6498,7 @@ /obj/structure/machinery/light{ dir = 4 }, +/obj/structure/largecrate/random/case/small, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -7765,6 +7789,11 @@ icon_state = "cargo_arrow" }, /area/golden_arrow/prep_hallway) +"Tb" = ( +/obj/item/toy/deck, +/obj/structure/surface/table/almayer, +/turf/open/floor/almayer, +/area/golden_arrow/dorms) "Tc" = ( /obj/effect/decal/warning_stripes{ icon_state = "W"; @@ -8199,6 +8228,13 @@ icon_state = "plate" }, /area/golden_arrow/hangar) +"Vz" = ( +/obj/effect/decal/cleanable/dirt, +/obj/structure/bed/chair, +/turf/open/floor/almayer{ + icon_state = "plate" + }, +/area/golden_arrow/dorms) "VG" = ( /turf/open/floor/almayer{ dir = 5; @@ -18165,11 +18201,11 @@ Sy mk vk Vp -EQ +KZ gL sk uH -Vp +wl Vp wd XQ @@ -18318,10 +18354,10 @@ Vr As Vp EQ -wl -wl +JL +Tb KK -EQ +JL Vp OG XI @@ -18470,10 +18506,10 @@ rJ As Vp EF -wl -wl -wl -KZ +JL +aO +yw +Vz Vp xm XI From 052a2184940bc4ab23c23bc29b48086e3b2af310 Mon Sep 17 00:00:00 2001 From: bearrrrrrrr <54826962+bearrrrrrrr@users.noreply.github.com> Date: Thu, 18 Jan 2024 17:33:51 -0500 Subject: [PATCH 2/4] super speshul m4ra (#89) Drulikar approved the code changes, and all checks passed. Let's see how it goes. --- code/datums/ammo/bullet/rifle.dm | 20 ++ code/modules/projectiles/gun_attachables.dm | 25 ++- code/modules/projectiles/gun_helpers.dm | 2 +- code/modules/projectiles/guns/rifles.dm | 61 +++++++ code/modules/projectiles/magazines/rifles.dm | 9 + .../items/weapons/guns/attachments/barrel.dmi | Bin 9109 -> 9719 bytes maps/map_files/golden_arrow/golden_arrow.dmm | 171 +++++++++++++----- 7 files changed, 235 insertions(+), 53 deletions(-) diff --git a/code/datums/ammo/bullet/rifle.dm b/code/datums/ammo/bullet/rifle.dm index b6085572e3..4098235ba8 100644 --- a/code/datums/ammo/bullet/rifle.dm +++ b/code/datums/ammo/bullet/rifle.dm @@ -185,6 +185,26 @@ to_chat(living_mob, SPAN_HIGHDANGER("The impact knocks you off-balance!")) living_mob.apply_stamina_damage(fired_projectile.ammo.damage, fired_projectile.def_zone, ARMOR_BULLET) + +// PvE M4RA rounds - pens&does toxin to whomever gets hit by it +/datum/ammo/bullet/rifle/m4ra/du + name = "depleted uranium bullet" + + damage = 60 + penetration = ARMOR_PENETRATION_TIER_10 + var/acid_per_hit = 15 //woe, toxin upon ye + +/datum/ammo/bullet/rifle/m4ra/du/set_bullet_traits() + . = ..() + LAZYADD(traits_to_give, list( + BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_penetrating) + )) + +/datum/ammo/bullet/rifle/m4ra/du/on_hit_mob(mob/target, obj/projectile/fired_proj) + target.AddComponent(/datum/component/toxic_buildup, acid_per_hit) + knockback(target, fired_proj, max_range = 2) + + /datum/ammo/bullet/rifle/mar40 name = "heavy rifle bullet" diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index 20781639a5..fbec82909c 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -165,10 +165,11 @@ Defined in conflicts.dm of the #defines folder. // Apply bullet traits from attachment to gun's current projectile G.in_chamber.apply_bullet_trait(L) -/obj/item/attachable/proc/Detach(mob/user, obj/item/weapon/gun/detaching_gub) +/obj/item/attachable/proc/Detach(mob/user, obj/item/weapon/gun/detaching_gub, drop_attachment = TRUE) if(!istype(detaching_gub)) return //Guns only - detaching_gub.on_detach(user) + if(user) + detaching_gub.on_detach(user, src) if(flags_attach_features & ATTACH_ACTIVATION) activate_attachment(detaching_gub, null, TRUE) @@ -182,7 +183,8 @@ Defined in conflicts.dm of the #defines folder. qdel(X) break - forceMove(get_turf(detaching_gub)) + if(drop_attachment) + forceMove(get_turf(detaching_gub)) if(sharp) detaching_gub.sharp = 0 @@ -556,7 +558,7 @@ Defined in conflicts.dm of the #defines folder. ..() G.attachable_offset["muzzle_x"] = 27 -/obj/item/attachable/mateba/Detach(mob/user, obj/item/weapon/gun/detaching_gub) +/obj/item/attachable/mateba/Detach(mob/user, obj/item/weapon/gun/detaching_gub, drop_attachment = TRUE) ..() detaching_gub.attachable_offset["muzzle_x"] = 20 @@ -847,7 +849,7 @@ Defined in conflicts.dm of the #defines folder. . = ..() G.AddElement(/datum/element/drop_retrieval/gun, retrieval_slot) -/obj/item/attachable/magnetic_harness/Detach(mob/user, obj/item/weapon/gun/detaching_gub) +/obj/item/attachable/magnetic_harness/Detach(mob/user, obj/item/weapon/gun/detaching_gub, drop_attachment = TRUE) . = ..() detaching_gub.RemoveElement(/datum/element/drop_retrieval/gun, retrieval_slot) @@ -871,7 +873,7 @@ Defined in conflicts.dm of the #defines folder. G.attachable_offset["under_y"] = 12 -/obj/item/attachable/magnetic_harness/lever_sling/Detach(mob/user, obj/item/weapon/gun/detaching_gub) +/obj/item/attachable/magnetic_harness/lever_sling/Detach(mob/user, obj/item/weapon/gun/detaching_gub, drop_attachment = TRUE) . = ..() detaching_gub.attachable_offset["under_x"] = 24 detaching_gub.attachable_offset["under_y"] = 16 @@ -923,7 +925,7 @@ Defined in conflicts.dm of the #defines folder. . = ..() RegisterSignal(gun, COMSIG_GUN_RECALCULATE_ATTACHMENT_BONUSES, PROC_REF(handle_attachment_recalc)) -/obj/item/attachable/scope/Detach(mob/user, obj/item/weapon/gun/detaching_gub) +/obj/item/attachable/scope/Detach(mob/user, obj/item/weapon/gun/detaching_gub, drop_attachment = TRUE) . = ..() UnregisterSignal(detaching_gub, COMSIG_GUN_RECALCULATE_ATTACHMENT_BONUSES) @@ -2228,6 +2230,11 @@ Defined in conflicts.dm of the #defines folder. if("classic") attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon +/obj/item/attachable/m4ra_barrel/pve + name = "M4RA-R2 muzzle break" + icon_state = "pve_m4ra_barrel" + attach_icon = "pve_m4ra_barrel" + /obj/item/attachable/upp_rpg_breech name = "HJRA-12 Breech" desc = "This isn't supposed to be seperated from the gun, how'd this happen?" @@ -2533,7 +2540,7 @@ Defined in conflicts.dm of the #defines folder. R.flags_equip_slot &= ~SLOT_WAIST //Can't wear it on the belt slot with stock on when we attach it first time. // When taking it off we want to undo everything not statwise -/obj/item/attachable/stock/revolver/Detach(mob/user, obj/item/weapon/gun/detaching_gub) +/obj/item/attachable/stock/revolver/Detach(mob/user, obj/item/weapon/gun/detaching_gub, drop_attachment = TRUE) ..() var/obj/item/weapon/gun/revolver/m44/R = detaching_gub if(!istype(R)) @@ -3260,7 +3267,7 @@ Defined in conflicts.dm of the #defines folder. RegisterSignal(G, COMSIG_ITEM_DROPPED, PROC_REF(handle_drop)) -/obj/item/attachable/bipod/Detach(mob/user, obj/item/weapon/gun/detaching_gub) +/obj/item/attachable/bipod/Detach(mob/user, obj/item/weapon/gun/detaching_gub, drop_attachment = TRUE) UnregisterSignal(detaching_gub, COMSIG_ITEM_DROPPED) if(bipod_deployed) diff --git a/code/modules/projectiles/gun_helpers.dm b/code/modules/projectiles/gun_helpers.dm index ba5f8e4915..9e5b1eeb11 100644 --- a/code/modules/projectiles/gun_helpers.dm +++ b/code/modules/projectiles/gun_helpers.dm @@ -395,7 +395,7 @@ DEFINES in setup.dm, referenced here. playsound(user, 'sound/handling/attachment_add.ogg', 15, 1, 4) return TRUE -/obj/item/weapon/gun/proc/on_detach(obj/item/attachable/attachment) +/obj/item/weapon/gun/proc/on_detach(mob/user, obj/item/attachable/attachment) return /obj/item/weapon/gun/proc/update_attachables() //Updates everything. You generally don't need to use this. diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index 1ee8aa189e..78cf3a654b 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -1587,6 +1587,67 @@ /obj/item/weapon/gun/rifle/m4ra/training current_mag = /obj/item/ammo_magazine/rifle/m4ra/rubber +// pve - kinda weird icon usage, uses urban M4RA sprite w/ custom attachie sprite +/obj/item/weapon/gun/rifle/m4ra/pve + name = "\improper M4RA-R2 battle rifle" + desc = "The M4RA-R2 is a souped-up M4RA, the result of an ARMAT upgrade program that didn't pan out in huge numbers. Its main attraction is the ability to chamber and fire devastating A19 depleted uranium rounds, infamous for their overpenetration abilities and toxic effects on anyone unfortunate enough to survive a hit. The thicker barrel, of course, also has no issue with non-HV ammo." + desc_lore = "The USCMC was not terribly enthusiastic about unproven hand-held plasma weaponry. Before the XM99A was eventually adopted into use, the USCMC instead sought out a traditional squad-portable, precision, armor-piercing weapon, and contracted ARMAT to upgrade their M4RA platform to be capable of firing advanced AP rounds. They succeeded- sort of.

The R2 was rejected for several reasons. It's a killer, but also a piece of junk. It kicks hard enough that precision sights simply don't stay zeroed, and its oversized muzzle-device extends an already long barrel-length. Additionally, A19 ammo, already expensive, was driven to absurd highs by the ammunition's specs. Depleted uranium is expensive...and cutting the service life of the M4RA's barrel in half is even more expensive.

Those that were made, however, are still service-ready and were issued where the XM99A was unavailable due to its production only just starting." + icon = 'icons/obj/items/weapons/guns/guns_by_map/urban/guns_obj.dmi' + icon_state = "m4ra" + item_state = "m4ra" + fire_sound = 'sound/weapons/gun_m4ra.ogg' + reload_sound = 'sound/weapons/handling/l42_reload.ogg' + unload_sound = 'sound/weapons/handling/l42_unload.ogg' + + current_mag = /obj/item/ammo_magazine/rifle/m4ra/pve + attachable_allowed = list( + /obj/item/attachable/reddot, + /obj/item/attachable/reflex, + /obj/item/attachable/flashlight, + /obj/item/attachable/extended_barrel, + /obj/item/attachable/magnetic_harness, + /obj/item/attachable/bipod, + /obj/item/attachable/verticalgrip, + /obj/item/attachable/angledgrip, + /obj/item/attachable/lasersight, + /obj/item/attachable/scope, + /obj/item/attachable/scope/mini, + /obj/item/attachable/scope/mini_iff, + /obj/item/attachable/flashlight/grip, + ) + + flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + wield_delay = WIELD_DELAY_VERY_FAST + aim_slowdown = SLOWDOWN_ADS_QUICK + map_specific_decoration = FALSE + +/obj/item/weapon/gun/rifle/m4ra/pve/set_gun_config_values() + ..() + set_fire_delay(FIRE_DELAY_TIER_4) + recoil_unwielded = RECOIL_AMOUNT_TIER_1 + recoil = RECOIL_AMOUNT_TIER_3 + + +// obnoxiously enough, need to do this manually... + item_icons = list( + WEAR_L_HAND = 'icons/obj/items/weapons/guns/guns_by_map/urban/guns_lefthand.dmi', + WEAR_R_HAND = 'icons/obj/items/weapons/guns/guns_by_map/urban/guns_righthand.dmi', + WEAR_BACK = 'icons/obj/items/weapons/guns/guns_by_map/urban/back.dmi' + ) + +/obj/item/weapon/gun/rifle/m4ra/pve/handle_starting_attachment() + ..() + var/obj/item/attachable/m4ra_barrel/pve/integrated = new(src) + integrated.flags_attach_features &= ~ATTACH_REMOVABLE + var/obj/item/attachable/old_barrel = attachments[integrated.slot] + if(old_barrel) + old_barrel.Detach(detaching_gub = src, drop_attachment = FALSE) + qdel(old_barrel) + integrated.Attach(src) + update_attachable(integrated.slot) + + + //------------------------------------------------------- //L42A Battle Rifle diff --git a/code/modules/projectiles/magazines/rifles.dm b/code/modules/projectiles/magazines/rifles.dm index 500a58bc67..ecb23297e7 100644 --- a/code/modules/projectiles/magazines/rifles.dm +++ b/code/modules/projectiles/magazines/rifles.dm @@ -167,6 +167,15 @@ default_ammo = /datum/ammo/bullet/rifle/incendiary ammo_band_color = AMMO_BAND_COLOR_INCENDIARY +/obj/item/ammo_magazine/rifle/m4ra/pve + name = "\improper M4RA depleted uranium magazine (10x24mm)" + desc = "A magazine of wall-penetrating, body-penetrating, toxic 10x24mm rounds for use in the M4RA-R2 battle rifle." + icon_state = "m4ra" + default_ammo = /datum/ammo/bullet/rifle/m4ra/du + max_rounds = 25 + gun_type = /obj/item/weapon/gun/rifle/m4ra/pve + ammo_band_color = AMMO_BAND_COLOR_TOXIN + //------------------------------------------------------- //XM40 AKA SOF RIFLE FROM HELL (It's an EM-2, a prototype of the real world L85A1 way back from the 1940s. We've given it a blue plastic shell and an integral suppressor) /obj/item/ammo_magazine/rifle/xm40 diff --git a/icons/obj/items/weapons/guns/attachments/barrel.dmi b/icons/obj/items/weapons/guns/attachments/barrel.dmi index 03c2257c69c55afe0d1593cccdf40cb620b34ecd..3e7956c6ad5b54de596cd0145586d8d659f625a4 100644 GIT binary patch literal 9719 zcmcI~2T)U8*X{`jNH2;YT?7FUDI!P*0YMM~C`CGg(t8O=2`W-WL<9t+_aX=q=|x(= zpmc(?(5rMp2_(6P_j|u`|2zMGXYS0+By%SF?6c20Yp>^d*4q0->FH|FQn67106=?R zQ_TPXAUxm?I8P3?To5h&2L73Q{>a2f?W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/maps/map_files/golden_arrow/golden_arrow.dmm b/maps/map_files/golden_arrow/golden_arrow.dmm index c819dc28b2..966fcc2cd9 100644 --- a/maps/map_files/golden_arrow/golden_arrow.dmm +++ b/maps/map_files/golden_arrow/golden_arrow.dmm @@ -965,6 +965,13 @@ icon_state = "plating" }, /area/golden_arrow/supply) +"ft" = ( +/obj/structure/curtain/red, +/obj/structure/pipes/standard/simple/hidden/supply, +/turf/open/floor/almayer{ + icon_state = "plate" + }, +/area/golden_arrow/platoon_sergeant) "fv" = ( /obj/effect/decal/warning_stripes{ icon_state = "W" @@ -1051,6 +1058,13 @@ icon_state = "test_floor4" }, /area/golden_arrow/medical) +"fW" = ( +/obj/structure/pipes/vents/scrubber, +/obj/structure/machinery/alarm/almayer{ + dir = 1 + }, +/turf/open/floor/almayer, +/area/golden_arrow/platoon_sergeant) "fX" = ( /obj/effect/decal/cleanable/dirt, /obj/effect/decal/warning_stripes{ @@ -1197,6 +1211,19 @@ icon_state = "plate" }, /area/golden_arrow/cryo_cells) +"gI" = ( +/obj/structure/surface/rack, +/obj/item/device/flashlight/lamp/on{ + pixel_y = 13 + }, +/obj/item/weapon/straight_razor{ + pixel_x = 4; + pixel_y = -6 + }, +/turf/open/floor/almayer{ + icon_state = "plate" + }, +/area/golden_arrow/platoon_sergeant) "gL" = ( /obj/structure/machinery/light{ dir = 8 @@ -1213,6 +1240,12 @@ icon_state = "plate" }, /area/golden_arrow/platoon_sergeant) +"gQ" = ( +/obj/structure/pipes/standard/simple/hidden/supply, +/turf/open/floor/almayer{ + icon_state = "plate" + }, +/area/golden_arrow/platoon_sergeant) "gS" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/pipes/standard/simple/hidden/supply{ @@ -2025,13 +2058,8 @@ }, /area/golden_arrow/squad_two) "lS" = ( -/obj/structure/surface/rack, -/obj/item/device/flashlight/lamp/on{ - pixel_y = 13 - }, -/turf/open/floor/almayer{ - icon_state = "plate" - }, +/obj/structure/pipes/standard/simple/hidden/supply, +/turf/open/floor/plating/plating_catwalk, /area/golden_arrow/platoon_sergeant) "lV" = ( /obj/effect/decal/cleanable/dirt, @@ -2051,11 +2079,9 @@ /turf/closed/wall/almayer/outer, /area/golden_arrow/supply) "mc" = ( -/obj/structure/bed{ - can_buckle = 0 - }, -/obj/item/bedsheet/brown{ - layer = 3.4 +/obj/structure/surface/rack, +/obj/item/weapon/gun/rifle/m4ra/pve{ + pixel_y = 8 }, /turf/open/floor/almayer{ icon_state = "plate" @@ -2812,6 +2838,17 @@ icon_state = "plate" }, /area/golden_arrow/hangar) +"qK" = ( +/obj/structure/closet/coffin/woodencrate, +/obj/item/ammo_magazine/rifle/m4ra/pve, +/obj/item/ammo_magazine/rifle/m4ra/pve, +/obj/item/ammo_magazine/rifle/m4ra/pve, +/obj/item/ammo_magazine/rifle/m4ra/pve, +/obj/item/ammo_magazine/rifle/m4ra/pve, +/turf/open/floor/almayer{ + icon_state = "plate" + }, +/area/golden_arrow/platoon_sergeant) "qQ" = ( /turf/open/floor/almayer{ icon_state = "cargo_arrow" @@ -2946,7 +2983,9 @@ }, /area/golden_arrow/prep_hallway) "rH" = ( -/obj/structure/pipes/standard/simple/hidden/supply, +/obj/structure/pipes/standard/manifold/hidden/supply{ + dir = 8 + }, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -3180,8 +3219,8 @@ pixel_y = 7 }, /obj/structure/sign/safety/hazard{ - pixel_y = -7; - pixel_x = -24 + pixel_x = -24; + pixel_y = -7 }, /turf/open/floor/almayer{ icon_state = "plate" @@ -3512,6 +3551,17 @@ icon_state = "plate" }, /area/golden_arrow/platoon_commander_rooms) +"vA" = ( +/obj/structure/pipes/standard/simple/hidden/supply, +/obj/structure/machinery/door/airlock/almayer/generic{ + dir = 1; + name = "\improper Platoon Sergeant's Bunk"; + req_one_access_txt = "12" + }, +/turf/open/floor/almayer{ + icon_state = "plate" + }, +/area/golden_arrow/platoon_sergeant) "vB" = ( /obj/effect/decal/warning_stripes{ icon_state = "NE-out"; @@ -4260,6 +4310,9 @@ "Ap" = ( /obj/structure/surface/table/almayer, /obj/item/trash/ceramic_plate, +/obj/structure/pipes/standard/simple/hidden/supply{ + dir = 9 + }, /turf/open/floor/almayer, /area/golden_arrow/platoon_sergeant) "As" = ( @@ -4516,6 +4569,17 @@ icon_state = "plate" }, /area/golden_arrow/firingrange) +"BK" = ( +/obj/structure/bed{ + can_buckle = 0 + }, +/obj/item/bedsheet/brown{ + layer = 3.4 + }, +/turf/open/floor/almayer{ + icon_state = "plate" + }, +/area/golden_arrow/platoon_sergeant) "BM" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/machinery/light{ @@ -6278,9 +6342,6 @@ /obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep/alpha{ density = 0 }, -/obj/structure/machinery/light/small{ - dir = 1 - }, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -7722,8 +7783,20 @@ /turf/open/floor/almayer, /area/golden_arrow/supply) "SC" = ( -/turf/closed/wall/almayer/outer, -/area/space) +/obj/structure/machinery/firealarm{ + pixel_y = 28 + }, +/obj/structure/surface/table/almayer, +/obj/item/reagent_container/food/drinks/cans/souto/classic{ + pixel_x = 10; + pixel_y = 3 + }, +/obj/item/prop/magazine/boots/n054{ + pixel_x = -6; + pixel_y = 5 + }, +/turf/open/floor/almayer, +/area/golden_arrow/platoon_sergeant) "SE" = ( /obj/effect/decal/warning_stripes{ icon_state = "S" @@ -7734,6 +7807,15 @@ icon_state = "redfull" }, /area/golden_arrow/firingrange) +"SI" = ( +/obj/structure/bed/chair{ + dir = 4 + }, +/obj/structure/pipes/standard/simple/hidden/supply{ + dir = 8 + }, +/turf/open/floor/almayer, +/area/golden_arrow/platoon_sergeant) "SL" = ( /obj/structure/machinery/light{ dir = 8 @@ -8266,6 +8348,9 @@ /area/golden_arrow/squad_one) "VL" = ( /obj/structure/closet/secure_closet/platoon_sergeant, +/obj/structure/machinery/light{ + dir = 8 + }, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -8535,9 +8620,9 @@ /area/golden_arrow/hangar) "Xu" = ( /obj/structure/machinery/door/airlock/multi_tile/almayer/generic{ + dir = 2; name = "\improper Firing Range"; - req_one_access_txt = "8;12;40"; - dir = 2 + req_one_access_txt = "8;12;40" }, /turf/open/floor/almayer{ icon_state = "test_floor4" @@ -8585,7 +8670,7 @@ "Xz" = ( /obj/structure/foamed_metal, /turf/open/floor/plating, -/area/space) +/area/golden_arrow/platoon_sergeant) "XI" = ( /obj/structure/pipes/standard/simple/hidden/supply{ dir = 4 @@ -15910,9 +15995,9 @@ Cr Cr Cr Cr -SC -SC -SC +sC +sC +sC sC sC sC @@ -16062,7 +16147,7 @@ Cr Cr Cr Cr -SC +sC Xz Xz sC @@ -16214,9 +16299,9 @@ Cr Cr Cr Cr -SC -Xz -Xz +sC +sC +sC sC Ls KQ @@ -16366,15 +16451,15 @@ Cr Cr Cr Cr +sC SC -Xz -Xz +Kv sC sC Uj sC Tj -Hm +SI Kv yt Kv @@ -16518,14 +16603,14 @@ Cr Cr Cr Cr -SC -Xz -Xz sC +fW +dr +vA lS -KQ -bw -KQ +lS +ft +gQ Ap uO qA @@ -16670,12 +16755,12 @@ Cr Cr Cr Cr -SC -Xz -Xz +sC +gI +BK sC mc -KQ +qK bw KQ QS From d26e5ebc1080330a2ad515191b15b87386f66f81 Mon Sep 17 00:00:00 2001 From: bearrrrrrrr <54826962+bearrrrrrrr@users.noreply.github.com> Date: Mon, 22 Jan 2024 13:29:58 -0500 Subject: [PATCH 3/4] smol buff and barrel fix for m4ra (#94) --- code/modules/projectiles/magazines/rifles.dm | 2 +- .../items/weapons/guns/attachments/barrel.dmi | Bin 9719 -> 10171 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/magazines/rifles.dm b/code/modules/projectiles/magazines/rifles.dm index ecb23297e7..47ee89fb79 100644 --- a/code/modules/projectiles/magazines/rifles.dm +++ b/code/modules/projectiles/magazines/rifles.dm @@ -172,7 +172,7 @@ desc = "A magazine of wall-penetrating, body-penetrating, toxic 10x24mm rounds for use in the M4RA-R2 battle rifle." icon_state = "m4ra" default_ammo = /datum/ammo/bullet/rifle/m4ra/du - max_rounds = 25 + max_rounds = 30 gun_type = /obj/item/weapon/gun/rifle/m4ra/pve ammo_band_color = AMMO_BAND_COLOR_TOXIN diff --git a/icons/obj/items/weapons/guns/attachments/barrel.dmi b/icons/obj/items/weapons/guns/attachments/barrel.dmi index 3e7956c6ad5b54de596cd0145586d8d659f625a4..04d1612ca4523eaf924aee77257a132c0bdfe37f 100644 GIT binary patch delta 9280 zcmb7~c|27A+y4(jB3t&oqDZ!c>=H?27sfI~*_W(Y&x9gjNLeatWHj08O>KMlU{ZO#7=a ztxQvHi**dtT*$i{^P+ez7`Q*`6#dotctWO_#ii9qfCD+^u-iOrGT6iA^yH$ZlkIPg zN7~VE9`5j6;J75!eA$WV&qIXqU8BUMxVA9cR^a2$W3bb=^Oa?|;= zlx9_tOVyd!`=uP0j1_oIOUH^gWf8RyOeeU`G@5+~8<^O|C<~r{qY3}Uan6YWdP|b@ zFy+u;rSsS-)i<7=Z?C9xHm4gFt|we8cwDj53cA-OzgmHZnBfMk^l|yP9aDh&O^V2y z#vf0EcXUsOZ69dk8F{zH$#{8rFZY4YhuR;-d4%%qjq=wVjt3?C3k@bY*9|d?JBFoK zB`O4}lrgr)e~`gGiUjOR&bPLe@!aM4Dje9^_eq9X`INEg)M*r6?UK?aQ-3Uv&#+Yi z?HjSjtjyDHBL^12$SQ=(J&nG^xG$_kkB#qv*MeqJBn(&g3oXI%@~6L3a)UjV9eKTJ z*Fz72g0|C;bQDPLsEhYrjs_af_4&a~{^Dv}#&31QD!lYqO?ltu;kO)vx6?)pl$WUH z9KwI#T$e4!Ly*;oYg=Q>wikH?V5)Lps!n;Z&E&r9_vU(@c!q?{x^4C*>*k>CLMYS` z_jOAXks_4#DGPaAp$Lb-JqN4aUJC9s=tBC_MR3+@-j=i3$qhY$BO@gRfYeYqYgqZy zl${`!<)b4K;D)kdt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2024 18:42:54 +0000 Subject: [PATCH 4/4] Upstream/tg Status effects port - part 1 (#92) --- .../signals/atom/mob/living/signals_living.dm | 5 + .../dcs/signals/atom/mob/signals_mob.dm | 6 - code/__DEFINES/mobs.dm | 29 +++ code/__DEFINES/traits.dm | 45 +++- code/__HELPERS/animations.dm | 2 + code/__HELPERS/status_effects.dm | 1 + code/__HELPERS/unsorted.dm | 16 +- code/_globalvars/bitfields.dm | 7 + code/_onclick/human.dm | 6 +- code/_onclick/ventcrawl.dm | 4 +- code/_onclick/xeno.dm | 4 +- code/datums/action.dm | 6 +- code/datums/agents/tools/chloroform.dm | 2 - code/datums/ammo/ammo.dm | 6 +- code/datums/ammo/bullet/shotgun.dm | 2 +- code/datums/ammo/xeno.dm | 8 +- code/datums/components/footstep.dm | 2 +- .../diseases/advance/symptoms/symptoms.dm | 2 - code/datums/diseases/cold.dm | 4 +- code/datums/diseases/flu.dm | 4 +- .../effects/xeno_strains/boiler_trap.dm | 14 +- code/datums/elements/mouth_drop_item.dm | 4 +- code/datums/mob_hud.dm | 4 +- code/game/atoms.dm | 2 +- .../colonialmarines/whiskey_outpost.dm | 4 +- .../gamemodes/colonialmarines/xenovsxeno.dm | 1 - code/game/jobs/job/antag/xeno/xenomorph.dm | 3 +- code/game/machinery/OpTable.dm | 2 +- code/game/machinery/bots/mulebot.dm | 1 - code/game/machinery/computer/aifixer.dm | 1 - code/game/machinery/computer/medical.dm | 2 +- code/game/machinery/computer/robot.dm | 21 +- code/game/machinery/doors/airlock.dm | 2 +- code/game/machinery/doors/firedoor.dm | 2 +- code/game/machinery/fax_machine.dm | 3 +- code/game/machinery/floodlight.dm | 4 +- code/game/machinery/iv_drip.dm | 4 +- code/game/machinery/machinery.dm | 10 +- .../game/machinery/medical_pod/bodyscanner.dm | 4 +- .../game/machinery/medical_pod/medical_pod.dm | 1 - code/game/machinery/medical_pod/sleeper.dm | 4 +- code/game/machinery/nuclearbomb.dm | 4 +- code/game/machinery/pipe/pipe_dispenser.dm | 6 +- code/game/machinery/vending/cm_vending.dm | 2 +- code/game/machinery/vending/vending.dm | 2 +- code/game/objects/effects/acid_hole.dm | 10 +- code/game/objects/effects/aliens.dm | 4 +- code/game/objects/effects/step_triggers.dm | 4 +- code/game/objects/items.dm | 9 +- .../objects/items/devices/autopsy_scanner.dm | 2 +- code/game/objects/items/devices/binoculars.dm | 2 +- .../objects/items/devices/radio/beacon.dm | 2 +- .../items/explosives/grenades/flashbang.dm | 7 +- code/game/objects/items/hoverpack.dm | 4 +- .../items/implants/implantneurostim.dm | 2 +- .../items/reagent_containers/blood_pack.dm | 2 +- code/game/objects/items/storage/backpack.dm | 2 +- code/game/objects/items/storage/internal.dm | 8 +- .../objects/items/storage/large_holster.dm | 2 +- code/game/objects/items/storage/smartpack.dm | 2 +- .../objects/items/tools/experimental_tools.dm | 2 +- code/game/objects/items/toys/toy_weapons.dm | 6 +- code/game/objects/objs.dm | 19 +- code/game/objects/structures.dm | 7 +- .../structures/barricade/deployable.dm | 2 +- code/game/objects/structures/bookcase.dm | 2 +- .../structures/crates_lockers/closets.dm | 11 +- .../crates_lockers/closets/secure/personal.dm | 2 +- .../closets/secure/secure_closets.dm | 2 +- .../crates_lockers/secure_crates.dm | 2 +- code/game/objects/structures/ladders.dm | 12 +- code/game/objects/structures/morgue.dm | 5 +- .../structures/stool_bed_chair_nest/bed.dm | 2 +- .../structures/stool_bed_chair_nest/chairs.dm | 2 +- .../stool_bed_chair_nest/wheelchair.dm | 2 +- .../stool_bed_chair_nest/xeno_nest.dm | 12 +- .../objects/structures/vulture_spotter.dm | 4 +- code/game/objects/structures/watercloset.dm | 1 + code/modules/admin/topic/topic.dm | 11 - code/modules/animations/animation_library.dm | 4 +- code/modules/assembly/infrared.dm | 2 +- code/modules/clothing/glasses/glasses.dm | 62 +++--- code/modules/clothing/glasses/hud.dm | 2 +- code/modules/clothing/gloves/miscellaneous.dm | 2 +- code/modules/clothing/head/misc_special.dm | 56 ++--- code/modules/clothing/masks/breath.dm | 2 +- code/modules/clothing/suits/jobs.dm | 2 +- code/modules/clothing/suits/labcoat.dm | 2 +- code/modules/clothing/suits/marine_armor.dm | 7 +- code/modules/clothing/suits/marine_coat.dm | 2 +- code/modules/clothing/suits/miscellaneous.dm | 2 +- code/modules/clothing/under/under.dm | 2 +- code/modules/cm_aliens/XenoStructures.dm | 5 +- code/modules/cm_aliens/structures/fruit.dm | 2 +- code/modules/cm_aliens/structures/trap.dm | 2 +- code/modules/cm_aliens/structures/tunnel.dm | 4 +- code/modules/cm_marines/Donator_Items.dm | 8 +- code/modules/cm_marines/m2c.dm | 17 +- code/modules/cm_marines/marines_consoles.dm | 4 +- code/modules/cm_marines/orbital_cannon.dm | 2 +- code/modules/cm_marines/smartgun_mount.dm | 10 +- code/modules/cm_preds/thrall_procs.dm | 2 +- code/modules/cm_preds/yaut_bracers.dm | 5 +- code/modules/cm_preds/yaut_procs.dm | 6 +- code/modules/cm_tech/hologram.dm | 1 - code/modules/defenses/defenses.dm | 4 +- .../desert_dam/filtration/filtration.dm | 2 +- .../desert_dam/motion_sensor/sensortower.dm | 2 +- code/modules/droppod/container_droppod.dm | 2 +- code/modules/economy/ATM.dm | 2 +- code/modules/flufftext/Dreaming.dm | 2 +- code/modules/flufftext/Hallucination.dm | 2 +- code/modules/gear_presets/corpses.dm | 1 - code/modules/hydroponics/vines.dm | 1 - code/modules/mob/dead/observer/observer.dm | 4 +- code/modules/mob/death.dm | 2 - code/modules/mob/inventory.dm | 4 - code/modules/mob/living/brain/brain.dm | 9 - code/modules/mob/living/brain/life.dm | 1 - code/modules/mob/living/carbon/carbon.dm | 49 +++-- .../mob/living/carbon/carbon_defines.dm | 1 + code/modules/mob/living/carbon/give.dm | 4 +- code/modules/mob/living/carbon/human/human.dm | 5 +- .../living/carbon/human/human_abilities.dm | 2 - .../living/carbon/human/human_attackhand.dm | 5 +- .../mob/living/carbon/human/human_defines.dm | 1 + .../mob/living/carbon/human/human_helpers.dm | 8 - .../mob/living/carbon/human/human_movement.dm | 9 +- code/modules/mob/living/carbon/human/life.dm | 2 - .../carbon/human/life/handle_disabilities.dm | 8 +- .../living/carbon/human/life/handle_organs.dm | 4 +- .../life/handle_regular_status_updates.dm | 5 +- .../carbon/human/life/handle_stasis_bag.dm | 3 + .../living/carbon/human/life/life_helpers.dm | 29 --- .../carbon/human/powers/human_powers.dm | 53 ++++- .../mob/living/carbon/human/species/monkey.dm | 4 +- .../living/carbon/human/species/species.dm | 17 +- .../mob/living/carbon/human/species/zombie.dm | 5 +- .../mob/living/carbon/human/update_icons.dm | 29 +-- .../modules/mob/living/carbon/update_icons.dm | 5 - .../mob/living/carbon/xenomorph/Embryo.dm | 8 +- .../living/carbon/xenomorph/Facehuggers.dm | 8 +- .../mob/living/carbon/xenomorph/XenoProcs.dm | 15 +- .../abilities/ability_helper_procs.dm | 1 - .../abilities/burrower/burrower_powers.dm | 12 +- .../abilities/crusher/crusher_abilities.dm | 9 +- .../abilities/crusher/crusher_powers.dm | 7 +- .../abilities/defender/defender_powers.dm | 2 - .../xenomorph/abilities/general_abilities.dm | 11 +- .../xenomorph/abilities/general_powers.dm | 3 - .../abilities/hivelord/hivelord_abilities.dm | 2 +- .../abilities/lurker/lurker_powers.dm | 2 +- .../abilities/praetorian/praetorian_powers.dm | 19 +- .../abilities/predalien/predalien_powers.dm | 6 - .../abilities/ravager/ravager_powers.dm | 2 - .../carbon/xenomorph/abilities/xeno_action.dm | 2 +- .../mob/living/carbon/xenomorph/ai/xeno_ai.dm | 2 +- .../living/carbon/xenomorph/attack_alien.dm | 8 +- .../carbon/xenomorph/castes/Burrower.dm | 7 - .../living/carbon/xenomorph/castes/Carrier.dm | 8 +- .../living/carbon/xenomorph/castes/Crusher.dm | 2 +- .../carbon/xenomorph/castes/Facehugger.dm | 14 +- .../living/carbon/xenomorph/castes/Larva.dm | 6 +- .../living/carbon/xenomorph/castes/Lurker.dm | 2 +- .../living/carbon/xenomorph/castes/Queen.dm | 14 +- .../living/carbon/xenomorph/damage_procs.dm | 2 +- .../mob/living/carbon/xenomorph/life.dm | 17 +- .../mutators/strains/crusher/charger.dm | 2 +- .../mutators/strains/drone/gardener.dm | 4 +- .../mutators/strains/drone/healer.dm | 4 +- .../mutators/strains/praetorian/oppressor.dm | 12 +- .../xenomorph/mutators/strains/runner/acid.dm | 2 +- .../living/carbon/xenomorph/update_icons.dm | 36 +++- code/modules/mob/living/init_signals.dm | 78 ++++++- code/modules/mob/living/living.dm | 202 +++++++++++++++++- code/modules/mob/living/living_defines.dm | 32 ++- .../modules/mob/living/living_health_procs.dm | 41 ++-- code/modules/mob/living/living_verbs.dm | 4 +- code/modules/mob/living/silicon/ai/ai.dm | 4 +- .../modules/mob/living/silicon/decoy/decoy.dm | 2 +- code/modules/mob/living/silicon/robot/life.dm | 16 +- .../modules/mob/living/silicon/robot/robot.dm | 4 +- code/modules/mob/living/simple_animal/bat.dm | 1 - .../living/simple_animal/friendly/mouse.dm | 1 - .../mob/living/simple_animal/hostile/alien.dm | 14 +- .../living/simple_animal/hostile/hostile.dm | 2 +- .../mob/living/simple_animal/parrot.dm | 4 +- .../mob/living/simple_animal/simple_animal.dm | 20 +- code/modules/mob/living/simple_animal/slug.dm | 1 - code/modules/mob/mob.dm | 76 ++----- code/modules/mob/mob_defines.dm | 3 - code/modules/mob/mob_grab.dm | 10 +- code/modules/mob/mob_helpers.dm | 13 +- code/modules/mob/mob_movement.dm | 25 ++- code/modules/mob/mob_verbs.dm | 3 +- code/modules/mob/new_player/new_player.dm | 2 +- code/modules/mob/transform_procs.dm | 34 +-- code/modules/nano/nanoui.dm | 6 +- code/modules/paperwork/photography.dm | 2 +- code/modules/power/apc.dm | 4 +- code/modules/projectiles/gun.dm | 6 +- code/modules/projectiles/gun_attachables.dm | 2 +- code/modules/projectiles/gun_helpers.dm | 2 +- code/modules/projectiles/guns/smartgun.dm | 2 +- .../specialist/launcher/rocket_launcher.dm | 4 +- .../projectiles/guns/specialist/sniper.dm | 4 +- code/modules/projectiles/projectile.dm | 8 +- .../chemistry_machinery/acid_harness.dm | 2 +- .../chemistry_properties/prop_neutral.dm | 4 +- .../chemistry_properties/prop_positive.dm | 2 +- .../chemistry_properties/prop_special.dm | 2 +- .../reagents/chemistry_reagents/drink.dm | 3 +- .../reagents/chemistry_reagents/toxin.dm | 2 + code/modules/recycling/conveyor2.dm | 2 +- code/modules/recycling/disposal.dm | 10 +- code/modules/shuttles/shuttle_console.dm | 2 - code/modules/sorokyne/sorokyne_cold_water.dm | 6 +- code/modules/surgery/surgery_initiator.dm | 4 +- code/modules/surgery/surgery_procedure.dm | 2 +- code/modules/tgui/status_composers.dm | 11 - .../vehicles/interior/interactable/seats.dm | 11 - code/modules/vehicles/train.dm | 6 +- code/modules/vehicles/van/van.dm | 6 +- colonialmarines.dme | 2 + 224 files changed, 1064 insertions(+), 833 deletions(-) create mode 100644 code/__HELPERS/animations.dm create mode 100644 code/__HELPERS/status_effects.dm diff --git a/code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm b/code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm index 89a65dad23..56cd4dd8cd 100644 --- a/code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm +++ b/code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm @@ -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" diff --git a/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm b/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm index 529b2e9314..0f2457d4b1 100644 --- a/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm +++ b/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm @@ -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() @@ -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) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 23b05a4d7b..67c52379e8 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -419,3 +419,32 @@ var/list/default_xeno_onmob_icons = list( #define EXTREMITY_LIMBS list("l_leg","l_foot","r_leg","r_foot","l_arm","l_hand","r_arm","r_hand") #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) + diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 7f69a4acc4..8962230946 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -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" @@ -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, @@ -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" diff --git a/code/__HELPERS/animations.dm b/code/__HELPERS/animations.dm new file mode 100644 index 0000000000..f85fb763a4 --- /dev/null +++ b/code/__HELPERS/animations.dm @@ -0,0 +1,2 @@ +/// The duration of the animate call in mob/living/update_transform +#define UPDATE_TRANSFORM_ANIMATION_TIME (0.2 SECONDS) diff --git a/code/__HELPERS/status_effects.dm b/code/__HELPERS/status_effects.dm new file mode 100644 index 0000000000..d06cb687f6 --- /dev/null +++ b/code/__HELPERS/status_effects.dm @@ -0,0 +1 @@ +#define TRAIT_STATUS_EFFECT(effect_id) "[effect_id]-trait" diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 07f237fada..c443a49ba1 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1111,7 +1111,7 @@ var/global/image/action_purple_power_up 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 @@ -1119,7 +1119,7 @@ var/global/image/action_purple_power_up 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) @@ -1143,13 +1143,13 @@ var/global/image/action_purple_power_up ) . = 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 @@ -1223,8 +1223,8 @@ var/global/image/action_purple_power_up ) . = 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 diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index b85aa18fdb..541d1a0536 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -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, diff --git a/code/_onclick/human.dm b/code/_onclick/human.dm index 1ff0fe6102..b57fc76f2e 100644 --- a/code/_onclick/human.dm +++ b/code/_onclick/human.dm @@ -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 @@ -92,7 +92,7 @@ SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, 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 . = ..() @@ -157,6 +157,4 @@ target.Move(user.loc, get_dir(target.loc, user.loc)) target.update_transform(TRUE) - target.update_canmove() - diff --git a/code/_onclick/ventcrawl.dm b/code/_onclick/ventcrawl.dm index b079cffe2a..51afbc139f 100644 --- a/code/_onclick/ventcrawl.dm +++ b/code/_onclick/ventcrawl.dm @@ -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 @@ -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 diff --git a/code/_onclick/xeno.dm b/code/_onclick/xeno.dm index 02b90b5cf4..c29841ce14 100644 --- a/code/_onclick/xeno.dm +++ b/code/_onclick/xeno.dm @@ -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 @@ -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 diff --git a/code/datums/action.dm b/code/datums/action.dm index 47b302e09a..0510a43415 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -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() diff --git a/code/datums/agents/tools/chloroform.dm b/code/datums/agents/tools/chloroform.dm index c6e3320688..b1c666ac9e 100644 --- a/code/datums/agents/tools/chloroform.dm +++ b/code/datums/agents/tools/chloroform.dm @@ -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) @@ -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) diff --git a/code/datums/ammo/ammo.dm b/code/datums/ammo/ammo.dm index 7957a8a994..41a8676f76 100644 --- a/code/datums/ammo/ammo.dm +++ b/code/datums/ammo/ammo.dm @@ -141,7 +141,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) @@ -183,8 +183,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) diff --git a/code/datums/ammo/bullet/shotgun.dm b/code/datums/ammo/bullet/shotgun.dm index d8a7248436..e254821aea 100644 --- a/code/datums/ammo/bullet/shotgun.dm +++ b/code/datums/ammo/bullet/shotgun.dm @@ -352,7 +352,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) diff --git a/code/datums/ammo/xeno.dm b/code/datums/ammo/xeno.dm index 75c78298fe..9ecc9ebf93 100644 --- a/code/datums/ammo/xeno.dm +++ b/code/datums/ammo/xeno.dm @@ -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) @@ -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.")) @@ -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.")) diff --git a/code/datums/components/footstep.dm b/code/datums/components/footstep.dm index ef77aaf471..6eaaa6e76a 100644 --- a/code/datums/components/footstep.dm +++ b/code/datums/components/footstep.dm @@ -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) diff --git a/code/datums/diseases/advance/symptoms/symptoms.dm b/code/datums/diseases/advance/symptoms/symptoms.dm index 72a132cf51..96a628be66 100644 --- a/code/datums/diseases/advance/symptoms/symptoms.dm +++ b/code/datums/diseases/advance/symptoms/symptoms.dm @@ -3,8 +3,6 @@ var/list/list_symptoms = typesof(/datum/symptom) - /datum/symptom var/list/dictionary_symptoms = list() -var/global/const/SYMPTOM_ACTIVATION_PROB = 3 - /datum/symptom // Buffs/Debuffs the symptom has to the overall engineered disease. var/name = "" diff --git a/code/datums/diseases/cold.dm b/code/datums/diseases/cold.dm index 46cd8952dd..fd3fbc3a7d 100644 --- a/code/datums/diseases/cold.dm +++ b/code/datums/diseases/cold.dm @@ -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 @@ -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 diff --git a/code/datums/diseases/flu.dm b/code/datums/diseases/flu.dm index f2c0295876..fad0b15228 100644 --- a/code/datums/diseases/flu.dm +++ b/code/datums/diseases/flu.dm @@ -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 @@ -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 diff --git a/code/datums/effects/xeno_strains/boiler_trap.dm b/code/datums/effects/xeno_strains/boiler_trap.dm index 1833b9641a..199505379b 100644 --- a/code/datums/effects/xeno_strains/boiler_trap.dm +++ b/code/datums/effects/xeno_strains/boiler_trap.dm @@ -5,16 +5,16 @@ duration = null flags = INF_DURATION -/datum/effects/boiler_trap/New(atom/A, mob/from, last_dmg_source, zone) +/datum/effects/boiler_trap/New(atom/A, mob/living/from, last_dmg_source, zone) . = ..() if(!QDELETED(src)) - var/mob/M = affected_atom - ADD_TRAIT(M, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name)) + var/mob/living/affected_living = affected_atom + ADD_TRAIT(affected_living, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name)) /datum/effects/boiler_trap/Destroy(force) if(ismob(affected_atom)) - var/mob/M = affected_atom - REMOVE_TRAIT(M, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name)) + var/mob/living/affected_living = affected_atom + REMOVE_TRAIT(affected_living, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name)) return ..() /datum/effects/boiler_trap/validate_atom(atom/A) @@ -26,6 +26,6 @@ /datum/effects/boiler_trap/process_mob() . = ..() if(!.) return FALSE - var/mob/M = affected_atom - ADD_TRAIT(M, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name)) + var/mob/living/affected_living = affected_atom + ADD_TRAIT(affected_living, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name)) return TRUE diff --git a/code/datums/elements/mouth_drop_item.dm b/code/datums/elements/mouth_drop_item.dm index 42c61bd275..7a546c6b39 100644 --- a/code/datums/elements/mouth_drop_item.dm +++ b/code/datums/elements/mouth_drop_item.dm @@ -19,9 +19,9 @@ SIGNAL_HANDLER if(slot == WEAR_FACE) - I.RegisterSignal(user, COMSIG_MOB_KNOCKED_DOWN, TYPE_PROC_REF(/obj/item, drop_to_floor)) + I.RegisterSignal(user, COMSIG_LIVING_SET_BODY_POSITION, TYPE_PROC_REF(/obj/item, drop_to_floor)) /datum/element/mouth_drop_item/proc/item_dropped(obj/item/I, mob/living/carbon/human/user) SIGNAL_HANDLER - I.UnregisterSignal(user, COMSIG_MOB_KNOCKED_DOWN) + I.UnregisterSignal(user, COMSIG_LIVING_SET_BODY_POSITION) diff --git a/code/datums/mob_hud.dm b/code/datums/mob_hud.dm index ff12635107..fdd4435d12 100644 --- a/code/datums/mob_hud.dm +++ b/code/datums/mob_hud.dm @@ -803,8 +803,6 @@ var/global/image/hud_icon_hudfocus if (tag_found) tag_holder.overlays += image('icons/mob/hud/hud.dmi', src, "prae_tag") - // Hacky, but works. Currently effects are hard to make with precise timings - var/freeze_found = HAS_TRAIT(src, TRAIT_IMMOBILIZED) && !buckled && !lying - + var/freeze_found = HAS_TRAIT(src, TRAIT_IMMOBILIZED) && body_position == STANDING_UP && !buckled // Eligible targets are unable to move but can stand and aren't buckled (eg nested) - This is to convey that they are temporarily unable to move if (freeze_found) freeze_holder.overlays += image('icons/mob/hud/hud.dmi', src, "xeno_freeze") diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 22e8cd3093..2f42c7891f 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -171,7 +171,7 @@ directive is properly returned. if(!time) transform = complete return - animate(src, transform = complete, time = time, easing = easing) + animate(src, transform = complete, time = time, easing = easing, flags = ANIMATION_PARALLEL) /// Upates the base_transform which will be compounded with other transforms /atom/proc/update_base_transform(matrix/new_transform, time = 0) diff --git a/code/game/gamemodes/colonialmarines/whiskey_outpost.dm b/code/game/gamemodes/colonialmarines/whiskey_outpost.dm index 4484846cd7..d8907911e9 100644 --- a/code/game/gamemodes/colonialmarines/whiskey_outpost.dm +++ b/code/game/gamemodes/colonialmarines/whiskey_outpost.dm @@ -511,10 +511,10 @@ unacidable = TRUE var/working = 0 -/obj/structure/machinery/wo_recycler/attack_hand(mob/user) +/obj/structure/machinery/wo_recycler/attack_hand(mob/living/user) if(inoperable(MAINT)) return - if(user.lying || user.stat) + if(user.is_mob_incapacitated()) return if(ismaintdrone(usr) || \ istype(usr, /mob/living/carbon/xenomorph)) diff --git a/code/game/gamemodes/colonialmarines/xenovsxeno.dm b/code/game/gamemodes/colonialmarines/xenovsxeno.dm index a19c3e3582..0e3107858b 100644 --- a/code/game/gamemodes/colonialmarines/xenovsxeno.dm +++ b/code/game/gamemodes/colonialmarines/xenovsxeno.dm @@ -141,7 +141,6 @@ original.statistic_exempt = TRUE original.buckled = start_nest original.setDir(start_nest.dir) - original.update_canmove() start_nest.buckled_mob = original start_nest.afterbuckle(original) diff --git a/code/game/jobs/job/antag/xeno/xenomorph.dm b/code/game/jobs/job/antag/xeno/xenomorph.dm index 53b06147e2..78b6ab7e3a 100644 --- a/code/game/jobs/job/antag/xeno/xenomorph.dm +++ b/code/game/jobs/job/antag/xeno/xenomorph.dm @@ -88,9 +88,8 @@ break human_to_transform.statistic_exempt = TRUE - human_to_transform.buckled = start_nest + human_to_transform.set_buckled(start_nest) human_to_transform.setDir(start_nest.dir) - human_to_transform.update_canmove() start_nest.buckled_mob = human_to_transform start_nest.afterbuckle(human_to_transform) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index c9092a750f..03c013703b 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -19,7 +19,7 @@ active_power_usage = 5 var/strapped = 0 can_buckle = TRUE - buckle_lying = TRUE + buckle_lying = 90 var/buckling_y = -4 surgery_duration_multiplier = SURGERY_SURFACE_MULT_IDEAL //Ideal surface for surgery. var/patient_exam = 0 diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index b88f824956..16e4335b71 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -763,7 +763,6 @@ M.stop_pulling() M.apply_effect(8, STUN) M.apply_effect(5, WEAKEN) - M.lying = 1 ..() /obj/structure/machinery/bot/mulebot/alter_health() diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 67e4e8ed35..3a809620d7 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -68,7 +68,6 @@ src.occupant.updatehealth() if (src.occupant.health >= 0 && src.occupant.stat == DEAD) src.occupant.set_stat(CONSCIOUS) - src.occupant.lying = 0 GLOB.dead_mob_list -= src.occupant GLOB.alive_mob_list += src.occupant occupant.reload_fullscreens() diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 53efad3da8..6f5c1229c5 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -24,7 +24,7 @@ set name = "Eject ID Card" set src in oview(1) - if(!usr || usr.stat || usr.lying) return + if(!usr || usr.is_mob_incapacitated()) return if(scan) to_chat(usr, "You remove \the [scan] from \the [src].") diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index c5a13e2c3e..19e3ac900a 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -51,11 +51,11 @@ dat += "[R.name] |" if(R.stat) dat += " Not Responding |" - else if (!R.canmove) + else if (HAS_TRAIT_FROM(R, TRAIT_IMMOBILIZED, HACKED_TRAIT)) dat += " Locked Down |" else dat += " Operating Normally |" - if(R.canmove && R.cell) + if(R.cell) dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |" else dat += " No Cell Installed |" @@ -70,7 +70,8 @@ if (isRemoteControlling(user)) if((user.mind.original == user)) dat += "(Hack) " - dat += "([R.canmove ? "Lockdown" : "Release"]) " + var/canmove = HAS_TRAIT_FROM(src, TRAIT_IMMOBILIZED, HACKED_TRAIT) + dat += "([canmove ? "Lockdown" : "Release"]) " dat += "(Destroy)" dat += "
" dat += "(Return to Main Menu)
" @@ -161,20 +162,22 @@ else if (href_list["stopbot"]) if(src.allowed(usr)) var/mob/living/silicon/robot/R = locate(href_list["stopbot"]) + var/canmove = HAS_TRAIT_FROM(src, TRAIT_IMMOBILIZED, HACKED_TRAIT) if(R && istype(R)) // Extra sancheck because of input var references - var/choice = tgui_input_list(usr, "Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?", "Hack machine", list("Confirm", "Abort")) + var/choice = tgui_input_list(usr, "Are you certain you wish to [canmove ? "lock down" : "release"] [R.name]?", "Hack machine", list("Confirm", "Abort")) if(choice == "Confirm") if(R && istype(R)) - message_admins("[key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!") - log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [R.name]!") - R.canmove = !R.canmove + message_admins("[key_name_admin(usr)] [canmove ? "locked down" : "released"] [R.name]!") + log_game("[key_name(usr)] [canmove ? "locked down" : "released"] [R.name]!") + if(canmove) + ADD_TRAIT(src, TRAIT_IMMOBILIZED, HACKED_TRAIT) + else + REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, HACKED_TRAIT) if (R.lockcharge) - // R.cell.charge = R.lockcharge R.lockcharge = !R.lockcharge to_chat(R, "Your lockdown has been lifted!") else R.lockcharge = !R.lockcharge - // R.cell.charge = 0 to_chat(R, "You have been locked down!") else diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index c6d9ddf3ef..e381da0c33 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -91,7 +91,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( else if(user.hallucination > 50 && prob(10) && operating == 0) to_chat(user, SPAN_DANGER("You feel a powerful shock course through your body!")) user.halloss += 10 - user.stunned += 10 + user.apply_effect(10, STUN) return ..(user) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 065816567c..d236b96166 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -135,7 +135,7 @@ "Would you like to [density ? "open" : "close"] this [src.name]?[ alarmed && density ? "\nNote that by doing so, you acknowledge any damages from opening this\n[src.name] as being your own fault, and you will be held accountable under the law." : ""]",\ "\The [src]", list("Yes", "No")) != "Yes") return - if(user.is_mob_incapacitated() || (!user.canmove && !isRemoteControlling(user)) || (get_dist(src, user) > 1 && !isRemoteControlling(user))) + if(user.is_mob_incapacitated() || (get_dist(src, user) > 1 && !isRemoteControlling(user))) to_chat(user, "Sorry, you must remain able bodied and close to \the [src] in order to use it.") return if(density && (inoperable())) //can still close without power diff --git a/code/game/machinery/fax_machine.dm b/code/game/machinery/fax_machine.dm index ff21671ed7..77a7de45a6 100644 --- a/code/game/machinery/fax_machine.dm +++ b/code/game/machinery/fax_machine.dm @@ -110,7 +110,8 @@ var/list/alldepartments = list() set category = "Object" set name = "Eject ID Card" set src in view(1) - if(!usr || usr.stat || usr.lying) return + if(usr.is_mob_incapacitated()) + return if(ishuman(usr) && scan) to_chat(usr, "You remove \the [scan] from \the [src].") diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 516cdad380..580fea644e 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -36,12 +36,12 @@ update_icon() -/obj/structure/machinery/floodlight/attack_hand(mob/user) +/obj/structure/machinery/floodlight/attack_hand(mob/living/user) if(!toggleable) to_chat(user, SPAN_NOTICE("[src] doesn't seem to have a switch to toggle the light.")) return - if(user.lying || user.stat) + if(user.is_mob_incapacitated()) return if(!is_valid_user(user)) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index ef6c74a052..4b863bec04 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -57,7 +57,7 @@ if(ishuman(usr)) var/mob/living/carbon/human/user = usr - if(user.stat || get_dist(user, src) > 1 || user.blinded || user.lying) + if(user.is_mob_incapacitated() || get_dist(user, src) > 1 || user.blinded) return if(!skillcheck(user, SKILL_SURGERY, SKILL_SURGERY_NOVICE)) @@ -179,7 +179,7 @@ if(!istype(usr, /mob/living)) return - if(usr.stat || usr.lying) + if(usr.stat || usr.is_mob_incapacitated()) return mode = !mode diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 66bf08afba..1cc66233f9 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -229,7 +229,11 @@ Class Procs: return TRUE if(inoperable()) return 1 - if(usr.is_mob_restrained() || usr.lying || usr.stat) + if(isliving(usr)) + var/mob/living/living = usr + if(living.body_position == LYING_DOWN) // legacy. if you too find it doesn't make sense, consider removing it + return TRUE + if(usr.is_mob_restrained()) return 1 if(!is_valid_user(usr)) to_chat(usr, SPAN_DANGER("You don't have the dexterity to do this!")) @@ -251,10 +255,10 @@ Class Procs: else return src.attack_hand(user) -/obj/structure/machinery/attack_hand(mob/user as mob) +/obj/structure/machinery/attack_hand(mob/living/user as mob) if(inoperable(MAINT)) return TRUE - if(user.lying || user.stat) + if(user.is_mob_incapacitated()) return TRUE if(!is_valid_user(user)) to_chat(usr, SPAN_DANGER("You don't have the dexterity to do this!")) diff --git a/code/game/machinery/medical_pod/bodyscanner.dm b/code/game/machinery/medical_pod/bodyscanner.dm index fdcd0ceb62..bbc3be7d5a 100644 --- a/code/game/machinery/medical_pod/bodyscanner.dm +++ b/code/game/machinery/medical_pod/bodyscanner.dm @@ -204,7 +204,7 @@ "toxloss" = H.getToxLoss(), "cloneloss" = H.getCloneLoss(), "brainloss" = H.getBrainLoss(), - "knocked_out" = H.knocked_out, + "knocked_out" = H.GetKnockOutValueNotADurationDoNotUse(), "bodytemp" = H.bodytemperature, "inaprovaline_amount" = H.reagents.get_reagent_amount("inaprovaline"), "dexalin_amount" = H.reagents.get_reagent_amount("dexalin"), @@ -263,7 +263,7 @@ s_class = occ["brainloss"] < 1 ? INTERFACE_GOOD : INTERFACE_BAD dat += "[SET_CLASS("  Approx. Brain Damage:", INTERFACE_PINK)] [SET_CLASS("[occ["brainloss"]]%", s_class)]

" - dat += "[SET_CLASS("Knocked Out Summary:", "#40628a")] [occ["knocked_out"]]% ([round(occ["knocked_out"] / 4)] seconds left!)
" + dat += "[SET_CLASS("Knocked Out Summary:", "#40628a")] [occ["knocked_out"]]% (approximately [round(occ["knocked_out"] / 5)] seconds left!)
" dat += "[SET_CLASS("Body Temperature:", "#40628a")] [occ["bodytemp"]-T0C]°C ([occ["bodytemp"]*1.8-459.67]°F)


" s_class = occ["blood_amount"] > 448 ? INTERFACE_OKAY : INTERFACE_BAD diff --git a/code/game/machinery/medical_pod/medical_pod.dm b/code/game/machinery/medical_pod/medical_pod.dm index b284d71ad4..62c8eef1f7 100644 --- a/code/game/machinery/medical_pod/medical_pod.dm +++ b/code/game/machinery/medical_pod/medical_pod.dm @@ -155,7 +155,6 @@ if(exit_stun) occupant.apply_effect(exit_stun, STUN) //Action delay when going out - occupant.update_canmove() //Force the delay to go in action immediately occupant.visible_message(SPAN_WARNING("[occupant] pops out of \the [src]!"), SPAN_WARNING("You get out of \the [src] and get your bearings!")) diff --git a/code/game/machinery/medical_pod/sleeper.dm b/code/game/machinery/medical_pod/sleeper.dm index bf2abe246c..0694783e20 100644 --- a/code/game/machinery/medical_pod/sleeper.dm +++ b/code/game/machinery/medical_pod/sleeper.dm @@ -390,8 +390,8 @@ to_chat(user, "[]\t -Respiratory Damage %: []", (occupant.getOxyLoss() < 60 ? SPAN_NOTICE("") : SPAN_DANGER("")), occupant.getOxyLoss()) to_chat(user, "[]\t -Toxin Content %: []", (occupant.getToxLoss() < 60 ? SPAN_NOTICE("") : SPAN_DANGER("")), occupant.getToxLoss()) to_chat(user, "[]\t -Burn Severity %: []", (occupant.getFireLoss() < 60 ? SPAN_NOTICE("") : SPAN_DANGER("")), occupant.getFireLoss()) - to_chat(user, SPAN_NOTICE(" Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)")) - to_chat(user, SPAN_NOTICE(" \t [occupant.knocked_out / 5] second\s (if around 1 or 2 the sleeper is keeping them asleep.)")) + to_chat(user, SPAN_NOTICE(" Expected time till occupant can safely awake: (note: These times are always inaccurate)")) + to_chat(user, SPAN_NOTICE(" \t [occupant.GetKnockOutValueNotADurationDoNotUse() / 5] second\s (if around 1 or 2 the sleeper is keeping them asleep.)")) else to_chat(user, SPAN_NOTICE(" There is no one inside!")) return diff --git a/code/game/machinery/nuclearbomb.dm b/code/game/machinery/nuclearbomb.dm index 28ebbecc75..45062cbf6b 100644 --- a/code/game/machinery/nuclearbomb.dm +++ b/code/game/machinery/nuclearbomb.dm @@ -99,7 +99,7 @@ var/bomb_set = FALSE ..() /obj/structure/machinery/nuclearbomb/attack_hand(mob/user as mob) - if(user.is_mob_incapacitated() || !user.canmove || get_dist(src, user) > 1 || isRemoteControlling(user)) + if(user.is_mob_incapacitated() || get_dist(src, user) > 1 || isRemoteControlling(user)) return if(isyautja(user)) @@ -291,7 +291,7 @@ var/bomb_set = FALSE set name = "Make Deployable" set src in oview(1) - if(!usr.canmove || usr.stat || usr.is_mob_restrained() || being_used || timing) + if(usr.is_mob_incapacitated() || being_used || timing) return if(!ishuman(usr)) diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index fc8815b051..e007ada79a 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -75,7 +75,7 @@ /obj/structure/machinery/pipedispenser/Topic(href, href_list) if(..()) return - if(unwrenched || !usr.canmove || usr.stat || usr.is_mob_restrained() || !in_range(loc, usr)) + if(unwrenched || usr.is_mob_incapacitated() || !in_range(loc, usr)) close_browser(usr, "pipedispenser") return usr.set_interaction(src) @@ -150,7 +150,7 @@ Nah //Allow you to drag-drop disposal pipes into it /obj/structure/machinery/pipedispenser/disposal/MouseDrop_T(obj/structure/disposalconstruct/pipe as obj, mob/usr as mob) - if(!usr.canmove || usr.stat || usr.is_mob_restrained()) + if(usr.is_mob_incapacitated()) return if (!istype(pipe) || get_dist(usr, src) > 1 || get_dist(src,pipe) > 1 ) @@ -192,7 +192,7 @@ Nah usr.set_interaction(src) src.add_fingerprint(usr) if(href_list["dmake"]) - if(unwrenched || !usr.canmove || usr.stat || usr.is_mob_restrained() || !in_range(loc, usr)) + if(unwrenched || usr.is_mob_incapacitated() || !in_range(loc, usr)) close_browser(usr, "pipedispenser") return if(!wait) diff --git a/code/game/machinery/vending/cm_vending.dm b/code/game/machinery/vending/cm_vending.dm index 03fe1c198b..fee6f9a53c 100644 --- a/code/game/machinery/vending/cm_vending.dm +++ b/code/game/machinery/vending/cm_vending.dm @@ -909,7 +909,7 @@ GLOBAL_LIST_EMPTY(vending_products) if(inoperable()) return - if(user.stat || user.is_mob_restrained() || user.lying) + if(user.stat || user.is_mob_restrained()) return if(get_dist(user, src) > 1 || get_dist(src, A) > 1) diff --git a/code/game/machinery/vending/vending.dm b/code/game/machinery/vending/vending.dm index 414ab4a562..b5f2c6181c 100644 --- a/code/game/machinery/vending/vending.dm +++ b/code/game/machinery/vending/vending.dm @@ -820,7 +820,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending if(inoperable()) return - if(user.stat || user.is_mob_restrained() || user.lying) + if(user.stat || user.is_mob_restrained()) return if(get_dist(user, src) > 1 || get_dist(src, A) > 1) diff --git a/code/game/objects/effects/acid_hole.dm b/code/game/objects/effects/acid_hole.dm index 207c6c9e25..8c972c42ef 100644 --- a/code/game/objects/effects/acid_hole.dm +++ b/code/game/objects/effects/acid_hole.dm @@ -48,20 +48,20 @@ return XENO_NO_DELAY_ACTION /obj/effect/acid_hole/proc/expand_hole(mob/living/carbon/xenomorph/user) - if(user.action_busy || user.lying) + if(user.action_busy || user.is_mob_incapacitated()) return playsound(src, "pry", 25, 1) xeno_attack_delay(user) ADD_TRAIT(user, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Acid hole")) - if(do_after(user, 60, INTERRUPT_ALL, BUSY_ICON_GENERIC) && !QDELETED(src) && holed_wall && !user.lying && istype(holed_wall)) + if(do_after(user, 60, INTERRUPT_ALL, BUSY_ICON_GENERIC) && !QDELETED(src) && holed_wall && istype(holed_wall)) holed_wall.take_damage(rand(2000,3500)) user.emote("roar") REMOVE_TRAIT(user, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Acid hole")) -/obj/effect/acid_hole/proc/use_wall_hole(mob/user) +/obj/effect/acid_hole/proc/use_wall_hole(mob/living/user) - if(user.mob_size >= MOB_SIZE_BIG || user.is_mob_incapacitated() || user.lying || user.buckled || user.anchored) + if(user.mob_size >= MOB_SIZE_BIG || user.is_mob_incapacitated() || user.buckled || user.anchored) return FALSE var/mob_dir = get_dir(user, src) @@ -95,7 +95,7 @@ to_chat(user, SPAN_NOTICE("You start crawling through the hole.")) if(do_after(user, 15, INTERRUPT_NO_NEEDHAND, BUSY_ICON_GENERIC)) - if(!user.is_mob_incapacitated() && !user.lying && !user.buckled) + if(!user.is_mob_incapacitated() && !user.buckled) if (T.density) return for(var/obj/O in T) diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 867c6924b3..0b44c0bb44 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -160,7 +160,7 @@ //damages human that comes in contact /obj/effect/xenomorph/spray/proc/apply_spray(mob/living/carbon/H, should_stun = TRUE) - if(!H.lying) + if(H.body_position == STANDING_UP) to_chat(H, SPAN_DANGER("Your feet scald and burn! Argh!")) if(ishuman(H)) H.emote("pain") @@ -264,7 +264,7 @@ else PAS.increment_stack_count(2) - if(!H.lying) + if(H.body_position == STANDING_UP) to_chat(H, SPAN_DANGER("Your feet scald and burn! Argh!")) H.emote("pain") H.last_damage_data = cause_data diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index 3c7eeaa6f4..6c1b740596 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -50,7 +50,7 @@ if(ismob(AM)) var/mob/M = AM if(immobilize) - M.canmove = 0 + ADD_TRAIT(M, TRAIT_IMMOBILIZED, STEP_TRIGGER_TRAIT) affecting.Add(AM) while(AM && !stopthrow) @@ -87,7 +87,7 @@ if(ismob(AM)) var/mob/M = AM if(immobilize) - M.canmove = 1 + REMOVE_TRAIT(M, TRAIT_IMMOBILIZED, STEP_TRIGGER_TRAIT) /* Stops things thrown by a thrower, doesn't do anything */ diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index d097090736..f6eaff2713 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -517,14 +517,14 @@ cases. Override_icon_state should be a list.*/ if(WEAR_L_HAND) if(human.l_hand) return FALSE - if(human.lying) + if(human.body_position == LYING_DOWN) to_chat(human, SPAN_WARNING("You can't equip that while lying down.")) return return TRUE if(WEAR_R_HAND) if(human.r_hand) return FALSE - if(human.lying) + if(human.body_position == LYING_DOWN) to_chat(human, SPAN_WARNING("You can't equip that while lying down.")) return return TRUE @@ -920,9 +920,10 @@ cases. Override_icon_state should be a list.*/ mob_state += GLOB.slot_to_contained_sprite_shorthand[slot] return mob_state -/obj/item/proc/drop_to_floor(mob/wearer) +/obj/item/proc/drop_to_floor(mob/wearer, body_position) SIGNAL_HANDLER - wearer.drop_inv_item_on_ground(src) + if(body_position == LYING_DOWN) + wearer.drop_inv_item_on_ground(src) // item animatzionen diff --git a/code/game/objects/items/devices/autopsy_scanner.dm b/code/game/objects/items/devices/autopsy_scanner.dm index c4c7ec665e..8aa2053fee 100644 --- a/code/game/objects/items/devices/autopsy_scanner.dm +++ b/code/game/objects/items/devices/autopsy_scanner.dm @@ -174,7 +174,7 @@ M.update_inv_r_hand() /obj/item/device/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob) - if(!istype(M) || !M.lying) + if(!istype(M) || !M.is_mob_incapacitated()) return var/table diff --git a/code/game/objects/items/devices/binoculars.dm b/code/game/objects/items/devices/binoculars.dm index 2d44ce076f..f8cf524731 100644 --- a/code/game/objects/items/devices/binoculars.dm +++ b/code/game/objects/items/devices/binoculars.dm @@ -422,7 +422,7 @@ if(!(GLOB.character_traits[/datum/character_trait/skills/spotter] in human.traits)) to_chat(human, SPAN_WARNING("You have no idea how to use this!")) return FALSE - if(istype(human) && !human.is_mob_incapacitated() && !human.lying && (holder_item == human.r_hand || holder_item || human.l_hand)) + if(istype(human) && !human.is_mob_incapacitated() && (holder_item == human.r_hand || holder_item || human.l_hand)) return TRUE /datum/action/item_action/specialist/spotter_target/proc/use_ability(atom/targeted_atom) diff --git a/code/game/objects/items/devices/radio/beacon.dm b/code/game/objects/items/devices/radio/beacon.dm index 0b8cbc303c..bc97cf04fd 100644 --- a/code/game/objects/items/devices/radio/beacon.dm +++ b/code/game/objects/items/devices/radio/beacon.dm @@ -27,7 +27,7 @@ set category = "Object" set src in usr - if ((usr.canmove && !( usr.is_mob_restrained() ))) + if (usr.is_mob_incapacitated()) src.code = t if (!( src.code )) src.code = "beacon" diff --git a/code/game/objects/items/explosives/grenades/flashbang.dm b/code/game/objects/items/explosives/grenades/flashbang.dm index 365dfe26df..50cb34668a 100644 --- a/code/game/objects/items/explosives/grenades/flashbang.dm +++ b/code/game/objects/items/explosives/grenades/flashbang.dm @@ -256,6 +256,7 @@ //decide how banged mob is var/bang_effect = 0 + var/lying = H.body_position == LYING_DOWN //flashbang effect depends on eye protection only, so we will process this case first //A bit dumb, but headsets don't have ear protection and even earmuffs are a fluff now @@ -264,7 +265,7 @@ if((get_dist(H, T) <= 1 || src.loc == H.loc || src.loc == H)) H.apply_damage(5, BRUTE) H.apply_damage(5, BURN) - if(H.lying) + if(lying) bang_effect = 1 else bang_effect = 2 @@ -277,13 +278,13 @@ H.apply_damage(5, BRUTE) H.apply_damage(5, BURN) - if(H.lying) + if(lying) bang_effect = 4 else bang_effect = 5 else if(get_dist(H, T) <= 5) - if(H.lying) + if(lying) bang_effect = 3 else bang_effect = 4 diff --git a/code/game/objects/items/hoverpack.dm b/code/game/objects/items/hoverpack.dm index c2bfacd3c3..027b9d77f5 100644 --- a/code/game/objects/items/hoverpack.dm +++ b/code/game/objects/items/hoverpack.dm @@ -184,7 +184,7 @@ warning.forceMove(path[max_distance]) /obj/item/hoverpack/proc/can_use_hoverpack(mob/living/carbon/human/user) - if(user.is_mob_incapacitated() || user.lying) + if(user.is_mob_incapacitated()) to_chat(user, SPAN_WARNING("You're a bit too incapacitated for that.")) return FALSE @@ -204,7 +204,7 @@ /datum/action/item_action/hover/can_use_action() var/mob/living/carbon/human/H = owner - if(!H.is_mob_incapacitated() && !H.lying && holder_item == H.back) + if(!H.is_mob_incapacitated() && holder_item == H.back) return TRUE /datum/action/item_action/hover/action_activate() diff --git a/code/game/objects/items/implants/implantneurostim.dm b/code/game/objects/items/implants/implantneurostim.dm index 544cf70147..21ee254264 100644 --- a/code/game/objects/items/implants/implantneurostim.dm +++ b/code/game/objects/items/implants/implantneurostim.dm @@ -63,7 +63,7 @@ var/mob_pain_msg = "Excruciating pain shoots through [part ? "your [part.display_name]" : "you"]!" M.visible_message(SPAN_DANGER("[M] convulses in pain!"), SPAN_DANGER(mob_pain_msg)) M.flash_eyes(1, TRUE) - M.stunned += 10 + M.apply_effect(10, STUN) M.apply_effect(10, WEAKEN) M.apply_damage(100, HALLOSS, part) M.apply_damage(5, BURN, part, 0, 0, src) diff --git a/code/game/objects/items/reagent_containers/blood_pack.dm b/code/game/objects/items/reagent_containers/blood_pack.dm index 128c127082..4794fb8cc0 100644 --- a/code/game/objects/items/reagent_containers/blood_pack.dm +++ b/code/game/objects/items/reagent_containers/blood_pack.dm @@ -159,7 +159,7 @@ if(!istype(usr, /mob/living)) return - if(usr.stat || usr.lying) + if(usr.stat || usr.is_mob_incapacitated()) return mode = !mode diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index 4c19cdd0dc..3daaf0228e 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -757,7 +757,7 @@ /datum/action/item_action/specialist/toggle_cloak/can_use_action() var/mob/living/carbon/human/H = owner - if(istype(H) && !H.is_mob_incapacitated() && !H.lying && holder_item == H.back) + if(istype(H) && !H.is_mob_incapacitated() && holder_item == H.back) return TRUE /datum/action/item_action/specialist/toggle_cloak/action_activate() diff --git a/code/game/objects/items/storage/internal.dm b/code/game/objects/items/storage/internal.dm index 68bdda8d7e..a491df12f0 100644 --- a/code/game/objects/items/storage/internal.dm +++ b/code/game/objects/items/storage/internal.dm @@ -25,10 +25,10 @@ //Items that use internal storage have the option of calling this to emulate default storage MouseDrop behaviour. //Returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of //Doing it without the ability to call another proc's parent, really. -/obj/item/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj) +/obj/item/storage/internal/proc/handle_mousedrop(mob/living/carbon/human/user, obj/over_object as obj) if(ishuman(user)) - if(user.lying) //Can't use your inventory when lying + if(user.body_position == LYING_DOWN) //Can't use your inventory when lying //what about stuns? don't argue return if(QDELETED(master_object)) @@ -84,8 +84,8 @@ //Items that use internal storage have the option of calling this to emulate default storage attack_hand behaviour. //Returns 1 if the master item's parent's attack_hand() should be called, 0 otherwise. //It's strange, but no other way of doing it without the ability to call another proc's parent, really. -/obj/item/storage/internal/proc/handle_attack_hand(mob/user as mob, mods) - if(user.lying) +/obj/item/storage/internal/proc/handle_attack_hand(mob/living/user as mob, mods) + if(user.body_position == LYING_DOWN) // what about stuns? huh? return FALSE if(ishuman(user)) diff --git a/code/game/objects/items/storage/large_holster.dm b/code/game/objects/items/storage/large_holster.dm index 27026165fc..76f98c4239 100644 --- a/code/game/objects/items/storage/large_holster.dm +++ b/code/game/objects/items/storage/large_holster.dm @@ -367,7 +367,7 @@ /datum/action/item_action/specialist/toggle_fuel/can_use_action() var/mob/living/carbon/human/H = owner - if(istype(H) && !H.is_mob_incapacitated() && !H.lying && holder_item == H.back) + if(istype(H) && !H.is_mob_incapacitated() && H.body_position == STANDING_UP && holder_item == H.back) return TRUE /datum/action/item_action/specialist/toggle_fuel/action_activate() diff --git a/code/game/objects/items/storage/smartpack.dm b/code/game/objects/items/storage/smartpack.dm index 0b0fd05eac..d012e77361 100644 --- a/code/game/objects/items/storage/smartpack.dm +++ b/code/game/objects/items/storage/smartpack.dm @@ -223,7 +223,7 @@ user.remove_filter("synth_protective_form") -/obj/item/storage/backpack/marine/smartpack/proc/immobile_form(mob/user) +/obj/item/storage/backpack/marine/smartpack/proc/immobile_form(mob/living/user) if(activated_form) return diff --git a/code/game/objects/items/tools/experimental_tools.dm b/code/game/objects/items/tools/experimental_tools.dm index d27272881e..221aa279a5 100644 --- a/code/game/objects/items/tools/experimental_tools.dm +++ b/code/game/objects/items/tools/experimental_tools.dm @@ -279,7 +279,7 @@ return if(ishuman(user)) - if(user.stat || user.blinded || user.lying) + if(user.stat || user.blinded || user.body_position == LYING_DOWN) return if(attaching) diff --git a/code/game/objects/items/toys/toy_weapons.dm b/code/game/objects/items/toys/toy_weapons.dm index 9acf6f2943..80f94cab8e 100644 --- a/code/game/objects/items/toys/toy_weapons.dm +++ b/code/game/objects/items/toys/toy_weapons.dm @@ -156,10 +156,10 @@ O.show_message(SPAN_DANGER("[user] realized they were out of ammo and starting scrounging for some!"), SHOW_MESSAGE_VISIBLE) -/obj/item/toy/crossbow/attack(mob/M as mob, mob/user as mob) +/obj/item/toy/crossbow/attack(mob/living/M as mob, mob/user as mob) src.add_fingerprint(user) - if (src.bullets > 0 && M.lying) + if (src.bullets > 0 && M.body_position == LYING_DOWN) for(var/mob/O in viewers(M, null)) if(O.client) @@ -169,7 +169,7 @@ playsound(user.loc, 'sound/items/syringeproj.ogg', 15, 1) new /obj/item/toy/crossbow_ammo(M.loc) src.bullets-- - else if (M.lying && src.bullets == 0) + else if (M.body_position == LYING_DOWN && src.bullets == 0) for(var/mob/O in viewers(M, null)) if (O.client) O.show_message(SPAN_DANGER("[user] casually lines up a shot with [M]'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!"), SHOW_MESSAGE_VISIBLE, SPAN_DANGER("You hear someone fall"), SHOW_MESSAGE_AUDIBLE) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 3fa16af058..109747f476 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -14,7 +14,8 @@ /// If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! var/in_use = FALSE var/mob/living/buckled_mob - var/buckle_lying = FALSE //Is the mob buckled in a lying position + /// Bed-like behaviour, forces mob.lying = buckle_lying if not set to [NO_BUCKLE_LYING]. + var/buckle_lying = NO_BUCKLE_LYING var/can_buckle = FALSE /**Applied to surgery times for mobs buckled prone to it or lying on the same tile, if the surgery cares about surface conditions. The lowest multiplier of objects on the tile is used.**/ @@ -224,7 +225,7 @@ else . = ..() /obj/proc/afterbuckle(mob/M as mob) // Called after somebody buckled / unbuckled - handle_rotation() + handle_rotation() // To be removed when we have full dir support in set_buckled SEND_SIGNAL(src, COSMIG_OBJ_AFTER_BUCKLE, buckled_mob) if(!buckled_mob) UnregisterSignal(M, COMSIG_PARENT_QDELETING) @@ -235,9 +236,8 @@ /obj/proc/unbuckle() SIGNAL_HANDLER if(buckled_mob && buckled_mob.buckled == src) - buckled_mob.buckled = null + buckled_mob.set_buckled(null) buckled_mob.anchored = initial(buckled_mob.anchored) - buckled_mob.update_canmove() var/M = buckled_mob REMOVE_TRAITS_IN(buckled_mob, TRAIT_SOURCE_BUCKLE) @@ -268,7 +268,7 @@ //trying to buckle a mob /obj/proc/buckle_mob(mob/M, mob/user) - if (!ismob(M) || (get_dist(src, user) > 1) || user.is_mob_restrained() || user.lying || user.stat || buckled_mob || M.buckled || !isturf(user.loc)) + if (!ismob(M) || (get_dist(src, user) > 1) || user.is_mob_restrained() || user.stat || buckled_mob || M.buckled || !isturf(user.loc)) return if (isxeno(user)) @@ -299,20 +299,15 @@ // the actual buckling proc // Yes I know this is not style but its unreadable otherwise -/obj/proc/do_buckle(mob/target, mob/user) +/obj/proc/do_buckle(mob/living/target, mob/user) send_buckling_message(target, user) if (src && src.loc) - target.buckled = src + target.set_buckled(src) target.forceMove(src.loc) target.setDir(dir) - target.update_canmove() src.buckled_mob = target src.add_fingerprint(user) afterbuckle(target) - if(buckle_lying) // Make sure buckling to beds/nests etc only turns, and doesn't give a random offset - var/matrix/new_matrix = matrix() - new_matrix.Turn(90) - target.apply_transform(new_matrix) return TRUE /obj/proc/send_buckling_message(mob/M, mob/user) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 9b0b8cf30a..95998d5de7 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -150,7 +150,8 @@ for(var/mob/living/M in get_turf(src)) - if(M.lying) return //No spamming this on people. + if(HAS_TRAIT(M, TRAIT_FLOORED)) + return //No spamming this on people. M.apply_effect(5, WEAKEN) to_chat(M, SPAN_WARNING("You topple as \the [src] moves under you!")) @@ -191,7 +192,7 @@ H.updatehealth() return -/obj/structure/proc/can_touch(mob/user) +/obj/structure/proc/can_touch(mob/living/user) if(!user) return 0 if(!Adjacent(user) || !isturf(user.loc)) @@ -199,7 +200,7 @@ if(user.is_mob_restrained() || user.buckled) to_chat(user, SPAN_NOTICE("You need your hands and legs free for this.")) return 0 - if(user.is_mob_incapacitated(TRUE) || user.lying) + if(user.is_mob_incapacitated(TRUE) || user.body_position == LYING_DOWN) return 0 if(isRemoteControlling(user)) to_chat(user, SPAN_NOTICE("You need hands for this.")) diff --git a/code/game/objects/structures/barricade/deployable.dm b/code/game/objects/structures/barricade/deployable.dm index 77aa6b7e68..0d5275f98a 100644 --- a/code/game/objects/structures/barricade/deployable.dm +++ b/code/game/objects/structures/barricade/deployable.dm @@ -63,7 +63,7 @@ if(!ishuman(usr)) return - if(usr.lying) + if(usr.is_mob_incapacitated()) return if(over_object == usr && Adjacent(usr)) diff --git a/code/game/objects/structures/bookcase.dm b/code/game/objects/structures/bookcase.dm index 6d6ee9ffa3..aba4eed6e8 100644 --- a/code/game/objects/structures/bookcase.dm +++ b/code/game/objects/structures/bookcase.dm @@ -34,7 +34,7 @@ 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.is_mob_restrained() || !in_range(loc, usr)) + if(usr.is_mob_incapacitated() || !in_range(loc, usr)) return if(ishuman(user)) if(!user.get_active_hand()) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index a7394f3a75..d6148b23b7 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -79,10 +79,11 @@ M.forceMove(loc) if(exit_stun) M.apply_effect(exit_stun, STUN) //Action delay when going out of a closet - M.update_canmove() //Force the delay to go in action immediately - if(!M.lying) - M.visible_message(SPAN_WARNING("[M] suddenly gets out of [src]!"), - SPAN_WARNING("You get out of [src] and get your bearings!")) + if(isliving(M)) + var/mob/living/living_M = M + if(living_M.mobility_flags & MOBILITY_MOVE) + M.visible_message(SPAN_WARNING("[M] suddenly gets out of [src]!"), + SPAN_WARNING("You get out of [src] and get your bearings!")) /obj/structure/closet/proc/open() if(opened) @@ -333,7 +334,7 @@ set category = "Object" set name = "Toggle Open" - if(!usr.canmove || usr.stat || usr.is_mob_restrained()) + if(usr.is_mob_incapacitated()) return if(usr.loc == src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index b63936ef88..b85a7834ec 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -63,7 +63,7 @@ set src in oview(1) // One square distance set category = "Object" set name = "Reset Lock" - if(!usr.canmove || usr.stat || usr.is_mob_restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain + if(usr.is_mob_incapacitated()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain return if(ishuman(usr)) src.add_fingerprint(usr) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 331cb884bd..ba974a8e72 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -121,7 +121,7 @@ set category = "Object" set name = "Toggle Lock" - if(!usr.canmove || usr.stat || usr.is_mob_restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain + if(usr.is_mob_incapacitated()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain return if(ishuman(usr)) diff --git a/code/game/objects/structures/crates_lockers/secure_crates.dm b/code/game/objects/structures/crates_lockers/secure_crates.dm index 28a77e0c81..6b025a57c7 100644 --- a/code/game/objects/structures/crates_lockers/secure_crates.dm +++ b/code/game/objects/structures/crates_lockers/secure_crates.dm @@ -53,7 +53,7 @@ set category = "Object" set name = "Toggle Lock" - if(!usr.canmove || usr.stat || usr.is_mob_restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain + if(usr.is_mob_incapacitated()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain return if(ishuman(usr)) diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index f2e6b172ad..da6d4f1a82 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -67,8 +67,8 @@ else //wtf make your ladders properly assholes icon_state = "ladder00" -/obj/structure/ladder/attack_hand(mob/user) - if(user.stat || get_dist(user, src) > 1 || user.blinded || user.lying || user.buckled || user.anchored) return +/obj/structure/ladder/attack_hand(mob/living/user) + if(user.stat || get_dist(user, src) > 1 || user.blinded || user.body_position == LYING_DOWN || user.buckled || user.anchored) return if(busy) to_chat(user, SPAN_WARNING("Someone else is currently using [src].")) return @@ -94,7 +94,7 @@ SPAN_NOTICE("You start climbing [ladder_dir_name] [src].")) busy = TRUE if(do_after(user, 20, INTERRUPT_INCAPACITATED|INTERRUPT_OUT_OF_RANGE|INTERRUPT_RESIST, BUSY_ICON_GENERIC, src, INTERRUPT_NONE)) - if(!user.is_mob_incapacitated() && get_dist(user, src) <= 1 && !user.blinded && !user.lying && !user.buckled && !user.anchored) + if(!user.is_mob_incapacitated() && get_dist(user, src) <= 1 && !user.blinded && user.body_position != LYING_DOWN && !user.buckled && !user.anchored) visible_message(SPAN_NOTICE("[user] climbs [ladder_dir_name] [src].")) //Hack to give a visible message to the people here without duplicating user message user.visible_message(SPAN_NOTICE("[user] climbs [ladder_dir_name] [src]."), SPAN_NOTICE("You climb [ladder_dir_name] [src].")) @@ -103,9 +103,9 @@ busy = FALSE add_fingerprint(user) -/obj/structure/ladder/check_eye(mob/user) +/obj/structure/ladder/check_eye(mob/living/user) //Are we capable of looking? - if(user.is_mob_incapacitated() || get_dist(user, src) > 1 || user.blinded || user.lying || !user.client) + if(user.is_mob_incapacitated() || get_dist(user, src) > 1 || user.blinded || user.body_position == LYING_DOWN || !user.client) user.unset_interaction() //Are ladder cameras ok? @@ -140,7 +140,7 @@ //Peeking up/down /obj/structure/ladder/MouseDrop(over_object, src_location, over_location) if((over_object == usr && (in_range(src, usr)))) - if(islarva(usr) || isobserver(usr) || usr.is_mob_incapacitated() || usr.blinded || usr.lying) + if(islarva(usr) || isobserver(usr) || usr.is_mob_incapacitated() || usr.blinded) to_chat(usr, "You can't do that in your current state.") return if(is_watching) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index e203bfc67a..3733e0b836 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -117,9 +117,8 @@ if(user.is_mob_incapacitated()) return if(exit_stun) - user.stunned = max(user.stunned, exit_stun) //Action delay when going out of a closet (or morgue in this case) - user.update_canmove() //Force the delay to go in action immediately - if(!user.lying) + user.apply_effect(exit_stun, STUN) + if(user.mobility_flags & MOBILITY_MOVE) user.visible_message(SPAN_WARNING("[user] suddenly gets out of [src]!"), SPAN_WARNING("You get out of [src] and get your bearings!")) toggle_morgue(user) diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index bc3b4ad7f4..a33d2889a4 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -13,7 +13,7 @@ icon_state = "bed" icon = 'icons/obj/objects.dmi' can_buckle = TRUE - buckle_lying = TRUE + buckle_lying = 90 throwpass = TRUE debris = list(/obj/item/stack/sheet/metal) var/buildstacktype = /obj/item/stack/sheet/metal diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 4186ae8608..e523906f4c 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -6,7 +6,7 @@ name = "chair" desc = "A rectangular metallic frame sitting on four legs with a back panel. Designed to fit the sitting position, more or less comfortably." icon_state = "chair" - buckle_lying = FALSE + buckle_lying = 0 var/propelled = FALSE //Check for fire-extinguisher-driven chairs var/can_rotate = TRUE var/picked_up_item = /obj/item/weapon/twohanded/folded_metal_chair diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 2b42e641f0..986ae99739 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -20,7 +20,7 @@ if(world.time <= l_move_time + move_delay) return // Redundant check? - if(user.is_mob_incapacitated() || user.lying) + if(user.is_mob_incapacitated()) return if(propelled) //can't manually move it mid-propelling. diff --git a/code/game/objects/structures/stool_bed_chair_nest/xeno_nest.dm b/code/game/objects/structures/stool_bed_chair_nest/xeno_nest.dm index 6375fcd138..65bb2fd6a9 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/xeno_nest.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/xeno_nest.dm @@ -10,7 +10,7 @@ health = 100 layer = ABOVE_MOB_LAYER plane = GAME_PLANE - buckle_lying = FALSE + buckle_lying = 0 var/on_fire = 0 var/resisting = 0 var/resisting_ready = 0 @@ -145,7 +145,7 @@ if(!(buckled_mob && buckled_mob.buckled == src && buckled_mob != user)) return - if(user.stat || user.lying || user.is_mob_restrained()) + if(user.body_position == LYING_DOWN || user.is_mob_incapacitated()) return if(isxeno(user)) @@ -167,7 +167,7 @@ if(H.stat != DEAD) if(alert(user, "[H] is still alive and kicking! Are you sure you want to remove them from the nest?", "Confirmation", "Yes", "No") != "Yes") return - if(!buckled_mob || !user.Adjacent(H) || user.stat || user.lying || user.is_mob_restrained()) + if(!buckled_mob || !user.Adjacent(H) || user.is_mob_incapacitated(FALSE)) return if(ishuman(user)) @@ -191,7 +191,7 @@ /obj/structure/bed/nest/buckle_mob(mob/mob, mob/user) . = FALSE - if(!isliving(mob) || islarva(user) || (get_dist(src, user) > 1) || user.is_mob_restrained() || user.stat || user.lying || mob.buckled || !iscarbon(user)) + if(!isliving(mob) || islarva(user) || (get_dist(src, user) > 1) || user.is_mob_incapacitated(FALSE)) return if(isxeno(mob)) @@ -220,7 +220,7 @@ var/mob/living/carbon/human/human = null if(ishuman(mob)) human = mob - if(!human.lying) //Don't ask me why is has to be + if(human.body_position != LYING_DOWN) //Don't ask me why is has to be to_chat(user, SPAN_WARNING("[mob] is resisting, ground them.")) return @@ -242,7 +242,7 @@ return if(human) //Improperly stunned Marines won't be nested - if(!human.lying) //Don't ask me why is has to be + if(human.body_position != LYING_DOWN) //Don't ask me why is has to be to_chat(user, SPAN_WARNING("[mob] is resisting, ground them.")) return diff --git a/code/game/objects/structures/vulture_spotter.dm b/code/game/objects/structures/vulture_spotter.dm index 44efd5ce84..ab23a80867 100644 --- a/code/game/objects/structures/vulture_spotter.dm +++ b/code/game/objects/structures/vulture_spotter.dm @@ -78,7 +78,7 @@ try_scope(user) -/obj/structure/vulture_spotter_tripod/on_set_interaction(mob/user) +/obj/structure/vulture_spotter_tripod/on_set_interaction(mob/living/user) var/obj/item/attachable/vulture_scope/scope = get_vulture_scope() scope.spotter_spotting = TRUE to_chat(scope.scope_user, SPAN_NOTICE("You notice that [scope] drifts less.")) @@ -102,7 +102,7 @@ give_action(user, /datum/action/vulture_tripod_unscope, null, null, src) set_scope_loc(user, scope) -/obj/structure/vulture_spotter_tripod/on_unset_interaction(mob/user) +/obj/structure/vulture_spotter_tripod/on_unset_interaction(mob/living/user) user.status_flags &= ~IMMOBILE_ACTION user.visible_message(SPAN_NOTICE("[user] looks up from [src]."),SPAN_NOTICE("You look up from [src].")) REMOVE_TRAIT(user, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Vulture spotter")) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 27fdf94dac..872b9be15d 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -9,6 +9,7 @@ anchored = TRUE can_buckle = TRUE unslashable = TRUE + buckle_lying = 0 var/open = 0 //if the lid is up var/cistern = 0 //if the cistern bit is open var/w_items = 0 //the combined w_class of all the items in the cistern diff --git a/code/modules/admin/topic/topic.dm b/code/modules/admin/topic/topic.dm index d60377123c..7dfc28a85e 100644 --- a/code/modules/admin/topic/topic.dm +++ b/code/modules/admin/topic/topic.dm @@ -612,17 +612,6 @@ message_admins("[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]") H.monkeyize() - else if(href_list["corgione"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["corgione"]) - if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") - return - - message_admins("[key_name_admin(usr)] attempting to corgize [key_name_admin(H)]") - H.corgize() - else if(href_list["forcespeech"]) if(!check_rights(R_ADMIN)) return diff --git a/code/modules/animations/animation_library.dm b/code/modules/animations/animation_library.dm index 2bbff8d4cf..d4fd8feeaf 100644 --- a/code/modules/animations/animation_library.dm +++ b/code/modules/animations/animation_library.dm @@ -249,7 +249,7 @@ Can look good elsewhere as well.*/ var/pre_rappel_alpha = alpha alpha = 20 dir = WEST - canmove = FALSE + ADD_TRAIT(src, TRAIT_IMMOBILIZED, INTERACTION_TRAIT) var/matrix/initial_matrix = matrix() initial_matrix.Turn(45) apply_transform(initial_matrix) @@ -257,4 +257,4 @@ Can look good elsewhere as well.*/ var/matrix/reset_matrix = matrix() animate(src, 3, transform = reset_matrix, pixel_y = 0, alpha = pre_rappel_alpha, flags = ANIMATION_PARALLEL) sleep(3) - canmove = TRUE + REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, INTERACTION_TRAIT) diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 05ad7c5a87..929e2d6af7 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -137,7 +137,7 @@ /obj/item/device/assembly/infra/Topic(href, href_list) ..() - if(!usr.canmove || usr.stat || usr.is_mob_restrained() || !in_range(loc, usr)) + if(usr.is_mob_incapacitated() || !in_range(loc, usr)) close_browser(usr, "infra") return diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 853a07ef10..0fbca14801 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -507,38 +507,40 @@ set name = "Adjust welding goggles" set src in usr - if(usr.canmove && !usr.stat && !usr.is_mob_restrained()) - if(active) - active = 0 - vision_impair = vision_impair_off - flags_inventory &= ~COVEREYES - flags_inv_hide &= ~HIDEEYES - flags_armor_protection &= ~BODY_FLAG_EYES - update_icon() - eye_protection = EYE_PROTECTION_NONE - to_chat(usr, "You push [src] up out of your face.") - else - active = 1 - vision_impair = vision_impair_on - flags_inventory |= COVEREYES - flags_inv_hide |= HIDEEYES - flags_armor_protection |= BODY_FLAG_EYES - update_icon() - eye_protection = initial(eye_protection) - to_chat(usr, "You flip [src] down to protect your eyes.") - - - if(ishuman(loc)) - var/mob/living/carbon/human/H = loc - if(H.glasses == src) - H.update_tint() + if(usr.is_mob_incapacitated()) + return + + if(active) + active = 0 + vision_impair = vision_impair_off + flags_inventory &= ~COVEREYES + flags_inv_hide &= ~HIDEEYES + flags_armor_protection &= ~BODY_FLAG_EYES + update_icon() + eye_protection = EYE_PROTECTION_NONE + to_chat(usr, "You push [src] up out of your face.") + else + active = 1 + vision_impair = vision_impair_on + flags_inventory |= COVEREYES + flags_inv_hide |= HIDEEYES + flags_armor_protection |= BODY_FLAG_EYES + update_icon() + eye_protection = initial(eye_protection) + to_chat(usr, "You flip [src] down to protect your eyes.") + + + if(ishuman(loc)) + var/mob/living/carbon/human/H = loc + if(H.glasses == src) + H.update_tint() - update_clothing_icon() + update_clothing_icon() - for(var/X in actions) - var/datum/action/A = X - if(istype(A, /datum/action/item_action/toggle)) - A.update_button_icon() + for(var/X in actions) + var/datum/action/A = X + if(istype(A, /datum/action/item_action/toggle)) + A.update_button_icon() /obj/item/clothing/glasses/welding/superior name = "superior welding goggles" diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 1a133eee0d..e4f9bdde48 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -36,7 +36,7 @@ return /datum/action/item_action/view_publications/can_use_action() - if(owner && !owner.is_mob_incapacitated() && !owner.lying && owner.faction != FACTION_SURVIVOR) + if(owner && !owner.is_mob_incapacitated() && owner.faction != FACTION_SURVIVOR) return TRUE /datum/action/item_action/view_publications/action_activate() diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index e6c8391ac0..15a4cf7424 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -88,7 +88,7 @@ playsound(loc, knockout_sound, 50, FALSE) M.show_message(FONT_SIZE_LARGE(SPAN_WARNING("KNOCKOUT!")), SHOW_MESSAGE_VISIBLE) return 1 - if (L.lying == 1 || L.stat == UNCONSCIOUS)//Can't beat 'em while they're down. + if (L.body_position == LYING_DOWN || L.stat == UNCONSCIOUS)//Can't beat 'em while they're down. to_chat(M, SPAN_WARNING("You can't box with [A], they're already down!")) return 1 M.visible_message(SPAN_DANGER("[M] [boxing_verb] [A]!")) diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 102d824175..afc8e0a7cb 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -45,33 +45,35 @@ set name = "Adjust welding mask" set src in usr - if(usr.canmove && !usr.stat && !usr.is_mob_restrained()) - if(up) - vision_impair = VISION_IMPAIR_MAX - flags_inventory |= COVEREYES|COVERMOUTH|BLOCKSHARPOBJ - flags_inv_hide |= HIDEEARS|HIDEEYES|HIDEFACE - icon_state = initial(icon_state) - eye_protection = initial(eye_protection) - to_chat(usr, "You flip the [src] down to protect your eyes.") - else - vision_impair = VISION_IMPAIR_NONE - flags_inventory &= ~(COVEREYES|COVERMOUTH|BLOCKSHARPOBJ) - flags_inv_hide &= ~(HIDEEARS|HIDEEYES|HIDEFACE) - icon_state = "[initial(icon_state)]up" - eye_protection = EYE_PROTECTION_NONE - to_chat(usr, "You push the [src] up out of your face.") - up = !up - - if(ishuman(loc)) - var/mob/living/carbon/human/H = loc - if(H.head == src) - H.update_tint() - - update_clothing_icon() //so our mob-overlays update - - for(var/X in actions) - var/datum/action/A = X - A.update_button_icon() + if(usr.is_mob_incapacitated()) + return + + if(up) + vision_impair = VISION_IMPAIR_MAX + flags_inventory |= COVEREYES|COVERMOUTH|BLOCKSHARPOBJ + flags_inv_hide |= HIDEEARS|HIDEEYES|HIDEFACE + icon_state = initial(icon_state) + eye_protection = initial(eye_protection) + to_chat(usr, "You flip the [src] down to protect your eyes.") + else + vision_impair = VISION_IMPAIR_NONE + flags_inventory &= ~(COVEREYES|COVERMOUTH|BLOCKSHARPOBJ) + flags_inv_hide &= ~(HIDEEARS|HIDEEYES|HIDEFACE) + icon_state = "[initial(icon_state)]up" + eye_protection = EYE_PROTECTION_NONE + to_chat(usr, "You push the [src] up out of your face.") + up = !up + + if(ishuman(loc)) + var/mob/living/carbon/human/H = loc + if(H.head == src) + H.update_tint() + + update_clothing_icon() //so our mob-overlays update + + for(var/X in actions) + var/datum/action/A = X + A.update_button_icon() /* * Cakehat diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 76d61b4e3c..ffdda93f8a 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -16,7 +16,7 @@ set name = "Adjust mask" set src in usr - if(usr.canmove && !usr.stat && !usr.is_mob_restrained()) + if(usr.is_mob_incapacitated()) if(!src.hanging) src.hanging = !src.hanging gas_transfer_coefficient = 1 //gas is now escaping to the turf and vice versa diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index a28a143f4f..5b97051852 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -385,7 +385,7 @@ set category = "Object" set src in usr - if(!usr.canmove || usr.stat || usr.is_mob_restrained()) + if(usr.is_mob_incapacitated()) return 0 switch(icon_state) diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm index 278ffb666b..1c2fb2a9f2 100644 --- a/code/modules/clothing/suits/labcoat.dm +++ b/code/modules/clothing/suits/labcoat.dm @@ -52,7 +52,7 @@ set category = "Object" set src in usr - if(!usr.canmove || usr.stat || usr.is_mob_restrained()) + if(usr.is_mob_incapacitated()) return 0 if(src.buttoned == TRUE) diff --git a/code/modules/clothing/suits/marine_armor.dm b/code/modules/clothing/suits/marine_armor.dm index fe37ba86ee..eae4cd6fd8 100644 --- a/code/modules/clothing/suits/marine_armor.dm +++ b/code/modules/clothing/suits/marine_armor.dm @@ -626,7 +626,7 @@ set category = "Object" set src in usr - if(!usr.canmove || usr.stat || usr.is_mob_restrained()) + if(usr.is_mob_incapacitated()) return 0 if(!injections) @@ -905,7 +905,6 @@ H.alpha = full_camo_alpha H.FF_hit_evade = 1000 ADD_TRAIT(H, TRAIT_UNDENSE, SPECIALIST_GEAR_TRAIT) - H.density = FALSE RegisterSignal(H, COMSIG_MOB_MOVE_OR_LOOK, PROC_REF(handle_mob_move_or_look)) @@ -930,7 +929,6 @@ COMSIG_MOB_FIRED_GUN, COMSIG_MOB_FIRED_GUN_ATTACHMENT, COMSIG_MOB_DEATH, - COMSIG_MOB_POST_UPDATE_CANMOVE, COMSIG_HUMAN_EXTINGUISH, COMSIG_MOB_MOVE_OR_LOOK )) @@ -939,7 +937,6 @@ animate(H, alpha = initial(H.alpha), flags = ANIMATION_END_NOW) H.FF_hit_evade = initial(H.FF_hit_evade) REMOVE_TRAIT(H, TRAIT_UNDENSE, SPECIALIST_GEAR_TRAIT) - H.update_canmove() var/datum/mob_hud/security/advanced/SA = huds[MOB_HUD_SECURITY_ADVANCED] SA.add_to_hud(H) @@ -984,7 +981,7 @@ /datum/action/item_action/specialist/prepare_position/can_use_action() var/mob/living/carbon/human/H = owner - if(istype(H) && !H.is_mob_incapacitated() && !H.lying && holder_item == H.wear_suit) + if(istype(H) && !H.is_mob_incapacitated() && H.body_position == STANDING_UP && holder_item == H.wear_suit) return TRUE /datum/action/item_action/specialist/prepare_position/action_activate() diff --git a/code/modules/clothing/suits/marine_coat.dm b/code/modules/clothing/suits/marine_coat.dm index 73d7e09818..3aa43706c7 100644 --- a/code/modules/clothing/suits/marine_coat.dm +++ b/code/modules/clothing/suits/marine_coat.dm @@ -53,7 +53,7 @@ set category = "Object" set src in usr - if(!usr.canmove || usr.stat || usr.is_mob_restrained()) + if(usr.is_mob_incapacitated()) return 0 if(src.buttoned == TRUE) diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 2a3cff05ee..b5859bb6f2 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -332,7 +332,7 @@ set category = "Object" set src in usr - if(!usr.canmove || usr.stat || usr.is_mob_restrained()) + if(usr.is_mob_incapacitated()) return 0 if(src.icon_state == "suitjacket_blue_open") diff --git a/code/modules/clothing/under/under.dm b/code/modules/clothing/under/under.dm index f452628a1c..ec20ed6f6b 100644 --- a/code/modules/clothing/under/under.dm +++ b/code/modules/clothing/under/under.dm @@ -106,7 +106,7 @@ if ((flags_item & NODROP) || loc != usr) return - if (!usr.is_mob_incapacitated() && !(usr.buckled && usr.lying)) + if (!usr.is_mob_incapacitated() && !(usr.buckled)) if(over_object) switch(over_object.name) if("r_hand") diff --git a/code/modules/cm_aliens/XenoStructures.dm b/code/modules/cm_aliens/XenoStructures.dm index 247118b965..3cbac124b3 100644 --- a/code/modules/cm_aliens/XenoStructures.dm +++ b/code/modules/cm_aliens/XenoStructures.dm @@ -160,7 +160,8 @@ /obj/effect/alien/resin/sticky/Crossed(atom/movable/AM) . = ..() var/mob/living/carbon/human/H = AM - if(istype(H) && !H.lying && !H.ally_of_hivenumber(hivenumber)) + // Wait doesn't this stack slows if you get dragged over it? What's going on here? + if(istype(H) && !H.ally_of_hivenumber(hivenumber)) H.next_move_slowdown = H.next_move_slowdown + slow_amt return . var/mob/living/carbon/xenomorph/X = AM @@ -565,7 +566,7 @@ return FALSE burning_friendly = TRUE - else if(current_mob.lying || current_mob.is_mob_incapacitated(TRUE)) + else if(current_mob.body_position == LYING_DOWN || current_mob.is_mob_incapacitated(TRUE)) return FALSE if(!burning_friendly && current_mob.health < 0) diff --git a/code/modules/cm_aliens/structures/fruit.dm b/code/modules/cm_aliens/structures/fruit.dm index 318bc6ba6c..09983c9300 100644 --- a/code/modules/cm_aliens/structures/fruit.dm +++ b/code/modules/cm_aliens/structures/fruit.dm @@ -442,7 +442,7 @@ /obj/effect/alien/resin/fruit/MouseDrop(atom/over_object) var/mob/living/carbon/xenomorph/X = over_object - if(!istype(X) || !Adjacent(X) || X != usr || X.is_mob_incapacitated() || X.lying) return ..() + if(!istype(X) || !Adjacent(X) || X != usr || X.is_mob_incapacitated() || X.body_position == LYING_DOWN) return ..() X.pickup_fruit(src) // Handles xenos picking up fruit diff --git a/code/modules/cm_aliens/structures/trap.dm b/code/modules/cm_aliens/structures/trap.dm index bc8eb7e6c7..d885e4d14a 100644 --- a/code/modules/cm_aliens/structures/trap.dm +++ b/code/modules/cm_aliens/structures/trap.dm @@ -106,7 +106,7 @@ var/mob/living/carbon/human/H = AM if(issynth(H) || isyautja(H)) return - if(H.stat == DEAD || H.lying) + if(H.stat == DEAD || H.body_position == LYING_DOWN) return if(H.ally_of_hivenumber(hivenumber)) return diff --git a/code/modules/cm_aliens/structures/tunnel.dm b/code/modules/cm_aliens/structures/tunnel.dm index 9ef7bfe87c..a8912bc438 100644 --- a/code/modules/cm_aliens/structures/tunnel.dm +++ b/code/modules/cm_aliens/structures/tunnel.dm @@ -127,7 +127,7 @@ /obj/structure/tunnel/proc/pick_tunnel(mob/living/carbon/xenomorph/X) . = FALSE //For peace of mind when it comes to dealing with unintended proc failures - if(!istype(X) || X.stat || X.lying || !isfriendly(X) || !hive) + if(!istype(X) || X.is_mob_incapacitated(TRUE) || !isfriendly(X) || !hive) return FALSE if(X in contents) var/list/tunnels = list() @@ -195,7 +195,7 @@ . = attack_alien(M) /obj/structure/tunnel/attack_alien(mob/living/carbon/xenomorph/M) - if(!istype(M) || M.stat || M.lying) + if(!istype(M) || M.is_mob_incapacitated(TRUE)) return XENO_NO_DELAY_ACTION if(!isfriendly(M)) diff --git a/code/modules/cm_marines/Donator_Items.dm b/code/modules/cm_marines/Donator_Items.dm index e8eb3f75ae..6d2f46490d 100644 --- a/code/modules/cm_marines/Donator_Items.dm +++ b/code/modules/cm_marines/Donator_Items.dm @@ -23,7 +23,7 @@ set src in usr if(!ishuman(usr)) return - if(!usr.canmove || usr.stat || usr.is_mob_restrained() || !usr.loc || !isturf(usr.loc)) + if(usr.is_mob_incapacitated() || !isturf(usr.loc)) to_chat(usr, SPAN_WARNING("Not right now!")) return @@ -35,7 +35,7 @@ set src in usr if(!ishuman(usr)) return - if(!usr.canmove || usr.stat || usr.is_mob_restrained() || !usr.loc || !isturf(usr.loc)) + if(usr.is_mob_incapacitated() || !isturf(usr.loc)) to_chat(usr, SPAN_WARNING("Not right now!")) return @@ -91,7 +91,7 @@ set src in usr if(!ishuman(usr)) return - if(!usr.canmove || usr.stat || usr.is_mob_restrained() || !usr.loc || !isturf(usr.loc)) + if(usr.is_mob_incapacitated() || !isturf(usr.loc)) to_chat(usr, SPAN_WARNING("Not right now!")) return @@ -103,7 +103,7 @@ set src in usr if(!ishuman(usr)) return - if(!usr.canmove || usr.stat || usr.is_mob_restrained() || !usr.loc || !isturf(usr.loc)) + if(usr.is_mob_incapacitated() || !isturf(usr.loc)) to_chat(usr, SPAN_WARNING("Not right now!")) return diff --git a/code/modules/cm_marines/m2c.dm b/code/modules/cm_marines/m2c.dm index 75c96f6717..ff16c924cd 100644 --- a/code/modules/cm_marines/m2c.dm +++ b/code/modules/cm_marines/m2c.dm @@ -445,7 +445,7 @@ //ATTACK WITH BOTH HANDS COMBO -/obj/structure/machinery/m56d_hmg/auto/attack_hand(mob/user) +/obj/structure/machinery/m56d_hmg/auto/attack_hand(mob/living/user) ..() var/turf/user_turf = get_turf(user) @@ -515,16 +515,13 @@ ..() ADD_TRAIT(user, TRAIT_OVERRIDE_CLICKDRAG, TRAIT_SOURCE_WEAPON) RegisterSignal(user, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(disable_interaction)) - RegisterSignal(user, COMSIG_MOB_POST_UPDATE_CANMOVE, PROC_REF(disable_canmove_interaction)) + RegisterSignal(user, COMSIG_LIVING_SET_BODY_POSITION, PROC_REF(body_position_changed)) // DISMOUNT THE MG /obj/structure/machinery/m56d_hmg/auto/on_unset_interaction(mob/user) REMOVE_TRAIT(user, TRAIT_OVERRIDE_CLICKDRAG, TRAIT_SOURCE_WEAPON) - UnregisterSignal(user, list( - COMSIG_MOVABLE_PRE_MOVE, - COMSIG_MOB_POST_UPDATE_CANMOVE - )) + UnregisterSignal(user, COMSIG_MOVABLE_PRE_MOVE) ..() // GET ANIMATED @@ -598,16 +595,16 @@ to_chat(user, SPAN_NOTICE("You rotate [src], using the tripod to support your pivoting movement.")) -/obj/structure/machinery/m56d_hmg/auto/proc/disable_interaction(mob/user, NewLoc, direction) +/obj/structure/machinery/m56d_hmg/auto/proc/disable_interaction(mob/living/user, NewLoc, direction) SIGNAL_HANDLER - if(user.lying || get_dist(user,src) > 0 || user.is_mob_incapacitated() || !user.client) + if(user.body_position != STANDING_UP || get_dist(user,src) > 0 || user.is_mob_incapacitated() || !user.client) user.unset_interaction() -/obj/structure/machinery/m56d_hmg/auto/proc/disable_canmove_interaction(mob/user, canmove, laid_down, lying) +/obj/structure/machinery/m56d_hmg/auto/proc/body_position_changed(mob/living/user, body_position, old_body_position) SIGNAL_HANDLER - if(laid_down) + if(body_position != STANDING_UP) user.unset_interaction() /obj/structure/machinery/m56d_hmg/auto/proc/handle_rotating_gun(mob/user) diff --git a/code/modules/cm_marines/marines_consoles.dm b/code/modules/cm_marines/marines_consoles.dm index a3bea392c2..734972ac7b 100644 --- a/code/modules/cm_marines/marines_consoles.dm +++ b/code/modules/cm_marines/marines_consoles.dm @@ -432,7 +432,7 @@ set name = "Eject ID Card" set src in oview(1) - if(!usr || usr.stat || usr.lying) return + if(!usr || usr.is_mob_incapacitated()) return if(user_id_card) user_id_card.loc = get_turf(src) @@ -498,7 +498,7 @@ set name = "Eject ID Card" set src in view(1) - if(!usr || usr.stat || usr.lying) return + if(!usr || usr.is_mob_incapacitated()) return if(ishuman(usr) && ID_to_modify) to_chat(usr, "You remove \the [ID_to_modify] from \the [src].") diff --git a/code/modules/cm_marines/orbital_cannon.dm b/code/modules/cm_marines/orbital_cannon.dm index 42737e7a8a..3aafc4b7c4 100644 --- a/code/modules/cm_marines/orbital_cannon.dm +++ b/code/modules/cm_marines/orbital_cannon.dm @@ -450,7 +450,7 @@ var/list/ob_type_fuel_requirements shake_camera(user, 3, total_shake_factor, shake_frequency) user.KnockDown(rand(max_knockdown_time * distance_percent, (max_knockdown_time * distance_percent + 1))) - if(!user.knocked_down) + if(HAS_TRAIT(user, TRAIT_FLOORED)) continue to_chat(user, SPAN_WARNING("You are thrown off balance and fall to the ground!")) diff --git a/code/modules/cm_marines/smartgun_mount.dm b/code/modules/cm_marines/smartgun_mount.dm index 225b855062..501cbfdd6e 100644 --- a/code/modules/cm_marines/smartgun_mount.dm +++ b/code/modules/cm_marines/smartgun_mount.dm @@ -839,7 +839,7 @@ to_chat(usr, SPAN_NOTICE("You are too far from the handles to man [src]!")) /obj/structure/machinery/m56d_hmg/on_set_interaction(mob/user) - RegisterSignal(user, list(COMSIG_MOB_MG_EXIT, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, COMSIG_MOB_KNOCKED_DOWN), PROC_REF(exit_interaction)) + RegisterSignal(user, list(COMSIG_MOB_MG_EXIT, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, COMSIG_LIVING_SET_BODY_POSITION), PROC_REF(exit_interaction)) flags_atom |= RELAY_CLICK user.status_flags |= IMMOBILE_ACTION user.visible_message(SPAN_NOTICE("[user] mans \the [src]."),SPAN_NOTICE("You man \the [src], locked and loaded!")) @@ -854,7 +854,7 @@ update_pixels(user) operator = user -/obj/structure/machinery/m56d_hmg/on_unset_interaction(mob/user) +/obj/structure/machinery/m56d_hmg/on_unset_interaction(mob/living/user) flags_atom &= ~RELAY_CLICK SEND_SIGNAL(src, COMSIG_GUN_INTERRUPT_FIRE) user.status_flags &= ~IMMOBILE_ACTION @@ -875,7 +875,7 @@ COMSIG_MOB_MG_EXIT, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, - COMSIG_MOB_KNOCKED_DOWN, + COMSIG_LIVING_SET_BODY_POSITION, )) @@ -915,8 +915,8 @@ user.client.pixel_y = 0 animate(user, pixel_x=user_old_x, pixel_y=user_old_y, 4, 1) -/obj/structure/machinery/m56d_hmg/check_eye(mob/user) - if(user.lying || get_dist(user,src) > 0 || user.is_mob_incapacitated() || !user.client) +/obj/structure/machinery/m56d_hmg/check_eye(mob/living/user) + if(user.body_position != STANDING_UP || get_dist(user,src) > 0 || user.is_mob_incapacitated() || !user.client) user.unset_interaction() /obj/structure/machinery/m56d_hmg/clicked(mob/user, list/mods) diff --git a/code/modules/cm_preds/thrall_procs.dm b/code/modules/cm_preds/thrall_procs.dm index 8ea0f2abb5..a28f6eba26 100644 --- a/code/modules/cm_preds/thrall_procs.dm +++ b/code/modules/cm_preds/thrall_procs.dm @@ -14,7 +14,7 @@ to_chat(wearer, SPAN_WARNING("You've already claimed your equipment.")) return - if(wearer.is_mob_incapacitated() || wearer.lying || wearer.buckled) + if(wearer.is_mob_incapacitated() || wearer.body_position == LYING_DOWN /* replace by mobility_flags */ || wearer.buckled) to_chat(wearer, SPAN_WARNING("You're not able to do that right now.")) return diff --git a/code/modules/cm_preds/yaut_bracers.dm b/code/modules/cm_preds/yaut_bracers.dm index 7173575710..9cb8b4bea4 100644 --- a/code/modules/cm_preds/yaut_bracers.dm +++ b/code/modules/cm_preds/yaut_bracers.dm @@ -106,6 +106,7 @@ /// handles decloaking only on HUNTER gloves /obj/item/clothing/gloves/yautja/proc/decloak() + SIGNAL_HANDLER return /// Called to update the minimap icon of the predator @@ -408,7 +409,7 @@ . = wristblades_internal(usr, FALSE) /obj/item/clothing/gloves/yautja/hunter/proc/wristblades_internal(mob/living/carbon/human/caller, forced = FALSE) - if(!caller.loc || !caller.canmove || caller.stat || !ishuman(caller)) + if(!caller.loc || caller.is_mob_incapacitated() || !ishuman(caller)) return . = check_random_function(caller, forced) @@ -648,7 +649,7 @@ . = caster_internal(usr, FALSE) /obj/item/clothing/gloves/yautja/hunter/proc/caster_internal(mob/living/carbon/human/caller, forced = FALSE) - if(!caller.loc || !caller.canmove || caller.stat || !ishuman(caller)) + if(!caller.loc || caller.is_mob_incapacitated() || !ishuman(caller)) return . = check_random_function(caller, forced) diff --git a/code/modules/cm_preds/yaut_procs.dm b/code/modules/cm_preds/yaut_procs.dm index 32d532da72..728e548dfd 100644 --- a/code/modules/cm_preds/yaut_procs.dm +++ b/code/modules/cm_preds/yaut_procs.dm @@ -48,7 +48,7 @@ set name = "Butcher" set desc = "Butcher a corpse you're standing on for its tasty meats." - if(is_mob_incapacitated() || lying || buckled) + if(is_mob_incapacitated() || body_position != STANDING_UP || buckled) return var/list/choices = list() @@ -77,7 +77,7 @@ to_chat(src, SPAN_WARNING("This tiny worm is not even worth using your tools on.")) return - if(is_mob_incapacitated() || lying || buckled) + if(is_mob_incapacitated() || body_position != STANDING_UP || buckled) return if(issynth(T)) @@ -236,7 +236,7 @@ to_chat(src, SPAN_WARNING("You've already claimed your equipment.")) return - if(is_mob_incapacitated() || lying || buckled) + if(is_mob_incapacitated() || body_position != STANDING_UP || buckled) to_chat(src, SPAN_WARNING("You're not able to do that right now.")) return diff --git a/code/modules/cm_tech/hologram.dm b/code/modules/cm_tech/hologram.dm index 5c0e986f45..3509c0a73a 100644 --- a/code/modules/cm_tech/hologram.dm +++ b/code/modules/cm_tech/hologram.dm @@ -5,7 +5,6 @@ GLOBAL_LIST_EMPTY_TYPED(hologram_list, /mob/hologram) desc = "It seems to be a visual projection of someone" //jinkies! icon = 'icons/mob/mob.dmi' icon_state = "hologram" - canmove = TRUE blinded = FALSE invisibility = INVISIBILITY_OBSERVER diff --git a/code/modules/defenses/defenses.dm b/code/modules/defenses/defenses.dm index 3a55e537f4..5ad8dbdc4b 100644 --- a/code/modules/defenses/defenses.dm +++ b/code/modules/defenses/defenses.dm @@ -416,9 +416,9 @@ damaged_action(damage) if(stat == DEFENSE_DAMAGED) - density = FALSE + set_density(FALSE) else - density = initial(density) + set_density(initial(density)) update_icon() diff --git a/code/modules/desert_dam/filtration/filtration.dm b/code/modules/desert_dam/filtration/filtration.dm index 6c079f3dcd..a0fd1b2933 100644 --- a/code/modules/desert_dam/filtration/filtration.dm +++ b/code/modules/desert_dam/filtration/filtration.dm @@ -198,7 +198,7 @@ var/global/east_riverstart = 0 M.apply_damage(0.5,BURN) else var/dam_amount = 3 - if(M.lying) + if(M.body_position == LYING_DOWN) M.apply_damage(dam_amount,BURN) M.apply_damage(dam_amount,BURN) M.apply_damage(dam_amount,BURN) diff --git a/code/modules/desert_dam/motion_sensor/sensortower.dm b/code/modules/desert_dam/motion_sensor/sensortower.dm index 6a718607aa..50aeede45f 100644 --- a/code/modules/desert_dam/motion_sensor/sensortower.dm +++ b/code/modules/desert_dam/motion_sensor/sensortower.dm @@ -211,7 +211,7 @@ if(do_after(M, 40, INTERRUPT_ALL, BUSY_ICON_HOSTILE)) if(M.loc != cur_loc) return XENO_NO_DELAY_ACTION //Make sure we're still there - if(M.lying) + if(M.is_mob_incapacitated()) return XENO_NO_DELAY_ACTION if(buildstate == SENSORTOWER_BUILDSTATE_BLOWTORCH) return XENO_NO_DELAY_ACTION diff --git a/code/modules/droppod/container_droppod.dm b/code/modules/droppod/container_droppod.dm index 270f15011c..a9432933fa 100644 --- a/code/modules/droppod/container_droppod.dm +++ b/code/modules/droppod/container_droppod.dm @@ -126,7 +126,7 @@ . = ..() if(loc) collect_objects(loc.contents) - density = TRUE + set_density(TRUE) /obj/structure/droppod/container/proc/collect_objects(list/L) for(var/atom/movable/A in L) diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 2e9142dcef..b166f9a496 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -465,7 +465,7 @@ log transactions set name = "Eject ID Card" set src in view(1) - if(!usr || usr.stat || usr.lying) return + if(!usr || usr.is_mob_incapacitated()) return if(ishuman(usr) && held_card) to_chat(usr, "You remove \the [held_card] from \the [src].") diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm index 9503eee267..e62ad15a64 100644 --- a/code/modules/flufftext/Dreaming.dm +++ b/code/modules/flufftext/Dreaming.dm @@ -21,7 +21,7 @@ for(var/i = rand(1,4),i > 0, i--) to_chat(src, SPAN_NOTICE("... [pick(POSSIBLE_DREAM_TOPICS)] ...")) sleep(rand(40,70)) - if(knocked_out <= 0) + if(!stat) dreaming = 0 return dreaming = 0 diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index c7b1d65c7d..1f8dcb2f81 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -351,7 +351,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/device/aicard,\ var/clone_weapon = null for(var/mob/living/carbon/human/H in GLOB.alive_mob_list) - if(H.stat || H.lying) continue + if(H.stat) continue // possible_clones += H clone = H break //changed the code a bit. Less randomised, but less work to do. Should be ok, world.contents aren't stored in any particular order. diff --git a/code/modules/gear_presets/corpses.dm b/code/modules/gear_presets/corpses.dm index 70f4e22060..de24f1f84f 100644 --- a/code/modules/gear_presets/corpses.dm +++ b/code/modules/gear_presets/corpses.dm @@ -39,7 +39,6 @@ if(nest) new_human.buckled = nest new_human.setDir(nest.dir) - new_human.update_canmove() nest.buckled_mob = new_human nest.afterbuckle(new_human) new_human.spawned_corpse = TRUE diff --git a/code/modules/hydroponics/vines.dm b/code/modules/hydroponics/vines.dm index 14091a1d29..0b7987e82b 100644 --- a/code/modules/hydroponics/vines.dm +++ b/code/modules/hydroponics/vines.dm @@ -124,7 +124,6 @@ if(V && (V.stat != DEAD) && (V.buckled != src)) // If mob exists and is not dead or captured. V.buckled = src V.forceMove(src.loc) - V.update_canmove() src.buckled_mob = V to_chat(V, SPAN_DANGER("The vines [pick("wind", "tangle", "tighten")] around you!")) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index a68a67cfdf..44a3592329 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -25,7 +25,6 @@ icon = 'icons/mob/mob.dmi' icon_state = "ghost" density = FALSE - canmove = TRUE blinded = FALSE anchored = TRUE // don't get pushed around invisibility = INVISIBILITY_OBSERVER @@ -80,6 +79,9 @@ GLOB.observer_list += src + // Ghosts don't move, they teleport via a special case in mob code + ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_INHERENT) + var/turf/spawn_turf if(ismob(body)) spawn_turf = get_turf(body) //Where is the body located? diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 6c825ec509..115e78fa7f 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -57,8 +57,6 @@ set_stat(DEAD) - update_canmove() - dizziness = 0 jitteriness = 0 diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 5ce40810e0..d71a908d62 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -29,8 +29,6 @@ //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) - if(lying) - return FALSE if(!istype(W)) return FALSE if(!l_hand) @@ -48,8 +46,6 @@ //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) - if(lying) - return FALSE if(!istype(W)) return FALSE if(!r_hand) diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm index 60fe422c0e..d9480fab4c 100644 --- a/code/modules/mob/living/brain/brain.dm +++ b/code/modules/mob/living/brain/brain.dm @@ -41,15 +41,6 @@ return 1 return ..() - -/mob/living/brain/update_canmove() - canmove = FALSE - return canmove - - - - - /mob/living/brain/update_sight() if (stat == DEAD) sight |= SEE_TURFS diff --git a/code/modules/mob/living/brain/life.dm b/code/modules/mob/living/brain/life.dm index 82cbb155b5..7f84b64661 100644 --- a/code/modules/mob/living/brain/life.dm +++ b/code/modules/mob/living/brain/life.dm @@ -18,7 +18,6 @@ //Status updates, death etc. handle_regular_status_updates() - update_canmove() if(client) handle_regular_hud_updates() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 0d33503bce..b63ce0174a 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -74,7 +74,7 @@ /mob/living/carbon/ex_act(severity, direction, datum/cause_data/cause_data) - if(lying) + if(body_position == LYING_DOWN) severity *= EXPLOSION_PRONE_MULTIPLIER if(severity >= 30) @@ -260,19 +260,24 @@ /mob/living/carbon/proc/help_shake_act(mob/living/carbon/M) if(src == M) return - var/t_him = "it" - if(gender == MALE) - t_him = "him" - else if(gender == FEMALE) - t_him = "her" - if(lying || sleeping) + var/t_him = p_them() + + var/shake_action + if(stat == DEAD || HAS_TRAIT(src, TRAIT_INCAPACITATED) || sleeping) // incap implies also unconscious or knockedout + shake_action = "wake [t_him] up!" + else if(HAS_TRAIT(src, TRAIT_FLOORED)) + shake_action = "get [t_him] up!" + + if(shake_action) // We are incapacitated in some fashion if(client) sleeping = max(0,sleeping-5) - if(sleeping == 0) - resting = 0 - update_canmove() - M.visible_message(SPAN_NOTICE("[M] shakes [src] trying to wake [t_him] up!"), \ - SPAN_NOTICE("You shake [src] trying to wake [t_him] up!"), null, 4) + M.visible_message(SPAN_NOTICE("[M] shakes [src] trying to [shake_action]"), \ + SPAN_NOTICE("You shake [src] trying to [shake_action]"), null, 4) + + else if(body_position == LYING_DOWN) // We're just chilling on the ground, let us be + M.visible_message(SPAN_NOTICE("[M] stares and waves impatiently at [src] lying on the ground."), \ + SPAN_NOTICE("You stare and wave at [src] just lying on the ground."), null, 4) + else var/mob/living/carbon/human/H = M if(istype(H)) @@ -452,19 +457,19 @@ /mob/living/carbon/slip(slip_source_name, stun_level, weaken_level, run_only, override_noslip, slide_steps) set waitfor = 0 if(buckled) return FALSE //can't slip while buckled - if(lying) return FALSE //can't slip if already lying down. + if(body_position != STANDING_UP) return FALSE //can't slip if already lying down. stop_pulling() to_chat(src, SPAN_WARNING("You slipped on \the [slip_source_name? slip_source_name : "floor"]!")) playsound(src.loc, 'sound/misc/slip.ogg', 25, 1) apply_effect(stun_level, STUN) apply_effect(weaken_level, WEAKEN) . = TRUE - if(slide_steps && lying)//lying check to make sure we downed the mob + if(slide_steps && HAS_TRAIT(src, TRAIT_FLOORED))//lying check to make sure we downed the mob var/slide_dir = dir for(var/i=1, i<=slide_steps, i++) step(src, slide_dir) sleep(2) - if(!lying) + if(!HAS_TRAIT(src, TRAIT_FLOORED)) // just watch this break in the most horrible way possible break @@ -518,3 +523,17 @@ . += SPAN_GREEN("[src] was thralled by [src.hunter_data.thralled_set.real_name] for '[src.hunter_data.thralled_reason]'.") else if(src.hunter_data.gear) . += SPAN_RED("[src] was marked as carrying gear by [src.hunter_data.gear_set].") + + +/mob/living/carbon/on_lying_down(new_lying_angle) + . = ..() + if(!buckled || buckled.buckle_lying != 0) + lying_angle_on_lying_down(new_lying_angle) + + +/// Special carbon interaction on lying down, to transform its sprite by a rotation. +/mob/living/carbon/proc/lying_angle_on_lying_down(new_lying_angle) + if(!new_lying_angle) + set_lying_angle(pick(90, 270)) + else + set_lying_angle(new_lying_angle) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 5cac9db53c..6ff2a96b72 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -1,5 +1,6 @@ /mob/living/carbon gender = MALE + mobility_flags = MOBILITY_FLAGS_CARBON_DEFAULT var/list/stomach_contents = list() var/life_tick = 0 // The amount of life ticks that have processed on this mob. diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index c493559ff0..3f88d6becc 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -28,7 +28,7 @@ I = giver.r_hand if(!istype(I) || (I.flags_item & (DELONDROP|NODROP|ITEM_ABSTRACT))) return - if(lying) + if(body_position == LYING_DOWN) // replace by mobiilty_flags probably to_chat(giver, SPAN_WARNING("[src] can't hold that while lying down.")) return if(r_hand && l_hand) @@ -47,7 +47,7 @@ to_chat(giver, SPAN_WARNING("You need to keep the item in your active hand.")) to_chat(src, SPAN_WARNING("[giver] seem to have given up on giving [I] to you.")) return - if(lying) + if(body_position == LYING_DOWN) to_chat(src, SPAN_WARNING("You can't hold that while lying down.")) to_chat(giver, SPAN_WARNING("[src] can't hold that while lying down.")) return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index c6bce7757d..260976af38 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -133,7 +133,7 @@ . += "Self Destruct Status: [SShijack.get_sd_eta()]" /mob/living/carbon/human/ex_act(severity, direction, datum/cause_data/cause_data) - if(lying) + if(body_position == LYING_DOWN) severity *= EXPLOSION_PRONE_MULTIPLIER @@ -172,6 +172,7 @@ var/obj/item/item1 = get_active_hand() var/obj/item/item2 = get_inactive_hand() apply_effect(round(knockdown_minus_armor), WEAKEN) + apply_effect(round(knockdown_minus_armor), STUN) // Remove this to let people crawl after an explosion. Funny but perhaps not desirable. var/knockout_value = damage * 0.1 var/knockout_minus_armor = min(knockout_value * bomb_armor_mult * 0.5, 0.5 SECONDS) // the KO time is halved from the knockdown timer. basically same stun time, you just spend less time KO'd. apply_effect(round(knockout_minus_armor), PARALYZE) @@ -1009,7 +1010,7 @@ /mob/living/carbon/human/proc/handle_embedded_objects() - if((stat == DEAD) || lying || buckled) // Shouldnt be needed, but better safe than sorry + if((stat == DEAD) || body_position || buckled) // Shouldnt be needed, but better safe than sorry return for(var/obj/item/W in embedded_items) diff --git a/code/modules/mob/living/carbon/human/human_abilities.dm b/code/modules/mob/living/carbon/human/human_abilities.dm index 027e279e29..75aa0de09a 100644 --- a/code/modules/mob/living/carbon/human/human_abilities.dm +++ b/code/modules/mob/living/carbon/human/human_abilities.dm @@ -455,9 +455,7 @@ CULT return to_chat(chosen, SPAN_HIGHDANGER("You feel a dangerous presence in the back of your head. You find yourself unable to move!")) - ADD_TRAIT(chosen, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Cultist Stun")) - chosen.update_canmove() chosen.update_xeno_hostile_hud() diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 805b3d7e17..2bb113d677 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -206,12 +206,11 @@ w_uniform.add_fingerprint(M) - if(lying || sleeping) + if(body_position == LYING_DOWN || sleeping) if(client) sleeping = max(0,src.sleeping-5) if(!sleeping) - resting = 0 - update_canmove() + set_resting(FALSE) M.visible_message(SPAN_NOTICE("[M] shakes [src] trying to wake [t_him] up!"), \ SPAN_NOTICE("You shake [src] trying to wake [t_him] up!"), null, 4) else if(stunned) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 4416ba74fd..cd6abd2262 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -1,5 +1,6 @@ /mob/living/carbon/human light_system = MOVABLE_LIGHT + rotate_on_lying = TRUE //Hair color and style var/r_hair = 0 var/g_hair = 0 diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index d2b86d2aa3..a98de60d3e 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -219,14 +219,6 @@ return 0 - -/mob/living/carbon/human/has_legs() - . = 0 - if(has_limb("r_foot") && has_limb("r_leg")) - .++ - if(has_limb("l_foot") && has_limb("l_leg")) - .++ - /mob/living/carbon/human/proc/disable_special_flags() status_flags |= CANPUSH anchored = FALSE diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 1a906dfa5c..1803e28911 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -108,7 +108,7 @@ //Do we have a working jetpack if(istype(back, /obj/item/tank/jetpack)) var/obj/item/tank/jetpack/J = back - if(((!check_drift) || (check_drift && J.stabilization_on)) && (!lying) && (J.allow_thrust(0.01, src))) + if(((!check_drift) || (check_drift && J.stabilization_on)) && (body_position == STANDING_UP) && (J.allow_thrust(0.01, src))) inertia_dir = 0 return 1 // if(!check_drift && J.allow_thrust(0.01, src)) @@ -140,3 +140,10 @@ prob_slip = round(prob_slip) return(prob_slip) + +/// Updates [TRAIT_FLOORED] based on whether the mob has appropriate limbs to stand or not +/mob/living/carbon/human/proc/update_leg_status() + if((has_limb("r_foot") && has_limb("r_leg")) || (has_limb("l_foot") && has_limb("l_leg"))) + REMOVE_TRAIT(src, TRAIT_FLOORED, BODY_TRAIT) + else + ADD_TRAIT(src, TRAIT_FLOORED, BODY_TRAIT) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index fded3d5e3f..be1c7833c5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -82,8 +82,6 @@ //Status updates, death etc. handle_regular_status_updates() //Optimized a bit - update_canmove() - handle_regular_hud_updates() pulse = handle_pulse() diff --git a/code/modules/mob/living/carbon/human/life/handle_disabilities.dm b/code/modules/mob/living/carbon/human/life/handle_disabilities.dm index 9ab2342121..77358ca45b 100644 --- a/code/modules/mob/living/carbon/human/life/handle_disabilities.dm +++ b/code/modules/mob/living/carbon/human/life/handle_disabilities.dm @@ -3,7 +3,7 @@ /mob/living/carbon/human/proc/handle_disabilities() if(disabilities & EPILEPSY) - if((prob(1) && knocked_out < 1)) + if(prob(1) && !HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) visible_message(SPAN_DANGER("\The [src] starts having a seizure!"), \ SPAN_DANGER("You start having a seizure!"), null, 5) apply_effect(10, PARALYZE) @@ -11,14 +11,14 @@ return if(disabilities & COUGHING) - if((prob(5) && knocked_out <= 1)) + if(prob(5) && !HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) drop_held_item() INVOKE_ASYNC(src, PROC_REF(emote), "cough") return if(disabilities & TOURETTES) speech_problem_flag = TRUE - if((prob(10) && knocked_out <= 1)) + if((prob(10) && !HAS_TRAIT(src, TRAIT_KNOCKEDOUT))) apply_effect(10, STUN) spawn() switch(rand(1, 3)) @@ -56,6 +56,6 @@ to_chat(src, SPAN_DANGER("Your hand won't respond properly, you drop what you're holding.")) drop_held_item() if(10 to 12) - if(getBrainLoss() >= 50 && !lying) + if(getBrainLoss() >= 50 && body_position == STANDING_UP) to_chat(src, SPAN_DANGER("Your legs won't respond properly, you fall down.")) resting = 1 diff --git a/code/modules/mob/living/carbon/human/life/handle_organs.dm b/code/modules/mob/living/carbon/human/life/handle_organs.dm index 2c978f2295..706e8567a5 100644 --- a/code/modules/mob/living/carbon/human/life/handle_organs.dm +++ b/code/modules/mob/living/carbon/human/life/handle_organs.dm @@ -16,7 +16,7 @@ else E.process() - if(!lying && world.time - l_move_time < 15) + if(body_position == STANDING_UP && world.time - l_move_time < 15) // Moving around with fractured ribs won't do you any good if(E.is_broken() && E.internal_organs && prob(15)) var/datum/internal_organ/I = pick(E.internal_organs) @@ -32,7 +32,7 @@ custom_pain("You feel broken bones cutting at you in your [E.display_name]!", 1) pain.apply_pain(damage * 1.5) - if(!lying && !buckled && prob(2)) + if(body_position == STANDING_UP && !buckled && prob(2)) var/left_leg_crippled = FALSE var/right_leg_crippled = FALSE diff --git a/code/modules/mob/living/carbon/human/life/handle_regular_status_updates.dm b/code/modules/mob/living/carbon/human/life/handle_regular_status_updates.dm index 5c951a8112..41554f0567 100644 --- a/code/modules/mob/living/carbon/human/life/handle_regular_status_updates.dm +++ b/code/modules/mob/living/carbon/human/life/handle_regular_status_updates.dm @@ -1,6 +1,6 @@ //Refer to life.dm for caller -/mob/living/carbon/human/handle_regular_status_updates(regular_update = TRUE) +/mob/living/carbon/human/handle_regular_status_updates(regular_update = TRUE) // you're next, evil proc --fira if(status_flags & GODMODE) return 0 @@ -53,9 +53,8 @@ if(!already_in_crit) new /datum/effects/crit/human(src) - if(knocked_out) + if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) blinded = TRUE - set_stat(UNCONSCIOUS) if(regular_update && halloss > 0) apply_damage(-3, HALLOSS) else if(sleeping) diff --git a/code/modules/mob/living/carbon/human/life/handle_stasis_bag.dm b/code/modules/mob/living/carbon/human/life/handle_stasis_bag.dm index 9d257da720..16d9955395 100644 --- a/code/modules/mob/living/carbon/human/life/handle_stasis_bag.dm +++ b/code/modules/mob/living/carbon/human/life/handle_stasis_bag.dm @@ -4,6 +4,9 @@ //Handle side effects from stasis switch(in_stasis) if(STASIS_IN_BAG) + // I hate whoever wrote this and statuses with a passion knocked_down = knocked_down? --knocked_down : knocked_down + 10 //knocked_down set. + if(knocked_down <= 0) + knocked_down_callback() if(STASIS_IN_CRYO_CELL) if(sleeping < 10) sleeping += 10 //Puts the mob to sleep indefinitely. diff --git a/code/modules/mob/living/carbon/human/life/life_helpers.dm b/code/modules/mob/living/carbon/human/life/life_helpers.dm index fedeaf9fd4..25f020a9f8 100644 --- a/code/modules/mob/living/carbon/human/life/life_helpers.dm +++ b/code/modules/mob/living/carbon/human/life/life_helpers.dm @@ -25,33 +25,6 @@ pressure_adjustment_coefficient = min(1, max(pressure_adjustment_coefficient, 0)) //So it isn't less than 0 or larger than 1. return pressure_adjustment_coefficient -//Calculate how much of the enviroment pressure-difference affects the human. -/mob/living/carbon/human/calculate_affecting_pressure(pressure) - var/pressure_difference - - //First get the absolute pressure difference. - if(pressure < ONE_ATMOSPHERE) //We are in an underpressure. - pressure_difference = ONE_ATMOSPHERE - pressure - - else //We are in an overpressure or standard atmosphere. - pressure_difference = pressure - ONE_ATMOSPHERE - - if(pressure_difference < 5) //If the difference is small, don't bother calculating the fraction. - pressure_difference = 0 - - else - //Otherwise calculate how much of that absolute pressure difference affects us, can be 0 to 1 (equals 0% to 100%). - //This is our relative difference. - pressure_difference *= get_pressure_weakness() - - //The difference is always positive to avoid extra calculations. - //Apply the relative difference on a standard atmosphere to get the final result. - //The return value will be the adjusted_pressure of the human that is the basis of pressure warnings and damage. - if(pressure < ONE_ATMOSPHERE) - return ONE_ATMOSPHERE - pressure_difference - else - return ONE_ATMOSPHERE + pressure_difference - /mob/living/carbon/human/proc/stabilize_body_temperature() @@ -320,9 +293,7 @@ emote("gasp") regenerate_icons() reload_fullscreens() - update_canmove() flash_eyes() apply_effect(10, EYE_BLUR) apply_effect(10, PARALYZE) - update_canmove() updatehealth() //One more time, so it doesn't show the target as dead on HUDs diff --git a/code/modules/mob/living/carbon/human/powers/human_powers.dm b/code/modules/mob/living/carbon/human/powers/human_powers.dm index 10b13225b3..219212d1e1 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -9,7 +9,7 @@ if(last_special > world.time) return - if(is_mob_incapacitated() || lying || buckled) + if(is_mob_incapacitated() || buckled) to_chat(src, "You cannot tackle someone in your current state.") return @@ -27,7 +27,7 @@ if(last_special > world.time) return - if(is_mob_incapacitated() || lying || buckled) + if(is_mob_incapacitated() || buckled) to_chat(src, "You cannot tackle in your current state.") return @@ -56,7 +56,7 @@ if(last_special > world.time) return - if(is_mob_incapacitated() || lying || buckled) + if(is_mob_incapacitated() || body_position != STANDING_UP || buckled) to_chat(src, "You cannot leap in your current state.") return @@ -74,7 +74,7 @@ if(last_special > world.time) return - if(is_mob_incapacitated() || lying || buckled) + if(is_mob_incapacitated() || body_position != STANDING_UP || buckled) to_chat(src, "You cannot leap in your current state.") return @@ -110,7 +110,7 @@ if(last_special > world.time) return - if(is_mob_incapacitated(TRUE) || lying) + if(is_mob_incapacitated() || body_position != STANDING_UP) to_chat(src, SPAN_DANGER("You cannot do that in your current state.")) return @@ -193,13 +193,46 @@ /mob/living/verb/lay_down() set name = "Rest" set category = "IC" + set_resting(!resting, FALSE, TRUE) - if(!resting) - apply_effect(1, WEAKEN) //so that the mob immediately falls over - - resting = !resting +///Proc to hook behavior to the change of value in the resting variable. +/mob/living/proc/set_resting(new_resting, silent = TRUE, instant = FALSE) + if(!(mobility_flags & MOBILITY_REST)) + return + if(new_resting == resting) + return + if(!COOLDOWN_FINISHED(src, rest_cooldown)) + to_chat(src, SPAN_WARNING("You can't 'rest' that fast. Take a breather!")) + return + COOLDOWN_START(src, rest_cooldown, 1 SECONDS) + + . = resting + resting = new_resting + if(new_resting) + if(body_position == LYING_DOWN) + if(!silent) + to_chat(src, SPAN_NOTICE("You will now try to stay lying down on the floor.")) + else if(HAS_TRAIT(src, TRAIT_FORCED_STANDING) || (buckled && buckled.buckle_lying != NO_BUCKLE_LYING)) + if(!silent) + to_chat(src, SPAN_NOTICE("You will now lay down as soon as you are able to.")) + else + if(!silent) + to_chat(src, SPAN_NOTICE("You lay down.")) + set_lying_down() + else + if(body_position == STANDING_UP) + if(!silent) + to_chat(src, SPAN_NOTICE("You will now try to remain standing up.")) + else if(HAS_TRAIT(src, TRAIT_FLOORED) || (buckled && buckled.buckle_lying != NO_BUCKLE_LYING)) + if(!silent) + to_chat(src, SPAN_NOTICE("You will now stand up as soon as you are able to.")) + else + if(!silent) + to_chat(src, SPAN_NOTICE("You stand up.")) + get_up(instant) - to_chat(src, SPAN_NOTICE("You are now [resting ? "resting." : "getting up."]")) +// SEND_SIGNAL(src, COMSIG_LIVING_RESTING, new_resting, silent, instant) +// update_resting() // HUD icons /mob/living/carbon/human/proc/toggle_inherent_nightvison() set category = "Synthetic" diff --git a/code/modules/mob/living/carbon/human/species/monkey.dm b/code/modules/mob/living/carbon/human/species/monkey.dm index 6c774432e7..8e8d244329 100644 --- a/code/modules/mob/living/carbon/human/species/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/monkey.dm @@ -46,8 +46,8 @@ /datum/species/monkey/handle_npc(mob/living/carbon/human/H) if(H.stat != CONSCIOUS) return - if(prob(33) && isturf(H.loc) && !H.pulledby && !H.lying && !H.is_mob_restrained()) //won't move if being pulled - step(H, pick(cardinal)) + if(prob(33) && isturf(H.loc) && !H.pulledby && (H.mobility_flags & MOBILITY_MOVE) && !H.is_mob_restrained()) //won't move if being pulled + step(H, pick(GLOB.cardinals)) var/obj/held = H.get_active_hand() if(held && prob(1)) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 3f415d8d30..d2177cf49a 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -166,6 +166,13 @@ for(var/datum/internal_organ/I in H.internal_organs) I.mechanize() + // We just deleted the legs so they fell down. + // Update again now that the legs are back so they can stand properly during rest of species code and before outside updates kick in. + // I hate this code. + H.update_leg_status() + // While we're deep in shitcode we also force instant transition so this nonsense isn't visually noticeable + H.update_transform(instant_update = TRUE) + /datum/species/proc/initialize_pain(mob/living/carbon/human/H) if(pain_type) QDEL_NULL(H.pain) @@ -179,12 +186,7 @@ /datum/species/proc/hug(mob/living/carbon/human/H, mob/living/carbon/target, target_zone = "chest") if(H.flags_emote) return - var/t_him = "them" - switch(target.gender) - if(MALE) - t_him = "him" - if(FEMALE) - t_him = "her" + var/t_him = target.p_them() if(target_zone == "head") attempt_rock_paper_scissors(H, target) @@ -195,6 +197,9 @@ else if(target_zone in list("l_hand", "r_hand")) attempt_fist_bump(H, target) return + else if(H.body_position == LYING_DOWN) // Keep other interactions above lying check for maximum awkwardness potential + H.visible_message(SPAN_NOTICE("[H] waves at [target] to make [t_him] feel better!"), \ + SPAN_NOTICE("You wave at [target] to make [t_him] feel better!"), null, 4) else if(target_zone == "groin") H.visible_message(SPAN_NOTICE("[H] hugs [target] to make [t_him] feel better!"), \ SPAN_NOTICE("You hug [target] to make [t_him] feel better!"), null, 4) diff --git a/code/modules/mob/living/carbon/human/species/zombie.dm b/code/modules/mob/living/carbon/human/species/zombie.dm index 5fa928a67f..35b6d4e43e 100644 --- a/code/modules/mob/living/carbon/human/species/zombie.dm +++ b/code/modules/mob/living/carbon/human/species/zombie.dm @@ -53,9 +53,6 @@ if(zombie.glasses) zombie.drop_inv_item_on_ground(zombie.glasses, FALSE, TRUE) if(zombie.wear_mask) zombie.drop_inv_item_on_ground(zombie.wear_mask, FALSE, TRUE) - if(zombie.lying) - zombie.lying = FALSE - var/obj/item/weapon/zombie_claws/ZC = new(zombie) ZC.icon_state = "claw_r" zombie.equip_to_slot_or_del(ZC, WEAR_R_HAND, TRUE) @@ -116,7 +113,7 @@ /datum/species/zombie/proc/revive_from_death(mob/living/carbon/human/zombie) if(zombie && zombie.loc && zombie.stat == DEAD) zombie.revive(TRUE) - zombie.stunned = 4 + zombie.apply_effect(4, STUN) zombie.make_jittery(500) zombie.visible_message(SPAN_WARNING("[zombie] rises from the ground!")) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 1dcefec9b6..2952aa7197 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -89,25 +89,6 @@ There are several things that need to be remembered: overlays -= I overlays_standing[cache_index] = null - -/mob/living/carbon/human/update_transform(force = FALSE) - if(lying == lying_prev && !force) - return - lying_prev = lying - var/matrix/new_matrix = matrix() - if(lying) - if(pulledby && pulledby.grab_level >= GRAB_CARRY) - new_matrix.Turn(90) - else - if(prob(50)) - new_matrix.Turn(90) - else - new_matrix.Turn(270) - new_matrix.Translate(rand(-10,10), rand(-10,10)) - apply_transform(new_matrix) - else - apply_transform(new_matrix) - /mob/living/carbon/human/UpdateDamageIcon() for(var/obj/limb/O in limbs) if(!(O.status & LIMB_DESTROYED)) @@ -131,6 +112,8 @@ There are several things that need to be remembered: //BASE MOB SPRITE /mob/living/carbon/human/proc/update_body() + update_leg_status() // Not icon ops, but placed here due to lack of a non-icons update_body + appearance_flags |= KEEP_TOGETHER // sanity update_damage_overlays() @@ -807,3 +790,11 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate, /mob/living/carbon/human/on_immobilized_trait_loss(datum/source) . = ..() update_xeno_hostile_hud() + +/mob/living/carbon/human/on_floored_trait_gain(datum/source) + . = ..() + update_xeno_hostile_hud() + +/mob/living/carbon/human/on_floored_trait_loss(datum/source) + . = ..() + update_xeno_hostile_hud() diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm index cc76999358..e08a71f81e 100644 --- a/code/modules/mob/living/carbon/update_icons.dm +++ b/code/modules/mob/living/carbon/update_icons.dm @@ -4,8 +4,3 @@ /mob/living/carbon/proc/remove_overlay(cache_index) return - -/mob/living/carbon/update_transform() - if(lying != lying_prev ) - lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again - update_icons() diff --git a/code/modules/mob/living/carbon/xenomorph/Embryo.dm b/code/modules/mob/living/carbon/xenomorph/Embryo.dm index d253d8bc07..06f677ece9 100644 --- a/code/modules/mob/living/carbon/xenomorph/Embryo.dm +++ b/code/modules/mob/living/carbon/xenomorph/Embryo.dm @@ -102,7 +102,7 @@ switch(stage) if(2) if(prob(4)) - if(affected_mob.knocked_out < 1) + if(!HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) affected_mob.pain.apply_pain(PAIN_CHESTBURST_WEAK) affected_mob.visible_message(SPAN_DANGER("[affected_mob] starts shaking uncontrollably!"), \ SPAN_DANGER("You feel something moving inside you! You start shaking uncontrollably!")) @@ -123,7 +123,7 @@ else if(prob(2)) affected_mob.emote("[pick("sneeze", "cough")]") if(prob(5)) - if(affected_mob.knocked_out < 1) + if(!HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) affected_mob.pain.apply_pain(PAIN_CHESTBURST_WEAK) affected_mob.visible_message(SPAN_DANGER("\The [affected_mob] starts shaking uncontrollably!"), \ SPAN_DANGER("You feel something moving inside you! You start shaking uncontrollably!")) @@ -139,7 +139,7 @@ if(prob(50)) affected_mob.emote("scream") if(prob(6)) - if(affected_mob.knocked_out < 1) + if(!HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) affected_mob.pain.apply_pain(PAIN_CHESTBURST_WEAK) affected_mob.visible_message(SPAN_DANGER("[affected_mob] starts shaking uncontrollably!"), \ SPAN_DANGER("You feel something moving inside you! You start shaking uncontrollably!")) @@ -295,7 +295,7 @@ return victim.chestburst = TRUE to_chat(src, SPAN_DANGER("You start bursting out of [victim]'s chest!")) - if(victim.knocked_out < 1) + if(!HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) victim.apply_effect(20, DAZE) victim.visible_message(SPAN_DANGER("\The [victim] starts shaking uncontrollably!"), \ SPAN_DANGER("You feel something ripping up your insides!")) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index 26003affa2..18bb56b632 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -116,8 +116,8 @@ attack_hand(user)//Not a carrier, or already full? Just pick it up. return XENO_NO_DELAY_ACTION -/obj/item/clothing/mask/facehugger/attack(mob/M, mob/user) - if(!can_hug(M, hivenumber) || !(M.is_mob_incapacitated() || M.lying || M.buckled && !isyautja(M))) +/obj/item/clothing/mask/facehugger/attack(mob/living/M, mob/user) + if(!can_hug(M, hivenumber) || !(M.is_mob_incapacitated() || M.body_position == LYING_DOWN || M.buckled && !isyautja(M))) to_chat(user, SPAN_WARNING("The facehugger refuses to attach.")) ..() return @@ -130,7 +130,7 @@ if(!do_after(user, 2 SECONDS, INTERRUPT_ALL, BUSY_ICON_HOSTILE, M, INTERRUPT_MOVED, BUSY_ICON_HOSTILE)) return - if(!can_hug(M, hivenumber) || !(M.is_mob_incapacitated() || M.lying || M.buckled)) + if(!can_hug(M, hivenumber) || !(M.is_mob_incapacitated() || M.body_position == LYING_DOWN || M.buckled)) return attach(M) @@ -525,7 +525,7 @@ var/catch_chance = 50 if(target.dir == reverse_dir[hugger.dir]) catch_chance += 20 - if(target.lying) + if(target.body_position == LYING_DOWN) catch_chance -= 50 catch_chance -= ((target.maxHealth - target.health) / 3) if(target.get_active_hand()) diff --git a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm index a1b6f96ab6..49bb644b40 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm @@ -150,7 +150,7 @@ //A simple handler for checking your state. Used in pretty much all the procs. /mob/living/carbon/xenomorph/proc/check_state(permissive = FALSE) if(!permissive) - if(is_mob_incapacitated() || lying || buckled || evolving || !isturf(loc)) + if(is_mob_incapacitated() || body_position == LYING_DOWN || buckled || evolving || !isturf(loc)) to_chat(src, SPAN_WARNING("You cannot do this in your current state.")) return FALSE else if(caste_type != XENO_CASTE_QUEEN && observed_xeno) @@ -319,7 +319,6 @@ if (pounceAction.freeze_self) if(pounceAction.freeze_play_sound) playsound(loc, rand(0, 100) < 95 ? 'sound/voice/alien_pounce.ogg' : 'sound/voice/alien_pounce2.ogg', 25, 1) - canmove = FALSE ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Pounce")) pounceAction.freeze_timer_id = addtimer(CALLBACK(src, PROC_REF(unfreeze_pounce)), pounceAction.freeze_time, TIMER_STOPPABLE) pounceAction.additional_effects(M) @@ -628,7 +627,7 @@ if(!TC) TC = new(tackle_min + tackle_min_offset, tackle_max + tackle_max_offset, tackle_chance*tackle_mult) LAZYSET(tackle_counter, M, TC) - RegisterSignal(M, COMSIG_MOB_KNOCKED_DOWN, PROC_REF(tackle_handle_lying_changed)) + RegisterSignal(M, COMSIG_LIVING_SET_BODY_POSITION, PROC_REF(tackle_handle_lying_changed)) if (TC.tackle_reset_id) deltimer(TC.tackle_reset_id) @@ -640,8 +639,11 @@ else reset_tackle(M) -/mob/living/carbon/xenomorph/proc/tackle_handle_lying_changed(mob/M) +/mob/living/carbon/xenomorph/proc/tackle_handle_lying_changed(mob/living/M, body_position) SIGNAL_HANDLER + if(body_position != LYING_DOWN) + return + // Infected mobs do not have their tackle counter reset if // they get knocked down or get up from a knockdown if(M.status_flags & XENO_HOST) @@ -654,7 +656,7 @@ if (TC) qdel(TC) LAZYREMOVE(tackle_counter, M) - UnregisterSignal(M, COMSIG_MOB_KNOCKED_DOWN) + UnregisterSignal(M, COMSIG_LIVING_SET_BODY_POSITION) /mob/living/carbon/xenomorph/burn_skin(burn_amount) @@ -778,3 +780,6 @@ SSminimaps.remove_marker(src) add_minimap_marker() + +/mob/living/carbon/xenomorph/lying_angle_on_lying_down(new_lying_angle) + return // Do not rotate xenos around on the floor, their sprite is already top-down'ish diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm index 6ce6de84a0..641312e050 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm @@ -165,7 +165,6 @@ return REMOVE_TRAIT(H, TRAIT_IMMOBILIZED, trait_source) - H.update_canmove() if(ishuman(H)) var/mob/living/carbon/human/T = H diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/burrower/burrower_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/burrower/burrower_powers.dm index 8b8e3f9c86..6a2071fafc 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/burrower/burrower_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/burrower/burrower_powers.dm @@ -37,18 +37,14 @@ to_chat(src, SPAN_XENOWARNING("You burrow yourself into the ground.")) invisibility = 101 anchored = TRUE - density = FALSE if(caste.fire_immunity == FIRE_IMMUNITY_NONE) RegisterSignal(src, COMSIG_LIVING_PREIGNITION, PROC_REF(fire_immune)) RegisterSignal(src, list( COMSIG_LIVING_FLAMER_CROSSED, COMSIG_LIVING_FLAMER_FLAMED, ), PROC_REF(flamer_crossed_immune)) - ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Burrow")) - ADD_TRAIT(src, TRAIT_ABILITY_BURROWED, TRAIT_SOURCE_ABILITY("Burrow")) - ADD_TRAIT(src, TRAIT_UNDENSE, TRAIT_SOURCE_ABILITY("Burrow")) + add_traits(list(TRAIT_ABILITY_BURROWED, TRAIT_UNDENSE, TRAIT_IMMOBILIZED), TRAIT_SOURCE_ABILITY("Burrow")) playsound(src.loc, 'sound/effects/burrowing_b.ogg', 25) - update_canmove() update_icons() addtimer(CALLBACK(src, PROC_REF(do_burrow_cooldown)), (caste ? caste.burrow_cooldown : 5 SECONDS)) burrow_timer = world.time + 90 // How long we can be burrowed @@ -74,19 +70,15 @@ COMSIG_LIVING_FLAMER_CROSSED, COMSIG_LIVING_FLAMER_FLAMED, )) - REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Burrow")) - REMOVE_TRAIT(src, TRAIT_ABILITY_BURROWED, TRAIT_SOURCE_ABILITY("Burrow")) - REMOVE_TRAIT(src, TRAIT_UNDENSE, TRAIT_SOURCE_ABILITY("Burrow")) + remove_traits(list(TRAIT_ABILITY_BURROWED, TRAIT_UNDENSE, TRAIT_IMMOBILIZED), TRAIT_SOURCE_ABILITY("Burrow")) invisibility = FALSE anchored = FALSE - density = TRUE playsound(loc, 'sound/effects/burrowoff.ogg', 25) for(var/mob/living/carbon/mob in loc) if(!can_not_harm(mob)) mob.apply_effect(2, WEAKEN) addtimer(CALLBACK(src, PROC_REF(do_burrow_cooldown)), (caste ? caste.burrow_cooldown : 5 SECONDS)) - update_canmove() update_icons() /mob/living/carbon/xenomorph/proc/do_burrow_cooldown() diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm index 5be44deb87..ca5f88638a 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm @@ -133,6 +133,11 @@ #define MINIMUM_CHARGE_DISTANCE 3 #define MAXIMUM_TARGET_DISTANCE 12 +/datum/action/xeno_action/onclick/charger_charge/proc/handle_position_change(mob/living/carbon/xenomorph/xeno, body_position) + SIGNAL_HANDLER + if(body_position == LYING_DOWN) + handle_movement(xeno) + /datum/action/xeno_action/onclick/charger_charge/process_ai(mob/living/carbon/xenomorph/processing_xeno, delta_time) if(!DT_PROB(ai_prob_chance, delta_time) || !isnull(charge_dir) || processing_xeno.action_busy) return @@ -281,7 +286,7 @@ shake_camera(Mob, 2, 1) for(var/mob/living/carbon/human/Mob in xeno.loc) - if(Mob.lying && Mob.stat != DEAD) + if(Mob.body_position == LYING_DOWN && Mob.stat != DEAD) xeno.visible_message(SPAN_DANGER("[xeno] runs [Mob] over!"), SPAN_DANGER("You run [Mob] over!") ) @@ -297,7 +302,7 @@ if(momentum >= 5) for(var/mob/living/carbon/human/hit_human in orange(1, xeno)) - if(hit_human.knocked_down) + if(hit_human.body_position == LYING_DOWN) continue shake_camera(hit_human, 4, 2) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index b14af5c005..74c6dadb72 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -113,17 +113,14 @@ ADD_TRAIT(xeno_owner, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Stomp")) xeno_owner.anchored = TRUE - xeno_owner.update_canmove() if (!do_after(xeno_owner, windup_duration, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE)) REMOVE_TRAIT(xeno_owner, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Stomp")) xeno_owner.anchored = FALSE - xeno_owner.update_canmove() return REMOVE_TRAIT(xeno_owner, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Stomp")) xeno_owner.anchored = FALSE - xeno_owner.update_canmove() playsound(get_turf(xeno_owner), 'sound/effects/bang.ogg', 25, 0) xeno_owner.visible_message(SPAN_XENODANGER("[xeno_owner] smashes into the ground!"), SPAN_XENODANGER("You smash into the ground!")) @@ -223,7 +220,7 @@ to_chat(Xeno, SPAN_XENONOTICE("You will [will_charge] charge when moving.")) if(activated) RegisterSignal(Xeno, COMSIG_MOVABLE_MOVED, PROC_REF(handle_movement)) - RegisterSignal(Xeno, COMSIG_MOB_KNOCKED_DOWN, PROC_REF(handle_movement)) + RegisterSignal(Xeno, COMSIG_LIVING_SET_BODY_POSITION, PROC_REF(handle_position_change)) RegisterSignal(Xeno, COMSIG_ATOM_DIR_CHANGE, PROC_REF(handle_dir_change)) RegisterSignal(Xeno, COMSIG_XENO_RECALCULATE_SPEED, PROC_REF(update_speed)) RegisterSignal(Xeno, COMSIG_XENO_STOP_MOMENTUM, PROC_REF(stop_momentum)) @@ -235,7 +232,7 @@ stop_momentum() UnregisterSignal(Xeno, list( COMSIG_MOVABLE_MOVED, - COMSIG_MOB_KNOCKED_DOWN, + COMSIG_LIVING_SET_BODY_POSITION, COMSIG_ATOM_DIR_CHANGE, COMSIG_XENO_RECALCULATE_SPEED, COMSIG_MOVABLE_ENTERED_RIVER, diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/defender/defender_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/defender/defender_powers.dm index bbb202fef3..3cdf1342f5 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/defender/defender_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/defender/defender_powers.dm @@ -220,7 +220,6 @@ ADD_TRAIT(X, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Fortify")) X.anchored = TRUE X.small_explosives_stun = FALSE - X.update_canmove() RegisterSignal(owner, COMSIG_XENO_PRE_CALCULATE_ARMOURED_DAMAGE_PROJECTILE, PROC_REF(check_directional_armor)) X.mob_size = MOB_SIZE_IMMOBILE //knockback immune X.mob_flags &= ~SQUEEZE_UNDER_VEHICLES @@ -242,7 +241,6 @@ UnregisterSignal(owner, COMSIG_XENO_PRE_CALCULATE_ARMOURED_DAMAGE_PROJECTILE) X.mob_size = MOB_SIZE_XENO //no longer knockback immune X.mob_flags |= SQUEEZE_UNDER_VEHICLES - X.update_canmove() X.update_icons() X.fortify = FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm index ed50ab58e2..a91f898e9b 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm @@ -282,7 +282,6 @@ return var/mob/living/carbon/xenomorph/X = owner REMOVE_TRAIT(X, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Pounce")) - X.update_canmove() deltimer(freeze_timer_id) freeze_timer_id = TIMER_ID_NULL to_chat(X, SPAN_XENONOTICE("Slashing frenzies you! You feel free to move immediately!")) @@ -315,7 +314,7 @@ /datum/action/xeno_action/onclick/toggle_long_range/can_use_action() var/mob/living/carbon/xenomorph/xeno = owner - if(xeno && !xeno.is_mob_incapacitated() && !xeno.lying && !xeno.buckled) + if(xeno && !xeno.is_mob_incapacitated() && !xeno.buckled) return TRUE /datum/action/xeno_action/onclick/toggle_long_range/give_to(mob/living/living_mob) @@ -572,6 +571,14 @@ hide_from(owner) +/datum/action/xeno_action/onclick/tacmap/can_use_action() + if(!owner) + return FALSE + var/mob/living/carbon/xenomorph/xeno = owner + if(xeno.is_mob_incapacitated() || xeno.dazed) + return FALSE + return TRUE + /datum/action/xeno_action/onclick/tacmap/use_ability(atom/target) var/mob/living/carbon/xenomorph/xeno = owner xeno.xeno_tacmap() diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm index 928dba4a76..958e0f7a2f 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm @@ -413,7 +413,6 @@ if (!windup_interruptable) ADD_TRAIT(X, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Pounce")) X.anchored = TRUE - X.update_canmove() pre_windup_effects() if (!do_after(X, windup_duration, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE)) @@ -421,14 +420,12 @@ if (!windup_interruptable) REMOVE_TRAIT(X, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Pounce")) X.anchored = FALSE - X.update_canmove() post_windup_effects(interrupted = TRUE) return if (!windup_interruptable) REMOVE_TRAIT(X, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Pounce")) X.anchored = FALSE - X.update_canmove() post_windup_effects() X.visible_message(SPAN_XENOWARNING("\The [X] [ability_name][findtext(ability_name, "e", -1) || findtext(ability_name, "p", -1) ? "s" : "es"] at [A]!"), SPAN_XENOWARNING("You [ability_name] at [A]!")) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/hivelord/hivelord_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/hivelord/hivelord_abilities.dm index 8c39228e35..02e7fd8144 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/hivelord/hivelord_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/hivelord/hivelord_abilities.dm @@ -18,7 +18,7 @@ /datum/action/xeno_action/active_toggle/toggle_speed/can_use_action() var/mob/living/carbon/xenomorph/hivelord/xeno = owner - if(xeno && !xeno.is_mob_incapacitated() && !xeno.lying && !xeno.buckled) + if(xeno && !xeno.is_mob_incapacitated() && xeno.body_position == STANDING_UP && !xeno.buckled) // do we rly need standing up? return TRUE /datum/action/xeno_action/active_toggle/toggle_speed/give_to(mob/living/living_mob) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 13734a5b9c..0c2b226cb2 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -268,7 +268,7 @@ if(xeno.can_not_harm(target_carbon)) return - if(!(target_carbon.knocked_out || target_carbon.stat == UNCONSCIOUS)) //called knocked out because for some reason .stat seems to have a delay . + if(!(HAS_TRAIT(target_carbon, TRAIT_KNOCKEDOUT) || target_carbon.stat == UNCONSCIOUS)) //called knocked out because for some reason .stat seems to have a delay . to_chat(xeno, SPAN_XENOHIGHDANGER("You can only headbite an unconscious, adjacent target!")) return diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm index 400a4a80ba..aab1ff6a60 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm @@ -174,9 +174,7 @@ var/root_duration = buffed ? root_duration_buffed : root_duration_unbuffed vanguard_user.visible_message(SPAN_XENODANGER("[vanguard_user] slams [target_atom] into the ground!"), SPAN_XENOHIGHDANGER("You slam [target_atom] into the ground!")) - ADD_TRAIT(target_carbon, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Cleave")) - target_carbon.update_canmove() if (ishuman(target_carbon)) var/mob/living/carbon/human/Hu = target_carbon @@ -293,7 +291,6 @@ var/throw_target_turf = get_step(xeno.loc, facing) ADD_TRAIT(xeno, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Abduct")) - xeno.update_canmove() if(!do_after(xeno, windup, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE, numticks = 1)) to_chat(xeno, SPAN_XENOWARNING("You relax your tail.")) apply_cooldown() @@ -303,7 +300,6 @@ qdel(xenotelegraph) REMOVE_TRAIT(xeno, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Abduct")) - xeno.update_canmove() return @@ -311,7 +307,6 @@ return REMOVE_TRAIT(xeno, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Abduct")) - xeno.update_canmove() playsound(get_turf(xeno), 'sound/effects/bang.ogg', 25, 0) xeno.visible_message(SPAN_XENODANGER("\The [xeno] suddenly uncoils its tail, firing it towards [atom]!"), SPAN_XENODANGER("You uncoil your tail, sending it out towards \the [atom]!")) @@ -339,13 +334,11 @@ new /datum/effects/xeno_slow(target, xeno, , ,25) target.apply_effect(1, SLOW) else if (LAZYLEN(targets) == 2) - ADD_TRAIT(target, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Abduct")) - target.update_canmove() if (ishuman(target)) - var/mob/living/carbon/human/human = target - human.update_xeno_hostile_hud() - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(unroot_human), target), get_xeno_stun_duration(target, 25)) + var/mob/living/carbon/human/target_human = target + target_human.update_xeno_hostile_hud() + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(unroot_human), target, TRAIT_SOURCE_ABILITY("Abduct")), get_xeno_stun_duration(target, 25)) to_chat(target, SPAN_XENOHIGHDANGER("[xeno] has pinned you to the ground! You cannot move!")) target.set_effect(2, DAZE) @@ -409,10 +402,9 @@ oppressor_user.animation_attack_on(target_carbon) oppressor_user.flick_attack_overlay(target_carbon, "punch") - if (HAS_TRAIT(target_carbon, TRAIT_IMMOBILIZED) || target_carbon.slowed || target_carbon.knocked_down) + if (!(target_carbon.mobility_flags & MOBILITY_MOVE) || !(target_carbon.mobility_flags & MOBILITY_STAND) || target_carbon.slowed) target_carbon.apply_damage(get_xeno_damage_slash(target_carbon, damage), BRUTE, target_limb? target_limb.name : "chest") ADD_TRAIT(target_carbon, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Oppressor Punch")) - target_carbon.update_canmove() if (ishuman(target_carbon)) var/mob/living/carbon/human/Hu = target_carbon @@ -1013,7 +1005,6 @@ throw_target_turf = behind_turf ADD_TRAIT(X, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Praetorian Retrieve")) - X.update_canmove() if(windup) if(!do_after(X, windup, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE, numticks = 1)) to_chat(X, SPAN_XENOWARNING("You cancel your retrieve.")) @@ -1024,12 +1015,10 @@ qdel(XT) REMOVE_TRAIT(X, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Praetorian Retrieve")) - X.update_canmove() return REMOVE_TRAIT(X, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Praetorian Retrieve")) - X.update_canmove() playsound(get_turf(X), 'sound/effects/bang.ogg', 25, 0) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm index a26cc922c5..3c475743c0 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm @@ -79,7 +79,6 @@ for(var/mob/living/carbon/carbon in oview(round(behavior.kills * 0.5 + 2), xeno)) if(!xeno.can_not_harm(carbon) && carbon.stat != DEAD) ADD_TRAIT(carbon, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Smash")) - carbon.update_canmove() if (ishuman(carbon)) var/mob/living/carbon/human/human = carbon @@ -126,7 +125,6 @@ return ADD_TRAIT(carbon, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Devastate")) - carbon.update_canmove() if (ishuman(carbon)) var/mob/living/carbon/human/human = carbon @@ -136,7 +134,6 @@ ADD_TRAIT(xeno, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Devastate")) xeno.anchored = TRUE - xeno.update_canmove() if (do_after(xeno, activation_delay, INTERRUPT_ALL | BEHAVIOR_IMMOBILE, BUSY_ICON_HOSTILE)) xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] rips open the guts of [carbon]!"), SPAN_XENOHIGHDANGER("You rip open the guts of [carbon]!")) @@ -154,9 +151,6 @@ REMOVE_TRAIT(xeno, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Devastate")) xeno.anchored = FALSE unroot_human(carbon, TRAIT_SOURCE_ABILITY("Devastate")) - xeno.update_canmove() - - unroot_human(carbon) xeno.visible_message(SPAN_XENODANGER("[xeno] rapidly slices into [carbon]!")) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm index a6c8067660..c2862c7762 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm @@ -387,7 +387,6 @@ ADD_TRAIT(xeno, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Eviscerate")) xeno.anchored = TRUE - xeno.update_canmove() if (do_after(xeno, (activation_delay - windup_reduction), INTERRUPT_ALL | BEHAVIOR_IMMOBILE, BUSY_ICON_HOSTILE)) xeno.emote("roar") @@ -432,7 +431,6 @@ REMOVE_TRAIT(xeno, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Eviscerate")) xeno.anchored = FALSE - xeno.update_canmove() return ..() diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/xeno_action.dm b/code/modules/mob/living/carbon/xenomorph/abilities/xeno_action.dm index 5f59f1c006..289e0f1bfa 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/xeno_action.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/xeno_action.dm @@ -82,7 +82,7 @@ if(!owner) return FALSE var/mob/living/carbon/xenomorph/X = owner - if(X && !X.is_mob_incapacitated() && !X.dazed && !X.lying && !X.buckled && X.plasma_stored >= plasma_cost) + if(X && !X.is_mob_incapacitated() && !X.dazed && X.body_position == STANDING_UP && !X.buckled && X.plasma_stored >= plasma_cost) return TRUE /datum/action/xeno_action/give_to(mob/living/living_mob) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm b/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm index 5835fd5165..4cac1dabe6 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm @@ -147,7 +147,7 @@ /mob/living/carbon/xenomorph/proc/can_move_and_apply_move_delay() // Unable to move, try next time. - if(ai_move_delay > world.time || !canmove || is_mob_incapacitated(TRUE) || (lying && !can_crawl) || anchored) + if(ai_move_delay > world.time || !(mobility_flags & MOBILITY_MOVE) || is_mob_incapacitated(TRUE) || (body_position != STANDING_UP && !can_crawl) || anchored) return FALSE ai_move_delay = world.time + move_delay diff --git a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm index 497ebe734e..1f37113ffc 100644 --- a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm +++ b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm @@ -209,7 +209,7 @@ SPAN_DANGER("You tackle down [src]!"), null, 5, CHAT_TYPE_XENO_COMBAT) else playsound(loc, 'sound/weapons/alien_claw_swipe.ogg', 25, 1) - if (knocked_down) + if (HAS_TRAIT(src, TRAIT_FLOORED)) M.visible_message(SPAN_DANGER("[M] tries to tackle [src], but they are already down!"), \ SPAN_DANGER("You try to tackle [src], but they are already down!"), null, 5, CHAT_TYPE_XENO_COMBAT) else @@ -555,8 +555,8 @@ if(M.action_busy) return - if(M.lying) - return + if(M.is_mob_incapacitated() || M.body_position != STANDING_UP) + return XENO_NO_DELAY_ACTION var/delay @@ -574,7 +574,7 @@ if(do_after(M, delay, INTERRUPT_ALL, BUSY_ICON_HOSTILE)) if(M.loc != cur_loc) return XENO_NO_DELAY_ACTION //Make sure we're still there - if(M.lying) + if(M.is_mob_incapacitated() || M.body_position != STANDING_UP) return XENO_NO_DELAY_ACTION if(locked) to_chat(M, SPAN_WARNING("[src] is bolted down tight.")) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm b/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm index e7118164cf..ee882bc14f 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm @@ -84,13 +84,6 @@ . = ..() sight |= SEE_TURFS -/mob/living/carbon/xenomorph/burrower/update_canmove() - . = ..() - if(HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) - density = FALSE - canmove = FALSE - return canmove - /mob/living/carbon/xenomorph/burrower/ex_act(severity) if(HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) return diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm b/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm index c13555cba1..07f161f4c6 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm @@ -117,8 +117,8 @@ for(var/i in hugger_image_index) if(stat == DEAD) hugger_overlays_icon.overlays += icon(icon, "clinger_[i] Knocked Down") - else if(lying) - if((resting || sleeping) && (!knocked_down && !knocked_out && health > 0)) + else if(body_position == LYING_DOWN) + if(!HAS_TRAIT(src, TRAIT_INCAPACITATED) && !HAS_TRAIT(src, TRAIT_FLOORED)) hugger_overlays_icon.overlays += icon(icon, "clinger_[i] Sleeping") else hugger_overlays_icon.overlays +=icon(icon, "clinger_[i] Knocked Down") @@ -162,8 +162,8 @@ i = 1 if(stat != DEAD) - if(lying) - if((resting || sleeping) && (!knocked_down && !knocked_out && health > 0)) + if(body_position == LYING_DOWN) + if(!HAS_TRAIT(src, TRAIT_INCAPACITATED) && !HAS_TRAIT(src, TRAIT_FLOORED)) eggsac_overlays_icon.overlays += icon(icon, "eggsac_[i] Sleeping") else eggsac_overlays_icon.overlays +=icon(icon, "eggsac_[i] Knocked Down") diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm index 7eca90af85..d326a4d061 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm @@ -295,6 +295,6 @@ . += "Shield: [shield_total]" /datum/behavior_delegate/crusher_base/on_update_icons() - if(HAS_TRAIT(bound_xeno, TRAIT_CHARGING) && !bound_xeno.lying) + if(HAS_TRAIT(bound_xeno, TRAIT_CHARGING) && bound_xeno.body_position == STANDING_UP) bound_xeno.icon_state = "[bound_xeno.mutation_icon_state || bound_xeno.mutation_type] Crusher Charging" return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm index 6113832ddd..16ce2ed9d5 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm @@ -69,7 +69,7 @@ if(stat == DEAD) return ..() - if(!lying && !(mutation_type == FACEHUGGER_WATCHER) && !(locate(/obj/effect/alien/weeds) in get_turf(src))) + if(body_position == STANDING_UP && !(mutation_type == FACEHUGGER_WATCHER) && !(locate(/obj/effect/alien/weeds) in get_turf(src))) adjustBruteLoss(1) return ..() @@ -85,8 +85,8 @@ if(stat == DEAD) icon_state = "[mutation_type] [caste.caste_type] Dead" - else if(lying) - if((resting || sleeping) && (!knocked_down && !knocked_out && health > 0)) + else if(body_position == LYING_DOWN) + if(!HAS_TRAIT(src, TRAIT_INCAPACITATED) && !HAS_TRAIT(src, TRAIT_FLOORED)) icon_state = "[mutation_type] [caste.caste_type] Sleeping" else icon_state = "[mutation_type] [caste.caste_type] Knocked Down" @@ -109,8 +109,8 @@ if(!caste) return FALSE - if(lying) //No attacks while laying down - return FALSE + if(body_position == LYING_DOWN) //No attacks while laying down + return FALSE // Yoooo replace this by a mobility_flag for attacks or something if(istype(A, /obj/effect/alien/resin/special/eggmorph)) var/obj/effect/alien/resin/special/eggmorph/morpher = A @@ -129,7 +129,7 @@ if(ishuman(A)) var/mob/living/carbon/human/human = A - if(!human.lying) + if(human.body_position != LYING_DOWN) to_chat(src, SPAN_WARNING("You can't reach \the [human], they need to be lying down.")) return if(!can_hug(human, hivenumber)) @@ -138,7 +138,7 @@ visible_message(SPAN_WARNING("\The [src] starts climbing onto \the [human]'s face..."), SPAN_XENONOTICE("You start climbing onto \the [human]'s face...")) if(!do_after(src, FACEHUGGER_WINDUP_DURATION, INTERRUPT_ALL, BUSY_ICON_HOSTILE, human, INTERRUPT_MOVED, BUSY_ICON_HOSTILE)) return - if(!human.lying) + if(human.body_position != LYING_DOWN) to_chat(src, SPAN_WARNING("You can't reach \the [human], they need to be lying down.")) return if(!can_hug(human, hivenumber)) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Larva.dm b/code/modules/mob/living/carbon/xenomorph/castes/Larva.dm index 34a2574f04..4efebf0a9c 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Larva.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Larva.dm @@ -129,8 +129,8 @@ else if(handcuffed || legcuffed) icon_state = "[state_override || state]Larva Cuff" - else if(lying) - if((resting || sleeping) && (!knocked_down && !knocked_out && health > 0)) + else if(body_position == LYING_DOWN) + if(!HAS_TRAIT(src, TRAIT_INCAPACITATED) && !HAS_TRAIT(src, TRAIT_FLOORED)) icon_state = "[state_override || state]Larva Sleeping" else icon_state = "[state_override || state]Larva Stunned" @@ -154,7 +154,7 @@ if(!caste) return FALSE - if(lying) //No attacks while laying down + if(body_position) //No attacks while laying down return FALSE A.attack_larva(src) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm b/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm index d18b5eb671..4a399a3e40 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm @@ -162,7 +162,7 @@ if (!isxeno_human(target_carbon)) return - if (target_carbon.knocked_down) + if (HAS_TRAIT(target_carbon, TRAIT_FLOORED)) new /datum/effects/xeno_slow(target_carbon, bound_xeno, null, null, get_xeno_stun_duration(target_carbon, slash_slow_duration)) return diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index c4eba46c64..40ca7d674f 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -789,6 +789,9 @@ if(ovipositor) return //sanity check ovipositor = TRUE + ADD_TRAIT(src, TRAIT_IMMOBILIZED, OVIPOSITOR_TRAIT) + set_body_position(STANDING_UP) + set_resting(FALSE) set_resin_build_order(GLOB.resin_build_order_ovipositor) // This needs to occur before we update the abilities so we can update the choose resin icon for(var/datum/action/xeno_action/action in actions) @@ -841,7 +844,6 @@ egg_planting_range = 3 anchored = TRUE resting = FALSE - update_canmove() update_icons() bubble_icon_x_offset = 32 bubble_icon_y_offset = 32 @@ -869,6 +871,7 @@ if(!ovipositor) return ovipositor = FALSE + REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, OVIPOSITOR_TRAIT) update_icons() bubble_icon_x_offset = initial(bubble_icon_x_offset) bubble_icon_y_offset = initial(bubble_icon_y_offset) @@ -897,7 +900,6 @@ ovi_ability.apply_cooldown() break anchored = FALSE - update_canmove() for(var/mob/living/carbon/xenomorph/L in hive.xeno_leader_list) L.handle_xeno_leader_pheromones() @@ -907,14 +909,6 @@ SEND_SIGNAL(src, COMSIG_QUEEN_DISMOUNT_OVIPOSITOR, instant_dismount) -/mob/living/carbon/xenomorph/queen/update_canmove() - . = ..() - if(ovipositor) - lying = FALSE - density = TRUE - canmove = FALSE - return canmove - /mob/living/carbon/xenomorph/queen/handle_special_state() if(ovipositor) return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm index 51ceee1533..b6ceb20434 100644 --- a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm @@ -36,7 +36,7 @@ /mob/living/carbon/xenomorph/ex_act(severity, direction, datum/cause_data/cause_data, pierce=0) - if(lying) + if(body_position == LYING_DOWN) severity *= EXPLOSION_PRONE_MULTIPLIER if(severity >= 30) diff --git a/code/modules/mob/living/carbon/xenomorph/life.dm b/code/modules/mob/living/carbon/xenomorph/life.dm index 6ea3b699dc..271ac7bbe3 100644 --- a/code/modules/mob/living/carbon/xenomorph/life.dm +++ b/code/modules/mob/living/carbon/xenomorph/life.dm @@ -10,7 +10,8 @@ ..() - if(is_zoomed && (stat || lying)) + // replace this by signals or trait signals + if(is_zoomed && (stat || body_position == LYING_DOWN)) zoom_out() if(stat != DEAD) //Stop if dead. Performance boost @@ -23,7 +24,6 @@ handle_regular_status_updates() handle_stomach_contents() handle_overwatch() // For new Xeno hivewide overwatch - Fourk, 6/24/19 - update_canmove() update_icons() handle_luminosity() handle_blood() @@ -184,9 +184,8 @@ ear_damage = 0 SetEyeBlind(0) - if(knocked_out) //If they're down, make sure they are actually down. + if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) //If they're down, make sure they are actually down. blinded = TRUE - set_stat(UNCONSCIOUS) if(regular_update && halloss > 0) apply_damage(-3, HALLOSS) else if(sleeping) @@ -339,7 +338,7 @@ Make sure their actual health updates immediately.*/ if(recovery_aura) plasma_stored += round(plasma_gain * plasma_max / 100 * recovery_aura/4) //Divided by four because it gets massive fast. 1 is equivalent to weed regen! Only the strongest pheromones should bypass weeds if(health < maxHealth && !hardcore && is_hive_living(hive) && last_hit_time + caste.heal_delay_time <= world.time) - if(lying || resting) + if(body_position == LYING_DOWN || resting) if(health < 0) //Unconscious heal_wounds(caste.heal_knocked_out * regeneration_multiplier, recoveryActual) //Healing is much slower. Warding pheromones make up for the rest if you're curious else @@ -533,8 +532,6 @@ Make sure their actual health updates immediately.*/ if(layer != initial(layer)) //Unhide layer = initial(layer) recalculate_move_delay = TRUE - if(!lying) - update_canmove() SEND_SIGNAL(src, COMSIG_XENO_HANDLE_CRIT) @@ -582,16 +579,14 @@ Make sure their actual health updates immediately.*/ return superslowed /mob/living/carbon/xenomorph/handle_knocked_down() - if(knocked_down) + if(HAS_TRAIT(src, TRAIT_FLOORED)) adjust_effect(life_knockdown_reduction, WEAKEN, EFFECT_FLAG_LIFE) knocked_down_callback_check() - return knocked_down /mob/living/carbon/xenomorph/handle_knocked_out() - if(knocked_out) + if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) adjust_effect(life_knockout_reduction, PARALYZE, EFFECT_FLAG_LIFE) knocked_out_callback_check() - return knocked_out //Returns TRUE if xeno is on weeds //Returns TRUE if xeno is off weeds AND doesn't need weeds for healing AND is not on Almayer UNLESS Queen is also on Almayer (aka - no solo Lurker Almayer hero) diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm index fc7be12e4e..9e8bb6a3ea 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm @@ -114,7 +114,7 @@ return /datum/behavior_delegate/crusher_charger/on_update_icons() - if(HAS_TRAIT(bound_xeno, TRAIT_CHARGING) && !bound_xeno.lying) + if(HAS_TRAIT(bound_xeno, TRAIT_CHARGING) && bound_xeno.body_position == STANDING_UP) bound_xeno.icon_state = "[bound_xeno.mutation_icon_state || bound_xeno.mutation_type] Crusher Charging" return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/drone/gardener.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/drone/gardener.dm index 303e1c9469..c11f0e11f3 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/drone/gardener.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/drone/gardener.dm @@ -379,8 +379,8 @@ if(bound_xeno.stat == DEAD) fruit_sac_overlay_icon.icon_state = "Gardener Drone Dead" - else if(bound_xeno.lying) - if((bound_xeno.resting || bound_xeno.sleeping) && (!bound_xeno.knocked_down && !bound_xeno.knocked_out && bound_xeno.health > 0)) + else if(bound_xeno.body_position == LYING_DOWN) + if(!HAS_TRAIT(bound_xeno, TRAIT_INCAPACITATED) && !HAS_TRAIT(bound_xeno, TRAIT_FLOORED)) fruit_sac_overlay_icon.icon_state = "Gardener Drone Sleeping" else fruit_sac_overlay_icon.icon_state = "Gardener Drone Knocked Down" diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/drone/healer.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/drone/healer.dm index 5caab38529..2e562ceac6 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/drone/healer.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/drone/healer.dm @@ -160,8 +160,8 @@ if(bound_xeno.stat == DEAD) salve_applied_icon.icon_state = "Healer Drone Dead" - else if(bound_xeno.lying) - if((bound_xeno.resting || bound_xeno.sleeping) && (!bound_xeno.knocked_down && !bound_xeno.knocked_out && bound_xeno.health > 0)) + else if(bound_xeno.body_position == LYING_DOWN) + if(!HAS_TRAIT(bound_xeno, TRAIT_INCAPACITATED) && !HAS_TRAIT(bound_xeno, TRAIT_FLOORED)) salve_applied_icon.icon_state = "Healer Drone Sleeping" else salve_applied_icon.icon_state = "Healer Drone Knocked Down" diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/praetorian/oppressor.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/praetorian/oppressor.dm index ecb0e1eff5..4beaedf8d6 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/praetorian/oppressor.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/praetorian/oppressor.dm @@ -52,14 +52,12 @@ var/tearing_damage = 15 /datum/behavior_delegate/oppressor_praetorian/melee_attack_additional_effects_target(mob/living/carbon/target_carbon) - if(target_carbon.stat == DEAD) return - if(!(target_carbon.knocked_down || HAS_TRAIT(target_carbon, TRAIT_IMMOBILIZED) || target_carbon.slowed)) - return + // impaired in some capacity + if(!(target_carbon.mobility_flags & MOBILITY_STAND) || !(target_carbon.mobility_flags & MOBILITY_MOVE) || target_carbon.slowed) + target_carbon.apply_armoured_damage(get_xeno_damage_slash(target_carbon, tearing_damage), ARMOR_MELEE, BRUTE, bound_xeno.zone_selected ? bound_xeno.zone_selected : "chest") + target_carbon.visible_message(SPAN_DANGER("[bound_xeno] tears into [target_carbon]!")) + playsound(bound_xeno, 'sound/weapons/alien_tail_attack.ogg', 25, TRUE) - target_carbon.apply_armoured_damage(get_xeno_damage_slash(target_carbon, tearing_damage), ARMOR_MELEE, BRUTE, bound_xeno.zone_selected ? bound_xeno.zone_selected : "chest") - target_carbon.visible_message(SPAN_DANGER("[bound_xeno] tears into [target_carbon]!")) - playsound(bound_xeno, 'sound/weapons/alien_tail_attack.ogg', 25, TRUE) - return diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm index 630edf26d3..490e5ca36c 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/runner/acid.dm @@ -87,7 +87,7 @@ if(embryo?.stage >= 4) //very late stage hugged in case the runner unnests them return - if(target_mob.lying) + if(target_mob.body_position == LYING_DOWN) modify_acid(acid_slash_regen_lying) return modify_acid(acid_slash_regen_standing) diff --git a/code/modules/mob/living/carbon/xenomorph/update_icons.dm b/code/modules/mob/living/carbon/xenomorph/update_icons.dm index 2eb86ac047..880f23f2d8 100644 --- a/code/modules/mob/living/carbon/xenomorph/update_icons.dm +++ b/code/modules/mob/living/carbon/xenomorph/update_icons.dm @@ -69,8 +69,8 @@ icon_state = "[mutation_caste_state] Dead" if(!(icon_state in icon_states(icon_xeno))) icon_state = "Normal [caste.caste_type] Dead" - else if(lying) - if((resting || sleeping) && (!knocked_down && !knocked_out && health > 0)) + else if(body_position == LYING_DOWN) + if(!HAS_TRAIT(src, TRAIT_INCAPACITATED) && !HAS_TRAIT(src, TRAIT_FLOORED)) icon_state = "[mutation_caste_state] Sleeping" if(!(icon_state in icon_states(icon_xeno))) icon_state = "Normal [caste.caste_type] Sleeping" @@ -93,6 +93,28 @@ update_inv_resource() update_icons() +/* CRUTCH ZONE - Update icons when relevant status happen - Ideally do this properly and for everything, then kill update_icons() someday */ +// set_body_position is needed on addition of floored start/stop because we can be switching between resting and knockeddown +/mob/living/carbon/xenomorph/set_body_position(new_value) + . = ..() + if(. != new_value) + update_icons() // Snowflake handler for xeno resting icons + +/mob/living/carbon/xenomorph/on_floored_start() + . = ..() + update_icons() +/mob/living/carbon/xenomorph/on_floored_end() + . = ..() + update_icons() +/mob/living/carbon/xenomorph/on_incapacitated_trait_gain() + . = ..() + update_icons() +/mob/living/carbon/xenomorph/on_incapacitated_trait_loss() + . = ..() + update_icons() + +/* ^^^^^^^^^^^^^^ End Icon updates */ + /mob/living/carbon/xenomorph/update_inv_pockets() var/datum/custom_hud/alien/ui_datum = GLOB.custom_huds_list[HUD_ALIEN] if(l_store) @@ -142,8 +164,8 @@ var/state_modifier = "" if(stat == DEAD) state_modifier = " Dead" - else if(lying) - if((resting || sleeping) && (!knocked_down && !knocked_out && health > 0)) + else if(body_position == LYING_DOWN) + if(!HAS_TRAIT(src, TRAIT_INCAPACITATED) && !HAS_TRAIT(src, TRAIT_FLOORED)) state_modifier = " Sleeping" else state_modifier = " Knocked Down" @@ -237,7 +259,7 @@ if(on_fire && fire_reagent) var/image/I if(mob_size >= MOB_SIZE_BIG) - if((!initial(pixel_y) || lying) && !resting && !sleeping) + if((!initial(pixel_y) || body_position != LYING_DOWN)) // what's that pixel_y doing here??? I = image("icon"='icons/mob/xenos/overlay_effects64x64.dmi', "icon_state"="alien_fire", "layer"=-X_FIRE_LAYER) else I = image("icon"='icons/mob/xenos/overlay_effects64x64.dmi', "icon_state"="alien_fire_lying", "layer"=-X_FIRE_LAYER) @@ -278,8 +300,8 @@ if(health > HEALTH_THRESHOLD_DEAD) if(health_threshold > 3) wound_icon_holder.icon_state = "none" - else if(lying) - if((resting || sleeping) && (!knocked_down && !knocked_out && health > 0)) + else if(body_position == LYING_DOWN) + if(!HAS_TRAIT(src, TRAIT_INCAPACITATED) && !HAS_TRAIT(src, TRAIT_FLOORED)) wound_icon_holder.icon_state = "[caste.caste_type]_rest_[health_threshold]" else wound_icon_holder.icon_state = "[caste.caste_type]_downed_[health_threshold]" diff --git a/code/modules/mob/living/init_signals.dm b/code/modules/mob/living/init_signals.dm index d7edd02893..696eaa3f01 100644 --- a/code/modules/mob/living/init_signals.dm +++ b/code/modules/mob/living/init_signals.dm @@ -1,21 +1,91 @@ /// Called on [/mob/living/Initialize(mapload)], for the mob to register to relevant signals. /mob/living/proc/register_init_signals() + RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_KNOCKEDOUT), PROC_REF(on_knockedout_trait_gain)) + RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_KNOCKEDOUT), PROC_REF(on_knockedout_trait_loss)) RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_IMMOBILIZED), PROC_REF(on_immobilized_trait_gain)) RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_IMMOBILIZED), PROC_REF(on_immobilized_trait_loss)) + + RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_FLOORED), PROC_REF(on_floored_trait_gain)) + RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_FLOORED), PROC_REF(on_floored_trait_loss)) + + RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_FORCED_STANDING), PROC_REF(on_forced_standing_trait_gain)) + RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_FORCED_STANDING), PROC_REF(on_forced_standing_trait_loss)) + + RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_INCAPACITATED), PROC_REF(on_incapacitated_trait_gain)) + RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_INCAPACITATED), PROC_REF(on_incapacitated_trait_loss)) + RegisterSignal(src, list(SIGNAL_ADDTRAIT(TRAIT_UNDENSE), SIGNAL_REMOVETRAIT(TRAIT_UNDENSE)), PROC_REF(undense_changed)) +/// Called when [TRAIT_KNOCKEDOUT] is added to the mob. +/mob/living/proc/on_knockedout_trait_gain(datum/source) + SIGNAL_HANDLER + if(stat < UNCONSCIOUS) + set_stat(UNCONSCIOUS) + +/// Called when [TRAIT_KNOCKEDOUT] is removed from the mob. +/mob/living/proc/on_knockedout_trait_loss(datum/source) + SIGNAL_HANDLER + if(stat <= UNCONSCIOUS) + update_stat() + /// Called when [TRAIT_IMMOBILIZED] is added to the mob. /mob/living/proc/on_immobilized_trait_gain(datum/source) SIGNAL_HANDLER -// mobility_flags &= ~MOBILITY_MOVE - update_canmove() + mobility_flags &= ~MOBILITY_MOVE /// Called when [TRAIT_IMMOBILIZED] is removed from the mob. /mob/living/proc/on_immobilized_trait_loss(datum/source) SIGNAL_HANDLER -// mobility_flags |= MOBILITY_MOVE - update_canmove() + mobility_flags |= MOBILITY_MOVE + +/// Called when [TRAIT_FLOORED] is added to the mob. +/mob/living/proc/on_floored_trait_gain(datum/source) + SIGNAL_HANDLER + if(buckled && buckled.buckle_lying != NO_BUCKLE_LYING) + return // Handled by the buckle. + if(HAS_TRAIT(src, TRAIT_FORCED_STANDING)) + return // Don't go horizontal if mob has forced standing trait. + mobility_flags &= ~MOBILITY_STAND + on_floored_start() + + +/// Called when [TRAIT_FLOORED] is removed from the mob. +/mob/living/proc/on_floored_trait_loss(datum/source) + SIGNAL_HANDLER + mobility_flags |= MOBILITY_STAND + on_floored_end() + +/// Called when [TRAIT_FORCED_STANDING] is added to the mob. +/mob/living/proc/on_forced_standing_trait_gain(datum/source) + SIGNAL_HANDLER + + set_body_position(STANDING_UP) + set_lying_angle(0) + +/// Called when [TRAIT_FORCED_STANDING] is removed from the mob. +/mob/living/proc/on_forced_standing_trait_loss(datum/source) + SIGNAL_HANDLER + + if(HAS_TRAIT(src, TRAIT_FLOORED)) + on_fall() + set_lying_down() + else if(resting) + set_lying_down() + +/// Called when [TRAIT_INCAPACITATED] is added to the mob. +/mob/living/proc/on_incapacitated_trait_gain(datum/source) + SIGNAL_HANDLER + //add_traits(list(TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED), TRAIT_INCAPACITATED) + //update_appearance() + return + +/// Called when [TRAIT_INCAPACITATED] is removed from the mob. +/mob/living/proc/on_incapacitated_trait_loss(datum/source) + SIGNAL_HANDLER + //remove_traits(list(TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED), TRAIT_INCAPACITATED) + //update_appearance() + return /// Called when [TRAIT_UNDENSE] is gained or lost /mob/living/proc/undense_changed(datum/source) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 9f01b8037e..6205c4f919 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -34,11 +34,6 @@ QDEL_NULL(stamina) QDEL_NULL(hallucinations) -//This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually -//affects them once clothing is factored in. ~Errorage -/mob/living/proc/calculate_affecting_pressure(pressure) - return - /mob/living/proc/initialize_pain() pain = new /datum/pain(src) @@ -151,6 +146,8 @@ return /mob/living/Move(NewLoc, direct) + if(lying_angle != 0) + lying_angle_on_movement(direct) if (buckled && buckled.loc != NewLoc) //not updating position if (!buckled.anchored) return buckled.Move(NewLoc, direct) @@ -454,16 +451,170 @@ for(var/h in src.hud_possible) src.clone.hud_list[h].icon_state = src.hud_list[h].icon_state +// Note that this might CLASH with handle_regular_status_updates until it is ELIMINATED +// and everything is switched from updates to signaling - due to not accounting for all cases. +// If this proc causes issues you can probably disable it until then. +/mob/living/carbon/update_stat() + if(stat != DEAD) + if(health <= HEALTH_THRESHOLD_DEAD) + death() + return + else if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) + set_stat(UNCONSCIOUS) + else + set_stat(CONSCIOUS) + /mob/living/set_stat(new_stat) . = ..() if(isnull(.)) return - switch(.) + + switch(.) //Previous stat. + if(CONSCIOUS) + if(stat >= UNCONSCIOUS) + ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_KNOCKEDOUT) + add_traits(list(/*TRAIT_HANDS_BLOCKED, */ TRAIT_INCAPACITATED, TRAIT_FLOORED), STAT_TRAIT) + if(UNCONSCIOUS) + if(stat >= UNCONSCIOUS) + ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_KNOCKEDOUT) //adding trait sources should come before removing to avoid unnecessary updates if(DEAD) SEND_SIGNAL(src, COMSIG_MOB_STAT_SET_ALIVE) - switch(stat) +// remove_from_dead_mob_list() +// add_to_alive_mob_list() + + switch(stat) //Current stat. + if(CONSCIOUS) + if(. >= UNCONSCIOUS) + REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_KNOCKEDOUT) + remove_traits(list(/*TRAIT_HANDS_BLOCKED, */ TRAIT_INCAPACITATED, TRAIT_FLOORED, /*TRAIT_CRITICAL_CONDITION*/), STAT_TRAIT) + if(UNCONSCIOUS) + if(. >= UNCONSCIOUS) + REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_KNOCKEDOUT) if(DEAD) SEND_SIGNAL(src, COMSIG_MOB_STAT_SET_DEAD) +// REMOVE_TRAIT(src, TRAIT_CRITICAL_CONDITION, STAT_TRAIT) +// remove_from_alive_mob_list() +// add_to_dead_mob_list() + +/** + * Changes the inclination angle of a mob, used by humans and others to differentiate between standing up and prone positions. + * + * In BYOND-angles 0 is NORTH, 90 is EAST, 180 is SOUTH and 270 is WEST. + * This usually means that 0 is standing up, 90 and 270 are horizontal positions to right and left respectively, and 180 is upside-down. + * Mobs that do now follow these conventions due to unusual sprites should require a special handling or redefinition of this proc, due to the density and layer changes. + * The return of this proc is the previous value of the modified lying_angle if a change was successful (might include zero), or null if no change was made. + */ +/mob/living/proc/set_lying_angle(new_lying, on_movement = FALSE) + if(new_lying == lying_angle) + return + . = lying_angle + lying_angle = new_lying + if(lying_angle != lying_prev) + update_transform(instant_update = on_movement) // Don't use transition for eg. crawling movement, because we already have the movement glide + lying_prev = lying_angle + +///Called by mob Move() when the lying_angle is different than zero, to better visually simulate crawling. +/mob/living/proc/lying_angle_on_movement(direct) + if(direct & EAST) + set_lying_angle(90, on_movement = TRUE) + else if(direct & WEST) + set_lying_angle(270, on_movement = TRUE) + +///Reports the event of the change in value of the buckled variable. +/mob/living/proc/set_buckled(new_buckled) + if(new_buckled == buckled) + return + SEND_SIGNAL(src, COMSIG_LIVING_SET_BUCKLED, new_buckled) + . = buckled + buckled = new_buckled + if(buckled) +// if(!HAS_TRAIT(buckled, TRAIT_NO_IMMOBILIZE)) +// ADD_TRAIT(src, TRAIT_IMMOBILIZED, BUCKLED_TRAIT) + ADD_TRAIT(src, TRAIT_IMMOBILIZED, BUCKLED_TRAIT) + switch(buckled.buckle_lying) + if(NO_BUCKLE_LYING) // The buckle doesn't force a lying angle. + REMOVE_TRAIT(src, TRAIT_FLOORED, BUCKLED_TRAIT) + if(0) // Forcing to a standing position. + REMOVE_TRAIT(src, TRAIT_FLOORED, BUCKLED_TRAIT) + set_body_position(STANDING_UP) + set_lying_angle(0) + else // Forcing to a lying position. + ADD_TRAIT(src, TRAIT_FLOORED, BUCKLED_TRAIT) + set_body_position(LYING_DOWN) + set_lying_angle(buckled.buckle_lying) + else + remove_traits(list(TRAIT_IMMOBILIZED, TRAIT_FLOORED), BUCKLED_TRAIT) + if(.) // We unbuckled from something. + //var/atom/movable/old_buckled = . + var/obj/old_buckled = . // /tg/ code has buckling defined on /atom/movable - consider refactoring this sometime + if(old_buckled.buckle_lying == 0 && (resting || HAS_TRAIT(src, TRAIT_FLOORED))) // The buckle forced us to stay up (like a chair) + set_lying_down() // We want to rest or are otherwise floored, so let's drop on the ground. + +/mob/living/proc/get_up(instant = FALSE) // arg ignored +// set waitfor = FALSE +// if(!instant && !do_after(src, 1 SECONDS, src, timed_action_flags = (IGNORE_USER_LOC_CHANGE|IGNORE_TARGET_LOC_CHANGE|IGNORE_HELD_ITEM), extra_checks = CALLBACK(src, TYPE_PROC_REF(/mob/living, rest_checks_callback)), interaction_key = DOAFTER_SOURCE_GETTING_UP)) +// return + if(resting || body_position == STANDING_UP || HAS_TRAIT(src, TRAIT_FLOORED)) + return + set_body_position(STANDING_UP) + set_lying_angle(0) + +/// Change the [body_position] to [LYING_DOWN] and update associated behavior. +/mob/living/proc/set_lying_down(new_lying_angle) + set_body_position(LYING_DOWN) + +/// Proc to append behavior related to lying down. +/mob/living/proc/on_lying_down(new_lying_angle) +// if(layer == initial(layer)) //to avoid things like hiding larvas. +// layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs + add_traits(list(/*TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED,*/ TRAIT_UNDENSE), LYING_DOWN_TRAIT) + if(HAS_TRAIT(src, TRAIT_FLOORED) && !(dir & (NORTH|SOUTH))) + setDir(pick(NORTH, SOUTH)) // We are and look helpless. +// if(rotate_on_lying) +// body_position_pixel_y_offset = PIXEL_Y_OFFSET_LYING + + // CM legacy canmove procs, replace this with signal procs probably + drop_l_hand() + drop_r_hand() + add_temp_pass_flags(PASS_MOB_THRU) + //so mob lying always appear behind standing mobs, but dead ones appear behind living ones + if(pulledby && pulledby.grab_level == GRAB_CARRY) + layer = ABOVE_MOB_LAYER + else if (stat == DEAD) + layer = LYING_DEAD_MOB_LAYER // Dead mobs should layer under living ones + else if(layer == initial(layer)) //to avoid things like hiding larvas. + layer = LYING_LIVING_MOB_LAYER + +/// Called when mob changes from a standing position into a prone while lacking the ability to stand up at the moment. +/mob/living/proc/on_fall() + return + +/// Changes the value of the [living/body_position] variable. Call this before set_lying_angle() +/mob/living/proc/set_body_position(new_value) + if(body_position == new_value) + return + if((new_value == LYING_DOWN) && !(mobility_flags & MOBILITY_LIEDOWN)) + return + . = body_position + body_position = new_value + SEND_SIGNAL(src, COMSIG_LIVING_SET_BODY_POSITION, new_value, .) + if(new_value == LYING_DOWN) // From standing to lying down. + on_lying_down() + else // From lying down to standing up. + on_standing_up() + +/// Proc to append behavior related to lying down. +/mob/living/proc/on_standing_up() + //if(layer == LYING_MOB_LAYER) + // layer = initial(layer) + remove_traits(list(/*TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED,*/ TRAIT_UNDENSE), LYING_DOWN_TRAIT) + // Make sure it doesn't go out of the southern bounds of the tile when standing. + //body_position_pixel_y_offset = get_pixel_y_offset_standing(current_size) + // CM stuff below + remove_temp_pass_flags(PASS_MOB_THRU) + if(layer == LYING_DEAD_MOB_LAYER || layer == LYING_LIVING_MOB_LAYER) + layer = initial(layer) + /// Uses presence of [TRAIT_UNDENSE] to figure out what is the correct density state for the mob. Triggered by trait signal. /mob/living/proc/update_density() @@ -471,3 +622,40 @@ set_density(FALSE) else set_density(TRUE) + +/// Proc to append behavior to the condition of being floored. Called when the condition starts. +/mob/living/proc/on_floored_start() + if(body_position == STANDING_UP) //force them on the ground + set_body_position(LYING_DOWN) + set_lying_angle(pick(90, 270), on_movement = TRUE) +// on_fall() + + +/// Proc to append behavior to the condition of being floored. Called when the condition ends. +/mob/living/proc/on_floored_end() + if(!resting) + get_up() + + +/mob/living/update_transform(instant_update = FALSE) + var/visual_angle = lying_angle + if(!rotate_on_lying) + return + var/matrix/base = matrix() + if(pulledby && pulledby.grab_level >= GRAB_CARRY) + visual_angle = 90 // CM code - for fireman carry + if(instant_update) + apply_transform(base.Turn(visual_angle)) + else + apply_transform(base.Turn(visual_angle), UPDATE_TRANSFORM_ANIMATION_TIME) + + +// legacy procs +/mob/living/put_in_l_hand(obj/item/W) + if(body_position == LYING_DOWN) + return + return ..() +/mob/living/put_in_r_hand(obj/item/W) + if(body_position == LYING_DOWN) + return + return ..() diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 97d71fcb4e..ce4634a102 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -14,6 +14,18 @@ var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot. var/halloss = 0 //Hallucination damage. 'Fake' damage obtained through hallucinating or the holodeck. Sleeping should cause it to wear off. + // please don't use these + VAR_PROTECTED/knocked_out = 0 + VAR_PROTECTED/knocked_down = 0 + VAR_PROTECTED/stunned = 0 + var/dazed = 0 + var/slowed = 0 // X_SLOW_AMOUNT + var/superslowed = 0 // X_SUPERSLOW_AMOUNT + var/sleeping = 0 + + /// Cooldown for manually toggling resting to avoid spamming + COOLDOWN_DECLARE(rest_cooldown) + var/hallucination = 0 //Directly affects how long a mob will hallucinate for var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm @@ -99,7 +111,6 @@ var/current_weather_effect_type - var/slash_verb = "attack" var/slashes_verb = "attacks" @@ -111,10 +122,15 @@ /// This is what the value is changed to when the mob dies. Actual BMV definition in atom/movable. var/dead_black_market_value = 0 - var/dazed = 0 - var/knocked_out = 0 - var/stunned = 0 - var/knocked_down = 0 - var/slowed = 0 // X_SLOW_AMOUNT - var/superslowed = 0 // X_SUPERSLOW_AMOUNT - var/sleeping = 0 + /// Variable to track the body position of a mob, regardgless of the actual angle of rotation (usually matching it, but not necessarily). + var/body_position = STANDING_UP + /// Number of degrees of rotation of a mob. 0 means no rotation, up-side facing NORTH. 90 means up-side rotated to face EAST, and so on. + VAR_PROTECTED/lying_angle = 0 + /// Value of lying lying_angle before last change. TODO: Remove the need for this. + var/lying_prev = 0 + /// Does the mob rotate when lying + var/rotate_on_lying = FALSE + + /// Flags that determine the potential of a mob to perform certain actions. Do not change this directly. + var/mobility_flags = MOBILITY_FLAGS_DEFAULT + diff --git a/code/modules/mob/living/living_health_procs.dm b/code/modules/mob/living/living_health_procs.dm index 2e4e8354c4..7801549528 100644 --- a/code/modules/mob/living/living_health_procs.dm +++ b/code/modules/mob/living/living_health_procs.dm @@ -89,6 +89,7 @@ VAR_PROTECTED/stun_timer = TIMER_ID_NULL /mob/living/proc/stun_callback() + REMOVE_TRAIT(src, TRAIT_INCAPACITATED, STUNNED_TRAIT) stunned = 0 handle_regular_status_updates(FALSE) if(stun_timer != TIMER_ID_NULL) @@ -96,9 +97,14 @@ stun_timer = TIMER_ID_NULL /mob/living/proc/stun_callback_check() + if(stunned) + ADD_TRAIT(src, TRAIT_INCAPACITATED, STUNNED_TRAIT) if(stunned && stunned < recovery_constant) stun_timer = addtimer(CALLBACK(src, PROC_REF(stun_callback)), (stunned/recovery_constant) * 2 SECONDS, TIMER_OVERRIDE|TIMER_UNIQUE|TIMER_STOPPABLE) return + if(!stunned) // Force reset since the timer wasn't called + stun_callback() + return if(stun_timer != TIMER_ID_NULL) deltimer(stun_timer) @@ -175,15 +181,23 @@ VAR_PRIVATE/knocked_down_timer /mob/living/proc/knocked_down_callback() + remove_traits(list(TRAIT_FLOORED, TRAIT_INCAPACITATED), KNOCKEDDOWN_TRAIT) knocked_down = 0 handle_regular_status_updates(FALSE) knocked_down_timer = null /mob/living/proc/knocked_down_callback_check() + if(knocked_down) + add_traits(list(TRAIT_FLOORED, TRAIT_INCAPACITATED), KNOCKEDDOWN_TRAIT) + if(knocked_down && knocked_down < recovery_constant) knocked_down_timer = addtimer(CALLBACK(src, PROC_REF(knocked_down_callback)), (knocked_down/recovery_constant) * 2 SECONDS, TIMER_OVERRIDE|TIMER_UNIQUE|TIMER_STOPPABLE) // times whatever amount we have per tick return + if(!knocked_down) // Force reset since the timer wasn't called + knocked_down_callback() + return + if(knocked_down_timer) deltimer(knocked_down_timer) knocked_down_timer = null @@ -195,11 +209,14 @@ return /mob/living/proc/knocked_out_callback() + REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, KNOCKEDOUT_TRAIT) knocked_out = 0 handle_regular_status_updates(FALSE) knocked_out_timer = null /mob/living/proc/knocked_out_callback_check() + if(knocked_out) + ADD_TRAIT(src, TRAIT_KNOCKEDOUT, KNOCKEDOUT_TRAIT) if(knocked_out && knocked_out < recovery_constant) knocked_out_timer = addtimer(CALLBACK(src, PROC_REF(knocked_out_callback)), (knocked_out/recovery_constant) * 2 SECONDS, TIMER_OVERRIDE|TIMER_UNIQUE|TIMER_STOPPABLE) // times whatever amount we have per tick return @@ -222,7 +239,6 @@ knocked_down_callback_check() return - /mob/living/proc/SetKnockDown(amount) if(status_flags & CANKNOCKDOWN) knocked_down = max(amount,0) @@ -365,12 +381,6 @@ to_chat(src, SPAN_WARNING("You start hearing things again!")) SEND_SIGNAL(src, COMSIG_MOB_REGAINED_HEARING) - - - - - - // heal ONE limb, organ gets randomly selected from damaged ones. /mob/living/proc/heal_limb_damage(brute, burn) apply_damage(-brute, BRUTE) @@ -494,14 +504,13 @@ return if(stat >= UNCONSCIOUS) return + face_dir(direction) return ..() -/mob/living/is_laid_down() - if(knocked_down || knocked_out) - return TRUE - return ..() - -/mob/living/is_mob_incapacitated(ignore_restrained) - if(stunned || knocked_down || knocked_out) - return TRUE - return ..() +// Transition handlers. do NOT use this. I mean seriously don't. It's broken. Players love their broken behaviors. +/mob/living/proc/GetStunValueNotADurationDoNotUse() + return stunned +/mob/living/proc/GetKnockDownValueNotADurationDoNotUse() + return knocked_down +/mob/living/proc/GetKnockOutValueNotADurationDoNotUse() + return knocked_out diff --git a/code/modules/mob/living/living_verbs.dm b/code/modules/mob/living/living_verbs.dm index 77b996ff6b..45f5a25fce 100644 --- a/code/modules/mob/living/living_verbs.dm +++ b/code/modules/mob/living/living_verbs.dm @@ -163,7 +163,7 @@ return //breaking out of handcuffs & putting out fires - if(canmove && !knocked_down) + if(!is_mob_incapacitated(TRUE)) if(on_fire) resist_fire() @@ -179,7 +179,7 @@ if(!iscarbon(src)) return var/mob/living/carbon/C = src - if((C.handcuffed || C.legcuffed) && C.canmove && (C.last_special <= world.time)) + if((C.handcuffed || C.legcuffed) && (C.mobility_flags & MOBILITY_MOVE) && (C.last_special <= world.time)) resist_restraints() /mob/living/proc/resist_buckle() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index cf734a09ae..818377c9c1 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -101,8 +101,8 @@ var/list/ai_verbs_default = list( // aiPDA = new/obj/item/device/pda/ai(src) SetName(pickedName) anchored = TRUE - canmove = 0 - density = TRUE + ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_INHERENT) + set_density(TRUE) forceMove(loc) holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1")) diff --git a/code/modules/mob/living/silicon/decoy/decoy.dm b/code/modules/mob/living/silicon/decoy/decoy.dm index b625b19b17..5b41078eea 100644 --- a/code/modules/mob/living/silicon/decoy/decoy.dm +++ b/code/modules/mob/living/silicon/decoy/decoy.dm @@ -4,7 +4,6 @@ icon = 'icons/obj/structures/machinery/ai.dmi' icon_state = "hydra" anchored = TRUE - canmove = 0 density = TRUE //Do not want to see past it. bound_height = 64 //putting this in so we can't walk through our machine. bound_width = 96 @@ -23,6 +22,7 @@ ai_headset = new(src) ai_mob_list += src real_name = MAIN_AI_SYSTEM + ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_INHERENT) /mob/living/silicon/decoy/ship_ai/Destroy() QDEL_NULL(ai_headset) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index b0230bba5d..b4a6e59e52 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -18,7 +18,6 @@ use_power() process_killswitch() process_locks() - update_canmove() /mob/living/silicon/robot/proc/clamp_values() @@ -79,14 +78,14 @@ death() if (stat != DEAD) //Alive. - if (knocked_out || stunned || knocked_down || !has_power) //Stunned etc. + if (HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || HAS_TRAIT(src, TRAIT_INCAPACITATED) || !has_power) //Stunned etc. set_stat(UNCONSCIOUS) if(regular_update) - if (src.stunned > 0) + if (HAS_TRAIT(src, TRAIT_INCAPACITATED)) adjust_effect(-1, STUN) - if (src.knocked_down > 0) + if (HAS_TRAIT(src, TRAIT_FLOORED)) adjust_effect(-1, WEAKEN) - if (src.knocked_out > 0) + if (HAS_TRAIT(src, TRAIT_KNOCKEDOUT)) adjust_effect(-1, PARALYZE) src.blinded = TRUE else @@ -113,8 +112,6 @@ src.ear_damage -= 0.05 src.ear_damage = max(src.ear_damage, 0) - src.density = !( src.lying ) - if ((src.sdisabilities & DISABILITY_BLIND)) src.blinded = TRUE if ((src.sdisabilities & DISABILITY_DEAF)) @@ -271,8 +268,3 @@ to_chat(src, SPAN_DANGER("Weapon Lock Timed Out!")) weapon_lock = 0 weaponlock_time = 120 - -/mob/living/silicon/robot/update_canmove() - if(knocked_out || stunned || knocked_down || buckled || lockcharge || !is_component_functioning("actuator")) canmove = 0 - else canmove = 1 - return canmove diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 4ad29179da..ebcdd60aa9 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -840,7 +840,7 @@ var/list/robot_verbs_default = list( cleaned_item.clean_blood() else if(istype(A, /mob/living/carbon/human)) var/mob/living/carbon/human/cleaned_human = A - if(cleaned_human.lying) + if(cleaned_human.body_position == LYING_DOWN) if(cleaned_human.head) cleaned_human.head.clean_blood() cleaned_human.update_inv_head(0) @@ -866,7 +866,7 @@ var/list/robot_verbs_default = list( src.connected_ai = null lawupdate = 0 lockcharge = 0 - canmove = 1 + //canmove = 1 // Yes this will probably break something, whatevver it is scrambledcodes = 1 //Disconnect it's camera so it's not so easily tracked. if(src.camera) diff --git a/code/modules/mob/living/simple_animal/bat.dm b/code/modules/mob/living/simple_animal/bat.dm index a95d97be6e..eea7998bda 100644 --- a/code/modules/mob/living/simple_animal/bat.dm +++ b/code/modules/mob/living/simple_animal/bat.dm @@ -27,4 +27,3 @@ set_stat(CONSCIOUS) icon_state = "bat" wander = 1 - canmove = 1 diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 7196090f0b..109a53c831 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -44,7 +44,6 @@ set_stat(CONSCIOUS) icon_state = "mouse_[body_color]" wander = 1 - canmove = 1 else if(prob(5)) INVOKE_ASYNC(src, PROC_REF(emote), "snuffles") diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 5e56b02047..6e8d0b8a28 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -63,19 +63,19 @@ icon_living = "Normal [caste_name] Running" icon_dead = "Normal [caste_name] Dead" -/mob/living/simple_animal/hostile/alien/update_transform() - if(lying != lying_prev) - lying_prev = lying +/mob/living/simple_animal/hostile/alien/update_transform(instant_update = FALSE) + // TODO: Move all this mess outside of update_transform if(stat == DEAD) icon_state = "Normal [caste_name] Dead" - else if(lying) - if((resting || sleeping) && (!knocked_down && !knocked_out && health > 0)) + else if(body_position == LYING_DOWN) + if(!HAS_TRAIT(src, TRAIT_INCAPACITATED) && !HAS_TRAIT(src, TRAIT_FLOORED)) icon_state = "Normal [caste_name] Sleeping" else icon_state = "Normal [caste_name] Knocked Down" else icon_state = "Normal [caste_name] Running" update_wounds() + return ..() /mob/living/simple_animal/hostile/alien/evaluate_target(mob/living/carbon/target) . = ..() @@ -114,8 +114,8 @@ if(health > HEALTH_THRESHOLD_DEAD) if(health_threshold > 3) wound_icon_holder.icon_state = "none" - else if(lying) - if((resting || sleeping) && (!knocked_down && !knocked_out && health > 0)) + else if(body_position == LYING_DOWN) + if(!HAS_TRAIT(src, TRAIT_INCAPACITATED) && !HAS_TRAIT(src, TRAIT_FLOORED)) wound_icon_holder.icon_state = "[caste_name]_rest_[health_threshold]" else wound_icon_holder.icon_state = "[caste_name]_downed_[health_threshold]" diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index b47b14f0d1..b285ec1179 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -125,7 +125,7 @@ if(client) return 0 - if(!stat && canmove) + if(!stat && mobility_flags & MOBILITY_MOVE) switch(stance) if(HOSTILE_STANCE_IDLE) target_mob = FindTarget() diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 0f15bd1d8f..f1452d95c2 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -127,7 +127,7 @@ /mob/living/simple_animal/parrot/Topic(href, href_list) //Can the usr physically do this? - if(!usr.canmove || usr.stat || usr.is_mob_restrained() || !in_range(loc, usr)) + if(usr.is_mob_incapacitated() || !in_range(loc, usr)) return //Is the usr's mob type able to do this? @@ -284,7 +284,7 @@ if(client || stat) return //Lets not force players or dead/incap parrots to move - if(!isturf(src.loc) || !canmove || buckled) + if(!isturf(src.loc) || !(mobility_flags & MOBILITY_MOVE) || buckled) return //If it can't move, dont let it move. (The buckled check probably isn't necessary thanks to canmove) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 403cfcfd1e..023ab46bb2 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -88,8 +88,8 @@ GLOB.dead_mob_list -= src GLOB.alive_mob_list += src set_stat(CONSCIOUS) - lying = 0 - density = TRUE +// lying = 0 +// density = TRUE reload_fullscreens() return 0 @@ -103,11 +103,10 @@ handle_stunned() handle_knocked_down(TRUE) handle_knocked_out(TRUE) - update_canmove() //Movement if(!client && !stop_automated_movement && wander && !anchored) - if(isturf(src.loc) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc. + if(isturf(src.loc) && !resting && !buckled && (mobility_flags & MOBILITY_MOVE)) //This is so it only moves if it's not inside a closet, gentics machine, etc. turns_since_move++ if(turns_since_move >= turns_per_move) if(!(stop_automated_movement_when_pulled && pulledby)) //Soma animals don't move when pulled @@ -368,10 +367,17 @@ ..(message, null, verb, nolog = !ckey) //if the animal has a ckey then it will log the message -/mob/living/simple_animal/update_canmove() +/mob/living/simple_animal/on_immobilized_trait_gain(datum/source) . = ..() - if(!canmove) - stop_moving() + stop_moving() + +/mob/living/simple_animal/on_knockedout_trait_gain(datum/source) + . = ..() + stop_moving() + +/mob/living/simple_animal/on_incapacitated_trait_gain(datum/source) + . = ..() + stop_moving() /mob/living/simple_animal/proc/stop_moving() walk_to(src, 0) // stops us dead in our tracks diff --git a/code/modules/mob/living/simple_animal/slug.dm b/code/modules/mob/living/simple_animal/slug.dm index ca06bfcde3..cdbf82081d 100644 --- a/code/modules/mob/living/simple_animal/slug.dm +++ b/code/modules/mob/living/simple_animal/slug.dm @@ -34,7 +34,6 @@ set_stat(CONSCIOUS) icon_state = "slug_movement" wander = 1 - canmove = 1 /mob/living/simple_animal/alien_slug/Initialize() . = ..() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 3d591d9027..4b49a15a6f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -454,7 +454,7 @@ if(!Adjacent(usr)) return if(!ishuman(M) && !ismonkey(M)) return if(!ishuman(src) && !ismonkey(src)) return - if(M.lying || M.is_mob_incapacitated()) + if(M.is_mob_incapacitated()) return if(M.pulling == src && (M.a_intent & INTENT_GRAB) && M.grab_level == GRAB_AGGRESSIVE) return @@ -517,6 +517,8 @@ if(!pulling) return + REMOVE_TRAIT(pulling, TRAIT_FLOORED, CHOKEHOLD_TRAIT) + var/mob/M = pulling pulling.pulledby = null pulling = null @@ -539,7 +541,6 @@ //so we must undo it here so the victim can move right away M.client.next_movement = world.time M.update_transform(TRUE) - M.update_canmove() /mob/living/vv_get_header() . = ..() @@ -720,71 +721,15 @@ note dizziness decrements automatically in the mob's Life() proc. // facing verbs /mob/proc/canface() - if(!canmove) return 0 - if(client && client.moving) return 0 + if(client.moving) return 0 if(stat==2) return 0 if(anchored) return 0 if(monkeyizing) return 0 if(is_mob_restrained()) return 0 + if(HAS_TRAIT(src, TRAIT_INCAPACITATED)) // We allow rotation if simply floored + return FALSE return 1 -//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. -/mob/proc/update_canmove() - var/laid_down = is_laid_down() - - if(laid_down) - lying = TRUE - flags_atom &= ~DIRLOCK - else - lying = FALSE - if(buckled) - if(buckled.buckle_lying) - lying = TRUE - flags_atom &= ~DIRLOCK - else - lying = FALSE - - canmove = !HAS_TRAIT(src, TRAIT_IMMOBILIZED) - - if(isliving(src)) // Temporary I SWEAR. This whole proc is going down - var/mob/living/living = src - if(living.stunned) - canmove = FALSE - - if(!can_crawl && lying) - canmove = FALSE - - if(lying_prev != lying) - if(lying) - ADD_TRAIT(src, TRAIT_UNDENSE, LYING_TRAIT) - add_temp_pass_flags(PASS_MOB_THRU) - drop_l_hand() - drop_r_hand() - SEND_SIGNAL(src, COMSIG_MOB_KNOCKED_DOWN) - else - REMOVE_TRAIT(src, TRAIT_UNDENSE, LYING_TRAIT) - SEND_SIGNAL(src, COMSIG_MOB_GETTING_UP) - remove_temp_pass_flags(PASS_MOB_THRU) - update_transform() - - if(lying) - //so mob lying always appear behind standing mobs, but dead ones appear behind living ones - if(pulledby && pulledby.grab_level == GRAB_CARRY) - layer = ABOVE_MOB_LAYER - else if (stat == DEAD) - layer = LYING_DEAD_MOB_LAYER // Dead mobs should layer under living ones - else if(layer == initial(layer)) //to avoid things like hiding larvas. - layer = LYING_LIVING_MOB_LAYER - else if(layer == LYING_DEAD_MOB_LAYER || layer == LYING_LIVING_MOB_LAYER) - layer = initial(layer) - - SEND_SIGNAL(src, COMSIG_MOB_POST_UPDATE_CANMOVE, canmove, laid_down, lying) - - return canmove - -/mob/proc/is_laid_down() - return (stat || !has_legs() || resting || (status_flags & FAKEDEATH) || (pulledby && pulledby.grab_level >= GRAB_AGGRESSIVE)) - /mob/proc/face_dir(ndir, specific_dir) if(!canface()) return 0 if(dir != ndir) @@ -951,13 +896,13 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/living/proc/handle_knocked_down(bypass_client_check = FALSE) if(knocked_down && (bypass_client_check || client)) - knocked_down = max(knocked_down-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times + knocked_down = max(knocked_down-1,0) knocked_down_callback_check() return knocked_down /mob/living/proc/handle_knocked_out(bypass_client_check = FALSE) if(knocked_out && (bypass_client_check || client)) - knocked_out = max(knocked_out-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times + knocked_out = max(knocked_out-1,0) knocked_out_callback_check() return knocked_out @@ -1150,6 +1095,9 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/set_stat(new_stat) if(new_stat == stat) return - . = stat //old stat + . = stat stat = new_stat SEND_SIGNAL(src, COMSIG_MOB_STATCHANGE, new_stat, .) + +/mob/proc/update_stat() + return diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index dc107e1bd1..f0e5bc48a8 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -87,9 +87,6 @@ var/exploit_record = "" var/gibbing = FALSE - var/lying = FALSE - var/lying_prev = 0 - var/canmove = 1 var/lastpuke = 0 unacidable = FALSE var/mob_size = MOB_SIZE_HUMAN diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index ecda0787c5..a5caf0ad06 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -74,21 +74,21 @@ if(GRAB_AGGRESSIVE) progress_aggressive(user, victim) -/obj/item/grab/proc/progress_passive(mob/living/carbon/human/user, mob/victim) + if(user.grab_level >= GRAB_AGGRESSIVE) + ADD_TRAIT(victim, TRAIT_FLOORED, CHOKEHOLD_TRAIT) + +/obj/item/grab/proc/progress_passive(mob/living/carbon/human/user, mob/living/victim) user.grab_level = GRAB_AGGRESSIVE playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7) user.visible_message(SPAN_WARNING("[user] has grabbed [victim] aggressively!"), null, null, 5) - victim.update_canmove() -/obj/item/grab/proc/progress_aggressive(mob/living/carbon/human/user, mob/victim) +/obj/item/grab/proc/progress_aggressive(mob/living/carbon/human/user, mob/living/victim) user.grab_level = GRAB_CHOKE playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7) user.visible_message(SPAN_WARNING("[user] holds [victim] by the neck and starts choking them!"), null, null, 5) victim.Move(user.loc, get_dir(victim.loc, user.loc)) victim.update_transform(TRUE) - victim.update_canmove() - /obj/item/grab/attack(mob/living/M, mob/living/user) if(M == grabbed_thing) attack_self(user) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index ae094e5ebc..08412dab48 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -311,14 +311,11 @@ var/global/list/limb_types_by_name = list( /mob/proc/is_mob_restrained() return +/// Returns if the mob is incapacitated and unable to perform general actions /mob/proc/is_mob_incapacitated(ignore_restrained) - return (stat || (!ignore_restrained && is_mob_restrained()) || status_flags & FAKEDEATH) - - -//returns how many non-destroyed legs the mob has (currently only useful for humans) -/mob/proc/has_legs() - return 2 - + // note that stat includes knockout via unconscious + // TODO: re-re-re-figure out if we need TRAIT_FLOORED here or using TRAIT_INCAPACITATED only is acceptable deviance from legacy behavior + return (stat || (!ignore_restrained && is_mob_restrained()) || (status_flags & FAKEDEATH) || HAS_TRAIT(src, TRAIT_INCAPACITATED)) /mob/proc/get_eye_protection() return EYE_PROTECTION_NONE @@ -480,7 +477,7 @@ var/global/list/limb_types_by_name = list( set name = "Pick Up" set category = "Object" - if(!canmove || stat || is_mob_restrained() || !Adjacent(pickupify)) + if(is_mob_incapacitated() || !Adjacent(pickupify)) return if(world.time <= next_move) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 6ccb9644d6..980e786aa7 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -95,7 +95,13 @@ mob.next_delay_update = world.time + mob.next_delay_delay /client/Move(n, direct) - if(world.time < next_movement || (mob.lying && mob.crawling)) + var/mob/living/living_mob + if(isliving(mob)) + living_mob = mob + + if(world.time < next_movement) + return + if(living_mob && living_mob.body_position == LYING_DOWN && mob.crawling) return next_move_dir_add = 0 @@ -134,7 +140,17 @@ if(!isliving(mob)) return mob.Move(n, direct) - if(!mob.canmove || mob.is_mob_incapacitated(TRUE) || (mob.lying && !mob.can_crawl)) + if(mob.is_mob_incapacitated(TRUE)) + return + + if(mob.buckled) + // Handle buckled relay before mobility because buckling inherently immobilizes + // This means you can (try to) move with a cargo tug or powerloader while immobilized, which i think makes sense + return mob.buckled.relaymove(mob, direct) + + if(!(living_mob.mobility_flags & MOBILITY_MOVE)) + return + if(living_mob.body_position == LYING_DOWN && !living_mob.can_crawl) return //Check if you are being grabbed and if so attemps to break it @@ -150,9 +166,6 @@ next_movement = world.time + MINIMAL_MOVEMENT_INTERVAL return - if(mob.buckled) - return mob.buckled.relaymove(mob, direct) - if(!mob.z)//Inside an object, tell it we moved var/atom/O = mob.loc if(!O) @@ -170,7 +183,7 @@ //We are now going to move moving = TRUE mob.move_intentionally = TRUE - if(mob.lying) + if(living_mob && living_mob.body_position == LYING_DOWN) //check for them not being a limbless blob (only humans have limbs) if(ishuman(mob)) var/mob/living/carbon/human/human = mob diff --git a/code/modules/mob/mob_verbs.dm b/code/modules/mob/mob_verbs.dm index d80455d7b2..ab2dd5262a 100644 --- a/code/modules/mob/mob_verbs.dm +++ b/code/modules/mob/mob_verbs.dm @@ -98,7 +98,8 @@ if(length(mind.memory) < 4000) mind.store_memory(msg) else - message_admins("[key_name(usr)] auto-slept for attempting to exceed mob memory limit.]", loc.x, loc.y, loc.z) + message_admins("[key_name(usr)] warned for attempting to exceed mob memory limit.]", loc.x, loc.y, loc.z) + to_chat(src, "You have exceeded the maximum memory limit. Sorry!") else to_chat(src, "The game appears to have misplaced your mind datum, so we can't show you your notes.") diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 0d6d906252..3e98167488 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -6,7 +6,6 @@ invisibility = 101 density = FALSE - canmove = FALSE anchored = TRUE universal_speak = TRUE stat = DEAD @@ -15,6 +14,7 @@ . = ..() GLOB.new_player_list += src GLOB.dead_mob_list -= src + ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_INHERENT) /mob/new_player/Destroy() if(ready) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index dcb478d0fc..51c9ba9e13 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -7,8 +7,8 @@ drop_inv_item_on_ground(W) regenerate_icons() monkeyizing = 1 - canmove = 0 - stunned = 1 + anchored = TRUE + ADD_TRAIT(src, TRAIT_INCAPACITATED, "Terminal Monkeyziation") icon = null invisibility = 101 for(var/t in limbs) @@ -68,7 +68,7 @@ for(var/obj/item/W in src) drop_inv_item_on_ground(W) monkeyizing = 1 - canmove = 0 + ADD_TRAIT(src, TRAIT_INCAPACITATED, "Terminal Monkeyziation") icon = null invisibility = 101 return ..() @@ -85,7 +85,7 @@ drop_inv_item_on_ground(W) regenerate_icons() monkeyizing = 1 - canmove = 0 + ADD_TRAIT(src, TRAIT_INCAPACITATED, "Terminal Monkeyziation") icon = null invisibility = 101 for(var/t in limbs) @@ -131,7 +131,7 @@ drop_inv_item_on_ground(W) regenerate_icons() monkeyizing = 1 - canmove = 0 + ADD_TRAIT(src, TRAIT_INCAPACITATED, "Terminal Monkeyziation") icon = null invisibility = 101 for(var/t in limbs) @@ -186,28 +186,6 @@ qdel(src) return -/mob/living/carbon/human/proc/corgize() - if (monkeyizing) - return - for(var/obj/item/W in src) - drop_inv_item_on_ground(W) - regenerate_icons() - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 - for(var/t in limbs) //this really should not be necessary - qdel(t) - - var/mob/living/simple_animal/corgi/new_corgi = new /mob/living/simple_animal/corgi (loc) - new_corgi.a_intent = INTENT_HARM - new_corgi.key = key - if(new_corgi.client) new_corgi.client.change_view(world_view_size) - - to_chat(new_corgi, "You are now a Corgi. Yap Yap!") - qdel(src) - return - /mob/living/carbon/human/Animalize() var/list/mobtypes = typesof(/mob/living/simple_animal) @@ -224,7 +202,7 @@ regenerate_icons() monkeyizing = 1 - canmove = 0 + ADD_TRAIT(src, TRAIT_INCAPACITATED, "Terminal Monkeyziation") icon = null invisibility = 101 diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index ce01931f5d..69263ed02e 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -177,9 +177,13 @@ nanoui is used to open and update nano browser uis close() return + var/mob/living/living_user + if(isliving(user)) + living_user = user + if ((allowed_user_stat > -1) && (user.stat > allowed_user_stat)) set_status(STATUS_DISABLED, push_update) // no updates, completely disabled (red visibility) - else if (user.is_mob_restrained() || user.lying) + else if (user.is_mob_restrained() || (living_user && living_user.body_position == LYING_DOWN)) set_status(STATUS_UPDATE, push_update) // update only (orange visibility) else if (!(src_object in view(4, user))) // If the src object is not in visable, set status to 0 set_status(STATUS_DISABLED, push_update) // interactive (green visibility) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index dbd490792e..b62161b802 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -213,7 +213,7 @@ // Check if we're looking at a mob that's lying down if(istype(cur_atom, /mob/living)) var/mob/living/cur_mob = cur_atom - if(!isxeno(cur_mob) && cur_mob.lying) //xenos don't use icon rotatin for lying. + if(!isxeno(cur_mob) && cur_mob.body_position == LYING_DOWN) //xenos don't use icon rotatin for lying. cur_icon.BecomeLying() // Calculate where we are relative to the center of the photo diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 731ad78caa..b210dbac29 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1000,7 +1000,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( SEND_SIGNAL(user, COMSIG_MOB_APC_POWER_PULSE, src) addtimer(VARSET_CALLBACK(src, shorted, FALSE), 2 MINUTES) -/obj/structure/machinery/power/apc/proc/can_use(mob/user as mob, loud = 0) //used by attack_hand() and Topic() +/obj/structure/machinery/power/apc/proc/can_use(mob/living/user as mob, loud = 0) //used by attack_hand() and Topic() if(user.client && user.client.remote_control) return TRUE @@ -1016,7 +1016,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( if(user.is_mob_restrained()) to_chat(user, SPAN_WARNING("You must have free hands to use [src].")) return 0 - if(user.lying) + if(user.body_position == LYING_DOWN) to_chat(user, SPAN_WARNING("You can't reach [src]!")) return 0 autoflag = 5 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index d98af7748c..c7a64f710a 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -1411,7 +1411,7 @@ and you're good to go. var/damage_buff = BASE_BULLET_DAMAGE_MULT //if target is lying or unconscious - add damage bonus - if(attacked_mob.lying == TRUE || attacked_mob.stat == UNCONSCIOUS) + if(!(attacked_mob.mobility_flags & MOBILITY_STAND) || attacked_mob.stat == UNCONSCIOUS) damage_buff += BULLET_DAMAGE_MULT_TIER_4 projectile_to_fire.damage *= damage_buff //Multiply the damage for point blank. if(bullets_fired == 1) //First shot gives the PB message. @@ -1437,7 +1437,7 @@ and you're good to go. projectile_to_fire.give_bullet_traits(BP) if(bullets_fired > 1) BP.original = attacked_mob //original == the original target of the projectile. If the target is downed and this isn't set, the projectile will try to fly over it. Of course, it isn't going anywhere, but it's the principle of the thing. Very embarrassing. - if(!BP.handle_mob(attacked_mob) && attacked_mob.lying) //This is the 'handle impact' proc for a flying projectile, including hit RNG, on_hit_mob and bullet_act. If it misses, it doesn't go anywhere. We'll pretend it slams into the ground or punches a hole in the ceiling, because trying to make it bypass the xeno or shoot from the tile beyond it is probably more spaghet than my life is worth. + if(!BP.handle_mob(attacked_mob) && attacked_mob.body_position == LYING_DOWN) //This is the 'handle impact' proc for a flying projectile, including hit RNG, on_hit_mob and bullet_act. If it misses, it doesn't go anywhere. We'll pretend it slams into the ground or punches a hole in the ceiling, because trying to make it bypass the xeno or shoot from the tile beyond it is probably more spaghet than my life is worth. if(BP.ammo.sound_bounce) playsound(attacked_mob.loc, BP.ammo.sound_bounce, 35, 1) attacked_mob.visible_message(SPAN_AVOIDHARM("[BP] slams into [get_turf(attacked_mob)]!"), //Managing to miss an immobile target flat on the ground deserves some recognition, don't you think? @@ -1450,7 +1450,7 @@ and you're good to go. if(bullets_fired > 1) projectile_to_fire.original = attacked_mob - if(!projectile_to_fire.handle_mob(attacked_mob) && attacked_mob.lying) + if(!projectile_to_fire.handle_mob(attacked_mob) && attacked_mob.body_position == LYING_DOWN) if(projectile_to_fire.ammo.sound_bounce) playsound(attacked_mob.loc, projectile_to_fire.ammo.sound_bounce, 35, 1) attacked_mob.visible_message(SPAN_AVOIDHARM("[projectile_to_fire] slams into [get_turf(attacked_mob)]!"), diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index fbec82909c..d7ec91b8ec 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -2678,7 +2678,7 @@ Defined in conflicts.dm of the #defines folder. /obj/item/attachable/attached_gun/grenade/unique_action(mob/user) if(!ishuman(usr)) return - if(!user.canmove || user.stat || user.is_mob_restrained() || !user.loc || !isturf(usr.loc)) + if(user.is_mob_incapacitated() || !isturf(usr.loc)) to_chat(user, SPAN_WARNING("Not right now.")) return diff --git a/code/modules/projectiles/gun_helpers.dm b/code/modules/projectiles/gun_helpers.dm index 9e5b1eeb11..486e25315e 100644 --- a/code/modules/projectiles/gun_helpers.dm +++ b/code/modules/projectiles/gun_helpers.dm @@ -462,7 +462,7 @@ DEFINES in setup.dm, referenced here. /obj/item/weapon/gun/proc/get_active_firearm(mob/user, restrictive = TRUE) if(!ishuman(usr)) return - if(!user.canmove || user.stat || user.is_mob_restrained() || !user.loc || !isturf(usr.loc)) + if(user.is_mob_incapacitated() || !isturf(usr.loc)) to_chat(user, SPAN_WARNING("Not right now.")) return diff --git a/code/modules/projectiles/guns/smartgun.dm b/code/modules/projectiles/guns/smartgun.dm index e9b5bd3aff..d42c1f4aa8 100644 --- a/code/modules/projectiles/guns/smartgun.dm +++ b/code/modules/projectiles/guns/smartgun.dm @@ -376,7 +376,7 @@ return for(var/mob/living/checked_living in checked_turf) - if(checked_living.lying && projectile_to_fire.original != checked_living) + if(checked_living.body_position == LYING_DOWN && projectile_to_fire.original != checked_living) continue if(checked_living.get_target_lock(user.faction_group)) diff --git a/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm b/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm index 6d99800213..356d0e6c3b 100644 --- a/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm +++ b/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm @@ -190,7 +190,7 @@ smoke.start() playsound(src, 'sound/weapons/gun_rocketlauncher.ogg', 100, TRUE, 10) for(var/mob/living/carbon/C in backblast_loc) - if(!C.lying && !HAS_TRAIT(C, TRAIT_EAR_PROTECTION)) //Have to be standing up to get the fun stuff + if(C.body_position == STANDING_UP && !HAS_TRAIT(C, TRAIT_EAR_PROTECTION)) //Have to be standing up to get the fun stuff C.apply_damage(15, BRUTE) //The shockwave hurts, quite a bit. It can knock unarmored targets unconscious in real life C.apply_effect(4, STUN) //For good measure C.apply_effect(6, STUTTER) @@ -362,7 +362,7 @@ smoke.start() playsound(src, 'sound/weapons/gun_rocketlauncher.ogg', 100, TRUE, 10) for(var/mob/living/carbon/C in backblast_loc) - if(!C.lying && !HAS_TRAIT(C, TRAIT_EAR_PROTECTION)) //Have to be standing up to get the fun stuff + if(C.body_position == STANDING_UP && !HAS_TRAIT(C, TRAIT_EAR_PROTECTION)) //Have to be standing up to get the fun stuff C.apply_damage(15, BRUTE) //The shockwave hurts, quite a bit. It can knock unarmored targets unconscious in real life C.apply_effect(4, STUN) //For good measure C.apply_effect(6, STUTTER) diff --git a/code/modules/projectiles/guns/specialist/sniper.dm b/code/modules/projectiles/guns/specialist/sniper.dm index 1e72a42538..71e5088aeb 100644 --- a/code/modules/projectiles/guns/specialist/sniper.dm +++ b/code/modules/projectiles/guns/specialist/sniper.dm @@ -75,7 +75,7 @@ /datum/action/item_action/specialist/aimed_shot/can_use_action() var/mob/living/carbon/human/H = owner - if(istype(H) && !H.is_mob_incapacitated() && !H.lying && (holder_item == H.r_hand || holder_item || H.l_hand)) + if(istype(H) && !H.is_mob_incapacitated() && (holder_item == H.r_hand || holder_item || H.l_hand)) return TRUE /datum/action/item_action/specialist/aimed_shot/proc/use_ability(atom/A) @@ -450,7 +450,7 @@ . = ..() if(.) var/mob/living/carbon/human/PMC_sniper = user - if(PMC_sniper.lying == 0 && !istype(PMC_sniper.wear_suit,/obj/item/clothing/suit/storage/marine/smartgunner/veteran/pmc) && !istype(PMC_sniper.wear_suit,/obj/item/clothing/suit/storage/marine/veteran)) + if(PMC_sniper.body_position == STANDING_UP && !istype(PMC_sniper.wear_suit,/obj/item/clothing/suit/storage/marine/smartgunner/veteran/pmc) && !istype(PMC_sniper.wear_suit,/obj/item/clothing/suit/storage/marine/veteran)) PMC_sniper.visible_message(SPAN_WARNING("[PMC_sniper] is blown backwards from the recoil of the [src.name]!"),SPAN_HIGHDANGER("You are knocked prone by the blowback!")) step(PMC_sniper,turn(PMC_sniper.dir,180)) PMC_sniper.apply_effect(5, WEAKEN) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 531afd2f4a..cec5d2089e 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -517,7 +517,7 @@ X.behavior_delegate.on_hitby_projectile(ammo) . = TRUE - else if(!L.lying) + else if(L.body_position != LYING_DOWN) animatation_displace_reset(L) if(ammo.sound_miss) playsound_client(L.client, ammo.sound_miss, get_turf(L), 75, TRUE) if(COOLDOWN_FINISHED(L, shot_cooldown)) @@ -768,8 +768,8 @@ //mobs use get_projectile_hit_chance instead of get_projectile_hit_boolean /mob/living/proc/get_projectile_hit_chance(obj/projectile/P) - if(lying && src != P.original) - return FALSE + if((body_position == LYING_DOWN || HAS_TRAIT(src, TRAIT_NESTED)) && src != P.original) + return FALSE // Snowflake check for xeno nests, because we want bullets to fly through even though they're standing in it var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & AMMO_XENO) if((status_flags & XENO_HOST) && HAS_TRAIT(src, TRAIT_NESTED)) @@ -777,7 +777,7 @@ . = P.get_effective_accuracy() - if(lying && stat) + if(body_position == LYING_DOWN && stat) . += 15 //Bonus hit against unconscious people. if(isliving(P.firer)) diff --git a/code/modules/reagents/chemistry_machinery/acid_harness.dm b/code/modules/reagents/chemistry_machinery/acid_harness.dm index ae54474c3a..52a1a5f13b 100644 --- a/code/modules/reagents/chemistry_machinery/acid_harness.dm +++ b/code/modules/reagents/chemistry_machinery/acid_harness.dm @@ -443,7 +443,7 @@ else if(inject_conditions & ACID_SCAN_CONDITION_DEFIB && vitals_scan < ACID_VITALS_DEAD && last_vitals_scan & ACID_SCAN_CONDITION_DEATH) condition_scan |= ACID_SCAN_CONDITION_DEFIB //If we were previously dead and are now alive, we assume we got defibbed - if(inject_conditions & ACID_SCAN_CONDITION_CONCUSSION && (user.knocked_down || user.knocked_out)) + if(inject_conditions & ACID_SCAN_CONDITION_CONCUSSION && (HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || HAS_TRAIT(src, TRAIT_FLOORED))) condition_scan |= ACID_SCAN_CONDITION_CONCUSSION if(inject_conditions & ACID_SCAN_CONDITION_INTOXICATION && (user.dazed || user.slowed || user.confused || user.drowsyness || user.dizziness || user.druggy)) diff --git a/code/modules/reagents/chemistry_properties/prop_neutral.dm b/code/modules/reagents/chemistry_properties/prop_neutral.dm index d420623879..3048b12ee2 100644 --- a/code/modules/reagents/chemistry_properties/prop_neutral.dm +++ b/code/modules/reagents/chemistry_properties/prop_neutral.dm @@ -199,8 +199,8 @@ M.druggy = min(M.druggy + 0.5 * potency * delta_time, potency * 10) /datum/chem_property/neutral/hallucinogenic/process_overdose(mob/living/M, potency = 1, delta_time) - if(isturf(M.loc) && !istype(M.loc, /turf/open/space) && M.canmove && !M.is_mob_restrained()) - step(M, pick(cardinal)) + if(isturf(M.loc) && !istype(M.loc, /turf/open/space) && (M.mobility_flags & MOBILITY_MOVE) && !M.is_mob_restrained()) + step(M, pick(GLOB.cardinals)) M.hallucination += 10 M.make_jittery(5) diff --git a/code/modules/reagents/chemistry_properties/prop_positive.dm b/code/modules/reagents/chemistry_properties/prop_positive.dm index 971051e9bf..8bf7eadc5d 100644 --- a/code/modules/reagents/chemistry_properties/prop_positive.dm +++ b/code/modules/reagents/chemistry_properties/prop_positive.dm @@ -455,7 +455,7 @@ if(prob(10 * delta_time)) to_chat(M, SPAN_WARNING("You feel like you have the worst brain freeze ever!")) M.apply_effect(20, PARALYZE) - M.stunned = max(M.stunned,21) + M.apply_effect(20, STUN) /datum/chem_property/positive/neurocryogenic/process_overdose(mob/living/M, potency = 1, delta_time) M.bodytemperature = max(M.bodytemperature - 2.5 * potency * delta_time,0) diff --git a/code/modules/reagents/chemistry_properties/prop_special.dm b/code/modules/reagents/chemistry_properties/prop_special.dm index 8dbc1bbe3d..5921644777 100644 --- a/code/modules/reagents/chemistry_properties/prop_special.dm +++ b/code/modules/reagents/chemistry_properties/prop_special.dm @@ -381,8 +381,8 @@ /datum/chem_property/special/revitalizing/reagent_added(mob/living/M) if(!ishuman(M)) return + M.SetKnockOut(0) M.status_flags &= ~CANKNOCKOUT - M.knocked_out = 0 /datum/chem_property/special/revitalizing/on_delete(mob/living/M) M.status_flags |= CANKNOCKOUT diff --git a/code/modules/reagents/chemistry_reagents/drink.dm b/code/modules/reagents/chemistry_reagents/drink.dm index 3bd7336c32..66ce084455 100644 --- a/code/modules/reagents/chemistry_reagents/drink.dm +++ b/code/modules/reagents/chemistry_reagents/drink.dm @@ -555,7 +555,8 @@ /datum/reagent/neurotoxin/on_mob_life(mob/living/carbon/M) . = ..() if(!.) return - M.knocked_down = max(M.knocked_down, 3) + if(!HAS_TRAIT(src, TRAIT_FLOORED)) + M.apply_effect(5, WEAKEN) if(!data) data = 1 data++ M.dizziness +=6 diff --git a/code/modules/reagents/chemistry_reagents/toxin.dm b/code/modules/reagents/chemistry_reagents/toxin.dm index 6ffd14ea8a..d9be565a85 100644 --- a/code/modules/reagents/chemistry_reagents/toxin.dm +++ b/code/modules/reagents/chemistry_reagents/toxin.dm @@ -113,6 +113,7 @@ if(!. || deleted) return M.status_flags |= FAKEDEATH + ADD_TRAIT(M, TRAIT_IMMOBILIZED, FAKEDEATH_TRAIT) M.apply_damage(0.5*REM, OXY) M.apply_effect(2, WEAKEN) M.silent = max(M.silent, 10) @@ -125,6 +126,7 @@ var/mob/living/holder_mob = . holder_mob.status_flags &= ~FAKEDEATH + REMOVE_TRAIT(holder_mob, TRAIT_IMMOBILIZED, FAKEDEATH_TRAIT) /datum/reagent/toxin/mindbreaker name = "Mindbreaker Toxin" diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index b4b4f68ed9..429f560032 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -112,7 +112,7 @@ // attack with hand, move pulled object onto conveyor /obj/structure/machinery/conveyor/attack_hand(mob/user as mob) - if ((!( user.canmove ) || user.is_mob_restrained() || !( user.pulling ))) + if (( user.is_mob_incapacitated() || !( user.pulling ))) return if (user.pulling.anchored) return diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index b6b35e3ed5..3a1e33a7ac 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -222,7 +222,7 @@ ///Attempt to move while inside /obj/structure/machinery/disposal/relaymove(mob/living/user) - if(user.stat || user.stunned || user.knocked_down || flushing) + if(user.is_mob_incapacitated(TRUE) || flushing) return FALSE if(user.loc == src) go_out(user) @@ -234,9 +234,8 @@ user.client.eye = user.client.mob user.client.perspective = MOB_PERSPECTIVE user.forceMove(loc) - user.stunned = max(user.stunned, 2) //Action delay when going out of a bin - user.update_canmove() //Force the delay to go in action immediately - if(!user.lying) + user.apply_effect(2, STUN) + if(user.mobility_flags & MOBILITY_MOVE) user.visible_message(SPAN_WARNING("[user] suddenly climbs out of [src]!"), SPAN_WARNING("You climb out of [src] and get your bearings!")) update() @@ -305,8 +304,7 @@ if(isliving(AM)) var/mob/living/living = AM living.Stun(2) - living.update_canmove() //Force the delay to go in action immediately - if(!living.lying) + if(living.body_position == STANDING_UP) living.visible_message(SPAN_WARNING("[living] is suddenly pushed out of [src]!"), SPAN_WARNING("You get pushed out of [src] and get your bearings!")) update() diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index dccdfad920..da1923730e 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -82,8 +82,6 @@ GLOBAL_LIST_EMPTY(shuttle_controls) user.visible_message(SPAN_NOTICE("[user] starts to type on the [src]."), SPAN_NOTICE("You try to take back the control over the shuttle. It will take around 3 minutes.")) if(do_after(user, 3 MINUTES, INTERRUPT_ALL, BUSY_ICON_FRIENDLY)) - if(user.lying) - return 0 shuttle.last_locked = world.time shuttle.queen_locked = 0 shuttle.last_door_override = world.time diff --git a/code/modules/sorokyne/sorokyne_cold_water.dm b/code/modules/sorokyne/sorokyne_cold_water.dm index adf7e3de62..345014a1e4 100644 --- a/code/modules/sorokyne/sorokyne_cold_water.dm +++ b/code/modules/sorokyne/sorokyne_cold_water.dm @@ -48,13 +48,13 @@ var/dam_amount = COLD_WATER_DAMAGE if(issynth(M) || isyautja(M)) dam_amount -= 0.5 - if(M.lying) - M.apply_damage(5*dam_amount,BURN) - else + if(M.body_position == STANDING_UP) M.apply_damage(dam_amount,BURN,"l_leg") M.apply_damage(dam_amount,BURN,"l_foot") M.apply_damage(dam_amount,BURN,"r_leg") M.apply_damage(dam_amount,BURN,"r_foot") + else + M.apply_damage(5*dam_amount,BURN) if (ishuman(M)) if (M.bodytemperature > MINIMUM_TEMP) diff --git a/code/modules/surgery/surgery_initiator.dm b/code/modules/surgery/surgery_initiator.dm index 8b7506c9b7..706b28d0e9 100644 --- a/code/modules/surgery/surgery_initiator.dm +++ b/code/modules/surgery/surgery_initiator.dm @@ -43,7 +43,7 @@ continue //Lying and self-surgery checks. - if(surgeryloop.lying_required && !target.lying) + if(surgeryloop.lying_required && target.body_position != LYING_DOWN) continue if(!surgeryloop.self_operable && target == user) continue @@ -134,7 +134,7 @@ [target_zone == "r_hand"||target_zone == "l_hand" ? "hand":"arm"] you're using!")) return TRUE - if(surgeryinstance.lying_required && !target.lying) + if(surgeryinstance.lying_required && target.body_position != LYING_DOWN) return TRUE if(surgery_limb) diff --git a/code/modules/surgery/surgery_procedure.dm b/code/modules/surgery/surgery_procedure.dm index 1e11516a80..8620c557eb 100644 --- a/code/modules/surgery/surgery_procedure.dm +++ b/code/modules/surgery/surgery_procedure.dm @@ -90,7 +90,7 @@ to_chat(user, SPAN_WARNING("You can't operate on [target], \he is being carried by [target.pulledby]!")) return FALSE - if(lying_required && !target.lying) + if(lying_required && target.body_position != LYING_DOWN) to_chat(user, SPAN_WARNING("[user == target ? "You need" : "[target] needs"] to be lying down for this operation!")) return FALSE diff --git a/code/modules/tgui/status_composers.dm b/code/modules/tgui/status_composers.dm index 6d7b589786..ba1b29d815 100644 --- a/code/modules/tgui/status_composers.dm +++ b/code/modules/tgui/status_composers.dm @@ -56,17 +56,6 @@ /mob/living/silicon/proc/get_ui_access(atom/source) return UI_INTERACTIVE // Ubiquitous networking. Do not abuse. -/// Returns UI_INTERACTIVE if the user is conscious and lying down. -/// Returns UI_UPDATE otherwise. -/proc/ui_status_user_is_conscious_and_lying_down(mob/user) - if (!isliving(user)) - return UI_UPDATE - - var/mob/living/living_user = user - return (living_user.lying && living_user.stat == CONSCIOUS) \ - ? UI_INTERACTIVE \ - : UI_UPDATE - /// Return UI_INTERACTIVE if the user is strictly adjacent to the target atom, whether they can see it or not. /// Return UI_CLOSE otherwise. /proc/ui_status_user_strictly_adjacent(mob/user, atom/target) diff --git a/code/modules/vehicles/interior/interactable/seats.dm b/code/modules/vehicles/interior/interactable/seats.dm index 3f3058d057..2984adda91 100644 --- a/code/modules/vehicles/interior/interactable/seats.dm +++ b/code/modules/vehicles/interior/interactable/seats.dm @@ -388,17 +388,6 @@ handle_rotation() -/obj/structure/bed/chair/vehicle/unbuckle() - if(buckled_mob && buckled_mob.buckled == src) - buckled_mob.buckled = null - buckled_mob.anchored = initial(buckled_mob.anchored) - buckled_mob.update_canmove() - - var/M = buckled_mob - buckled_mob = null - - afterbuckle(M) - //attack handling /obj/structure/bed/chair/vehicle/attack_alien(mob/living/user) diff --git a/code/modules/vehicles/train.dm b/code/modules/vehicles/train.dm index 92358a1e0f..cbad4535df 100644 --- a/code/modules/vehicles/train.dm +++ b/code/modules/vehicles/train.dm @@ -54,8 +54,8 @@ //------------------------------------------- -/obj/vehicle/train/MouseDrop_T(atom/movable/C, mob/user as mob) - if(user.buckled || user.stat || user.is_mob_restrained() || !Adjacent(user) || !user.Adjacent(C) || !istype(C) || (user == C && !user.canmove)) +/obj/vehicle/train/MouseDrop_T(atom/movable/C, mob/living/user as mob) + if(user.buckled || user.stat || user.is_mob_restrained() || !Adjacent(user) || !user.Adjacent(C) || !istype(C) || (user == C && !(user.mobility_flags & MOBILITY_MOVE))) return if(istype(C,/obj/vehicle/train)) latch(C, user) @@ -71,7 +71,7 @@ if(!istype(usr, /mob/living/carbon/human)) return - if(!usr.canmove || usr.stat || usr.is_mob_restrained() || !Adjacent(usr)) + if(usr.is_mob_incapacitated() || !Adjacent(usr)) return unattach(usr) diff --git a/code/modules/vehicles/van/van.dm b/code/modules/vehicles/van/van.dm index c017eae28d..0b99d682c0 100644 --- a/code/modules/vehicles/van/van.dm +++ b/code/modules/vehicles/van/van.dm @@ -91,13 +91,13 @@ if(mover in mobs_under) //can't collide with the thing you're buckled to return NO_BLOCKED_MOVEMENT - if(ismob(mover)) - var/mob/M = mover + if(isliving(mover)) + var/mob/living/M = mover if(M.mob_flags & SQUEEZE_UNDER_VEHICLES) add_under_van(M) return NO_BLOCKED_MOVEMENT - if(M.lying) + if(M.body_position == LYING_DOWN) return NO_BLOCKED_MOVEMENT if(M.mob_size >= MOB_SIZE_IMMOBILE && next_push < world.time) diff --git a/colonialmarines.dme b/colonialmarines.dme index f91139d4c9..f3f5d9a012 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -147,6 +147,7 @@ #include "code\__HELPERS\#maths.dm" #include "code\__HELPERS\_lists.dm" #include "code\__HELPERS\_time.dm" +#include "code\__HELPERS\animations.dm" #include "code\__HELPERS\chat.dm" #include "code\__HELPERS\cmp.dm" #include "code\__HELPERS\datums.dm" @@ -168,6 +169,7 @@ #include "code\__HELPERS\qdel.dm" #include "code\__HELPERS\sanitize_values.dm" #include "code\__HELPERS\shell.dm" +#include "code\__HELPERS\status_effects.dm" #include "code\__HELPERS\text.dm" #include "code\__HELPERS\traits.dm" #include "code\__HELPERS\type2type.dm"