add "updater" for the old marching entity

This commit is contained in:
minenice55 2023-06-13 17:38:24 -04:00
parent 118cd4993d
commit 10f8fa7f5a

View file

@ -41,6 +41,8 @@ namespace HeavenStudio.Games.Loaders
} }
entity.CreateProperty("direction", entity["type"]); entity.CreateProperty("direction", entity["type"]);
entity.CreateProperty("point", false); entity.CreateProperty("point", false);
// don't actually need to do this here
//entity.version = 1;
entity.dynamicData.Remove("type"); entity.dynamicData.Remove("type");
entity.dynamicData.Remove("type2"); entity.dynamicData.Remove("type2");
@ -50,6 +52,17 @@ namespace HeavenStudio.Games.Loaders
} }
RiqBeatmap.OnUpdateEntity += FaceTurnUpdater; RiqBeatmap.OnUpdateEntity += FaceTurnUpdater;
RiqEntity MarchUpdater(string datamodel, RiqEntity entity)
{
if (datamodel == "marchingOrders/marching")
{
entity.beat = double.NaN;
return entity;
}
return null;
}
RiqBeatmap.OnUpdateEntity += MarchUpdater;
return new Minigame("marchingOrders", "Marching Orders", "ffb108", false, false, new List<GameAction>() return new Minigame("marchingOrders", "Marching Orders", "ffb108", false, false, new List<GameAction>()
{ {
new GameAction("bop", "Bop") new GameAction("bop", "Bop")
@ -163,13 +176,7 @@ namespace HeavenStudio.Games.Loaders
// hidden in the editor but here cuz backwards compatibility // hidden in the editor but here cuz backwards compatibility
new GameAction("marching", "Start Marching (old)") new GameAction("marching", "Start Marching (old)")
{ {
hidden = false, hidden = true,
preFunction = delegate {
var e = eventCaller.currentEntity;
MarchingOrders.instance.ForceMarching(e.beat, e.length);
},
preFunctionLength = 0.2f,
resizable = true,
}, },
new GameAction("face turn", "Direction to Turn (old)") new GameAction("face turn", "Direction to Turn (old)")
{ {