Commit Graph

1117 Commits

Author SHA1 Message Date
Collin Smith
eb011ed471 Changed ItemReader#readSingleItem to package-private
readSingleItem visibility was provided for backcompat which is no longer needed
2020-09-05 17:45:11 -07:00
Collin Smith
c96f787cf9 Removed Item#loadFromStream(BitStream)
ClientNetworkReceiver requires injection of ItemReader
Changed ClientNetworkReceiver to read item instead of single item
Removed workaround comment for ItemReader
2020-09-05 17:43:44 -07:00
Collin Smith
4571f8ce18 Fixed crash on android due to missing control panel buttons 2020-09-05 17:11:43 -07:00
Collin Smith
b522365d25 Fixed crash on android
Moved Actioneer and related systems outside of desktop restriction
MobileControls will cast spells 12 units in front of player target angle
2020-09-05 16:59:19 -07:00
Collin Smith
9c33689b35 Added some comments for fields that will require injection
Added some comments for fields that will require injection (or looked into for plausibility of injection)
2020-09-05 16:42:51 -07:00
Collin Smith
de8f81db47 Made AttributesUpdater#update on non-AggregateAttributes to be a no-op 2020-09-05 14:57:42 -07:00
Collin Smith
77e58a72b1 Generated StatList for gems is now frozen 2020-09-05 14:56:29 -07:00
Collin Smith
03484882d3 Added more tests 2020-09-05 14:49:21 -07:00
Collin Smith
37ea64921c Fixed incorrect stat assignment 2020-09-05 14:48:01 -07:00
Collin Smith
1734b90bf9 Implemented structured logging 2020-09-05 14:43:33 -07:00
Collin Smith
e81af4dece Added assertion validations to GemGenerator
Added assertion validations to GemGenerator to make sure property list indexes are correct
Renamed StatListBuilder#index() to #listIndex() to clarify
2020-09-05 14:38:45 -07:00
Collin Smith
273b434c7c Renamed GemUtils to GemGenerator 2020-09-05 14:33:17 -07:00
Collin Smith
d5b6f74a61 Made params final 2020-09-05 14:32:00 -07:00
Collin Smith
f61af7414e Added AttributesUpdater#add to append StatList lists to an aggregate 2020-09-05 14:30:10 -07:00
Collin Smith
d59dcd625b Added some placeholder documentation 2020-09-05 14:25:26 -07:00
Collin Smith
8cfcc2195d Fixed spelling error 2020-09-05 02:37:29 -07:00
Collin Smith
e9b3d69c81 Fixed cache not clearing after consecutive calls 2020-09-05 02:34:34 -07:00
Collin Smith
554553888c Created PropertiesGenerator, GemUtils and tests
GemUtils may be rolled into PropertiesGenerator
PropertiesGenerator may belong with item generation
More validation for behavior on a larger variety of items required
Disabled an assertion in StatListLabeler which prevented creating labels for Attributes#list()
Above assertion only necessary to enforce label creation only works for Attribute collections
2020-09-05 02:20:03 -07:00
Collin Smith
f1246f5aea Added getter for ItemStatCost entry using String stat code 2020-09-05 02:15:10 -07:00
Collin Smith
82d08989d1 Added type-safe version of Item#getBase 2020-09-04 21:54:40 -07:00
Collin Smith
e0f977f8a0 Replaced comment to reference Item#data repurpose 2020-09-04 21:54:13 -07:00
Collin Smith
0548514a9e Added improved support for injection during tests 2020-09-04 21:48:26 -07:00
Collin Smith
b7dcf0f4fe Modified logging parameters to show only StatListLabeler trace 2020-09-04 20:44:31 -07:00
Collin Smith
030564a5a6 Created StatListLabeler and tests
Encoded stats may require StatGetter#asString instead of value
Changed visibility of StatList#MAX_LISTS and StatList#MAX_STATS to package-private
2020-09-04 20:42:23 -07:00
Collin Smith
7c54483e12 Created AttributesUpdater and tests to fold attributes into each other 2020-09-04 20:40:43 -07:00
Collin Smith
3b34642c0d Created StatFormatter#formatEncoded to format encoded stats 2020-09-04 20:39:14 -07:00
Collin Smith
2bd5f217a4 Changed return type for StatFormatter methods to String from CharSequence 2020-09-04 20:38:39 -07:00
Collin Smith
2fd51347bf Fixed issues with StatList#add and StatList#ensureCapacity
Add functions now validate they are adding to same stat, else they put a new one
Moved arraycopy copies into static function
StatList#ensureCapacity will correctly copy arrays
Moved any offsets modification operations into StatList#ensureCapacity
2020-09-04 18:29:48 -07:00
Collin Smith
db04f49fba Added support for StatListGetter#get(int) index 2020-09-04 15:54:40 -07:00
Collin Smith
a839560e6a Implemented StatListBuilder#toString() 2020-09-04 15:53:01 -07:00
Collin Smith
b45f770478 Changed StatList.IndexIterator to support pushback(int)
StatList.IndexIterator can now pushback n indexes (up to list start index)
2020-09-04 15:52:41 -07:00
Collin Smith
79a9409a75 Fixed and issue where StatList#ensureCapacity(int,int) was only shifting next list
Added int index to StatList#ensureCapacity so that it shifts after index
Added additional validation within StatList#ensureCapacity
Added assertion that clearList does not result in a negative size
StatList#copy(int,StatList,int) now copies #maxLists as well
Added additional logging for StatList#copy
2020-09-04 15:51:49 -07:00
Collin Smith
e892970ef8 Added constants and getters for encoded and grouped stats 2020-09-04 15:47:47 -07:00
Collin Smith
ecd6946ffe Fixed StatList#add where stat did not exist 2020-09-03 21:20:53 -07:00
Collin Smith
61ba1248e1 Fixed bug where adding stat that didn't exist resulted in an IOOBE 2020-09-03 20:52:14 -07:00
Collin Smith
04b9ed785c Created StatFormatter and tests, testing as-needed 2020-09-03 20:43:28 -07:00
Collin Smith
8b06f92f54 Added getter and checker for stat ids 2020-09-03 18:53:13 -07:00
Collin Smith
fa7e066ee1 Created StatList#isEmpty() to check if there are any stats in any list 2020-09-03 18:37:30 -07:00
Collin Smith
948f1a189c Added static getter Stat#index(String) to get stat id from String name 2020-09-03 18:34:34 -07:00
Collin Smith
a3b3840b20 Added support for iterating over StatList lists 2020-09-03 18:33:55 -07:00
Collin Smith
b17f528611 Changed signatures for StatListBuilder#add(StatGetter) and #addAll(StatListGetter)
Changed signatures for StatListBuilder#add(StatGetter) and #addAll(StatListGetter) to match sibling methods
Changed StatList#addAll(int,StatList,int) to return the last index added
Above change is so that StatListBuilder index remains valid and calling #addAll does not result in undefined behavior
2020-09-03 18:02:05 -07:00
Collin Smith
bf5b0677cc Moved modification functions #add(StatGetter) and #addAll(StatListGetter)
Moved modification functions #add(StatGetter) and #addAll(StatListGetter) from StatListGetter to StatListBuilder
StatListGetter should contain read-only operations
2020-09-03 17:57:20 -07:00
Collin Smith
4c96af70d3 Changed Attriutes#remaining() to return StatListGetter instead of StatList
Changed Attriutes#remaining() to return StatListGetter instead of StatList
Unsure if this will change, but all calls require #first()
Attribute returns are all asserted to be StatLists of numLists = 1
Creation of StatList delegated, or in the case of AggregateAttributes, lazily initialized
2020-09-03 17:54:24 -07:00
Collin Smith
bd278e3c82 Changed Attriutes#base() to return StatListGetter instead of StatList
Changed Attriutes#base() to return StatListGetter instead of StatList
Unsure if this will change, but all calls require #first()
Attribute returns are all asserted to be StatLists of numLists = 1
StatList is by default delegated, or in the case of AggregatedAttributes, lazily initialized
Added support for retrieving StatListGetter parent StatList
Added support for creating a StatListBuilder from StatListGetter
Added support for clearing a StatList list from StatListGetter
2020-09-03 17:52:36 -07:00
Collin Smith
5d9420a659 Moved aggregate list creation to Attributes#aggregate() to lazily init 2020-09-03 17:47:57 -07:00
Collin Smith
e26b22c1ba Changed Attriutes#aggregate() to return StatListGetter instead of StatList
Changed Attriutes#aggregate() to return StatListGetter instead of StatList
Unsure if this will change, but all calls require #first()
Attribute returns are all asserted to be StatLists of numLists = 1
2020-09-03 17:32:58 -07:00
Collin Smith
eddd0e9b0a Created StatList#add(int,StatGetter) to add stats 2020-09-03 17:14:11 -07:00
Collin Smith
cac5236225 Added support for using StatGetter on StatListGetter operations
Added support for using StatGetter on StatListGetter operations
Created StatList#contains(int,short,int) to check a specific stat with param
2020-09-03 14:26:35 -07:00
Collin Smith
07ad2d4af2 Created package-private StatList#forceClear() to allow clearing frozen list
StatList#clear() did not allow clearing when frozen for external APIs
Attributes re-uses stat lists, and requires the ability to force clear
Renamed Attributes#resetToBase() to #reset() (functionality is documented)
Attributes#reset() no longer clears Attributes#list
2020-09-03 14:08:17 -07:00
Collin Smith
2b07fcc3d0 Added logged warning when StatListGetter#get(short) returns null 2020-09-03 03:12:04 -07:00