Removed PlayerController from core. Added Controller:isPlayerControlled#169
Draft
MatthewBlanchard wants to merge 1 commit intomasterfrom
Draft
Removed PlayerController from core. Added Controller:isPlayerControlled#169MatthewBlanchard wants to merge 1 commit intomasterfrom
MatthewBlanchard wants to merge 1 commit intomasterfrom
Conversation
Member
Author
|
Might want to stage this to r2 honestly because it's a fairly big API change. I'm considering r1 though since it's really not too painful for the user to convert to. |
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.
This removes the PlayerController from the core and puts it in the template. The Decision classes associated with it will remain in core, because eventually I want to move to having all Controllers use Decisions.
This facilitates creating a common Controller root class in your own projects. For instance say you wanted a Controller which works with the new extra/StatusEffects and respects overrides of the current controller, right now you would have to either manually manage controller components which is prone to bugs as multiple effects might override the controller.
Instead with this you could create a Controller Modification that overrides the current controller and a base class all Controllers in your game inherit from to provide this behavior, and status effects and similar things can override whether a controller is player controlled at any given moment.
This is a breaking change, but the fix on the user's end is not so bad. It requires the following file in their modules/game/components with no other changes: