Added up ladder and mine elevator
parent
5c59d0fa1e
commit
20e07d79cc
|
@ -69,6 +69,7 @@ namespace stardew_access.Game
|
|||
exclusions.Add("weed");
|
||||
exclusions.Add("twig");
|
||||
exclusions.Add("coloured stone");
|
||||
exclusions.Add("ice crystal");
|
||||
exclusions.Add("clay stone");
|
||||
exclusions.Add("fossil stone");
|
||||
exclusions.Add("crop");
|
||||
|
@ -77,7 +78,7 @@ namespace stardew_access.Game
|
|||
exclusions.Add("water");
|
||||
exclusions.Add("grass");
|
||||
|
||||
/* Not excluded
|
||||
/* Not excluded Categories
|
||||
*
|
||||
*
|
||||
* exclusions.Add("farmer");
|
||||
|
@ -291,7 +292,15 @@ namespace stardew_access.Game
|
|||
}
|
||||
}
|
||||
// Check for Mine ladders
|
||||
else if (ReadTile.isMineLadderAtTile((int)position.X, (int)position.Y))
|
||||
else if (ReadTile.isMineDownLadderAtTile((int)position.X, (int)position.Y))
|
||||
{
|
||||
PlaySoundAt(position, "ladder", CATEGORY.Buildings);
|
||||
}
|
||||
else if (ReadTile.isMineUpLadderAtTile((int)position.X, (int)position.Y))
|
||||
{
|
||||
PlaySoundAt(position, "ladder", CATEGORY.Buildings);
|
||||
}
|
||||
else if (ReadTile.isElevatorAtTile((int)position.X, (int)position.Y))
|
||||
{
|
||||
PlaySoundAt(position, "ladder", CATEGORY.Buildings);
|
||||
}
|
||||
|
|
|
@ -75,10 +75,18 @@ namespace stardew_access.Game
|
|||
{
|
||||
toSpeak = "Door";
|
||||
}
|
||||
else if (isMineLadderAtTile(x, y))
|
||||
else if (isMineDownLadderAtTile(x, y))
|
||||
{
|
||||
toSpeak = "Ladder";
|
||||
}
|
||||
else if (isMineUpLadderAtTile(x, y))
|
||||
{
|
||||
toSpeak = "Up Ladder";
|
||||
}
|
||||
else if (isElevatorAtTile(x, y))
|
||||
{
|
||||
toSpeak = "Elevator";
|
||||
}
|
||||
else if (getBuildingAtTile(x, y) != null)
|
||||
{
|
||||
toSpeak = getBuildingAtTile(x, y);
|
||||
|
@ -203,6 +211,7 @@ namespace stardew_access.Game
|
|||
/* Add More
|
||||
MainClass.monitor.Log(index.ToString(), LogLevel.Debug);
|
||||
*/
|
||||
|
||||
if (index != null)
|
||||
{
|
||||
switch (index)
|
||||
|
@ -240,6 +249,7 @@ namespace stardew_access.Game
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return toReturn;
|
||||
|
@ -572,11 +582,11 @@ namespace stardew_access.Game
|
|||
return toReturn;
|
||||
}
|
||||
|
||||
public static bool isMineLadderAtTile(int x, int y)
|
||||
public static bool isMineDownLadderAtTile(int x, int y)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Game1.inMine || Game1.currentLocation is Mine)
|
||||
if (Game1.currentLocation is Mine or MineShaft)
|
||||
{
|
||||
int? index = null;
|
||||
|
||||
|
@ -592,6 +602,46 @@ namespace stardew_access.Game
|
|||
return false;
|
||||
}
|
||||
|
||||
public static bool isMineUpLadderAtTile(int x, int y)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Game1.currentLocation is Mine or MineShaft)
|
||||
{
|
||||
int? index = null;
|
||||
|
||||
if (Game1.currentLocation.Map.GetLayer("Buildings").Tiles[x, y] != null)
|
||||
index = Game1.currentLocation.Map.GetLayer("Buildings").Tiles[x, y].TileIndex;
|
||||
|
||||
if (index == 115)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool isElevatorAtTile(int x, int y)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Game1.currentLocation is Mine or MineShaft)
|
||||
{
|
||||
int? index = null;
|
||||
|
||||
if (Game1.currentLocation.Map.GetLayer("Buildings").Tiles[x, y] != null)
|
||||
index = Game1.currentLocation.Map.GetLayer("Buildings").Tiles[x, y].TileIndex;
|
||||
|
||||
if (index == 112)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool isDoorAtTile(int x, int y)
|
||||
{
|
||||
Point tilePoint = new Point(x, y);
|
||||
|
|
Loading…
Reference in New Issue