Put Minigame Definitions in a Dictionary (#614)

* put minigame definitions in a dictionary

why haven't we done this two years ago

* paranoia
This commit is contained in:
minenice55
2024-01-08 01:38:05 -05:00
committed by GitHub
parent 5cc31c32d8
commit 254e725b6f
7 changed files with 72 additions and 46 deletions

View File

@ -873,10 +873,8 @@ namespace HeavenStudio.Editor.Track
public TimelineEventObj AddEventObject(string eventName, bool dragNDrop = false, Vector3 pos = new Vector3(), RiqEntity entity = null, bool addEvent = false)
{
var game = EventCaller.instance.GetMinigame(eventName.Split(0));
var action = EventCaller.instance.GetGameAction(game, eventName.Split(1));
var gameAction = EventCaller.instance.GetGameAction(EventCaller.instance.GetMinigame(eventName.Split(0)), eventName.Split(1));
string[] split = eventName.Split('/');
var action = EventCaller.instance.GetGameAction(split[0], split[1]);
if (addEvent)
{
@ -884,7 +882,7 @@ namespace HeavenStudio.Editor.Track
if (entity == null)
{
RiqEntity en = GameManager.instance.Beatmap.AddNewEntity(eventName, 0, gameAction.defaultLength);
RiqEntity en = GameManager.instance.Beatmap.AddNewEntity(eventName, 0, action.defaultLength);
tempEntity = en;