From ab0c01677feb0578426cdffcd9cb94569d8e1371 Mon Sep 17 00:00:00 2001 From: Matt-Hurd Date: Thu, 14 Sep 2023 14:25:25 -0500 Subject: [PATCH 1/3] add more scuffed routes --- public/assets/default_routes.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/public/assets/default_routes.json b/public/assets/default_routes.json index 73bf5a1..d764c9d 100644 --- a/public/assets/default_routes.json +++ b/public/assets/default_routes.json @@ -11,6 +11,21 @@ "name": "Centum v1.2", "gh": true, "path": "gh/Matt-Hurd/totk-speedrun-routes/hundo_centum_v1.2/" + }, + { + "name": "Any% Scuffed", + "gh": true, + "path": "gh/Matt-Hurd/totk-speedrun-routes/any_scuffed_abahbob_1.0/" + }, + { + "name": "AD Scuffed", + "gh": true, + "path": "gh/Matt-Hurd/totk-speedrun-routes/ad_scuffed_abahbob_1.0/" + }, + { + "name": "AMQ Scuffed", + "gh": true, + "path": "gh/Matt-Hurd/totk-speedrun-routes/amq_scuffed_abahbob_1.0/" } ] } From 9aeb1b513302d7df28beff5741097cf90570fae1 Mon Sep 17 00:00:00 2001 From: Matt-Hurd Date: Thu, 14 Sep 2023 14:25:44 -0500 Subject: [PATCH 2/3] Add category to route --- src/models/Route.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/models/Route.ts b/src/models/Route.ts index 15ae51c..b4d19cd 100644 --- a/src/models/Route.ts +++ b/src/models/Route.ts @@ -5,6 +5,7 @@ export default class Route { url: string; game: Game; version: string; + category: string = ""; branches: Branch[] = []; things: Record = {}; From 3b3c8e68c7715b3a64577dfd73a6d6d2213badf2 Mon Sep 17 00:00:00 2001 From: Matt-Hurd Date: Thu, 14 Sep 2023 14:33:52 -0500 Subject: [PATCH 3/3] allow for split names without Shrine/Lightroot --- src/store/progressSlice.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/store/progressSlice.ts b/src/store/progressSlice.ts index e37a512..5866ee2 100644 --- a/src/store/progressSlice.ts +++ b/src/store/progressSlice.ts @@ -2,7 +2,7 @@ import { createAsyncThunk, createSlice } from "@reduxjs/toolkit"; import { RootState } from "."; import liveSplitService from "../services/LiveSplitWebSocket"; -interface ProgressState { +export interface ProgressState { branchIndex: number; pointIndex: number; } @@ -25,7 +25,14 @@ export const incrementProgress = createAsyncThunk("progress/increment", async (_ ((thing.type === "Shrine" && point.action === "COMPLETE") || thing.type === "Lightroot") ) { const currentSplitName = await liveSplit.getCurrentSplitName(); - if (currentSplitName.endsWith(thing.name)) { + + const shrineName = thing.name.replace(" Shrine", "").replace(" Lightroot", ""); + + const sanitizedCurrentSplitName = currentSplitName.startsWith("-") + ? currentSplitName.substring(1) + : currentSplitName; + + if (sanitizedCurrentSplitName === shrineName) { liveSplit.split(); } }