Refactor ventcrawling flag into traits (#56620)

Instead of using var/ventcrawling on `/mob/living`, it is now instead
two traits. It functions in exactly the same way.

This now ensures that manipulation of ventcrawling will not clash with
any other manipulation, such as a proposed genetics ability to give
people ventcrawling, versus abductor organs.

---

Intended to be a pure refactor, no functionality should change.
This commit is contained in:
coiax
2021-02-07 14:12:50 -05:00
committed by GitHub
parent 2a90fdd75e
commit b0f7381aa2
39 changed files with 139 additions and 72 deletions
+5 -2
View File
@@ -62,7 +62,8 @@
return TRUE
var/mob/living/M = caller
if(!M.ventcrawler && M.mob_size != MOB_SIZE_TINY)
var/ventcrawler = HAS_TRAIT(M, TRAIT_VENTCRAWLER_ALWAYS) || HAS_TRAIT(M, TRAIT_VENTCRAWLER_NUDE)
if(!ventcrawler && M.mob_size != MOB_SIZE_TINY)
return FALSE
var/atom/movable/M = caller
if(M?.pulling)
@@ -92,7 +93,9 @@
var/mob/living/M = A
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
return TRUE
if(M.body_position == STANDING_UP && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
var/ventcrawler = HAS_TRAIT(M, TRAIT_VENTCRAWLER_ALWAYS) || HAS_TRAIT(M, TRAIT_VENTCRAWLER_NUDE)
if(M.body_position == STANDING_UP && !ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
return FALSE
/obj/structure/plasticflaps/deconstruct(disassembled = TRUE)