Bug - Cannot Reproduce Clovers disassembled upon removal from Closet during Beecore

When you are in Beecore, clover protection the Relay Browser now offers to
closet your clover, rather than disassemble it.

When I bought a clover from the Hermit, it was automatically closeted, and I assumed that the updated protection for Beecore meant it would be safe to use in Mafia. However, when I removed the clover from my closet for use (via the relay browser), it was automatically disassembled.

Was this the expected behavior (using r9344)?
 

Veracity

Developer
Staff member
No, that is not expected behavior. It doesn't do it for me, either. I tried it from the Closet/Inventory screen in the Relay Browser, via chat command, via the item manager, via the CLI. In all cases, the clover was left intact in inventory, exactly as expected.

Looking at ResultProcessor.shouldDisassembleClovers() and ResultProcessor.isCloverURL(), clover protection kicks in when a clover is obtained from one of the following URLs:

adventure.php
choice.php
hermit.php
mallstore.php (purchase)
barrel.php
shore.php
inv_use.php with whichitem=553 (the 31337 scroll)

Moving out of the closet is not one of the above.

I suggest that you disable or remove your Greasemonkey script which is disassembling your clovers.
 
I suggest that you disable or remove your Greasemonkey script which is disassembling your clovers.

I'm not using a Greasemonkey script. I did, however, have the clover protection option selected in Preferences, but I thought that was for the warning before adventuring with a clover, and the default behavior (pre-Beecore) was to disassemble, regardless of that setting.
 

Winterbay

Active member
No, mafia only dissambles clovers (or closets them as the case may be) if you have that setting set. Otherwise it should leave the clovers alone.
 

Veracity

Developer
Staff member
I don't believe you.

As I said - with citations to specific methods - KoLmafia does not touch clovers obtained by removing from the closet. There is no mechanism to do so. The code is not present. Even if clover protection DID kick in, the "default" behavior is irrelevant, since you are in Beecore. In Beecore, it would move the clovers to your closet again; it would not disassemble them - which you saw, since you said it closeted the clover from the hermit.

I'm sorry. What you are reporting cannot possibly be due to KoLmafia r9344.
 

Veracity

Developer
Staff member
Just to make it completely clear, this is the core of clover protection:

Code:
		if ( ResultProcessor.shouldDisassembleClovers( this.getURLString() ) )
		{
			if ( KoLCharacter.inBeecore() )
			{
				KoLmafiaCLI.DEFAULT_SHELL.executeCommand( "closet", "put * ten-leaf clover" );
			}
			else
			{
				KoLmafiaCLI.DEFAULT_SHELL.executeCommand( "use", "* ten-leaf clover" );
			}
		}
If you are in Beecore, it closets your clovers. Otherwise, it disassembles them. You report that you obtained a clover from the hermit and KoLmafia put it in the closet - which proves that it knew you were in Beecore - and later when you took it out of the closet, KoLmafia disassembled it - which is not possible since 1) KoLmafia does not "protect" clovers from closet removal and 2) it knew you were in Beecore, and therefore does not disassemble clovers.

I have no idea what your problem is, but it is not KoLmafia.

This is probably "Not a Bug" (since it's not KoLmafia doing it to you), but if you insist on blaming it on this program, it is "Cannot Reproduce" at worst...
 
I'm sorry. What you are reporting cannot possibly be due to KoLmafia r9344.

Code:
hermit

hermit 1 ten-leaf clover
You acquire an item: ten-leaf clover

add to closet: 1 ten-leaf clover

take from closet: 1 ten-leaf clover
You acquire an item: ten-leaf clover

Use 1 ten-leaf clover
You acquire an item: disassembled clover

If KoLmafia's not responsible for the disassembly, do you have any ideas about where I should look for the culprit? As I said, I don't use Greasemonkey.
 

StDoodle

Minion
Is it possible Mafia doesn't know you're in Beecore? The only way, as far as I can tell, that this could happen would be ascending outside of mafia and then getting bad lag while logging on, but... I dunno. Maybe your api.php page is screwy on KoL's side? Or perhaps, is it at all possible you manually (without noticing, perhaps) used the clover?
 

Veracity

Developer
Staff member
Is it possible Mafia doesn't know you're in Beecore?
Assuming this is evidence of clover protection:

Code:
hermit 1 ten-leaf clover
You acquire an item: ten-leaf clover

add to closet: 1 ten-leaf clover
...that proves that KoLmafia knew he was in Beecore.

Or perhaps, is it at all possible you manually (without noticing, perhaps) used the clover?
Considering that there is no code within KoLmafia which will disassemble a clover after you remove it from the closet, the following:

Code:
take from closet: 1 ten-leaf clover
You acquire an item: ten-leaf clover

Use 1 ten-leaf clover
You acquire an item: disassembled clover
...certainly indicates that.
 
Is it possible Mafia doesn't know you're in Beecore?

Since it closeted my clover when I got it from the hermit, I think it's safe to assume that it does know.

The only way, as far as I can tell, that this could happen would be ascending outside of mafia and then getting bad lag while logging on, but...

I did ascend with r9310, and then realized that I should update, and downloaded r9344.


Maybe your api.php page is screwy on KoL's side?

I have no idea—this is all arcane wizardry to me.

Or perhaps, is it at all possible you manually (without noticing, perhaps) used the clover?

If the code—as Veracity say—is incapable of producing the result I reported (I'm not a coder, so I'm not qualified even to comment on this), then this would appear to be to the cause for the outcome believed I experienced. I'll attempt to reproduce it after rollover, but it doesn't happen again, I'll just have to assume that I made some error that I'm unable to recall. If it does happen again, I'll return to this forum.
 

heeheehee

Developer
Staff member
SICP is a very nice book for programming concepts. Scheme (which is now Racket, evidently) isn't very widely used anymore (they're phasing it out at Berkeley, one of the last places that teaches it), but it has some nice features.

But yeah, it was a reference to the cover and intro to chapter 1.
 
Last edited:
Top