Пример #1
0
        /// <summary>
        /// Called when the mod is loaded.
        /// </summary>
        public override void OnLoad()
        {
            Invasion.LoadVanilla();
            DateEvent.LoadVanilla();

            LoadBiomes();
            LoadInvasions();
            LoadSpawns();

            base.OnLoad();

            tomeSkillHotkey    = options[0];
            shadowMirrorHotkey = options[1];

            MWorld.managers    = new SkillManager[1];
            MWorld.tomes       = new Item        [1];
            MWorld.accessories = new Item        [1][];

            MWorld.tomes   [0] = new Item();

            for (int i = 0; i < MWorld.accessories.Length; i++)
            {
                MWorld.accessories[i] = new Item[ExtraSlots];

                for (int j = 0; j < MWorld.accessories[i].Length; j++)
                {
                    MWorld.accessories[i][j] = new Item();
                }
            }

            // insert all graphical/UI-related stuff AFTER this check!
            if (Main.dedServ)
            {
                return;
            }

            Texture2D gWings = textures["Resources/Wings/Golden Wings"];

            foreach (Texture2D t in Main.wingsTexture.Values)
            {
                if (gWings == t)
                {
                    addedWings = true;
                    break;
                }
            }

            if (!addedWings)
            {
                GoldenWings = Main.dedServ ? Main.wingsTexture.Count : ObjectLoader.AddWingsToGame(gWings);

                addedWings = true;
            }

            StarterSetSelectionHandler.Init();
        }