diff options
Diffstat (limited to 'Manifold Garden.asl')
-rw-r--r-- | Manifold Garden.asl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Manifold Garden.asl b/Manifold Garden.asl index 3968955..517f55b 100644 --- a/Manifold Garden.asl +++ b/Manifold Garden.asl | |||
@@ -45,6 +45,7 @@ startup { | |||
45 | 45 | ||
46 | settings.Add("raymarchitecture", true, "Split on Raymarchitecture (ending cutscene)"); | 46 | settings.Add("raymarchitecture", true, "Split on Raymarchitecture (ending cutscene)"); |
47 | settings.Add("norepeats",false,"Split only on the first encounter of each level"); | 47 | settings.Add("norepeats",false,"Split only on the first encounter of each level"); |
48 | settings.Add("gravChanges",false, "Override first text component with a Gravity Changes count"); | ||
48 | settings.Add("every",true,"Split on every level change"); | 49 | settings.Add("every",true,"Split on every level change"); |
49 | settings.Add("fall",false,"Including all ending falling scenes","every"); | 50 | settings.Add("fall",false,"Including all ending falling scenes","every"); |
50 | settings.Add("allGodCubes", false, "All God Cubes waypoints"); | 51 | settings.Add("allGodCubes", false, "All God Cubes waypoints"); |
@@ -156,6 +157,9 @@ init { | |||
156 | var versionNum = mono.GetClass("VersionNumber"); | 157 | var versionNum = mono.GetClass("VersionNumber"); |
157 | vars.Helper["version"] = versionNum.MakeString("instance", "_text"); | 158 | vars.Helper["version"] = versionNum.MakeString("instance", "_text"); |
158 | 159 | ||
160 | var rigidCon = mono.GetClass("RigidbodyController"); | ||
161 | vars.Helper["gravity"] = gameMan.Make<int>("playerController", rigidCon["_gravityDirection"]); | ||
162 | |||
159 | current.onStartScreen = false; | 163 | current.onStartScreen = false; |
160 | 164 | ||
161 | return true; | 165 | return true; |
@@ -176,6 +180,19 @@ init { | |||
176 | } | 180 | } |
177 | } | 181 | } |
178 | } | 182 | } |
183 | |||
184 | vars.updateText = false; | ||
185 | if (settings["gravChanges"]) { | ||
186 | foreach (LiveSplit.UI.Components.IComponent component in timer.Layout.Components) { | ||
187 | if (component.GetType().Name == "TextComponent") { | ||
188 | vars.tc = component; | ||
189 | vars.tcs = vars.tc.Settings; | ||
190 | vars.updateText = true; | ||
191 | vars.log("Found text component at " + component); | ||
192 | break; | ||
193 | } | ||
194 | } | ||
195 | } | ||
179 | } | 196 | } |
180 | 197 | ||
181 | update { | 198 | update { |
@@ -184,6 +201,7 @@ update { | |||
184 | 201 | ||
185 | current.level = vars.Helper.Scenes.Active.Index; | 202 | current.level = vars.Helper.Scenes.Active.Index; |
186 | current.isLoadingGameFromUI = vars.Helper["isLoadingGameFromUI"].Current; | 203 | current.isLoadingGameFromUI = vars.Helper["isLoadingGameFromUI"].Current; |
204 | current.gravity = vars.Helper["gravity"].Current; | ||
187 | 205 | ||
188 | if (!vars.doneFirstLook) { | 206 | if (!vars.doneFirstLook) { |
189 | vars.doneFirstLook = true; | 207 | vars.doneFirstLook = true; |
@@ -211,6 +229,12 @@ update { | |||
211 | if (!vars.studioScreenDone) { | 229 | if (!vars.studioScreenDone) { |
212 | vars.studioScreenDone = !current.isLoadingGameFromUI; | 230 | vars.studioScreenDone = !current.isLoadingGameFromUI; |
213 | } | 231 | } |
232 | if (current.gravity != old.gravity) { | ||
233 | vars.gravChanges += 1; | ||
234 | if (settings["gravChanges"] && vars.updateText) { | ||
235 | vars.tcs.Text2 = vars.gravChanges.ToString(); | ||
236 | } | ||
237 | } | ||
214 | } | 238 | } |
215 | } | 239 | } |
216 | 240 | ||
@@ -235,6 +259,11 @@ start { | |||
235 | vars.prev.Clear(); | 259 | vars.prev.Clear(); |
236 | vars.firstRoom = false; | 260 | vars.firstRoom = false; |
237 | vars.inEnding = false; | 261 | vars.inEnding = false; |
262 | vars.gravChanges = 0; | ||
263 | if (settings["gravChanges"] && vars.updateText) { | ||
264 | vars.tcs.Text1 = "Gravity Changes:"; | ||
265 | vars.tcs.Text2 = "0"; | ||
266 | } | ||
238 | return true; | 267 | return true; |
239 | } | 268 | } |
240 | } | 269 | } |
@@ -302,6 +331,13 @@ reset { | |||
302 | return current.onStartScreen && !old.onStartScreen; | 331 | return current.onStartScreen && !old.onStartScreen; |
303 | } | 332 | } |
304 | 333 | ||
334 | onReset { | ||
335 | if (settings["gravChanges"] && vars.updateText) { | ||
336 | vars.tcs.Text1 = "Gravity Changes:"; | ||
337 | vars.tcs.Text2 = "0"; | ||
338 | } | ||
339 | } | ||
340 | |||
305 | exit | 341 | exit |
306 | { | 342 | { |
307 | vars.Helper.Dispose(); | 343 | vars.Helper.Dispose(); |