-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathLiveSplit.PaintTheTownRed.asl
57 lines (47 loc) · 1.2 KB
/
LiveSplit.PaintTheTownRed.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
state("PaintTheTownRed")
{
byte BeneathLoads: "UnityPlayer.dll", 0x1A46258, 0xDA8, 0x18, 0xA8, 0x0;
}
startup
{
Assembly.Load(File.ReadAllBytes("Components/asl-help")).CreateInstance("Unity");
vars.Helper.GameName = "Paint the Town Red";
vars.Helper.LoadSceneManager = true;
vars.Helper.AlertLoadless();
}
init
{
vars.Helper.TryLoad = (Func<dynamic, bool>)(mono =>
{
var ls = mono["LoadingScreen"];
vars.Helper["Loads"] = ls.Make<bool>("Instance");
var gm = mono["GameManager"];
vars.Helper["LevelComplete"] = gm.Make<bool>("HasWon");
vars.Helper["HasNotFinishedLoadingNewLevel"] = gm.Make<bool>("HasNotFinishedLoadingNewLevel");
vars.Helper["isBeneath"] = gm.Make<bool>("IsBeneath");
return true;
});
}
start
{
return !current.Loads && old.Loads;
}
update
{
if(current.Loads != old.Loads)
{
print("Loading: " + old.Loads + " -> " + current.Loads);
}
}
isLoading
{
return current.Loads || current.BeneathLoads == 1 && current.isBeneath;
}
split
{
return current.LevelComplete && !old.LevelComplete;
}
exit
{
timer.IsGameTimePaused = true;
}