Mall limit highlighting

ziz

Member
It's a thing I wanted, so I made a tiny modification to the source. "limit 1" things show up in red, "limit (anything other than 1)" things show up in blue, they're still gray if you can't buy them, and no other mall display is changed.

Code:
Index: src/net/sourceforge/kolmafia/request/MallPurchaseRequest.java
===================================================================
--- src/net/sourceforge/kolmafia/request/MallPurchaseRequest.java       (revision 7660)
+++ src/net/sourceforge/kolmafia/request/MallPurchaseRequest.java       (working copy)
@@ -327,8 +327,21 @@
 
                        if ( this.limit < this.quantity || !this.canPurchase() )
                        {
+                               if (this.canPurchase())
+                               {
+                                       if ( this.limit == 1 )
+                                       {
+                                               buffer.append( "<font color=red>" );
+                                       } else {
+                                               buffer.append( "<font color=blue>" );
+                                       }
+                               }
                                buffer.append( " limit " );
                                buffer.append( KoLConstants.COMMA_FORMAT.format( this.limit ) );
+                               if (this.canPurchase())
+                               {
+                                       buffer.append( " </font>" );
+                               }
                        }
                }
 

Spiny

Member
While I only use the daily versions of mafia, I'd be interested in this being implemented if it would add some color to the purchases screen thru mafia? I actually prefer the KoL mall interface for purchasing but I like to get updated pricing for historical prices so I try to purchase things from KoL's interface instead.

Actually I'd love to see a lot more color on Mafia's purchase screen, ie when using a general search like hi mein, to have each grouping of items be a color and the next grouping of items be another color for easier readability.

Something interesting that happens to me sometimes: when I buy a quantity of an item from a store that has no limits thru mafia's purchase screen... The store that I bought the items from will then display a limit equal to the number of items I purchased. If I do a fresh search, that false limit disappears.

To be fair, I'm not sure what the force sort and limit purchases options do, I've always left them as they are, so I have no idea if they might attribute to that false limit weirdness I sometimes see.
 
I'm in favor of this as well - both in terms of highlighting limit prices and visually separating groups of items via shading, perhaps.
 
Top