Ports "Refactors NODROP flag into TRAIT_NODROP"

This commit is contained in:
Ghommie
2019-07-13 10:27:39 +02:00
parent 194e420a1c
commit 129ca9d71f
82 changed files with 386 additions and 212 deletions
+1 -1
View File
@@ -79,5 +79,5 @@
/obj/item/clothing/gloves/space_ninja/examine(mob/user)
..()
if(item_flags & NODROP)
if(HAS_TRAIT_FROM(src, TRAIT_NODROP, NINJA_SUIT_TRAIT))
to_chat(user, "The energy drain mechanism is <B>[candrain?"active":"inactive"]</B>.")
+8 -8
View File
@@ -111,15 +111,15 @@ Contents:
to_chat(H, "<span class='userdanger'>ERROR</span>: 110223 UNABLE TO LOCATE HAND GEAR\nABORTING...")
return FALSE
affecting = H
item_flags |= NODROP //colons make me go all |=
ADD_TRAIT(src, TRAIT_NODROP, NINJA_SUIT_TRAIT) //colons make me go all |=
slowdown = 0
n_hood = H.head
n_hood.item_flags |= NODROP
ADD_TRAIT(n_hood, TRAIT_NODROP, NINJA_SUIT_TRAIT)
n_shoes = H.shoes
n_shoes.item_flags |= NODROP
ADD_TRAIT(n_shoes, TRAIT_NODROP, NINJA_SUIT_TRAIT)
n_shoes.slowdown--
n_gloves = H.gloves
n_gloves.item_flags |= NODROP
ADD_TRAIT(n_gloves, TRAIT_NODROP, NINJA_SUIT_TRAIT)
return TRUE
/obj/item/clothing/suit/space/space_ninja/proc/lockIcons(mob/living/carbon/human/H)
@@ -131,18 +131,18 @@ Contents:
//This proc allows the suit to be taken off.
/obj/item/clothing/suit/space/space_ninja/proc/unlock_suit()
affecting = null
item_flags &= ~NODROP
REMOVE_TRAIT(src, TRAIT_NODROP, NINJA_SUIT_TRAIT)
slowdown = 1
icon_state = "s-ninja"
if(n_hood)//Should be attached, might not be attached.
n_hood.item_flags &= ~NODROP
REMOVE_TRAIT(n_hood, TRAIT_NODROP, NINJA_SUIT_TRAIT)
if(n_shoes)
n_shoes.item_flags &= ~NODROP
REMOVE_TRAIT(n_shoes, TRAIT_NODROP, NINJA_SUIT_TRAIT)
n_shoes.slowdown++
if(n_gloves)
n_gloves.icon_state = "s-ninja"
n_gloves.item_state = "s-ninja"
n_gloves.item_flags &= ~NODROP
REMOVE_TRAIT(n_gloves, TRAIT_NODROP, NINJA_SUIT_TRAIT)
n_gloves.candrain=0
n_gloves.draining=0