mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
[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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user