mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
Add type checks in case of Initialize() weirdness
This commit is contained in:
@@ -37,6 +37,12 @@
|
||||
var/mob/M = has_suit.loc
|
||||
A.Grant(M)
|
||||
|
||||
if (islist(has_suit.armor) || isnull(has_suit.armor)) // This proc can run before /obj/Initialize has run for U and src,
|
||||
has_suit.armor = getArmor(arglist(has_suit.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) || isnull(armor))
|
||||
armor = getArmor(arglist(armor))
|
||||
|
||||
has_suit.armor = has_suit.armor.attachArmor(armor)
|
||||
|
||||
if(user)
|
||||
|
||||
Reference in New Issue
Block a user