Feature determine if item is a "potion"

AFAIK there isn't a way to determine if an item is a "potion" without using visit_url() to check the item_desc.php

Kol uses that to determine a few things now - For example, whether it can be duplicated in the Deep Machine Tunnels, and whether it is obtainable from Mr. Cheeng's Spectacles / Continental Juice Bar.

This could be resolved by either adding a boolean "is_potion" item proxy field, or possibly including a "desc_type" item proxy field which simply contains the "Type: " value which Kol shows in item_desc.php
 

heeheehee

Developer
Staff member
This would warrant changing datafiles, and possibly the format. Question in the meanwhile: are all potions usable? Or, to put this another way, are there any potions that aren't usable?
 

heeheehee

Developer
Staff member
Thanks for the list!

So, the easiest fix here would be to change the primary use of all potions to "potion", then edit some code so that "potion" can show up as a result of item_type(item).

I do find it a little strange that getItemType (which uses itemTypes for weapons / offhands) lives in EquipmentDatabase, especially since most of the heavy lifting is done by ItemDatabase.getConsumptionType.

I'm also disappointed that KoL doesn't automatically make all potions multi-usable, but that's probably not changing any time soon.
 

Veracity

Developer
Staff member
That apparently requires a manual decision at the time the item is created. They often start as single use and then become multi usable - which is why we assume single use until we learn otherwise; it still works.
 
Top