static void Postfix(UnitPartSizeModifier __instance, List <Fact> ___m_SizeChangeFacts) { Fact fact = ___m_SizeChangeFacts.LastItem <Fact>(); if (fact == null) { __instance.Owner.State.Size = __instance.Owner.Ensure <UnitPartSizeOverride>().getSize(); } }
static void Postfix(UnitPartSizeModifier __instance, List <Fact> ___m_SizeChangeFacts) { Fact fact = ___m_SizeChangeFacts?.LastItem <Fact>(); var part = __instance?.Owner?.Get <UnitPartSizeOverride>(); if (fact == null && part != null) { __instance.Owner.State.Size = part.getSize(); } }