-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathLiveSplit.MulletMadJack.asl
68 lines (53 loc) · 1.6 KB
/
LiveSplit.MulletMadJack.asl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
state("Mullet Mad Jack")
{
}
startup
{
Assembly.Load(File.ReadAllBytes("Components/asl-help")).CreateInstance("Unity");
vars.Helper.GameName = "Mullet Mad Jack";
vars.Helper.LoadSceneManager = true;
vars.Helper.AlertLoadless();
vars.totalIGT = new TimeSpan();
settings.Add("MMJ", true, "Mullet Mad Jack");
settings.Add("CAMPAIGN", true, "Campaign Splits", "MMJ");
settings.Add("FLOORS", false, "Split after each Floor", "CAMPAIGN");
settings.Add("CHAPTERS", true, "Split on each Chapter Select Screen", "CAMPAIGN");
}
init
{
vars.Splits = new HashSet<string>();
vars.Helper.TryLoad = (Func<dynamic, bool>)(mono =>
{
vars.Helper["Floor"] = mono.Make<int>("MMC", "instance", "floorNumber");
vars.Helper["ChapComplete"] = mono.Make<bool>("MadMulletCopTM", "instance", "onChapterCompleteScreen");
vars.Helper["GameSession"] = mono.Make<float>("MainPlayer", "totalGameSessionTime");
return true;
});
}
update
{
current.ActiveScene = vars.Helper.Scenes.Active.Name ?? old.ActiveScene;
}
start
{
return current.GameSession > 0.0f && old.GameSession == 0.0f;
}
split
{
if(current.Floor > old.Floor && settings["FLOORS"])
{
return true && vars.Log("Floor Cleared");
}
if(current.ChapComplete && !old.ChapComplete && settings["CHAPTERS"])
{
return true;
}
}
gameTime
{
return TimeSpan.FromSeconds(current.GameSession);
}
reset
{
return current.ActiveScene == "TITLE" && old.ActiveScene != "TITLE";
}