Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ModifyEntriesThatNeedIt()

void Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.ModifyEntriesThatNeedIt ( )
inlineprivate

Definition at line 513 of file BestiaryDatabaseNPCsPopulator.cs.

514 {
515 FindEntryByNPCID(258).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.SurfaceMushroom));
516 FindEntryByNPCID(-1).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCorruption));
517 FindEntryByNPCID(81).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCorruption));
518 FindEntryByNPCID(121).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCorruption));
519 FindEntryByNPCID(7).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCorruption));
520 FindEntryByNPCID(98).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCorruption));
521 FindEntryByNPCID(6).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCorruption));
522 FindEntryByNPCID(94).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCorruption));
523 FindEntryByNPCID(173).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCrimson));
524 FindEntryByNPCID(181).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCrimson));
525 FindEntryByNPCID(183).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCrimson));
526 FindEntryByNPCID(242).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCrimson));
527 FindEntryByNPCID(241).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCrimson));
528 FindEntryByNPCID(174).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCrimson));
529 FindEntryByNPCID(240).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.TheCrimson));
530 FindEntryByNPCID(175).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.UndergroundJungle));
531 FindEntryByNPCID(153).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.Jungle));
532 FindEntryByNPCID(52).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.Jungle));
533 FindEntryByNPCID(58).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.Jungle));
534 FindEntryByNPCID(102).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.Caverns));
535 FindEntryByNPCID(157).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.Jungle));
536 FindEntryByNPCID(51).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.Jungle));
537 FindEntryByNPCID(169).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.UndergroundSnow));
538 FindEntryByNPCID(510).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.UndergroundDesert));
539 FindEntryByNPCID(69).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.Desert));
540 FindEntryByNPCID(580).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.UndergroundDesert));
541 FindEntryByNPCID(581).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.UndergroundDesert));
542 FindEntryByNPCID(78).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.Desert));
543 FindEntryByNPCID(79).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.CorruptDesert));
544 FindEntryByNPCID(630).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.CrimsonDesert));
545 FindEntryByNPCID(80).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.HallowDesert));
546 FindEntryByNPCID(533).AddTags(new BestiaryPortraitBackgroundBasedOnWorldEvilProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.CorruptUndergroundDesert, CommonTags.SpawnConditions.Biomes.CrimsonUndergroundDesert));
547 FindEntryByNPCID(528).AddTags(new BestiaryPortraitBackgroundProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.UndergroundDesert));
548 FindEntryByNPCID(529).AddTags(new BestiaryPortraitBackgroundBasedOnWorldEvilProviderPreferenceInfoElement(CommonTags.SpawnConditions.Biomes.CorruptUndergroundDesert, CommonTags.SpawnConditions.Biomes.CrimsonUndergroundDesert));
550 BestiaryEntry bestiaryEntry = FindEntryByNPCID(398);
551 bestiaryEntry.Info.Add(new MoonLordPortraitBackgroundProviderBestiaryInfoElement());
552 bestiaryEntry.Info.RemoveAll((IBestiaryInfoElement x) => x is NamePlateInfoElement);
553 bestiaryEntry.Info.Add(new NamePlateInfoElement("Enemies.MoonLord", 398));
554 bestiaryEntry.Icon = new UnlockableNPCEntryIcon(398, 0f, 0f, 0f, 0f, "Enemies.MoonLord");
555 FindEntryByNPCID(664).Info.RemoveAll((IBestiaryInfoElement x) => x is NPCKillCounterInfoElement);
556 FindEntryByNPCID(687).Info.RemoveAll((IBestiaryInfoElement x) => x is NPCKillCounterInfoElement);
557 ModifyEntriesThatNeedIt_NameOverride(637, "Friends.TownCat");
558 ModifyEntriesThatNeedIt_NameOverride(638, "Friends.TownDog");
559 ModifyEntriesThatNeedIt_NameOverride(656, "Friends.TownBunny");
560 for (int i = 494; i <= 506; i++)
561 {
562 FindEntryByNPCID(i).UIInfoProvider = new SalamanderShellyDadUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[i]);
563 }
564 FindEntryByNPCID(534).UIInfoProvider = new HighestOfMultipleUICollectionInfoProvider(new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[534], quickUnlock: false), new TownNPCUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[441]));
565 foreach (NPCStatsReportInfoElement item in from x in FindEntryByNPCID(13).Info
566 select x as NPCStatsReportInfoElement into x
567 where x != null
568 select x)
569 {
570 item.OnRefreshStats += AdjustEaterOfWorldStats;
571 }
572 foreach (NPCStatsReportInfoElement item2 in from x in FindEntryByNPCID(491).Info
573 select x as NPCStatsReportInfoElement into x
574 where x != null
575 select x)
576 {
577 item2.OnRefreshStats += AdjustPirateShipStats;
578 }
579 FindEntryByNPCID(68).UIInfoProvider = new HighestOfMultipleUICollectionInfoProvider(new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[68], quickUnlock: true), new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[35], quickUnlock: true), new TownNPCUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[54]));
580 FindEntryByNPCID(35).UIInfoProvider = new HighestOfMultipleUICollectionInfoProvider(new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[35], quickUnlock: true), new TownNPCUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[54]));
581 FindEntryByNPCID(37).UIInfoProvider = new HighestOfMultipleUICollectionInfoProvider(new TownNPCUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[37]), new TownNPCUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[54]), new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[35], quickUnlock: true));
582 FindEntryByNPCID(565).UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[565], quickUnlock: true);
583 FindEntryByNPCID(577).UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[577], quickUnlock: true);
584 FindEntryByNPCID(551).UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[551], quickUnlock: true);
585 FindEntryByNPCID(491).UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[491], quickUnlock: true);
587 {
588 { 5, 4 },
589 { 267, 266 },
590 { 115, 113 },
591 { 116, 113 },
592 { 117, 113 },
593 { 139, 134 },
594 { 372, 370 },
595 { 658, 657 },
596 { 659, 657 },
597 { 660, 657 },
598 { 454, 439 },
599 { 521, 439 }
600 })
601 {
602 int key = item3.Key;
603 int value = item3.Value;
604 FindEntryByNPCID(key).UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[value], quickUnlock: true);
605 }
607 dictionary.Add(443, new int[1] { 46 });
608 dictionary.Add(442, new int[1] { 74 });
609 dictionary.Add(592, new int[1] { 55 });
610 dictionary.Add(444, new int[1] { 356 });
611 dictionary.Add(601, new int[1] { 599 });
612 dictionary.Add(445, new int[1] { 361 });
613 dictionary.Add(446, new int[1] { 377 });
614 dictionary.Add(605, new int[1] { 604 });
615 dictionary.Add(447, new int[1] { 300 });
616 dictionary.Add(627, new int[1] { 626 });
617 dictionary.Add(613, new int[1] { 612 });
618 dictionary.Add(448, new int[1] { 357 });
619 dictionary.Add(539, new int[2] { 299, 538 });
620 foreach (KeyValuePair<int, int[]> item4 in dictionary)
621 {
622 FindEntryByNPCID(item4.Key).UIInfoProvider = new GoldCritterUICollectionInfoProvider(item4.Value, ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[item4.Key]);
623 }
625 {
626 { 362, 363 },
627 { 364, 365 },
628 { 602, 603 },
629 { 608, 609 }
630 })
631 {
632 FindEntryByNPCID(item5.Key).UIInfoProvider = new HighestOfMultipleUICollectionInfoProvider(new CritterUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[item5.Key]), new CritterUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[item5.Value]));
633 }
634 FindEntryByNPCID(4).AddTags(new SearchAliasInfoElement("eoc"));
635 FindEntryByNPCID(13).AddTags(new SearchAliasInfoElement("eow"));
636 FindEntryByNPCID(266).AddTags(new SearchAliasInfoElement("boc"));
637 FindEntryByNPCID(113).AddTags(new SearchAliasInfoElement("wof"));
638 FindEntryByNPCID(50).AddTags(new SearchAliasInfoElement("slime king"));
639 FindEntryByNPCID(125).AddTags(new SearchAliasInfoElement("the twins"));
640 FindEntryByNPCID(126).AddTags(new SearchAliasInfoElement("the twins"));
641 FindEntryByNPCID(222).AddTags(new SearchAliasInfoElement("qb"));
642 FindEntryByNPCID(222).AddTags(new SearchAliasInfoElement("bee queen"));
643 FindEntryByNPCID(398).AddTags(new SearchAliasInfoElement("moonlord"));
644 FindEntryByNPCID(398).AddTags(new SearchAliasInfoElement("cthulhu"));
645 FindEntryByNPCID(398).AddTags(new SearchAliasInfoElement("ml"));
646 FindEntryByNPCID(125).AddTags(new SearchAliasInfoElement("mech boss"));
647 FindEntryByNPCID(126).AddTags(new SearchAliasInfoElement("mech boss"));
648 FindEntryByNPCID(127).AddTags(new SearchAliasInfoElement("mech boss"));
649 FindEntryByNPCID(134).AddTags(new SearchAliasInfoElement("mech boss"));
650 FindEntryByNPCID(657).AddTags(new SearchAliasInfoElement("slime queen"));
651 FindEntryByNPCID(636).AddTags(new SearchAliasInfoElement("eol"));
652 FindEntryByNPCID(636).AddTags(new SearchAliasInfoElement("fairy"));
653 }
void Add(TKey key, TValue value)
IBestiaryUICollectionInfoProvider UIInfoProvider
void AddTags(params IBestiaryInfoElement[] elements)
static Dictionary< int, string > NpcBestiaryCreditIdsByNpcNetIds

References Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator._currentDatabase, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), Terraria.GameContent.Bestiary.BestiaryEntry.AddTags(), Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.AdjustEaterOfWorldStats(), Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.AdjustPirateShipStats(), Terraria.GameContent.Bestiary.BestiaryDatabase.ApplyPass(), Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptDesert, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptUndergroundDesert, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonDesert, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonUndergroundDesert, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.FindEntryByNPCID(), Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowDesert, Terraria.GameContent.Bestiary.BestiaryEntry.Info, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.ModifyEntriesThatNeedIt_NameOverride(), Terraria.ID.ContentSamples.NpcBestiaryCreditIdsByNpcNetIds, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.TryGivingEntryFlavorTextIfItIsMissing(), Terraria.GameContent.Bestiary.BestiaryEntry.UIInfoProvider, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, and Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow.

Referenced by Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator.Populate().