When you use the Item Manager -> Creatable section to create an item, and you click "create item", the field is pre-filled with a value representing as much as you can make. If you have the meat to make thousands of items, you probably don't want to actually make that many. However, it seems to be common enough (at least once every few months) that someone uses all of their meat making bottles of gin or something because they just wanted to blow up their bartender before ascending. I think it would be nice if the pre-filled number there was however many you can make or 100 (maybe some other number), whichever is smaller. I made the following change to my version of mafia, and it worked properly for all of the cases I could think to test.
First, there are plenty of parts of mafia I don't use, and it took me three tries to find the right file to change, so it's possible there are unintended side effects. Second, I feel like defaultCap should be a user-changeable variable (CLI/ash only I expect), and it should have a better name in that case.
Code:
Index: src/net/sourceforge/kolmafia/utilities/InputFieldUtilities.java
===================================================================
--- src/net/sourceforge/kolmafia/utilities/InputFieldUtilities.java (revision 8515)
+++ src/net/sourceforge/kolmafia/utilities/InputFieldUtilities.java (working copy)
@@ -218,7 +218,10 @@
public static final int getQuantity(
final String title, final int maximumValue) {
- return InputFieldUtilities.getQuantity(title, maximumValue, maximumValue);
+ //return InputFieldUtilities.getQuantity(title, maximumValue, maximumValue);
+
+ int defaultCap = 100;
+ return InputFieldUtilities.getQuantity(title, maximumValue, defaultCap);
}
public static final int getQuantity(
First, there are plenty of parts of mafia I don't use, and it took me three tries to find the right file to change, so it's possible there are unintended side effects. Second, I feel like defaultCap should be a user-changeable variable (CLI/ash only I expect), and it should have a better name in that case.