Bug - Fixed oil of parrrlay is multiusable

Rinn

Developer
I'm going to take a guess without looking at the code and say that the alternate way to use restorers from the skill page has something to do with it, and it's legacy from way before you could multi-use anything else.
 

Catch-22

Active member
Ah yes, that would probably be it. They should probably be marked as multiusable anyway, seeings as you can use them from the multiuse page.
 

xKiv

Active member
Edit: Also as someone who has provided large patches to data files before, editing them can be pretty tedious work. I'd say there is a good chance that someone fully intends to make the changes, they just haven't gathered up the motivation to do so yet.

I know. I figured one day before first anxious question would be OK-ish (considering that roippi asked me for double-checking the lists, and I doublechecked only one item and didn't say whether I would check the rest). Then in a week, then month, then every few months ...

... I am assuming you used something similar to this:

Well, my loop ran over $items[], filtered out only usable and multiusable (and only those I successfully got into my inventory), then checked using contains_text.
I also got not just items where the multi-flag is missing, but also items where it shouldn't be. "mafiaSingle(true)" means usable==true && multi==false, " mafiaSingle(false)" means multi==true. "isInMulti(...)" just displays return value of contains_text.
But most of the script was dealing with getting items to my inventory and then getting them back where I got them from.


I think there may be some special handling for restorers somewhere because I just used two cloaca-colas and they were multi-used.
UseItemRequest has a switch on consumptionType. MP_RESTORE, HP_RESTORE, HPMP_RESTORE and CONSUME_MULTIPLE all go to multiuse.php (as long as quantity > 1).
When called from the "use" command, an item gets CONSUME_MULTIPLE if it has the multi flag (ATTR_MULTIPLE), CONSUME_USE if it has the usable flag, CONSUME_INFINITE if it has reusable flag, there are a couple of special cases on item id, otherwise it is a bitmap of primary/secondary uses.
Phonics down is defined as hpmp, but not usable (usable would take priority). It isn't uncluded in my data because I only went over items which had usable==true || multi==true.

Catch-22 said:
Ah yes, that would probably be it. They should probably be marked as multiusable anyway, seeings as you can use them from the multiuse page.
I suspect that might break some stuff.
 

fronobulax

Developer
Staff member
Well you're not the only one, sometimes devs are just busy and other times it's not something that they feel is a priority or worthwhile.

Speaking only for myself... I started a new job about nine months ago (and my KoLmafia experience was a factor in hiring me :cool: ) but as a consequence my day job involves writing code so I am no longer actively seeking little projects I can contribute to mafia. However I have always had an offer on the table that if someone else does the work I will review and commit. Furthermore if a feature interests me and can be implemented within my skill and knowledge level I am willing to do so. I do read kolmafia.us at least daily but I do not always remember what was interesting to me or needed to be done. Bottom line - if you feel something worthwhile is being ignored then PM me and I will work with you to implement or give you my reasons why it is not a good use of my time.
 

Rinn

Developer
r11807 updates a bunch of items. I didn't change any items that are reusable (BURT for example).

If adding the multiple flags to mp or hp restores breaks anything someone should revert it, but I didn't see any ill effects.
 
Last edited:

Veracity

Developer
Staff member
Restoratives are assumed to be multiusable, although I am not sure they all are. Presumably we have a way to mark a restorative as not multiusable - perhaps by giving it a secondary usage as "usable"
 

Rinn

Developer
In that case someone should probably do a find\replace on items.txt (replace for 'multiple, mp", "multiple, hp" etc) and remove the multiple flags I just added to the restores and then set that flag in code instead unless usable is set. I changed the data file on a break at work, so I can't do it at the moment.
 
Last edited:

Catch-22

Active member
Uhhh why not just keep the data consistent and change the code? I don't think it would be too hard to spade all restoratives and find out which ones are actually multiusable.

I didn't change any items that are reusable (BURT for example).

BURT is no different to bit of clingfilm or duct tape, if you use 1 it doesn't get consumed, if you multiuse an amount that makes a valid item, you lose that amount. Why should the data be represented any differently?
 
Last edited:

Rinn

Developer
I didn't change it because I wasn't sure if it would break, and I didn't feel like taking the risk.
 

Catch-22

Active member
I didn't change it because I wasn't sure if it would break, and I didn't feel like taking the risk.

Not sure which part you are referring to, if you mean changing the code that's fair enough. The changes you made haven't broken anything so far.

Anyway, I purchased all the restoratives I could acquire, which came out to everything except Platinum Yendorian Express Card, pixel orb and stuff a disco bandit can't buy. I ran my script to compare the multi records, and here's the output as of the latest revision:

Code:
> call scripts\sandbox\check_multiuse.ash

The following items are not marked as multi but appear in multiuse.php
ancient Magi-Wipes
BURT
can of CRIMBCOLA
elven magi-pack
generic healing potion
generic restorative potion
high-pressure seltzer bottle
New Cloaca-Cola
procrastination potion
really thick bandage
Wolfman Nardz

The following items marked as multi but do not appear in multiuse.php
 

Fluxxdog

Active member
r11808
Code:
Unknown secondary usage for Doc Galaktik's Pungent Unguent: hp
Unknown secondary usage for Doc Galaktik's Ailment Ointment: hp
Unknown secondary usage for Doc Galaktik's Restorative Balm: hp
Unknown secondary usage for Doc Galaktik's Homeopathic Elixir: hp
Unknown secondary usage for Knob Goblin seltzer: mp
Unknown secondary usage for Knob Goblin superseltzer: mp
Unknown secondary usage for Dyspepsi-Cola: mp
Unknown secondary usage for Mountain Stream soda: mp
Unknown secondary usage for red pixel potion: hp
Unknown secondary usage for blue pixel potion: mp
Unknown secondary usage for green pixel potion: hpmp
Unknown secondary usage for cast: hp
Unknown secondary usage for tiny house: hpmp
Unknown secondary usage for phonics down: hpmp
Unknown secondary usage for forest tears: hp
Unknown secondary usage for Blatantly Canadian: mp
Unknown secondary usage for Cloaca-Cola: mp
Unknown secondary usage for Cherry Cloaca Cola: mp
Unknown secondary usage for Diet Cloaca Cola: mp
Unknown secondary usage for Regular Cloaca Cola: mp
Unknown secondary usage for unrefined Mountain Stream syrup: mp
Unknown secondary usage for bottle of Vangoghbitussin: hpmp
Unknown secondary usage for bottle of Monsieur Bubble: mp
Unknown secondary usage for carbonated soy milk: mp
Unknown secondary usage for filthy poultice: hp
Unknown secondary usage for natural fennel soda: mp
Unknown secondary usage for Monstar energy beverage: mp
Unknown secondary usage for gauze garter: hp
Unknown secondary usage for honey-dipped locust: hpmp
Unknown secondary usage for carbonated water lily: mp
Unknown secondary usage for palm-frond fan: hpmp
Unknown secondary usage for plump juicy grub: hp
Unknown secondary usage for delicious shimmering moth: mp
Unknown secondary usage for cotton candy cone: hpmp
Unknown secondary usage for cotton candy pinch: hpmp
Unknown secondary usage for cotton candy smidgen: hpmp
Unknown secondary usage for cotton candy skoshe: hpmp
Unknown secondary usage for cotton candy plug: hpmp
Unknown secondary usage for cotton candy pillow: hpmp
Unknown secondary usage for cotton candy bale: hpmp
Unknown secondary usage for Nardz energy beverage: mp
Unknown secondary usage for sugar shard: hpmp
Unknown secondary usage for Okee-Dokee soda: mp
Unknown secondary usage for Notes from the Elfpocalypse, Chapter I: hpmp
Unknown secondary usage for Notes from the Elfpocalypse, Chapter II: hpmp
Unknown secondary usage for Notes from the Elfpocalypse, Chapter III: hpmp
Unknown secondary usage for Notes from the Elfpocalypse, Chapter IV: hpmp
Unknown secondary usage for Notes from the Elfpocalypse, Chapter V: hpmp
Unknown secondary usage for Notes from the Elfpocalypse, Chapter VI: hpmp
Unknown secondary usage for elven medi-pack: hp
Dunno if this is a problem, but here it is.
 
Top