Feature pull meat option

taltamir

Member
the commands pull and take_storage() allow you to take items out of hangk, but there is no option to pull meat. (you can type an exact amount but the price is always rounded up to 1 pull being used for 1000 meat)
would be great if there was an option to pull meat
 

MCroft

Developer
Staff member
are you looking for a gCLI command, an ash command, or both? Should it round if you are unrestricted, but don't want to pull all?
 

taltamir

Member
I was hoping for both an ash command and a gCLI command.
in unrestricted I would suggest hot rounding... but it would probably be fine to round there as well to save on some code by just always rounding up to nearest 1000
 

lostcalpolydude

Developer
Staff member
This thread confuses me.

You can "pull 500 meat", and KoLmafia will attempt to pull 500 meat from storage. No rounding up; I tested this in aftercore, but I also have 0 meat to pull. It looks like this isn't actually documented anywhere. It doesn't look like there is an equivalent ASH command, so I can understand requesting that.

I think I also don't know what interface you are referring to where the amount is rounded up.
 

taltamir

Member
This thread confuses me.

You can "pull 500 meat", and KoLmafia will attempt to pull 500 meat from storage. No rounding up; I tested this in aftercore, but I also have 0 meat to pull. It looks like this isn't actually documented anywhere. It doesn't look like there is an equivalent ASH command, so I can understand requesting that.

I think I also don't know what interface you are referring to where the amount is rounded up.
The rounding is done by kingdom of loathing itself.
any number you type during ronin is rounded up to the nearest 1000 when pulling meat from hangk.
hangk said:
Rounding up to 1000 because you're in Ronin and we don't want you to feel cheated.
You take 1,000 Meat out of storage.

I was not aware that the gCLI command pull could be used for meat using the format you gave. Thank you for informing me.
As you mentioned it is not documented and the ash command equivalent is take_storage( int, item ) which refuses to accept $item[meat] when I tested it. (saying that meat is not an item)
I discussed it in the discord and nobody who was online knew how to get mafia to pull meat. So I made this feature request

However, since "pull 1000 meat" does work then there is no need.
Well, if someone has the time and inclination it would be nice to have an ash command called take_storage_meat( int )
But it is not really necessary since I can just use
cli_execute("pull 1000 meat");
inside a script to get the desired effect. Thank you.
 

MCroft

Developer
Staff member
This thread confuses me.

You can "pull 500 meat", and KoLmafia will attempt to pull 500 meat from storage. No rounding up; I tested this in aftercore, but I also have 0 meat to pull. It looks like this isn't actually documented anywhere. It doesn't look like there is an equivalent ASH command, so I can understand requesting that.

I think I also don't know what interface you are referring to where the amount is rounded up.
Yeah, I looked at the code, and StorageRequest.java has a special case for item = "Meat".

Java:
if ( item.getName().equals( AdventureResult.MEAT ) )
{
       if ( !inHardcore )
       {
              RequestThread.postRequest( new StorageRequest( StorageRequest.PULL_MEAT_FROM_STORAGE, item.getCount() ) );
       }
...
}

So, since you also can execute_cli("pull 500 meat"); , it's got a workaround in ASH. It could be changed to an explicit command that called StorageRequest as the CLI does.

But maybe the way to fix this is to include better documentation.

Java:
this.usage = " all | outfit <name> | <item> [, <item>]... - pull items from Hagnk's storage.";

I'm trying to come up with a clear way to say [<quantity>] <item or "meat">, [[<quantity>] <item or "meat">], and not liking what I just came up with...
 

taltamir

Member
how about
Code:
this.usage = " all | outfit <name> | <quantity> meat | <quantity> <item> [, <item>]... - pull items from Hagnk's storage.";
 

MCroft

Developer
Staff member
how about
Code:
this.usage = " all | outfit <name> | <quantity> meat | <quantity> <item> [, <item>]... - pull items from Hagnk's storage.";
That's 97% right, and definitely better, but looking at the code, it will accept pull 2 cog, 12 meat, 3 sprocket

also, quantity is not optional for meat. It tries to search for items with meat in the name if it doesn't have a quantity. For items, quantity defaults to 1

Code:
this.usage = " all | outfit <name> | <quantity> meat | [<quantity>] <item> [, <item>]... - pull items from Hagnk's storage.";

As long as we're ok with not showing the flexibility, that's probably the clearest answer.
 

taltamir

Member
That is very flexible. nice. in that case how about this then
Code:
this.usage = \"pull [command, command, command...]\". valid commands: all | outfit <name> | <quantity> meat | <quantity> <item> - pull items from Hagnk's storage.";
 
Top