Esempio n. 1
0
        public override void OnLoad(Harmony harmony)
        {
            base.OnLoad(harmony);
            new POptions().RegisterOptions(this, typeof(Always3InterestsSettings));


            // Init PLib and settings
            PUtil.InitLibrary();

            Settings = POptions.ReadSettings <Always3InterestsSettings>();
            if (Settings == null)
            {
                Settings = new Always3InterestsSettings();
            }

            int[] customAttributes = new int[] {
                Settings.pointsWhen1Interest,
                Settings.pointsWhen2Interest,
                Settings.pointsWhen3Interest,
                Settings.pointsWhenMoreThan3Interest,
                Settings.pointsWhenMoreThan3Interest,
                Settings.pointsWhenMoreThan3Interest,
                Settings.pointsWhenMoreThan3Interest,
                Settings.pointsWhenMoreThan3Interest,
                Settings.pointsWhenMoreThan3Interest,
                Settings.pointsWhenMoreThan3Interest,
                Settings.pointsWhenMoreThan3Interest
            };

            Traverse.Create <DUPLICANTSTATS>().Field <int[]>("APTITUDE_ATTRIBUTE_BONUSES").Value = customAttributes;
        }
Esempio n. 2
0
        public static void ReadSettings()
        {
            Debug.Log("Loading settings");

            Settings = POptions.ReadSettings <Always3InterestsSettings>();
            if (Settings == null)
            {
                Settings = new Always3InterestsSettings();
            }
        }
Esempio n. 3
0
        public static void OnLoad()
        {
            PUtil.InitLibrary();
            POptions.RegisterOptions(typeof(Always3InterestsSettings));
            settings = new Always3InterestsSettings();
            ReadSettings();

            var customAttributes = new int[] {
                settings.pointsWhen1Interest,
                settings.pointsWhen2Interest,
                settings.pointsWhen3Interest,
                settings.pointsWhenMoreThan3Interest,
                settings.pointsWhenMoreThan3Interest,
                settings.pointsWhenMoreThan3Interest,
                settings.pointsWhenMoreThan3Interest,
                settings.pointsWhenMoreThan3Interest,
                settings.pointsWhenMoreThan3Interest,
                settings.pointsWhenMoreThan3Interest,
                settings.pointsWhenMoreThan3Interest
            };

            Traverse.Create <DUPLICANTSTATS>().Field <int[]>("APTITUDE_ATTRIBUTE_BONUSES").Value = customAttributes;
        }