Added ladder to read tile

master
shoaib11120 2021-12-20 23:02:50 +05:30
parent fdf9f7c0a8
commit dd0889e7fb
3 changed files with 34 additions and 12 deletions

View File

@ -6,7 +6,7 @@ namespace stardew_access.Game
internal class CurrentPlayer
{
internal static int getHealth()
public static int getHealth()
{
if(Game1.player == null)
return 0;
@ -18,7 +18,7 @@ namespace stardew_access.Game
return healthPercentage;
}
internal static int getStamina()
public static int getStamina()
{
if (Game1.player == null)
return 0;
@ -31,7 +31,7 @@ namespace stardew_access.Game
return staminaPercentage;
}
internal static int getPositionX()
public static int getPositionX()
{
if (Game1.player == null)
return 0;
@ -40,7 +40,7 @@ namespace stardew_access.Game
return x;
}
internal static int getPositionY()
public static int getPositionY()
{
if (Game1.player == null)
return 0;
@ -48,5 +48,19 @@ namespace stardew_access.Game
int y = (int)Game1.player.getTileLocation().Y;
return y;
}
public static string getTimeOfDay()
{
int timeOfDay = Game1.timeOfDay;
return timeOfDay.ToString();
}
public static int getMoney()
{
if(Game1.player == null)
return -1;
return Game1.player.Money;
}
}
}

View File

@ -10,7 +10,6 @@ using AutoHotkey.Interop;
using Microsoft.Xna.Framework;
using StardewValley.TerrainFeatures;
using StardewValley.Locations;
using StardewValley.Objects;
namespace stardew_access
{
@ -255,6 +254,7 @@ namespace stardew_access
if (!Equals(gt, prevTile))
{
prevTile = gt;
if (Game1.currentLocation.isWaterTile(x, y)){
ScreenReader.say("Water", true);
}
@ -464,6 +464,14 @@ namespace stardew_access
});
});
#endregion
if (Game1.inMine || Game1.currentLocation is Mine)
{
int index = Game1.currentLocation.Map.GetLayer("Buildings").Tiles[x, y].TileIndex;
if (index == 173 || index == 174)
ScreenReader.say("Ladder", true);
}
}
}
}

View File

@ -91,16 +91,16 @@ namespace stardew_access.Patches
#region Add title if any
if (boldTitleText != null)
toSpeak.Append($"{boldTitleText}.\n");
#endregion
#region Add the base text
toSpeak.Append(text);
toSpeak.Append($"{boldTitleText}\n");
#endregion
#region Add money
if (moneyAmountToDisplayAtBottom != -1)
toSpeak.Append($"\nValue: {moneyAmountToDisplayAtBottom}g\n");
toSpeak.Append($"\nCost: {moneyAmountToDisplayAtBottom}g\n");
#endregion
#region Add the base text
toSpeak.Append(text);
#endregion
#region Add crafting ingredients