Smaller planets, 93% sectors, dearer late game, automation perks, autopilot, grass train

Not yet tried in the game: Unity could not get a licence (Unity Hub isn't
running), so this was only type-checked with Roslyn.

- Planets by area: the hard one half the old whole planet, normal a third of
  that, easy a sixth. Saves keep the size set they were made on (sizeGen 0).
- A sector closes at 93% mown.
- Mid and late prices go up (perks, machines, vehicles, tunes); the early
  game stays as it was.
- AUTOMATION perk tree: Long Leash (robot reach), Overdrive Motors, Bigger
  Hoppers, Long-Range Drones and Hive Mind.
- Autopilot, a garage tune for mowers: C hands the machine over. It mows the
  fields around in strokes, unloads at the nearest pad or the base yard and
  comes back. Getting in takes it back; it carries on after a load.
- Grass Train: lays its own track to a station next door, mowing under it,
  then runs back and forth cutting wider each run. Models in gc_train.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NiemandKG
2026-11-10 11:39:02 +06:00
parent 5b14fd6635
commit df55b5e417
37 changed files with 1690 additions and 328 deletions

View File

@ -18,6 +18,9 @@ namespace GrassCutter
public float tank;
public int[] tune;
public Vector2[] bed;
/// <summary>On autopilot (<see cref="Vehicle.AutoJob"/>, 0 off), and the spot and way it was started from.</summary>
public int auto;
public Vector3 home, fwd;
}
/// <summary>Where a garage puts a machine: its pad, or if it's gone, at the base along the ramp in the first free spot.</summary>
@ -141,6 +144,7 @@ namespace GrassCutter
{
if (!v || !v.IsSpawned) continue;
var s = new VehicleSave { kind = (int)v.kind, key = v.Crew.Value.ToString(), at = v.transform.position, turn = v.transform.rotation, tank = v.Tank.Value };
if (!v.HasDriver) v.AutoState(out s.auto, out s.home, out s.fwd);
s.tune = new int[v.Tuned.Count];
for (int i = 0; i < s.tune.Length; i++) s.tune[i] = v.Tuned[i];
s.bed = new Vector2[v.Bed.Count];
@ -161,6 +165,7 @@ namespace GrassCutter
v.Tank.Value = s.tank;
if (s.tune != null) for (int i = 0; i < s.tune.Length && i < v.Tuned.Count; i++) v.Tuned[i] = (byte)s.tune[i];
if (s.bed != null) foreach (var b in s.bed) v.Bed.Add(b);
if (s.auto != 0) v.ServerResumeAuto(s.home, s.fwd);
}
}
}