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

Switch friend states to use a bin 2^n pattern #37

Closed
ShawnClake opened this issue Jan 27, 2017 · 3 comments
Closed

Switch friend states to use a bin 2^n pattern #37

ShawnClake opened this issue Jan 27, 2017 · 3 comments

Comments

@ShawnClake
Copy link
Owner

Switch friend states to use a 2^n state. This can then be converted to a binary string. For example if following = 2, friended = 4, and subscribed = 8, then we can store the number 14 which translates to binary as: 1110. Thus we can see the 3 1's correlate to our friend states. Now we can store multiple user relations rather than just 1.

@ShawnClake ShawnClake created this issue from a note in UserExtended Core Release 2.20.00 (TODO, long term) Jan 27, 2017
@ShawnClake ShawnClake self-assigned this Jan 27, 2017
@ShawnClake
Copy link
Owner Author

  • Rename FriendsManager to 'RelationshipManager'

@ShawnClake
Copy link
Owner Author

Higher states can override lower states. This means a relation between two users can be marked as Friends and Blocked simultaneously; however it will appear to both end users that only block has been applied.

State priority is defined by the digit of the relation. The 0th digit is said to have the 0th state position. The 5th digit (Equatable to 16) is said to have the 5th state position.

States reservations:
State positions 0-9 are reserved for official UE states.
State positions 10-19 are reserved for other plugin's modules to inject.
State positions 20-21 are reserved for UE_BLOCKED and UE_DELETED
State positions above 21 will override and UE_BLOCKED and UE_DELETED and thus must be used with extreme caution.

ShawnClake added a commit that referenced this issue Mar 9, 2017
ShawnClake added a commit that referenced this issue Apr 12, 2017
ShawnClake added a commit that referenced this issue Apr 12, 2017
…ually utilize injected bonds. Perhaps in a later release?
@ShawnClake
Copy link
Owner Author

To the best of my knowledge this has been added. Injecting bond states is in a 50/50 state. Currently, injecting bond states wont actually effect the application in any way. This will be fixed in a later release. I will close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant