migrate player_activity using item index to item_location #37910
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.
Summary
SUMMARY: Infrastructure "migrate player_activity using item index to item_location"
Purpose of change
item indices are pretty fragile, and item_location has been made much sturdier recently (within the last 6 months or so)
additionally, with my current ideas for implementation of the nested container system, index will likely be even more fragile, if not outright incoherent during play. that being said, i'd like to move away from using it wherever possible, culminating in the removal of Character::i_at()
Describe the solution
changes the following activities to use the targets vector instead of the position integer:
and implements a function in player_activity to aid in migration. also bumped the savegame version in order to help out
Testing
started some fires, attached a gun mod