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

change item_location return from an int to item_location #37816

Merged
merged 2 commits into from
Apr 2, 2020

Conversation

KorGgenT
Copy link
Member

@KorGgenT KorGgenT commented Feb 7, 2020

Summary

SUMMARY: Infrastructure "change item_location return from an int to item_location"

Purpose of change

Item indices are very fragile. They not only invalidate when the inventory changes shape, but only return the item at the top of the stack (so grabbing an item from inside another item is impossible)

Therefore, this PR is imperative for the nested container stuff i'm working on.

Describe alternatives you've considered

none

Testing

Compiled.
Tested wearing clothing as it has several sites of item_location::obtain

@KorGgenT KorGgenT force-pushed the item_location-obtain branch from 27077ad to d05654b Compare April 2, 2020 17:50
@kevingranade kevingranade merged commit de046e9 into CleverRaven:master Apr 2, 2020
@KorGgenT KorGgenT deleted the item_location-obtain branch August 13, 2020 04:23
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