예제 #1
0
파일: Main.cs 프로젝트: snoopybeegle/Agony
        private static void ReplaceNodeTech(uGUI_CraftNode node)
        {
            if (node.action != TreeAction.Craft)
            {
                return;
            }

            TechType recyclingTech;

            if (RecyclingData.TryGet(node.techType0, out recyclingTech))
            {
                replacedNodeTechs[node] = node.techType0;
                node.techType0          = recyclingTech;
            }
        }
예제 #2
0
            public static void Postfix()
            {
                foreach (TechType techType in Enum.GetValues(typeof(TechType)))
                {
#if SUBNAUTICA
                    if (SMLHelper.V2.Handlers.CraftDataHandler.GetTechData(techType) != null)
#elif BELOWZERO
                    if (SMLHelper.V2.Handlers.CraftDataHandler.GetRecipeData(techType) != null)
#endif
                    {
                        RecyclingData.TryGet(techType, out TechType recyclingTech, true);
                    }
                }

#if BELOWZERO
                TechData.Cache();
#endif
                CraftData.RebuildDatabase();
                Language.main.LoadLanguageFile(Language.main.GetCurrentLanguage());
            }
예제 #3
0
파일: Main.cs 프로젝트: MrPurple6411/Agony
        private static void ReplaceNodeTech(uGUI_CraftNode node)
        {
            if (node.action != TreeAction.Craft)
            {
                return;
            }

            if (!node.techType0.ToString().StartsWith("Defabricated") && RecyclingData.TryGet(node.techType0, out TechType recyclingTech))
            {
                node.techType0 = recyclingTech;
            }
            else if (node.techType0.ToString().StartsWith("Defabricated"))
            {
                TechTypeExtensions.FromString(node.techType0.ToString().Replace("Defabricated", ""), out TechType original, true);
                node.techType0 = original;
            }
            else
            {
                ErrorMessage.AddMessage($"Failed to change {node.techType0}");
            }
        }