[lua] xi.itemUtils.pickItemRandom tidy #8220
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I affirm:
What does this pull request do?
Continues the work from here. Updates another itemUtil to create a lootTable of a single lootGroup and use the util from the previous PR
I would also like to move the lootTable util
utils.selectFromLootGroupsover to itemUtils, but didn't want to do that unless i got confirmation that is wanted (it would make more sense to rename itxi.itemUtils.selectFromLootGroups, I would think?)I also was going to update nyzul item appraisals, but i'll leave that for another PR as it's also a ton of find/replace to add
itemId/weightkeysFor now, this PR
casket_loot.luawas updated with the following sed, then used the new LLS editorconfig to autoformatsed -E 's/\{\s*(xi\.item\.[^,]+)(,\s*)([0-9]+)/{ itemId = \1\2weight = \3/' casket_loot.lua -iremoves thesplitZonesset as the casket_loot having aHi/Lowtable indicates if it's a split zone alreadytable[math.random(#table)]calls to useutils.randomEntrySteps to test these changes
!additem 26955CASKET_DROP_RATE = 1