Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate player_activity using item index to item_location #37910

Conversation

KorGgenT
Copy link
Member

@KorGgenT KorGgenT commented Feb 11, 2020

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:

  • ACT_FIRSTAID
  • ACT_GAME
  • ACT_PICKAXE
  • ACT_START_FIRE
  • ACT_HAND_CRANK
  • ACT_VIBE
  • ACT_OXYTORCH
  • ACT_FISH
  • ACT_ATM
  • ACT_GUNMOD_ADD

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

@KorGgenT KorGgenT added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style 0.E Feature Freeze labels Feb 11, 2020
@KorGgenT KorGgenT marked this pull request as ready for review February 11, 2020 02:32
@KorGgenT KorGgenT force-pushed the change-activities-to-use-item-location branch from ea07fa5 to 9119ee3 Compare March 7, 2020 16:02
@KorGgenT KorGgenT force-pushed the change-activities-to-use-item-location branch 2 times, most recently from 93b09ee to ca8aed2 Compare April 3, 2020 02:34
@KorGgenT KorGgenT force-pushed the change-activities-to-use-item-location branch from ca8aed2 to 4d0807e Compare April 5, 2020 02:08
@kevingranade kevingranade merged commit be8a46f into CleverRaven:master Apr 9, 2020
@KorGgenT KorGgenT deleted the change-activities-to-use-item-location branch August 13, 2020 04:23
@Trioct Trioct mentioned this pull request Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants