Feedback round: bots that keep working, Sky Mower, calmer HUD, faster menus, new map

- Robot docks and drone pads with no belt ship straight to Earth; robots widen
  their rings up to 4x once everything in reach is mown, travel 2.5x faster
  empty, hoppers 60/150 kg. Drone reach 70 m + 25 m per upgrade.
- New Sky Mower: a big mowing drone on a pad, 91 sectors, flies over the grass.
- Cut paint follows the blade as a strip, no disc ahead of the machine.
- Sector toasts aggregate, chimes and till sounds throttled, toasts moved and
  narrowed.
- Menus no longer rebuild on every money change (price tint follows the
  wallet), scroll position kept.
- Map drawn as one mesh, opens near the player, ME / + / - / GLOBE, scale bar.
- Key-art still (x_key) and -shotsize for the store stills; -demobots test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NiemandKG
2026-11-09 15:38:37 +06:00
parent d1c3761e58
commit 27d075103b
44 changed files with 6801 additions and 5733 deletions

View File

@ -264,7 +264,7 @@ namespace GrassCutter
/// standing counts, so the whole planet is worth exactly its area. minSweep lets a blade held still eat what is
/// under it, paint widens only what the eye sees, so that rows laid edge to edge show no seam.
/// </summary>
public static float Cut(Vector3 from, Vector3 to, float width, float minSweep = 0f, float paint = 0f)
public static float Cut(Vector3 from, Vector3 to, float width, float minSweep = 0f, float paint = 0f, bool blade = false)
{
var up = Planet.Up(to);
var flat = Vector3.ProjectOnPlane(to - from, up);
@ -296,9 +296,22 @@ namespace GrassCutter
if (cut <= 0f) return 0f;
Critters.Disturb(to, half, cut);
float r = half + paint;
int stamps = Mathf.Clamp(Mathf.CeilToInt(len / Mathf.Max(r, 0.25f)) + 1, 1, MaxStampsPerCut);
for (int i = 0; i < stamps; i++) Stamp(Vector3.Lerp(from, to, stamps > 1 ? (float)i / (stamps - 1) : 1f), r);
// a machine's header shows the strip it took and nothing ahead of it; a stroke shows round ends
if (blade)
{
if (len > 1e-3f)
foreach (int id in s_touched)
{
var m = Open(id);
if (m != null) PaintStrip(m, a, b, half);
}
}
else
{
float r = half + paint;
int stamps = Mathf.Clamp(Mathf.CeilToInt(len / Mathf.Max(r, 0.25f)) + 1, 1, MaxStampsPerCut);
for (int i = 0; i < stamps; i++) Stamp(Vector3.Lerp(from, to, stamps > 1 ? (float)i / (stamps - 1) : 1f), r);
}
return cut;
}
@ -411,6 +424,41 @@ namespace GrassCutter
if (-Vector3.Dot(d, s.borders[k]) < reach) Paint(HexGrid.Get(s.neighbours[k]), d, r);
}
/// <summary>
/// Show the strip a header swept from a to b: square across the line of travel, as wide as the cut, and only a
/// hand's breadth past either end so the next stroke joins on without a seam. A wide header shows a wide strip
/// behind it, not a disc eaten out in front of it.
/// </summary>
static void PaintStrip(Mask m, Vector3 a, Vector3 b, float half)
{
var s = m.s;
Flat(s, a, out float u0, out float v0);
Flat(s, b, out float u1, out float v1);
float du = u1 - u0, dv = v1 - v0, len = Mathf.Sqrt(du * du + dv * dv);
if (len < 1e-4f) return;
float ux = du / len, uv = dv / len;
const float cap = 0.3f;
float reach = half + PaintFeather + cap;
int x0 = Mathf.Max(0, Mathf.FloorToInt((Mathf.Min(u0, u1) - reach + s.half) / m.cell));
int x1 = Mathf.Min(Res - 1, Mathf.CeilToInt((Mathf.Max(u0, u1) + reach + s.half) / m.cell));
int z0 = Mathf.Max(0, Mathf.FloorToInt((Mathf.Min(v0, v1) - reach + s.half) / m.cell));
int z1 = Mathf.Min(Res - 1, Mathf.CeilToInt((Mathf.Max(v0, v1) + reach + s.half) / m.cell));
float wide = Mathf.Max(half, MinPaintRadius);
for (int z = z0; z <= z1; z++)
for (int x = x0; x <= x1; x++)
{
float cu = Cell(m, x) - u0, cv = Cell(m, z) - v0;
float across = Mathf.Abs(cv * ux - cu * uv);
float t = cu * ux + cv * uv;
float off = Mathf.Max(-t, t - len);
float f = Mathf.Clamp01((wide - across) / PaintFeather + 0.5f) * Mathf.Clamp01((cap - off) / PaintFeather + 0.5f);
if (f <= 0f) continue;
byte by = (byte)(f * 255f);
int i = (z * Res + x) * 2;
if (by > m.rg[i]) { m.rg[i] = by; m.show = m.dirty = m.keep = true; }
}
}
static void Paint(HexGrid.Sector s, Vector3 d, float r)
{
var m = Open(s.id);