Пример #1
0
        private static void Postfix()
        {
            Logger.Log("The Long Dark version: '{0}'", GameManager.GetVersionString());

            SerializableSkill.MaybeRegisterInIl2Cpp();

            try { BlueprintMapper.MapBlueprints(); }
            catch (System.Exception e)
            {
                Logger.LogError("Blueprint Mapping failed: " + e);
            }

            try { SkillsMapper.MapSkills(); }
            catch (System.Exception e)
            {
                Logger.LogError("Skills Mapping failed: " + e);
            }


            //
            //Need to be called after GameManager is initialized
            //

            if (!ModExisting.IsInitialized())            //ModExisting only needs to be initialized at the start of the game
            {
                ModExisting.Initialize();
            }
            AlternativeToolManager.ProcessList();
        }
Пример #2
0
        private static void MapSkill(GameObject prefab)
        {
            SkillJson.InitializeModSkill(ref prefab);
            ModSkill modSkill = ModComponentUtils.ComponentUtils.GetComponent <ModSkill>(prefab);

            if (modSkill != null)
            {
                SkillsMapper.RegisterSkill(modSkill);
            }
        }