Merge pull request #35011 from vuonojenmustaturska/pocketprotectorfix

Fixes a semi-inconsistent runtime with accessories and armor datums
This commit is contained in:
oranges
2018-01-29 09:17:58 +13:00
committed by GitHub
@@ -28,6 +28,12 @@
pixel_y -= 8
U.add_overlay(src)
if (islist(U.armor)) // This proc can run before /obj/Initialize has run for U and src,
U.armor = getArmor(arglist(U.armor)) // we have to check that the armor list has been transformed into a datum before we try to call a proc on it
// This is safe to do as /obj/Initialize only handles setting up the datum if actually needed.
if (islist(armor))
armor = getArmor(arglist(armor))
U.armor = U.armor.attachArmor(armor)
if(isliving(user))