New Content - Implemented Sept 13: Mall <-> Hangnk's Storage

Veracity

Developer
Staff member
September 13
You can also now purchase things in-run using meat from Hagnk's, which is also where those things will go after they're purchased.

I am in Hardcore.
When I do a search on the Purchases frame, it works the same as ever.
- Since I am in-run, if an item is available from an NPC store, it shows me only that item, not ones in PC stores.
(If I buy from the NPC store, it uses Meat from inventory and goes to inventory. But, with this new update, I COULD buy the PC store offering, using Meat from Hagnk's to put the item in Hagnk's. Just not through the Purchase frame, which will not show me the PC store offerings.)
- When it displays the results, they are black or greyed out, depending on whether I can afford the item - but that determination is based on Meat in inventory, not in storage.
- When I select an item and say Purchase, no request is made; the Frame simply says "Desired purchase quantity not reached (wanted 1, got 0)"

When I go to the Mall in the Relay Browser and say "buy", it works. I see this displayed:

You acquire an item: tiny plastic Charity the Zombie Hunter [acc1] [acc2] [acc3]

(You spent 1,900 meat from Hagnk's.
You have XXX meat left.)
The DEBUG log says:

Code:
You acquire an item: <b>tiny plastic Charity the Zombie Hunter</b> (stored in Hagnk's Ancestral Mini-Storage)
and:

Processing results...
You acquire an item: tiny plastic Charity the Zombie Hunter
Processing result: tiny plastic Charity the Zombie Hunter

That explains the "use links". I do not know why it did not show me "(stored in Hagnk's Ancestral Mini-Storage)".
The item (erroneously) appears in my inventory.
I see no indication that Meat was deducted either from inventory or Hagnks.

The request was this:

Code:
Requesting: http://www.kingdomofloathing.com/mallstore.php?buying=1&quantity=1&whichitem=5959000001900&ajax=1&pwd&whichstore=674339&_=1380988122140
Here is the full response:

Code:
<script type="text/javascript">top.charpane.location.href="charpane.php";</script><script type="text/javascript">if (window.updateInv) updateInv([])</script><center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Results:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><table class="item" style="float: none" rel="id=5959&s=10&q=0&d=1&g=0&t=1&n=1&m=0&p=0&u=q"><tr><td><img src="http://images.kingdomofloathing.com/itemimages/tp3_29.gif" alt="tiny plastic Charity the Zombie Hunter" title="tiny plastic Charity the Zombie Hunter" class=hand onClick='descitem(274804483)'></td><td valign=center class=effect>You acquire an item: <b>tiny plastic Charity the Zombie Hunter</b> (stored in Hagnk's Ancestral Mini-Storage)</td></tr></table></center><center>(You spent 1,900 meat from Hagnk's.<br />You have XXX meat left.)</center><script type="text/javascript">if (window.update_stock) update_stock(674339, 5959, 1);</script></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center>
 

Veracity

Developer
Staff member
When buy from mall in Hardcore or Ronin, uses Meat from storage and item goes into storage.

- On Purchases tab, do not trim exact matches that are obtainable from an NPC store to have only the NPC store; show PC stores as well.
- On Purchases tab, NPC store purchases are either available (black) or too expensive (grey) depending on Meat in inventory.
- On Purchases tab, PC store purchases are either available (a different color) or too expensive (grey) depending on Meat in storage.
- In Hardcore or Ronin, Purchases tab has a note that says (color) will use storage Meat - and give total - and go to storage.
- When make a Mall purchase via Purchases tab, "buy" command or function, or Relay Browser, recognize if it uses inventory or storage Meat and whether the result goes to inventory or storage and update appropriately on success.

"acquire" and retrieve_item() will continue to never consider the mall in Hardcore or Ronin, regardless of autoSatisfyWithMall, since the mall can never "satisfy" such requests in Hardcore or Ronin.

Do we care that the "buy" command or script will use storage Meat and leave the item in storage? I think not; the user/script will know that the character is in Hardcore or Ronin and will expect that. "buy" means buy; it is an imperative.
 

Bale

Minion
Do we care that the "buy" command or script will use storage Meat and leave the item in storage? I think not; the user/script will know that the character is in Hardcore or Ronin and will expect that. "buy" means buy; it is an imperative.

Agreed. We assume that the player knows how the game is played.
 

Veracity

Developer
Staff member
Revision 12872 does part of this:

- If you are in Hardcore or Ronin, the Mall Purchase frame will have an extra line, showing both your inventory Meat (in black) and your storage Meat (in blue). If you are out of Ronin, you will not see this line; only inventory Meat is of interest, and that is displayed in the compact side pane.
- When displaying the results, if you are in Hardcore or Ronin, if you can afford the item using storage Meat, the line will be blue (the same color as the storage Meat).
- If you cannot afford the item - using inventory Meat if out of Ronin or using storage Meat if in Hardcore or Ronin - the line will be gray as before.
- If you can afford the item using inventory Meat - NPC store only if in Hardcore or Ronin, any store, otherwise - the reuslt is black as before.

I consider this experimental. I want feedback on how it looks. One issue I noticed is that my browser highlights selected text in blue - and that does not look good when the text is gray or blue. Interestingly enough, when it highlights black text, it turns it white. I'd like that for the otherwise blue or gray text, too, so you can still read it, but I don't know how to do that.

(Note that even before this, if you highlighted gray text - something you could not afford - it had the same problem. This is just a little more difficult because the background text can be blue...)

Comments and suggestions welcome, before I go farther with this.
 

roippi

Developer
I consider this experimental. I want feedback on how it looks. One issue I noticed is that my browser highlights selected text in blue - and that does not look good when the text is gray or blue. Interestingly enough, when it highlights black text, it turns it white. I'd like that for the otherwise blue or gray text, too, so you can still read it, but I don't know how to do that.

Try r12873

PurchaseRequest.toString() may be completely vestigial now. I don't know if there are any corner cases where PurchaseRequests are displayed outside of a ShowDescription(List|Table) context.
 

Veracity

Developer
Staff member
Revision 12878 does more of this:

You can purchase from the mall using the buy command (and hence the buy function), the Purchases frame, or the Relay Browser. In all cases, we recognize where the Meat comes from and where the item ends up.

Now I just need to make sure that exact searches do not prune out PC stores, when you are in Hardcore or Ronin - and that if you buy in the Relay Browser and the item goes to storage, we don't add a Use Link.

Clover protection also needs to not kick in for mall purchases that went to storage.
 
Last edited:

Veracity

Developer
Staff member
Revision 12879 finishes this:

- no "use links" for mall purchases that went into storage
- do a mall search even if you are in Hardcore or Ronin when the item is available from an NPC store.

Clover protection does not kick in for purchases that go to storage since the result processor does not record that it obtained a clover.
 
Top