-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactor PlaybackController #200
Merged
ScribbleTAS
merged 27 commits into
MinecraftTAS:develop
from
ScribbleTAS:refactor/playback
Apr 14, 2024
Merged
Refactor PlaybackController #200
ScribbleTAS
merged 27 commits into
MinecraftTAS:develop
from
ScribbleTAS:refactor/playback
Apr 14, 2024
Conversation
This file contains 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
- Add null check to copyFrom
ScribbleTAS
added
Core
Issue relates to core concepts
Refactor
This issue talks about refactoring code
labels
Feb 27, 2024
ScribbleTAS
force-pushed
the
refactor/playback
branch
from
March 26, 2024 10:55
d11b2ac
to
0eaf3b6
Compare
- [Common] Fixed indentation in eventlistener
- Added null checks when passing null as a parameter - Disabled Exception when listener list is empty - Reformatted code
- However, things don't seem to be properly reset
…tTASState - Fixed issues with deep copy - Fixed bug in interpolation leading to nullpointer exception
`clone()` used to just clone the object without the associated subticks. This has been renamed to `shallowClone()` and now clone actually does a deep clone of the VirtualPeripherals
- [VirtualInput] Removed old interpolation - [VirtualInput] Add a way to disable recording subticks for camera angle
Changed constructor of PlaybackMetadata to accept PlaybackMetadataExtension. This is to encourage users to write `new PlaybackMetadata(this)` to ensure, that the metadata extension name is also in the PlaybackMetadata. - Added PlaybackMetadata and PlaybackMetadataRegistry tests
- [Events] Added seperate EventPlaybackClient file under events for playback specific events^ - Moved tasfile specific serializers to subpackage tasfile - Added PlaybackLoadException
- Removed credits from PlaybackControllerClient - Removed startposition from PlaybackControllerClient - Added onClear to MetadaExtension for cleaning up. - Moved TeleportPacket handling to from PlaybackControllerServer to StartpositionMetadataExtension
- Add documentation to StartpositionMetadataExtension - Add documentation to CreditsMetadataExtension - Removed credits and metadata related methods from PlaybackControllerClient
PancakeTAS
approved these changes
Apr 14, 2024
8 tasks
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.
Continuation of #179
Changes
PlaybackController
The main focus of this PR was to reduce complexity in the PlaybackController, the main class for starting/stopping recordings/playbacks.
Up to now, everything playback related was added to the controller, without any consideration for architecture.
Hooks into the VirtualInput-System are now added via EventVirtualKeyboardTick, EventVirtualMouseTick, EventVirtualCameraAngleTick.
Any future TASmod extensions can use these too by implementing
EventVirtualKeyboardTick
in your class and registering it viaEventListenerRegistry.register(YourClass)
PlaybackMetadata
The first lines of the TASfile contain metadata that is used for storing playback specific configuration.
In Alpha9 this metadata consisted of:
All of these (except starting seed, which is due in #190) have now been rewritten in the form of PlaybackMetadata.
After registering this class under
PlaybackMetadataRegistry
, any time you run/saveTAS
or/loadTAS
,your custom metadata is automatically stored in the TASFile in the first lines. (At the time of writing, serialization is not implemented, this is my next task)
Such a system will also be used for making extensions to a line in the TASFile itself.
Fixes
Fixed a load of interpolation issues introduced in the #179 PR.
TODO
copyFrom
tomoveFrom
and writecopyFrom
that actually copies the methods!