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/" } ] } 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 = {}; 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(); } }