-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Messaging and Text Display Updates + Bug Fixes
- Added ITRADE_NO_COST_AMOUNT setting and FAILED_TRADE message - Changed INSUFFICIENT_ITEMS, SHOP_INSUFFICIENT_ITEMS, and ON_TRADE messages to show full trade details - Message file incremented to v1.3 - Added ItemMultiLin Message method - Changed ObjectHolder#toString to just pass Object#toString to reduce output size and readability - DRY'd Shop#areCostsValid and Shop#areProducts Valid - Fixed bug caused by Shop#hasProductStock and Shop#hasCostStock pulling directly from product/cost objects instead of Shop#getCost/Shop#getProduct(was causing inaccurate output from getItems the wasn't apparent until other changes were made) - Changed Utils#getItems to take Inventory#getStorageContents rather than Inventory - Added Static implementation of ShopItemStack#getCleanItemName to be used without creating new objects when not needed and redirected non-static method to use new static method(DRY) - Added support to ShopItemStack#getCleanItemName for book Titles and Proper formatting of ItemType returns - Added MISSING_ITEMS, RECEIVED_LINES, and GIVEN_ITEMS to Variables Enum - Added Utils#createBadList to clean up creation of `null as first index lists - Cleaned up some javaDocs and missed significantly more - Changed return of Utils#canExchangeAll to Tuple<ExchangeStatus, List<ItemStack>> to return bad lists in cases where ExchangeStatus indicates failure do to missing items. returns badList in all other cases - Cleaned up message calls in ShopTradeListener using new detailed messages. - Changed ShopTradeListener#tradeAllItems to return Tuple<List<ItemStack>, List<ItemStack>> as Good/Bad CostList, ProductList for detailed messages - Changed output for cost-free iTrade shops - Other Cleanup and Optimizations
- Loading branch information
1 parent
ac4f0b8
commit bd3c245
Showing
11 changed files
with
255 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
151 changes: 63 additions & 88 deletions
151
src/main/java/org/shanerx/tradeshop/listeners/ShopTradeListener.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.