Bug Astral Energy Drinks don't appear in Item Manager

sadoatcakes

New member
I noticed this a while ago, but forgot to actually bug report it. Basically what it says on the tin: I have AEDs available in my inventory, but they don't show in the spleen section of the item manager. I'm currently in Avatar of Jarlsberg but that path has regular spleen function (15 available, no weird restrictions), so I don't think that's the issue.

Attached screenshots:
  • itemmanager1.png, itemmanager2.png: current views of my spleen section in the item manager (just missed getting it all on one screen, sorry)
  • inventory.png: current view of my spleen section in KoL
I'm using r28020 and I did not find any previous mention of this on the forums here.
 

Attachments

  • inventory.png
    inventory.png
    28.3 KB · Views: 10
  • itemmanager1.png
    itemmanager1.png
    61.5 KB · Views: 10
  • itemmanager2.png
    itemmanager2.png
    68.8 KB · Views: 10
Just popping in to say that I've encountered the same issue in a different path (ZS). I don't usually take AEDs so I haven't really been tracking this, but it's exactly the same: shows in my inventory, but not in the inventory tab. Using r28075 currently.

1728009371257.png
1728009401364.png
 
I had a thought on this one. There are two items with the same name:

- 5140 astral energy drink
- 10883 astral energy drink

On the wiki, the page for item 5140 redirects to the page for item 10883, since that's the AED version reintroduced in 2022 (after 5140 was obsoleted in 2018).

https://github.com/kolmafia/kolmafia/blob/main/src/data/items.txt still has both items in its list. Could mafia be still looking for 5140, not seeing it, and stopping before it looks for 10883? Or something along those lines?
 
Necro-ing this old thread because someone mentioned encountering it again today. After some debugging, I've determined that the root cause is a mismatch between how Concoction and ConsumablesDatabase are handling the names. ConsumablesDatabase.consumablesByName has its entry for astral energy drink keyed as "[10883]astral energy drink", but when Concoction.computeType() tries to look up the consumption information for the item, it uses the item's name, "astral energy drink". Because it doesn't find consumption information (because the consumables database has "[10883]astral energy drink" and "[5140]astral energy drink", but not "astral energy drink"), its concoction type gets set to ConcoctionType.NONE instead of ConcoctionType.SPLEEN.

I spent a little time trying to fix it, but couldn't come up with a generic solution that didn't break something else elsewhere. Maybe someone more familiar with this bit of code would be able to fix the bug.
 
You can use `ItemPool.get(itemId).getDisambiguatedName()` to get the "[10883]astral energy drink" format given the item id 10883.

However, when I tried that in computeType(), it crashed.

Easiest fix is perhaps just to check the main food, booze, spleen types (I don't know why this isn't done at the moment):

```
return switch (ItemDatabase.getConsumptionType(itemId)) {
case EAT, FOOD_HELPER -> ConcoctionType.FOOD;
case DRINK, DRINK_HELPER -> ConcoctionType.BOOZE;
case SPLEEN -> ConcoctionType.SPLEEN;
```
 
Back
Top