-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
SkriptTimings - massive overhaul #7420
base: dev/feature
Are you sure you want to change the base?
Conversation
- clear timings when disabled - Add messages to enable/disable command - Add reset command - Add message when a script isn't found
- add use short util method (likes nicer)
- Remove TimingInstance below command stuff - Add the option to reset a specific script to the command
- as well as some assertions
Looks like a really good start, this is something I've wanted to see for a while. |
- fixes a bug where stopping a loop (in a script) would not stop the timing
Thank you. That said, there are a few things here I am not happy with (ex: getting the nodes). I would love to see this added one day (or something similar) so im definitely open to feedback in making this PR better. |
Description
This PR aims to do a massive overhaul of Skript's timing system.
Warning
This is a very VERY rough draft of what can be done
As many know, Paper has disabled their built in timings and moved over to use Spark timings.
Skript's timings relied solely on Paper's timings and have been rendered useless.
I have spent much time finicking around with this just to see what could be done.
A lot of the code here is just an example of what COULD be done, but may be a bad way of doing it.
CHANGES:
Timings
class which can be implemented by another classSparkTimings
class.SkriptTimings
is no longer a static class. It now extendsTimings
and is setup in Skript's main class.Timeable
(sp?) which is implemented in a few classes to be able to retrieve Nodes.COMMAND:
I made a command (with a print function in the SkriptTimings class) just to test how the timings were working.
The print function is god awful but it was all I could think of for now.
Each line is given a timing.
# blah blah
(average ms per execution [timing count])
The gif just shows the command being run after different resets and timings:
I am open to feedback and seeing where this could be taken.
Reminder: VERY VERY VERY ROUGH DRAFT!
Target Minecraft Versions: any
Requirements: none
Related Issues: none