public static void Postfix(CombatHUDMechTray __instance) { Mod.Log.Trace("CHUDMT::Update - entered."); if (__instance.DisplayedActor is Mech displayedMech && CombatHUDMechTray_Init.HoverElement != null) { CombatHUDMechTray_Init.HoverElement.UpdateText(displayedMech); } }
public static void Postfix(CombatHUDMechTray __instance) { if (__instance == null || __instance.DisplayedActor == null || __instance.DisplayedActor.Description == null) { return; } string fullName = __instance.DisplayedActor.Description.UIName; if (!string.IsNullOrEmpty(fullName)) { Mod.Log.Debug($"RefreshMechInfo - Setting CombatHUDMechTray name to {fullName}"); __instance.MechNameText.SetText(fullName, Array.Empty <object>()); } }
public static void Postfix(CombatHUDMechTray __instance, CombatHUD ___HUD) { Mod.Log.Trace("CHUDMT::Init - entered."); if (__instance.gameObject.GetComponentInChildren <CombatHUDHeatDisplay>() == null) { Mod.Log.Warn("COULD NOT FIND HEAT DISPLAY"); } else { CombatHUDHeatDisplay heatDisplay = __instance.gameObject.GetComponentInChildren <CombatHUDHeatDisplay>(); HoverElement = heatDisplay.gameObject.AddComponent <CombatHUDSidePanelHeatHoverElement>(); HoverElement.name = "CBTBE_Hover_Element"; HoverElement.Init(___HUD); } HUD = ___HUD; }