From db1cc7f58dc7c26fef7f32609dbddd40c7595422 Mon Sep 17 00:00:00 2001 From: shoaib11120 Date: Thu, 13 Jan 2022 14:13:15 +0530 Subject: [PATCH] Added tile indexes --- stardew-access/Game/ReadTile.cs | 38 +++++++++++++++++++++++++++++++++ stardew-access/manifest.json | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/stardew-access/Game/ReadTile.cs b/stardew-access/Game/ReadTile.cs index 2b8e8f3..aea1f11 100644 --- a/stardew-access/Game/ReadTile.cs +++ b/stardew-access/Game/ReadTile.cs @@ -77,6 +77,44 @@ namespace stardew_access.Game else if (!Game1.currentLocation.isTilePassable(Game1.player.nextPosition(Game1.player.getDirection()), Game1.viewport)) { toSpeak = "Colliding"; + } else + { + try + { + int index = Game1.currentLocation.Map.GetLayer("Buildings").Tiles[x, y].TileIndex; + /* Add More + MainClass.monitor.Log(index.ToString(), LogLevel.Debug); + */ + switch (index) + { + case 1955: + case 41: + toSpeak = "Mail Box"; + break; + case 173: + toSpeak = "Fridge"; + break; + case 169: + case 170: + case 171: + case 172: + toSpeak = "Kitchen"; + break; + case 1003: + toSpeak = "Street lamp"; + break; + case 78: + toSpeak = "Trash bin"; + break; + case 617: + toSpeak = "Daily quest"; + break; + case 616: + toSpeak = "Calender"; + break; + } + } + catch (Exception) {} } #endregion diff --git a/stardew-access/manifest.json b/stardew-access/manifest.json index 8d6bc3e..6dcf2f3 100644 --- a/stardew-access/manifest.json +++ b/stardew-access/manifest.json @@ -1,7 +1,7 @@ { "Name": "Stardew Access", "Author": "Mohammad Shoaib", - "Version": "1.0.13-beta", + "Version": "1.0.14-beta", "Description": "An accessibility mod with screen reader support!", "UniqueID": "shoaib.stardewaccess", "EntryDll": "stardew-access.dll",