feat: SK backlog from test through 2026.11.22.48 (Trade Shop, Oracle, quests, loot, nav)

Squash of test/main-merge-2026-10-25 onto aelrynth main 2026.11.19.1 for the standing sk PR. Includes Trade Shop, Oracle wiki/ILT tracker, quest runs, loot checklist, RynthNav, VTank import. HandWrittenVersion remains 0.5.0-legacy-ui. See Changelog/2026-11-22-sk-backlog-test-merge.md.
This commit is contained in:
BlankenshipG 2026-11-23 00:08:38 -05:00
commit dc08e1abba
521 changed files with 47247 additions and 795 deletions

View file

@ -60,10 +60,19 @@ internal interface INavRecoveryPlanner
{
NavRecoveryPlan? TryPlan(NavPoint target, out string why);
NavAreaCheck CheckArea(uint playerCell, double tNs, double tEw, out string routeArea, out string playerArea);
/// <summary>
/// Outdoors: does the straight walk from (aNs, aEw) to (bNs, bEw) climb ground too steep to
/// walk (RynthVision's red slopes)? <paramref name="atYd"/> is how far along; false indoors
/// or when the landscape isn't loaded.
/// </summary>
bool CrossesSteepGround(double aNs, double aEw, double bNs, double bEw, out double atYd);
}
internal sealed class NavRecoveryPlanner : INavRecoveryPlanner
{
/// <summary>TryPlan's why when the waypoint is a level above or below with no walk to it.</summary>
internal const string OtherLevelWhy = "the waypoint is on another level, no walk leads there";
// A dungeon waypoint is always inside some cell; its distance to that cell's centre
// is at most about half the biggest room. Used to decide "this waypoint is in that
// cell graph" for both planning and the area check.
@ -181,10 +190,13 @@ internal sealed class NavRecoveryPlanner : INavRecoveryPlanner
applicable = true;
uint start = graph.ContainsKey(playerCell) ? playerCell : DungeonPathfinder.NearestCell(graph, pNs, pEw, pz);
if (start == 0) { why = "can't place you on the dungeon map"; return null; }
if (start == goal) { why = "already in the waypoint's room, the map has no way around"; return null; }
// The waypoint over or under you by a level (2026-11-08: a chase into a pit, 17 m down, and the route's
// waypoints up on the floor above): no walk gets there; NavigationEngine hands it on (WaypointOnOtherLevel).
bool otherLevel = Math.Abs(pz - tz) > DungeonPathfinder.LevelApartZ;
if (start == goal) { why = otherLevel ? OtherLevelWhy : "already in the waypoint's room, the map has no way around"; return null; }
var path = DungeonPathfinder.FindPath(start, goal, graph, _hazards());
if (path.Count < 2) { why = "no walkable way on the dungeon map"; return null; }
if (path.Count < 2) { why = otherLevel ? OtherLevelWhy : "no walkable way on the dungeon map"; return null; }
// The same points the dungeon patrol uses: an approach and an exit point centred on
// every narrow opening (flagged, so the engine goes through straight), rooms crossed
@ -250,6 +262,31 @@ internal sealed class NavRecoveryPlanner : INavRecoveryPlanner
return plan;
}
// ══════════════════════════════════════════════════════════════════════
// STEEP GROUND AHEAD (the red slope overlay's rule, on a straight leg)
// ══════════════════════════════════════════════════════════════════════
// Where the character stands and where the waypoint sits are not checked (either may sit
// on the edge of a slope), nor anything farther ahead than SteepLookaheadYd: the engine
// asks again as the character comes closer.
private const double SteepSkipStartYd = 0.5;
private const double SteepSkipEndYd = 2.0;
private const double SteepLookaheadYd = 150.0;
public bool CrossesSteepGround(double aNs, double aEw, double bNs, double bEw, out double atYd)
{
atYd = -1;
if (!_host.HasGetPlayerPose ||
!_host.TryGetPlayerPose(out uint cell, out _, out _, out _, out _, out _, out _, out _))
return false;
if (cell == 0 || (cell & 0xFFFF) >= 0x0100) return false; // indoors: the dungeon map's job
var geo = _raycast()?.GeometryLoader;
if (geo == null) return false;
atYd = NavSteepGround.FirstBlockedYd(NavToWorld(aEw), NavToWorld(aNs), NavToWorld(bEw), NavToWorld(bNs),
key => geo.GetLandblockData(key)?.HeightsZ, SteepSkipStartYd, SteepSkipEndYd, SteepLookaheadYd);
return atYd >= 0;
}
// ══════════════════════════════════════════════════════════════════════
// AREA CHECK (route in another dungeon / on the landscape)
// ══════════════════════════════════════════════════════════════════════