Configurable Event Priority & Bugfixes (#209)

* add event priority

fix crop stomp queuing inputs while chart is paused
fix rhythm tweezers not killing queued inputs when switching veggies

* file cleanup

* remove debug print

* remove more files
This commit is contained in:
minenice55
2023-01-18 21:31:08 -05:00
committed by GitHub
parent 8d707ecd4e
commit c037901d34
53 changed files with 77 additions and 1489 deletions

View File

@ -152,6 +152,7 @@ namespace HeavenStudio
public bool resizable = false;
public List<Param> parameters = null;
public bool hidden = false;
public int priority = 0;
public EventCallback inactiveFunction = delegate { };
public EventCallback preFunction = delegate { };
@ -169,7 +170,9 @@ namespace HeavenStudio
/// <param name="inactiveFunction">What the block does when read while the game it's associated with isn't loaded.</param>
/// <param name="prescheduleFunction">What the block does when the GameManager seeks to this cue for pre-scheduling.</param>
/// <param name="hidden">Prevents the block from being shown in the game list. Block will still function normally if it is in the timeline.</param>
public GameAction(string actionName, string displayName, float defaultLength = 1, bool resizable = false, List<Param> parameters = null, EventCallback function = null, EventCallback inactiveFunction = null, EventCallback prescheduleFunction = null, bool hidden = false)
/// <param name="preFunction">Runs two beats before this event is reached.</param>
/// <param name="priority">Priority of this event. Higher priority events will be run first.</param>
public GameAction(string actionName, string displayName, float defaultLength = 1, bool resizable = false, List<Param> parameters = null, EventCallback function = null, EventCallback inactiveFunction = null, EventCallback prescheduleFunction = null, bool hidden = false, EventCallback preFunction = null, int priority = 0)
{
this.actionName = actionName;
if (displayName == String.Empty) this.displayName = actionName;
@ -182,6 +185,8 @@ namespace HeavenStudio
this.function = function ?? delegate { };
this.inactiveFunction = inactiveFunction ?? delegate { };
this.preFunction = prescheduleFunction ?? delegate { };
this.priority = priority;
//todo: converting to new versions of GameActions
}