public static void ReplaceAnim(BuildingDef def, string animName) { if (FestivalManager.CurrentFestival == Festival.None) { return; } KAnimFile anim = ModAssets.GetAnim(animName); if (anim != null) { def.AnimFiles = new KAnimFile[1] { anim }; } }
public static void Postfix(EquipmentDef __result) { if (ModSettings.Instance.EnableCustomHelmets) { if (FestivalManager.CurrentFestival != Festival.None) { KAnimFile itemAnim = ModAssets.GetAnim("suit_oxygen"); KAnimFile suitAnim = Assets.GetAnim("body_oxygen_nohelm_kanim"); if (itemAnim != null && suitAnim != null) { __result.Anim = itemAnim; __result.BuildOverride = suitAnim; } } } }
public static void ReplaceAnim(GameObject obj, string animName) { if (FestivalManager.CurrentFestival == Festival.None) { return; } KAnimFile anim = ModAssets.GetAnim(animName); if (anim != null) { var ac = obj.GetComponent <KBatchedAnimController>(); if (ac != null) { ac.AnimFiles = new KAnimFile[1] { anim }; } } }