[REFACTOR] Remove the flying var, adds the flying trait. (#26881)

* Remove the flying var, adds the flying trait

* Remove flight when broomstick is unwielded

* Adds some comments

* tab indentation

* Fix carp flight

* Remove comment

---------

Co-authored-by: Adrer <adrermail@gmail.com>
This commit is contained in:
Chap
2024-10-16 17:46:19 +00:00
committed by GitHub
co-authored by Adrer
parent be2cdeb261
commit c3d773402c
51 changed files with 86 additions and 78 deletions
+2 -2
View File
@@ -106,7 +106,7 @@
return TRUE
if(ismob(mover))
var/mob/living/M = mover
if(M.flying || (istype(M) && IS_HORIZONTAL(M) && HAS_TRAIT(M, TRAIT_CONTORTED_BODY)))
if(HAS_TRAIT(M, TRAIT_FLYING) || (istype(M) && IS_HORIZONTAL(M) && HAS_TRAIT(M, TRAIT_CONTORTED_BODY)))
return TRUE
if(mover.throwing)
return TRUE
@@ -133,7 +133,7 @@
if(isprojectile(O))
return TRUE
if(istype(M))
if(M.flying || M.floating || (IS_HORIZONTAL(M) && HAS_TRAIT(M, TRAIT_CONTORTED_BODY)))
if(HAS_TRAIT(M, TRAIT_FLYING) || M.floating || (IS_HORIZONTAL(M) && HAS_TRAIT(M, TRAIT_CONTORTED_BODY)))
return TRUE
if(O.throwing)
return TRUE
+2 -2
View File
@@ -140,7 +140,7 @@
if(istype(mover,/obj/item/projectile))
return (check_cover(mover,target))
var/mob/living/living_mover = mover
if(istype(living_mover) && (living_mover.flying || (IS_HORIZONTAL(living_mover) && HAS_TRAIT(living_mover, TRAIT_CONTORTED_BODY))))
if(istype(living_mover) && (HAS_TRAIT(living_mover, TRAIT_FLYING) || (IS_HORIZONTAL(living_mover) && HAS_TRAIT(living_mover, TRAIT_CONTORTED_BODY))))
return TRUE
if(istype(mover) && mover.checkpass(PASSTABLE))
return TRUE
@@ -484,7 +484,7 @@
if(!isliving(AM))
return
var/mob/living/L = AM
if(L.incorporeal_move || L.flying || L.floating)
if(L.incorporeal_move || HAS_TRAIT(L, TRAIT_FLYING) || L.floating)
return
// Don't break if they're just flying past