ThinkInvis / RoR2-TILER2

A library mod for Risk of Rain 2.
GNU General Public License v3.0
2 stars 1 forks source link

Lunar Items not properly obeying the WorldUnique ItemTag #14

Closed DestroyedClone closed 3 years ago

DestroyedClone commented 3 years ago

Describe the Bug

Lunar Items that have the ItemTag "WorldUnique" are added to the Lunar drop item pool despite the tag. public override ReadOnlyCollection<ItemTag> itemTags => new ReadOnlyCollection<ItemTag>(new[] { ItemTag.WorldUnique, ItemTag.AIBlacklist });

To Reproduce

Steps to reproduce the behavior:

  1. Create a mod that uses TILER2's ItemBase with an item that is both a LunarTier, and has a "WorldUnique" itemtag.
  2. Use a Lunar Command Menu/Load the Bazaar scene
  3. The Lunar Item will be among the choices available.

Expected Behavior

The Lunar Item would not appear within the Lunar drop item pool. Vanilla items with this tag (https://riskofrain2.fandom.com/wiki/Category:WorldUnique_Items) are properly removed, and so are modded Legendary items that are WorldUnique.

Console Log

Not Applicable.

Additional Context

https://discordapp.com/channels/562704639141740588/562704639569428506/806915765667889262

Phedg1 Today at 7:55 AM The way ItemDropAPI works has changed a lot Because TILER2.CatalogBoilerplateModule.On_RunBuildDropTable calls R2API.ItemDropAPI.AddToDefaultByTier the lunar item is being added to the lunar drop list when in vanilla it would not be Also, there are some lines in R2API.ItemAPI.AddItemAction that will cause the item to be added to the lunar drop list incorrectly but only for the first run after the game is launched I'll PR the changes to R2API after I have had some sleep, I can't do anything about Tiler2

ThinkInvis commented 3 years ago

Attempted fix in e15dadd1dde48c52861ac8f2543620113fa333a5, but ItemDropAPI is so different now that hooking it may or may not be necessary at all; I'll have to do some testing to find out how to proceed from here.

ThinkInvis commented 3 years ago

Looks to be fixed as of v4.0.6. Will watch for regression if/when use of ItemDropAPI is reimplemented.