Round 6 fixes: held tools, headlamp glare, ladder openings, level horizon, roof hulls, rain hits, idle motion, belt packs, meadow variety

- Held tools sit lower and further right; the hammer faces forward and strikes about the camera's right
- Headlamp leaves held items, treats and vending machines alone (rendering layer NoLamp); other lights keep lighting them
- Hay grounded on the floor in world space (it floated)
- Deck fence opens at each ladder, rail colliders split around it; ladders moved to 2 m off the edge middle, clear of the intakes; climbing goes over a rail only if one is in the way
- Crew stand to the soil's up (Planet.Level): flat round the base, the ball's up past it, so the horizon stays level on a small planet
- Convex roof hulls for the crew cabin, garage, pitched roof and windmill tower; cabin box lowered to the eaves
- Rain and acid rain hits differ by surface: soil, grass, wood, metal
- Idle motion: dishes pan, sways sway, sensors turn, eyes blink, windmill turns in the breeze, reels and parked rotors tick over
- Belt: take tools off at the supply wall; hold E at a vending machine for a pack of 3 on the belt, LMB has one
- New meadow pieces: boulders, slab stones, crystals, mushrooms, stump, bulb plants
- -demofix checks for all of the above; loc rows in all 11 tables

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NiemandKG
2026-12-01 22:52:05 +06:00
parent fd20af06ae
commit 36e4bb2a10
88 changed files with 7588 additions and 4926 deletions

View File

@ -18,6 +18,9 @@ namespace GrassCutter
public GameObject[] spires = new GameObject[3];
public GameObject[] trees = new GameObject[3];
public GameObject bush;
/// <summary>More than trees and spires: field stones, slabs and crystals (they stay), and mushrooms, a stump and
/// bulb plants (they come down with the trees when their sector is mown clean).</summary>
public GameObject[] stones = new GameObject[0], growths = new GameObject[0];
const int Rings = 112, Spokes = 192, WildRocks = 800, Groves = 110;
const float FirstRing = 1f, RingGrowth = 1.06f, RockDraw = 1800f;
@ -352,6 +355,49 @@ namespace GrassCutter
Place(trees[rng.Next(3)], at, R(0f, 360f), R(1.2f, 2.2f), true, true);
}
}
Scatter();
}
/// <summary>Stones and odd growths over the meadow: a few round the clearing, the rest anywhere on the ball. A separate
/// sequence of its own, so the spires and the trees stand where they always have.</summary>
void Scatter()
{
var rng = new System.Random(9311);
float R(float a, float b) => a + (float)rng.NextDouble() * (b - a);
bool any = false;
foreach (var g in stones) any |= g;
foreach (var g in growths) any |= g;
if (!any) return;
GameObject Pick(GameObject[] set) => set.Length > 0 ? set[rng.Next(set.Length)] : null;
// close by, where the crew sees them from the first minute
for (int i = 0; i < 26; i++)
{
float a = R(0f, Mathf.PI * 2f), d = R(55f, 150f);
var dir = Planet.FromBase(Mathf.Cos(a) * d, Mathf.Sin(a) * d);
bool stone = rng.NextDouble() < 0.5;
var p = Pick(stone ? stones : growths);
if (!p) continue;
// the bulb plants are walked through; everything else is solid
Place(p, dir, R(0f, 360f), stone ? R(0.8f, 1.6f) : R(0.9f, 1.5f), p.name != "SM_BulbPlants", !stone);
}
int far = Mathf.Max(40, Mathf.RoundToInt(420 * Planet.Scale * Planet.Scale));
for (int i = 0; i < far; i++)
{
var dir = new Vector3(R(-1f, 1f), R(-1f, 1f), R(-1f, 1f)).normalized;
if (dir.y > 0.985f) continue;
bool stone = rng.NextDouble() < 0.55;
var p = Pick(stone ? stones : growths);
if (!p) continue;
// they come in little clusters of two or three
var e1 = Vector3.Cross(dir, Vector3.right).normalized;
var e2 = Vector3.Cross(dir, e1);
int n = rng.Next(1, 4);
for (int k = 0; k < n; k++)
{
var at = (dir + (e1 * R(-9f, 9f) + e2 * R(-9f, 9f)) / Planet.Radius).normalized;
Place(p, at, R(0f, 360f), stone ? R(0.7f, 2.2f) : R(0.8f, 1.7f), p.name != "SM_BulbPlants", !stone);
}
}
}
/// <summary>70 m round each far station, on any ball.</summary>