-
Notifications
You must be signed in to change notification settings - Fork 43
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
Improve/fix the cast bar script previews #267
base: master
Are you sure you want to change the base?
Conversation
gareth3001
commented
Feb 20, 2025
- Define CONST_PREVIEW_SPELLID in Plater.lua as well, and use this in all cases.
- Allow the castNoInterrupt arg to actually let non-interruptible spells to be previewed.
- Wipe DefaultCastScripts when recompiling all scripts.
- Add all spell casting (2) scripts to DefaultCastScripts during compilation.
- Sort the list of scripts to show in the preview window.
- Use the number of preview scripts with a reasonable minimum of 12 for the preview cast height.
- Define CONST_PREVIEW_SPELLID in Plater.lua as well, and use this in all cases. - Allow the castNoInterrupt arg to actually let non-interruptible spells to be previewed. - Wipe DefaultCastScripts when recompiling all scripts. - Add all spell casting (2) scripts to DefaultCastScripts during compilation. - Sort the list of scripts to show in the preview window. - Use the number of preview scripts with a reasonable minimum of 12 for the preview cast height.
Please don't clear the default list. Back-fill from there. |
I'm not sure how common it is for a profile to use both the standard Plater scripts and custom scripts, but I suppose it's possible. The most important part of my change was to allow non-Plater scripts to be previewed in this window. I'll take another crack and do the custom sorting you suggest, shouldn't be too hard -- probably just need to leave the default scripts table alone and track additional ones in a separate table. |
As I edited above: don't clear the default list. Use it for back-fill. |
- Add CurrentCastScripts table to script library. - Use CurrentCastScripts instead of DefaultCastScripts for tracking of cast bar scripts in the profile. - Only preview enabled scripts, as previews don't work for disabled scripts. - Sort the preview list so non-standard scripts come first, followed by all Plater default scripts. Use the [P] or [Plater] string in the name to detect these, as some aren't in the DefaultCastScripts table.
Okay, I think I came up with a nice way to achieve the outcome you wanted. Instead of implementing a custom sort, I just put the default Plater scripts into a different temporary table and appended those after the full list had been processed. I've confirmed that this puts any custom scripts ahead of any Plater scripts tagged with [P] or [Plater] via a default profile with some extras added. |
Let me know if you have any other concerns about the latest version, thanks! |