Fix for SWs with same Action= shadowing each other - #69
Open
Templarfreak wants to merge 1 commit into
Open
Conversation
SWs that have the same Action type shadow each other due to pulling which superweapon the player is targeting via `From_Action`, which only returns the first entry that matches the action. This adds new player state that tracks what the last SW the player started targeting and uses that instead.
Author
|
Line 721 in e67c749 this could also be relevant in the future but it doesnt seem to affect anything noticeable right now. edit: well it's entirely unused anyway actually so it's weird, whatever lol |
|
Very nice improvement for sure. Great work! Few considerations to take into account:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
SWs that have the same Action type shadow each other due to pulling which superweapon the player is targeting via
From_Action, which only returns the first entry that matches the action. This adds new player state that tracks what the last SW the player started targeting and uses that instead. The new state gets cleaned up when the SW fires or the player clears the targeting mode. The value gets initialized and serializes.Behavior and compatibility
This should remain fully backwards compatible, no changes to vanilla rules needed for it to continue working as expected.
Validation
Player having access to multiple Superweapons with the same Action= at the same time should now work properly.
Documentation
N/A
Checklist