Added more objects to object narration in read tile
parent
a9e015f11f
commit
4d0dd1dc11
|
@ -50,7 +50,7 @@ namespace stardew_access.Game
|
||||||
{
|
{
|
||||||
toSpeak = "Water";
|
toSpeak = "Water";
|
||||||
}
|
}
|
||||||
else if (Game1.currentLocation.getObjectAtTile(x, y) != null)
|
else if (Game1.currentLocation.isObjectAtTile(x, y))
|
||||||
{
|
{
|
||||||
string? objectName = getObjectNameAtTile(x, y);
|
string? objectName = getObjectNameAtTile(x, y);
|
||||||
if (objectName != null)
|
if (objectName != null)
|
||||||
|
@ -62,6 +62,10 @@ namespace stardew_access.Game
|
||||||
if (terrain != null)
|
if (terrain != null)
|
||||||
toSpeak = terrain;
|
toSpeak = terrain;
|
||||||
}
|
}
|
||||||
|
else if (getResourceClumpAtTile(x, y) != null)
|
||||||
|
{
|
||||||
|
toSpeak = getResourceClumpAtTile(x, y);
|
||||||
|
}
|
||||||
else if (isDoorAtTile(x, y))
|
else if (isDoorAtTile(x, y))
|
||||||
{
|
{
|
||||||
toSpeak = "Door";
|
toSpeak = "Door";
|
||||||
|
@ -70,10 +74,6 @@ namespace stardew_access.Game
|
||||||
{
|
{
|
||||||
toSpeak = "Ladder";
|
toSpeak = "Ladder";
|
||||||
}
|
}
|
||||||
else if (getResourceClumpAtTile(x, y) != null)
|
|
||||||
{
|
|
||||||
toSpeak = getResourceClumpAtTile(x, y);
|
|
||||||
}
|
|
||||||
else if (!Game1.currentLocation.isTilePassable(Game1.player.nextPosition(Game1.player.getDirection()), Game1.viewport))
|
else if (!Game1.currentLocation.isTilePassable(Game1.player.nextPosition(Game1.player.getDirection()), Game1.viewport))
|
||||||
{
|
{
|
||||||
toSpeak = "Colliding";
|
toSpeak = "Colliding";
|
||||||
|
@ -275,20 +275,130 @@ namespace stardew_access.Game
|
||||||
string? toReturn = null;
|
string? toReturn = null;
|
||||||
|
|
||||||
StardewValley.Object obj = Game1.currentLocation.getObjectAtTile(x, y);
|
StardewValley.Object obj = Game1.currentLocation.getObjectAtTile(x, y);
|
||||||
|
int index = obj.ParentSheetIndex;
|
||||||
toReturn = obj.DisplayName;
|
toReturn = obj.DisplayName;
|
||||||
|
|
||||||
// TODO add individual stone narration using parentSheetIndex
|
// Get object names based on index
|
||||||
// monitor.Log(obj.parentSheetIndex.ToString(), LogLevel.Debug);
|
switch (index)
|
||||||
if (Game1.objectInformation.ContainsKey(obj.ParentSheetIndex) && toReturn.ToLower().Equals("stone"))
|
|
||||||
{
|
{
|
||||||
string info = Game1.objectInformation[obj.parentSheetIndex];
|
case 313:
|
||||||
if (info.ToLower().Contains("copper"))
|
case 314:
|
||||||
toReturn = "Copper " + toReturn;
|
case 315:
|
||||||
|
case 316:
|
||||||
|
case 317:
|
||||||
|
case 318:
|
||||||
|
case 452:
|
||||||
|
case 674:
|
||||||
|
case 675:
|
||||||
|
case 676:
|
||||||
|
case 677:
|
||||||
|
case 678:
|
||||||
|
case 679:
|
||||||
|
case 750:
|
||||||
|
case 784:
|
||||||
|
case 785:
|
||||||
|
case 786:
|
||||||
|
return "Weed";
|
||||||
|
case 792:
|
||||||
|
case 793:
|
||||||
|
case 794:
|
||||||
|
return "Fertile weed";
|
||||||
|
case 319:
|
||||||
|
case 320:
|
||||||
|
case 321:
|
||||||
|
return "Ice crystal";
|
||||||
|
case 75:
|
||||||
|
return "Geode";
|
||||||
|
case 76:
|
||||||
|
return "Frozen geode";
|
||||||
|
case 77:
|
||||||
|
return "Magma geode";
|
||||||
|
case 8:
|
||||||
|
case 66:
|
||||||
|
return "Amethyst node";
|
||||||
|
case 14:
|
||||||
|
case 62:
|
||||||
|
return "Aquamarine node";
|
||||||
|
case 843:
|
||||||
|
case 844:
|
||||||
|
return "Cinder shard node";
|
||||||
|
case 2:
|
||||||
|
case 72:
|
||||||
|
return "Diamond node";
|
||||||
|
case 12:
|
||||||
|
case 60:
|
||||||
|
return "Emerald node";
|
||||||
|
case 44:
|
||||||
|
return "Gem node";
|
||||||
|
case 6:
|
||||||
|
case 70:
|
||||||
|
return "Jade node";
|
||||||
|
case 46:
|
||||||
|
return "Mystic stone";
|
||||||
|
case 74:
|
||||||
|
return "Prismatic node";
|
||||||
|
case 4:
|
||||||
|
case 64:
|
||||||
|
return "Ruby node";
|
||||||
|
case 10:
|
||||||
|
case 68:
|
||||||
|
return "Topaz node";
|
||||||
|
case 819:
|
||||||
|
return "Omni geode node";
|
||||||
|
case 751:
|
||||||
|
case 849:
|
||||||
|
return "Copper node";
|
||||||
|
case 764:
|
||||||
|
return "Gold node";
|
||||||
|
case 765:
|
||||||
|
return "Iridium node";
|
||||||
|
case 290:
|
||||||
|
case 850:
|
||||||
|
return "Iron node";
|
||||||
|
case 32:
|
||||||
|
case 34:
|
||||||
|
case 36:
|
||||||
|
case 38:
|
||||||
|
case 40:
|
||||||
|
case 42:
|
||||||
|
case 48:
|
||||||
|
case 50:
|
||||||
|
case 52:
|
||||||
|
case 54:
|
||||||
|
case 56:
|
||||||
|
case 58:
|
||||||
|
return "Coloured stone";
|
||||||
|
case 668:
|
||||||
|
case 670:
|
||||||
|
case 845:
|
||||||
|
case 846:
|
||||||
|
case 847:
|
||||||
|
return "Mine stone";
|
||||||
|
case 818:
|
||||||
|
return "Clay stone";
|
||||||
|
case 816:
|
||||||
|
case 817:
|
||||||
|
return "Fossil stone";
|
||||||
|
case 25:
|
||||||
|
return "Stone";
|
||||||
|
case 118:
|
||||||
|
case 120:
|
||||||
|
case 122:
|
||||||
|
case 124:
|
||||||
|
return "Barrel";
|
||||||
|
case 119:
|
||||||
|
case 121:
|
||||||
|
case 123:
|
||||||
|
case 125:
|
||||||
|
return "Item box";
|
||||||
}
|
}
|
||||||
|
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool isMineLadderAtTile(int x, int y)
|
public static bool isMineLadderAtTile(int x, int y)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (Game1.inMine || Game1.currentLocation is Mine)
|
if (Game1.inMine || Game1.currentLocation is Mine)
|
||||||
{
|
{
|
||||||
|
@ -297,6 +407,8 @@ namespace stardew_access.Game
|
||||||
if (index == 173 || index == 174)
|
if (index == 173 || index == 174)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (Exception) {}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue