Ejemplo n.º 1
0
        private static void SetupBestiary(CancellationToken token)
        {
            //Beastiary DB
            var bestiaryDatabase = new BestiaryDatabase();

            new BestiaryDatabaseNPCsPopulator().Populate(bestiaryDatabase);
            Main.BestiaryDB = bestiaryDatabase;
            ContentSamples.RebuildBestiarySortingIDsByBestiaryDatabaseContents(bestiaryDatabase);

            //Drops DB
            var itemDropDatabase = new ItemDropDatabase();

            itemDropDatabase.Populate();
            Main.ItemDropsDB = itemDropDatabase;

            //Update the bestiary DB with the drops DB.
            bestiaryDatabase.Merge(Main.ItemDropsDB);

            //Etc

            if (!Main.dedServ)
            {
                Main.BestiaryUI = new UIBestiaryTest(Main.BestiaryDB);
            }

            Main.ItemDropSolver  = new ItemDropResolver(itemDropDatabase);
            Main.BestiaryTracker = new BestiaryUnlocksTracker();
        }
Ejemplo n.º 2
0
 public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
 {
     bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
         BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface,
         new FlavorTextBestiaryInfoElement("Mods.AlchemistNPCLite.Bestiary.Tinkerer")
     });
 }
Ejemplo n.º 3
0
 public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
 {
     bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
         BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface,
         new FlavorTextBestiaryInfoElement($"Mods.FargowiltasSouls.Bestiary.{Name}")
     });
 }
Ejemplo n.º 4
0
        public UIBestiaryBar(BestiaryDatabase db)
        {
            _db = db;
            _bestiaryBarItems = new List <BestiaryBarItem>();

            RecalculateBars();
        }
Ejemplo n.º 5
0
 public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
 {
     bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
         BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky,
         new FlavorTextBestiaryInfoElement("Mods.Fargowiltas.Bestiary.Abominationn")
     });
 }
Ejemplo n.º 6
0
 public UIBestiaryTest(BestiaryDatabase database)
 {
     this._filterer.SetSearchFilterObject <Filters.BySearch>(new Filters.BySearch());
     this._originalEntriesList = new List <BestiaryEntry>((IEnumerable <BestiaryEntry>)database.Entries);
     this._workingSetEntries   = new List <BestiaryEntry>((IEnumerable <BestiaryEntry>) this._originalEntriesList);
     this._filterer.AddFilters(database.Filters);
     this._sorter.AddSortSteps(database.SortSteps);
     this.BuildPage();
 }
Ejemplo n.º 7
0
 public UIBestiaryTest(BestiaryDatabase database)
 {
     _filterer.SetSearchFilterObject(new Filters.BySearch());
     _originalEntriesList = new List <BestiaryEntry>(database.Entries);
     _workingSetEntries   = new List <BestiaryEntry>(_originalEntriesList);
     _filterer.AddFilters(database.Filters);
     _sorter.AddSortSteps(database.SortSteps);
     BuildPage();
 }
Ejemplo n.º 8
0
 public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
 {
     bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(
         ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCID.BrainofCthulhu],
         quickUnlock: true
         );
     bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
         BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson,
         new FlavorTextBestiaryInfoElement("Mods.FargowiltasSouls.Bestiary.GuttedCreeper")
     });
 }
Ejemplo n.º 9
0
        public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
        {
            // We can use AddRange instead of calling Add multiple times in order to add multiple items at once
            bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
                // Sets the spawning conditions of this NPC that is listed in the bestiary.
                BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime,

                // Sets the description of this NPC that is listed in the bestiary.
                new FlavorTextBestiaryInfoElement("This type of zombie for some reason really likes to spread confetti around. Otherwise, it behaves just like a normal zombie.")
            });
        }
Ejemplo n.º 10
0
 public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
 {
     bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(
         ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCID.QueenBee],
         quickUnlock: true
         );
     bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
         BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle,
         new FlavorTextBestiaryInfoElement("Mods.FargowiltasSouls.Bestiary.RoyalSubject")
     });
 }
Ejemplo n.º 11
0
 public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
 {
     bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(
         ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[ModContent.NPCType <LifeChampion>()],
         quickUnlock: true
         );
     bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
         BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow,
         new FlavorTextBestiaryInfoElement($"Mods.FargowiltasSouls.Bestiary.{Name}")
     });
 }
Ejemplo n.º 12
0
        public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
        {
            // We can use AddRange instead of calling Add multiple times in order to add multiple items at once
            bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
                // Sets the spawning conditions of this NPC that is listed in the bestiary.
                BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground,
                BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns,

                // Sets the description of this NPC that is listed in the bestiary.
                new FlavorTextBestiaryInfoElement("Looks like a Digger fell into some aqua-colored paint. Oh well.")
            });
        }
Ejemplo n.º 13
0
        public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
        {
            // We can use AddRange instead of calling Add multiple times in order to add multiple items at once
            bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
                // Sets the preferred biomes of this town NPC listed in the bestiary.
                // With Town NPCs, you usually set this to what biome it likes the most in regards to NPC happiness.
                BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface,

                // Sets your NPC's flavor text in the bestiary.
                new FlavorTextBestiaryInfoElement("Armored to the bone, this heartless carries a sword and is weak to a sun rising.\nWill only appear in really large groups alongsode Surveilance Robots")
            });
        }
Ejemplo n.º 14
0
        public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
        {
            // We can use AddRange instead of calling Add multiple times in order to add multiple items at once
            bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
                // Sets the preferred biomes of this town NPC listed in the bestiary.
                // With Town NPCs, you usually set this to what biome it likes the most in regards to NPC happiness.
                BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface,

                // Sets your NPC's flavor text in the bestiary.
                new FlavorTextBestiaryInfoElement("These small flying drone Heartless fire lasers that can be returned with a block, but they will respond with an even stronger power laser")
            });
        }
Ejemplo n.º 15
0
        public static void SetBestiary(NPC npc, BestiaryDatabase database, BestiaryEntry bestiaryEntry)
        {
            if (npc.ModNPC != null)
            {
                bestiaryEntry.Info.Add(npc.ModNPC.Mod.ModSourceBestiaryInfoElement);
            }
            npc.ModNPC?.SetBestiary(database, bestiaryEntry);

            foreach (GlobalNPC g in HookSetBestiary.Enumerate(npc.globalNPCs))
            {
                g.SetBestiary(npc, database, bestiaryEntry);
            }
        }
Ejemplo n.º 16
0
        public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
        {
            // We can use AddRange instead of calling Add multiple times in order to add multiple items at once
            bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
                // Sets the preferred biomes of this town NPC listed in the bestiary.
                // With Town NPCs, you usually set this to what biome it likes the most in regards to NPC happiness.
                BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground,

                // Sets your NPC's flavor text in the bestiary.
                new FlavorTextBestiaryInfoElement("Don't be fooled by this pot looking creature or it will come at you and take your money away" +
                                                  "\nKeep hurting it to take it's money away instead.")
            });
        }
Ejemplo n.º 17
0
        public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
        {
            // We can use AddRange instead of calling Add multiple times in order to add multiple items at once
            bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
                // Sets the preferred biomes of this town NPC listed in the bestiary.
                // With Town NPCs, you usually set this to what biome it likes the most in regards to NPC happiness.
                BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface,

                // Sets your NPC's flavor text in the bestiary.
                new FlavorTextBestiaryInfoElement("Heartless that emerge from various places" +
                                                  "\nThey sneak up to their enemies and strike them with sharp claws" +
                                                  "\nThey are extremely tenacious, often chasing their prey to the end")
            });
        }
Ejemplo n.º 18
0
        public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
        {
            // We can use AddRange instead of calling Add multiple times in order to add multiple items at once
            bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
                // Sets the preferred biomes of this town NPC listed in the bestiary.
                // With Town NPCs, you usually set this to what biome it likes the most in regards to NPC happiness.
                BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface,

                // Sets your NPC's flavor text in the bestiary.
                new FlavorTextBestiaryInfoElement("Spellcasting Heartless" +
                                                  "\nWhile hovering about, they attack by casting Fire" +
                                                  "\nHaving low HP, they keep their distance from their opponents, making them difficult to attack")
            });
        }
Ejemplo n.º 19
0
        public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
        {
            // We can use AddRange instead of calling Add multiple times in order to add multiple items at once
            bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
                // Sets the preferred biomes of this town NPC listed in the bestiary.
                // With Town NPCs, you usually set this to what biome it likes the most in regards to NPC happiness.
                BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface,

                // Sets your NPC's flavor text in the bestiary.
                new FlavorTextBestiaryInfoElement("Hailing from a mysterious greyscale cube world, the Example Person is here to help you understand everything about tModLoader."),

                // You can add multiple elements if you really wanted to
                // You can also use localization keys (see Localization/en-US.lang)
                new FlavorTextBestiaryInfoElement("Mods.ExampleMod.Bestiary.ExamplePerson")
            });
        }
Ejemplo n.º 20
0
 /// <summary>
 /// Allows you to set an NPC's information in the Bestiary.
 /// </summary>
 /// <param name="database"></param>
 /// <param name="bestiaryEntry"></param>
 public virtual void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
 {
 }