public static void Postfix(Panel_Materials __instance) { if (!shouldRun() || instance.m_BungeeButton == null) { return; } instance.m_BungeeMaterialLimit.Set(Budget.m_BungieRopeLeft); }
public static void Postfix(Panel_Materials __instance, float ___DISABLED_ALPHA) { if (!shouldRun() || instance.m_BungeeButton == null) { return; } instance.m_BungeeButton.SetAlpha((Budget.m_BungieRopeBudget > 0) ? 1f : ___DISABLED_ALPHA); }
public static void Postfix(BridgeMaterialType material, Panel_Materials __instance) { if (!shouldRun() || instance.m_BungeeButton == null) { return; } if (material == BridgeMaterialType.BUNGINE_ROPE) { instance.m_BungeeButton.TurnOn(); } }
public static void Postfix(Panel_Materials __instance) { if (!shouldRun() || instance.m_BungeeButton == null) { return; } instance.m_BungeeMaterialLimit.gameObject.SetActive( Budget.m_BungieRopeBudget != Budget.UNLIMITED_MATERIAL_BUDGET && Budget.m_BungieRopeBudget != 0 ); instance.m_BungeeButton.transform.parent.gameObject.SetActive(Budget.m_BungieRopeBudget != 0); }
public static void Postfix(Panel_Materials __instance) { if (!shouldRun() || instance.m_BungeeButton == null) { return; } TwoStateButton button = instance.m_BungeeButton; if (button.IsOn() && BridgeTrace.IsTracingActive()) { button.Duck(); return; } button.UnDuck(); }
public static void Postfix(Panel_Materials __instance) { if (!shouldRun() || instance.m_BungeeButton == null) { return; } MethodInfo InitSlot = AccessTools.Method(typeof(Panel_Materials), "InitSlot"); InitSlot.Invoke( __instance, new object[] { instance.m_BungeeButton, instance.m_BungeeMaterialLimit, Budget.m_BungieRopeBudget } ); }
public static bool Prefix(BridgeMaterialType materialType, ref TwoStateButton __result, Panel_Materials __instance) { if (!shouldRun()) { return(true); } switch (materialType) { case BridgeMaterialType.ROAD: __result = __instance.m_RoadButton; return(false); case BridgeMaterialType.REINFORCED_ROAD: __result = __instance.m_ReinforcedRoadButton; return(false); case BridgeMaterialType.WOOD: __result = __instance.m_WoodButton; return(false); case BridgeMaterialType.STEEL: __result = __instance.m_SteelButton; return(false); case BridgeMaterialType.HYDRAULICS: __result = __instance.m_HydraulicsButton; return(false); case BridgeMaterialType.ROPE: __result = __instance.m_RopeButton; return(false); case BridgeMaterialType.CABLE: __result = __instance.m_CableButton; return(false); case BridgeMaterialType.SPRING: __result = __instance.m_SpringButton; return(false); case BridgeMaterialType.BUNGINE_ROPE: __result = instance.m_BungeeButton; return(false); } Debug.LogWarningFormat("Unexpected materialType in PanelMaterials.GetMaterialButton: {0}", new object[] { materialType.ToString() }); __result = null; return(false); }