Bug - Fixed divine item not acquireable?

gnaddelwarz

New member
Divine items seems to be not "acquire"able:
gCLI said:
> acquire 50 noisem

You need 8 more divine noisemaker to continue.

> buy 8 noisem

Searching for "divine noisemaker"...
Purchasing divine noisemaker (8 @ 685)...
You acquire divine noisemaker (8)
Purchases complete.

> acquire 50 love cute

Searching for "love song of sugary cuteness"...
Purchasing love song of sugary cuteness (10 @ 888)...
You acquire love song of sugary cuteness (10)
Purchasing love song of sugary cuteness (9 @ 900)...
You acquire love song of sugary cuteness (9)
Purchases complete.
(This was the preparation for basementing, if you wonder....)

As you can see, acquire does not get the items from the mall, I had to explicitly buy them, but the lovesongs were bought by acquire (as any other items, too)
 

Spiny

Member
Duplicated. Tested with buy from mall enabled and disabled, the three summoned divine items I tested: blowout, silly string and noisemaker. r8425.
 

Bale

Minion
Mafia does not auto-purchase any item without an autosale price. I believe there are a couple of exceptions coded into that rule, but only a few. That's why you need to specifically buy divine items, cyclops eyedrops and other items that cannot be discarded.
 

gnaddelwarz

New member
Feature request [patch]: allow divine items to be mall-bought

Ah, good to know.
I just wondered, why love songs work, but divine items not, because both items are quite similar (same game-mechanics...)

so, make this a feature request, patch attached
 

Attachments

  • divine.patch
    1.5 KB · Views: 38

fronobulax

Developer
Staff member
r8427.

Eventually I'm going to get in trouble checking in other people's patches, but for the moment...

Should this be extended to cyclops eyedrops and the other items Bale alluded to above?
 

StDoodle

Minion
I can't speak for the main devs. One thing I can say is that there at least used to be a policy of not adding in anything until several people had requested it.

Also, while I risk coming off as an ass here... I'd really rather something* not get added into mafia itself if both 1) it could be taken care of by scripting and 2) all of the various dependencies, requirements, et al haven't been looked into. For reference, I'm referring to the slimeling charge addition that doesn't support the CLI. (I mean c'mon; the CLI isn't exactly a strange edge case.)

* as in new stuff, not fixes
 

Veracity

Developer
Staff member
2) all of the various dependencies, requirements, et al haven't been looked into. For reference, I'm referring to the slimeling charge addition that doesn't support the CLI. (I mean c'mon; the CLI isn't exactly a strange edge case.)
I don't ever accept a patch "as is". I look at and understand all the code before loading it in. And, even if I do think the code is suitable and without unintended side effects, I make sure that the indentation and such matches our standard style. And, yes - I prefer that the patch be a complete solution.

I just looked at the slimeling submit. The indentation is wrong. And, why in the world would you do "(float) 0.0" to cast a double constant into a float when you can simply do "0.0F"? And why do two gets and potentially two sets to make sure a Preference is non-negative, when you can do it with a single get and a single set? I have those things fixed in my workspace and will submit them, whenever I need to submit something else of my own.

I don't understand the "doesn't support the CLI" comment. You can feed your slimeling through the GUI (Item Manager/Equipment) or the CLI ("slimeling" command) and both go through exactly the same code - and my session log shows Slimeling charges for both.

My opinion on installing user-supplied patches:

- don't do it unless you understand the code - and understand the context well enough to know that the code is complete and without unintended side effects
- make sure the code has KoLmafia standard indentation, commentation, braces, and so on. If the code didn't come in formatted correctly, reformat it yourself.
 

StDoodle

Minion
All I know is that I fed my slimeling many times from the equipment page, and his charges were accurately tracked. He emptied out, I fed him through the CLI, and mafia thought he was out of charges. I assumed this meant the CLI hadn't been properly supported by this patch, but perhaps it was another bug altogether and the fact that it coincided with CLI use was coincidental. I dunno. For what it's worth, I've never fed him through the item manager, so perhaps neither is supported?
 

Veracity

Developer
Staff member
If you mean that KoLmafia did not update the charpane in the Relay Browser for you after binging your Slimeling through the CLI, I can believe that; unless you have chat open, the charpane never refreshes after actions you do in the GUI or CLI. You can use the "refresh" link on the charpane to force a refresh, and when I did that, after binging from the CLI and GUI, it properly showed the updated fullness.

I don't know that not refreshing is a "bug", as such. I don't know a way to force the browser to submit a request to fetch and display the sidepane. The user presses links, the browser submits requests, KoLmafia acts as a proxy by relaying them along to the server and handing the replies back to the browser, which displays them. I don't know how to force an unsolicited charpane down to the browser.
 

StDoodle

Minion
IIRC, it wasn't showing up in KoLmafia either -- which is where I looked first (for reference, my familiar displays below buffs, so I rarely see it in the RB; I just check it in mafia). But to be honest, this was days ago, and I hadn't expected the same standard of non-bugginess from this patch as the ones from you & jh to begin with, so I just kinda shrugged it off after reporting in the thread on that patch. I tried looking through my session logs, but either the "slimeling" command doesn't get recorded, or it records identically to how feeding through the RB does, so nothing useful to report.
 
Top