Merge branch 'master' of https://github.com/stardew-access/stardew-access
commit
02250ed307
|
@ -1,13 +1,8 @@
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Netcode;
|
|
||||||
using StardewValley;
|
using StardewValley;
|
||||||
using StardewValley.Buildings;
|
using StardewValley.Buildings;
|
||||||
using StardewValley.Locations;
|
using StardewValley.Locations;
|
||||||
using StardewValley.Objects;
|
|
||||||
using StardewValley.TerrainFeatures;
|
|
||||||
using static stardew_access.Features.Utils;
|
using static stardew_access.Features.Utils;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace stardew_access.Features
|
namespace stardew_access.Features
|
||||||
|
@ -16,101 +11,101 @@ namespace stardew_access.Features
|
||||||
/// Provides methods to locate tiles of interest in various game locations that are conditional or unpredictable (I.E. not static).
|
/// Provides methods to locate tiles of interest in various game locations that are conditional or unpredictable (I.E. not static).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The DynamicTiles class currently supports the following location types:
|
/// The DynamicTiles class currently supports the following location types:
|
||||||
/// - Beach
|
/// - Beach
|
||||||
/// - BoatTunnel
|
/// - BoatTunnel
|
||||||
/// - CommunityCenter
|
/// - CommunityCenter
|
||||||
/// - Farm
|
/// - Farm
|
||||||
/// - FarmHouse
|
/// - FarmHouse
|
||||||
/// - Forest
|
/// - Forest
|
||||||
/// - IslandFarmHouse
|
/// - IslandFarmHouse
|
||||||
/// - IslandLocation
|
/// - IslandLocation
|
||||||
/// - LibraryMuseum
|
/// - LibraryMuseum
|
||||||
/// - Town
|
/// - Town
|
||||||
///
|
///
|
||||||
/// And the following Island LocationTypes:
|
/// And the following Island LocationTypes:
|
||||||
/// - IslandNorth
|
/// - IslandNorth
|
||||||
/// - IslandWest
|
/// - IslandWest
|
||||||
/// - VolcanoDungeon
|
/// - VolcanoDungeon
|
||||||
///
|
///
|
||||||
/// The class also supports the following named locations:
|
/// The class also supports the following named locations:
|
||||||
/// - Barn (and its upgraded versions)
|
/// - Barn (and its upgraded versions)
|
||||||
/// - Coop (and its upgraded versions)
|
/// - Coop (and its upgraded versions)
|
||||||
///
|
///
|
||||||
/// The class does not yet support the following location types, but consider adding support in future updates:
|
/// The class does not yet support the following location types, but consider adding support in future updates:
|
||||||
/// - AbandonedJojaMart
|
/// - AbandonedJojaMart
|
||||||
/// - AdventureGuild
|
/// - AdventureGuild
|
||||||
/// - BathHousePool
|
/// - BathHousePool
|
||||||
/// - BeachNightMarket
|
/// - BeachNightMarket
|
||||||
/// - BugLand
|
/// - BugLand
|
||||||
/// - BusStop
|
/// - BusStop
|
||||||
/// - Caldera
|
/// - Caldera
|
||||||
/// - Cellar
|
/// - Cellar
|
||||||
/// - Club
|
/// - Club
|
||||||
/// - Desert
|
/// - Desert
|
||||||
/// - FarmCave
|
/// - FarmCave
|
||||||
/// - FishShop
|
/// - FishShop
|
||||||
/// - JojaMart
|
/// - JojaMart
|
||||||
/// - ManorHouse
|
/// - ManorHouse
|
||||||
/// - MermaidHouse
|
/// - MermaidHouse
|
||||||
/// - Mine
|
/// - Mine
|
||||||
/// - Mountain
|
/// - Mountain
|
||||||
/// - MovieTheater
|
/// - MovieTheater
|
||||||
/// - Railroad
|
/// - Railroad
|
||||||
/// - SeedShop
|
/// - SeedShop
|
||||||
/// - Sewer
|
/// - Sewer
|
||||||
/// - Submarine
|
/// - Submarine
|
||||||
/// - Summit
|
/// - Summit
|
||||||
/// - WizardHouse
|
/// - WizardHouse
|
||||||
/// - Woods
|
/// - Woods
|
||||||
///
|
///
|
||||||
/// The class does not yet support the following named locations, but consider adding support in future updates:
|
/// The class does not yet support the following named locations, but consider adding support in future updates:
|
||||||
/// - "AnimalShop"
|
/// - "AnimalShop"
|
||||||
/// - "Backwoods"
|
/// - "Backwoods"
|
||||||
/// - "BathHouse_Entry"
|
/// - "BathHouse_Entry"
|
||||||
/// - "BathHouse_MensLocker"
|
/// - "BathHouse_MensLocker"
|
||||||
/// - "BathHouse_WomensLocker"
|
/// - "BathHouse_WomensLocker"
|
||||||
/// - "Blacksmith"
|
/// - "Blacksmith"
|
||||||
/// - "ElliottHouse"
|
/// - "ElliottHouse"
|
||||||
/// - "FarmGreenHouse"
|
/// - "FarmGreenHouse"
|
||||||
/// - "Greenhouse"
|
/// - "Greenhouse"
|
||||||
/// - "HaleyHouse"
|
/// - "HaleyHouse"
|
||||||
/// - "HarveyRoom"
|
/// - "HarveyRoom"
|
||||||
/// - "Hospital"
|
/// - "Hospital"
|
||||||
/// - "JoshHouse"
|
/// - "JoshHouse"
|
||||||
/// - "LeahHouse"
|
/// - "LeahHouse"
|
||||||
/// - "LeoTreeHouse"
|
/// - "LeoTreeHouse"
|
||||||
/// - "Saloon"
|
/// - "Saloon"
|
||||||
/// - "SamHouse"
|
/// - "SamHouse"
|
||||||
/// - "SandyHouse"
|
/// - "SandyHouse"
|
||||||
/// - "ScienceHouse"
|
/// - "ScienceHouse"
|
||||||
/// - "SebastianRoom"
|
/// - "SebastianRoom"
|
||||||
/// - "SkullCave"
|
/// - "SkullCave"
|
||||||
/// - "Sunroom"
|
/// - "Sunroom"
|
||||||
/// - "Tent"
|
/// - "Tent"
|
||||||
/// - "Trailer"
|
/// - "Trailer"
|
||||||
/// - "Trailer_Big"
|
/// - "Trailer_Big"
|
||||||
/// - "Tunnel"
|
/// - "Tunnel"
|
||||||
/// - "WitchHut"
|
/// - "WitchHut"
|
||||||
/// - "WitchSwamp"
|
/// - "WitchSwamp"
|
||||||
/// - "WitchWarpCave"
|
/// - "WitchWarpCave"
|
||||||
/// - "WizardHouseBasement"
|
/// - "WizardHouseBasement"
|
||||||
///
|
///
|
||||||
/// The class does not yet support the following IslandLocation location types, but consider adding support in future updates:
|
/// The class does not yet support the following IslandLocation location types, but consider adding support in future updates:
|
||||||
/// - IslandEast
|
/// - IslandEast
|
||||||
/// - IslandFarmCave
|
/// - IslandFarmCave
|
||||||
/// - IslandFieldOffice
|
/// - IslandFieldOffice
|
||||||
/// - IslandHut
|
/// - IslandHut
|
||||||
/// - IslandShrine
|
/// - IslandShrine
|
||||||
/// - IslandSouth
|
/// - IslandSouth
|
||||||
/// - IslandSouthEast
|
/// - IslandSouthEast
|
||||||
/// - IslandSouthEastCave
|
/// - IslandSouthEastCave
|
||||||
/// - IslandWestCave1
|
/// - IslandWestCave1
|
||||||
///
|
///
|
||||||
/// The class does not yet support the following IslandLocation named locations, but consider adding support in future updates:
|
/// The class does not yet support the following IslandLocation named locations, but consider adding support in future updates:
|
||||||
/// - "CaptainRoom"
|
/// - "CaptainRoom"
|
||||||
/// - "IslandNorthCave1"
|
/// - "IslandNorthCave1"
|
||||||
/// - "QiNutRoom"
|
/// - "QiNutRoom"
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class DynamicTiles
|
public class DynamicTiles
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using StardewValley;
|
using StardewValley;
|
||||||
using StardewValley.Objects;
|
using StardewValley.Objects;
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
using System.IO;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Linq;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using StardewValley;
|
using StardewValley;
|
||||||
using static stardew_access.Features.Utils;
|
using static stardew_access.Features.Utils;
|
||||||
|
|
||||||
|
@ -512,4 +509,4 @@ namespace stardew_access.Features
|
||||||
return (name, category ?? CATEGORY.Others);
|
return (name, category ?? CATEGORY.Others);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Netcode;
|
|
||||||
using StardewValley;
|
using StardewValley;
|
||||||
using StardewValley.Buildings;
|
|
||||||
using StardewValley.Locations;
|
using StardewValley.Locations;
|
||||||
using StardewValley.Objects;
|
using StardewValley.Objects;
|
||||||
using StardewValley.TerrainFeatures;
|
using StardewValley.TerrainFeatures;
|
||||||
|
@ -116,6 +114,26 @@ namespace stardew_access.Features
|
||||||
return (warp ?? door, CATEGORY.Doors);
|
return (warp ?? door, CATEGORY.Doors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isMineDownLadderAtTile(currentLocation, x, y))
|
||||||
|
{
|
||||||
|
return ("Ladder", CATEGORY.Doors);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isShaftAtTile(currentLocation, x, y))
|
||||||
|
{
|
||||||
|
return ("Shaft", CATEGORY.Doors);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isMineUpLadderAtTile(currentLocation, x, y))
|
||||||
|
{
|
||||||
|
return ("Up Ladder", CATEGORY.Doors);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isElevatorAtTile(currentLocation, x, y))
|
||||||
|
{
|
||||||
|
return ("Elevator", CATEGORY.Doors);
|
||||||
|
}
|
||||||
|
|
||||||
string? junimoBundle = GetJunimoBundleAt(currentLocation, x, y);
|
string? junimoBundle = GetJunimoBundleAt(currentLocation, x, y);
|
||||||
if (junimoBundle != null)
|
if (junimoBundle != null)
|
||||||
{
|
{
|
||||||
|
@ -354,7 +372,7 @@ namespace stardew_access.Features
|
||||||
{
|
{
|
||||||
// Get the terrain feature from the reference
|
// Get the terrain feature from the reference
|
||||||
var terrainFeature = terrain.Get();
|
var terrainFeature = terrain.Get();
|
||||||
|
|
||||||
// Check if the terrain feature is HoeDirt
|
// Check if the terrain feature is HoeDirt
|
||||||
if (terrainFeature is HoeDirt dirt)
|
if (terrainFeature is HoeDirt dirt)
|
||||||
{
|
{
|
||||||
|
@ -803,7 +821,7 @@ namespace stardew_access.Features
|
||||||
/// <returns>True if a mine down ladder is found at the specified tile, otherwise false.</returns>
|
/// <returns>True if a mine down ladder is found at the specified tile, otherwise false.</returns>
|
||||||
public static bool isMineDownLadderAtTile(GameLocation currentLocation, int x, int y)
|
public static bool isMineDownLadderAtTile(GameLocation currentLocation, int x, int y)
|
||||||
{
|
{
|
||||||
return currentLocation is Mine or MineShaft || currentLocation.Name == "SkullCave"
|
return currentLocation is Mine or MineShaft || currentLocation.Name == "SkullCave"
|
||||||
? CheckTileIndex(currentLocation, x, y, 173)
|
? CheckTileIndex(currentLocation, x, y, 173)
|
||||||
: false;
|
: false;
|
||||||
}
|
}
|
||||||
|
@ -861,7 +879,7 @@ namespace stardew_access.Features
|
||||||
{
|
{
|
||||||
// Create a Point object from the given tile coordinates
|
// Create a Point object from the given tile coordinates
|
||||||
Point tilePoint = new(x, y);
|
Point tilePoint = new(x, y);
|
||||||
|
|
||||||
// Access the doorList in the current location
|
// Access the doorList in the current location
|
||||||
StardewValley.Network.NetPointDictionary<string, Netcode.NetString> doorList = currentLocation.doors;
|
StardewValley.Network.NetPointDictionary<string, Netcode.NetString> doorList = currentLocation.doors;
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@ using HarmonyLib;
|
||||||
using stardew_access.Patches;
|
using stardew_access.Patches;
|
||||||
using stardew_access.ScreenReader;
|
using stardew_access.ScreenReader;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using StardewValley.Menus;
|
|
||||||
using Microsoft.Xna.Framework.Input;
|
|
||||||
|
|
||||||
namespace stardew_access
|
namespace stardew_access
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue