Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upRefactor to reload ammo from location #14782
Conversation
mugling
added some commits
Jan 9, 2016
kevingranade
merged commit 304c438
into
CleverRaven:master
Jan 11, 2016
1 check passed
default
Details
mugling
deleted the
mugling:mags_p12
branch
Jan 31, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
mugling commentedJan 10, 2016
This is (hopefully) the final refactor of the reloading code before support for magazines can be added.
The two major changes are that items are now reloaded from an
item_locationrather than an inventory position and that the selection of ammo is changed from usingcharacter::items_withtocharacter::visit_itemsas implemented in #14600.The latter change is required so that differing logic can be implemented when reloading magazines (which always use loose ammo) vs guns (which may use magazines and/or loose ammo).
There are no intended behavioral changes in this PR however presuming there are no regressions a future PR may extend this to allow reloading using ammo found on the ground/vehicle or adjacent tiles.