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:
@ -30,7 +30,15 @@ namespace GrassCutter
|
||||
|
||||
static readonly Color BeerGlow = new Color(1f, 0.82f, 0.32f), CigarGlow = new Color(1f, 0.55f, 0.22f), Deny = new Color(1f, 0.15f, 0.1f);
|
||||
|
||||
public string Prompt => Loc.F("{0}: 1 kg of grass from your tool. {1}, {2} for 2½ minutes", Treats.Name(kind), Treats.Boost(kind), Treats.Effect(kind));
|
||||
public string Prompt
|
||||
{
|
||||
get
|
||||
{
|
||||
var line = Loc.F("{0}: 1 kg of grass from your tool. {1}, {2} for 2½ minutes", Treats.Name(kind), Treats.Boost(kind), Treats.Effect(kind));
|
||||
var me = PlayerAgent.Local;
|
||||
return me && me.Tools.PackRoom(kind) ? line + "\n" + Loc.F("Hold {0}: a pack of {1} for your belt ({1} kg)", Binds.Cap(Act.Interact), Treats.PackSize) : line;
|
||||
}
|
||||
}
|
||||
public bool CanInteract => TeamState.Instance && !_busy && !TreatHand.Busy;
|
||||
|
||||
void OnEnable() => All.Add(this);
|
||||
@ -38,6 +46,8 @@ namespace GrassCutter
|
||||
|
||||
void Start()
|
||||
{
|
||||
// its own lit sign and display: the headlamp on top of them only burnt them out
|
||||
DayNight.KeepOutOfLamp(gameObject);
|
||||
_mpb = new MaterialPropertyBlock();
|
||||
_signBase = kind == TreatId.Beer ? new Color(0.25f, 1f, 0.5f) : CigarGlow;
|
||||
_displayBase = kind == TreatId.Beer ? new Color(0.45f, 1f, 0.55f) : new Color(1f, 0.72f, 0.4f);
|
||||
@ -64,12 +74,40 @@ namespace GrassCutter
|
||||
Hud.Toast(Loc.T("Bring 1 kg of grass in your tool: mow a little first"), Hud.ToastKind.Warn);
|
||||
return;
|
||||
}
|
||||
StartCoroutine(Choose(me));
|
||||
}
|
||||
|
||||
/// <summary>A tap has it now; held a moment, it's a pack for the belt (if there's room and grass enough).</summary>
|
||||
IEnumerator Choose(PlayerAgent me)
|
||||
{
|
||||
_busy = true;
|
||||
float held = 0f;
|
||||
while (Ctl.InteractHeld && held < 0.4f) { held += Time.deltaTime; yield return null; }
|
||||
_busy = false;
|
||||
var from = me.Tools.Nozzle;
|
||||
if (held >= 0.4f && me.Tools.PackRoom(kind))
|
||||
{
|
||||
float cost = Treats.CostKg * Treats.PackSize;
|
||||
if (me.Tools.Carried < cost - 0.001f)
|
||||
{
|
||||
_deny = 1f;
|
||||
Sfx.PlayAt("error", transform.position, 0.7f);
|
||||
Hud.Toast(Loc.F("A pack takes {0} kg of grass from your tools", Treats.PackSize), Hud.ToastKind.Warn);
|
||||
yield break;
|
||||
}
|
||||
me.Tools.Spend(cost);
|
||||
me.TreatRpc((byte)kind, transform.position, from);
|
||||
_pack = true;
|
||||
Play(true, from);
|
||||
yield break;
|
||||
}
|
||||
me.Tools.Spend(Treats.CostKg);
|
||||
me.TreatRpc((byte)kind, transform.position, from);
|
||||
Play(true, from);
|
||||
}
|
||||
|
||||
bool _pack;
|
||||
|
||||
/// <summary>Run the machine's show: for the buyer it ends with the treat in their hand, for everyone else it's just the show.</summary>
|
||||
public void Play(bool mine, Vector3 from)
|
||||
{
|
||||
@ -168,7 +206,18 @@ namespace GrassCutter
|
||||
yield return null;
|
||||
}
|
||||
Destroy(item.gameObject);
|
||||
TreatHand.I?.Play(kind);
|
||||
if (_pack)
|
||||
{
|
||||
_pack = false;
|
||||
var me = PlayerAgent.Local;
|
||||
if (me && me.Tools.AddPack(kind, Treats.PackSize))
|
||||
{
|
||||
Sfx.Play("plastic_grab", 0.6f, 0.9f);
|
||||
Hud.Toast(Loc.F("{0} ×{1} on your belt: pick the slot and click to have one", Treats.Name(kind), me.Tools.PackLeft(kind)), Hud.ToastKind.Info);
|
||||
}
|
||||
else TreatHand.I?.Play(kind);
|
||||
}
|
||||
else TreatHand.I?.Play(kind);
|
||||
}
|
||||
else if (item)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user