Exemple #1
0
            private static void Postfix(Panel_Crafting __instance)
            {
                __instance.m_SelectedDescription.color = WhiteColor;
                var bpi = __instance.m_SelectedBPI;

                if (!bpi)
                {
                    return;
                }
                if (!bpi.m_CraftedResult)
                {
                    return;
                }

                if (!MendingHelper.IsClothing(bpi))
                {
                    return;
                }

                var mendingLevel         = MendingHelper.GetCurrentMendingLevel();
                var requiredMendingLevel = MendingHelper.GetRequiredMendingLevel(bpi);

                if (mendingLevel < requiredMendingLevel)
                {
                    __instance.m_SelectedDescription.text  = "REQUIRES MENDING LEVEL " + requiredMendingLevel;
                    __instance.m_SelectedDescription.color = RedColor;
                }
            }
Exemple #2
0
            public static void Prefix(string itemName)
            {
                Implementation.Log("Crafted " + itemName);
                var xp = MendingHelper.GetXpForCrafting(itemName);

                if (xp > 0)
                {
                    MendingHelper.AddMendingXP(xp);
                }
            }
Exemple #3
0
            static void Postfix(ref bool __result, BlueprintItem __instance)
            {
                if (__result == false)
                {
                    return;
                }

                var mendingLevel         = MendingHelper.GetCurrentMendingLevel();
                var requiredMendingLevel = MendingHelper.GetRequiredMendingLevel(__instance);

                if (mendingLevel < requiredMendingLevel)
                {
                    __result = false;
                }
            }