Content Patcher

Content Patcher

378k Downloads

[Lookup Anything] add Custom Ore Node support

Pathoschild opened this issue ยท 0 comments

commented

Looking up in-world ore added by Custom Ore Nodes causes this error:

[Lookup Anything] Something went wrong looking that up:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Pathoschild.Stardew.LookupAnything.GameHelper.GetSpriteSheetPixel[TPixel](Texture2D spriteSheet, Vector2 position) in C:\source\_Stardew\Mods.Pathoschild\LookupAnything\GameHelper.cs:line 480
   at Pathoschild.Stardew.LookupAnything.Framework.Lookups.GenericTarget`1.SpriteIntersectsPixel(Vector2 tile, Vector2 position, Rectangle spriteArea, Texture2D spriteSheet, Rectangle spriteSourceRectangle, SpriteEffects spriteEffects) in C:\source\_Stardew\Mods.Pathoschild\LookupAnything\Framework\Lookups\GenericTarget.cs:line 115
   at Pathoschild.Stardew.LookupAnything.Framework.Lookups.Items.ObjectTarget.SpriteIntersectsPixel(Vector2 tile, Vector2 position, Rectangle spriteArea) in C:\source\_Stardew\Mods.Pathoschild\LookupAnything\Framework\Lookups\Items\ObjectTarget.cs:line 109
   at Pathoschild.Stardew.LookupAnything.Framework.TargetFactory.<>c__DisplayClass5_0.<GetTargetFromScreenCoordinate>b__7(<>f__AnonymousType74`3 p) in C:\source\_Stardew\Mods.Pathoschild\LookupAnything\Framework\TargetFactory.cs:line 110
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Pathoschild.Stardew.LookupAnything.Framework.TargetFactory.GetTargetFromScreenCoordinate(GameLocation location, Vector2 tile, Vector2 position) in C:\source\_Stardew\Mods.Pathoschild\LookupAnything\Framework\TargetFactory.cs:line 109
   at Pathoschild.Stardew.LookupAnything.Framework.TargetFactory.GetSubjectFrom(Farmer player, GameLocation location, Boolean hasCursor) in C:\source\_Stardew\Mods.Pathoschild\LookupAnything\Framework\TargetFactory.cs:line 123
   at Pathoschild.Stardew.LookupAnything.ModEntry.GetSubject(StringBuilder logMessage) in C:\source\_Stardew\Mods.Pathoschild\LookupAnything\ModEntry.cs:line 362
   at Pathoschild.Stardew.LookupAnything.ModEntry.<>c__DisplayClass17_0.<ShowLookup>b__0() in C:\source\_Stardew\Mods.Pathoschild\LookupAnything\ModEntry.cs:line 228
   at Pathoschild.Stardew.Common.CommonHelper.InterceptErrors(IMonitor monitor, String verb, String detailedVerb, Action action, Action`1 onError) in C:\source\_Stardew\Mods.Pathoschild\Common\CommonHelper.cs:line 477

Repro steps:

  1. Install this Mods folder.
  2. Go through the mines until you see a custom ore node (see example screenshot).
  3. Try to look up the ore node.