This repository was archived by the owner on Oct 11, 2023. It is now read-only.
Unique Event IDs, and Reward/exp propogation#195
Merged
JustinPinero merged 4 commits intoget-agent-status-stubfrom Apr 22, 2021
Merged
Unique Event IDs, and Reward/exp propogation#195JustinPinero merged 4 commits intoget-agent-status-stubfrom
JustinPinero merged 4 commits intoget-agent-status-stubfrom
Conversation
Contributor
|
This looks great, that grant_reward endpoint is much appreciated and will come in really handy. |
| const reducer = (state, msg) => { | ||
| // TODO replace the specific incomprehensible message somehow instead | ||
| if ( | ||
| // TODO (Justin) Can we target the event ID to swap the text out now? |
Contributor
There was a problem hiding this comment.
We certainly can. I'll take care of it today.
JustinPinero
approved these changes
Apr 22, 2021
Contributor
JustinPinero
left a comment
There was a problem hiding this comment.
This looks great and is going to make what we've discussed on the frontend easy set up and easy to test. I will reach out if I have any questions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Overview
Introduces an
event_idproperty to allGraphEvents such that we can uniquely identify them. This is useful for attributing experience and rewards, and also for reporting and blocking messages. It also includes a POST endpoint for/game/api/grant_rewardwith arguments fortarget_event_idandtarget_node_id.Implementation
Mostly tracking down
event_ids and making sure they can go through all the way from theuseWSDataSourcehook all the way through to theWorldmethods for parsing and constructing events.Major change occurs in the
RewardEvent, which can now specify atarget_event_idto attribute the bonus reward to. From the LIGHT main game, I expect this to be the most likely way to grant rewards.Testing
Did some things, ensured that unique event ids were being set and propagated, and checked to see that exp granted by the model also makes it through. @JustinPinero I added an inline note to
base_soul.pyon where you can make a local edit to see experience granted, even without models. This should let you grant yourself some experience, and then you can try the reward flows too once they're wired.