Key hints follow the player's own keys; down in fly mode is Ctrl only
The prompts on the HUD and in build mode named E, R, T, LMB and the rest outright, so they were wrong for anyone who had set other keys. Sixteen of them now take the key from Binds.Cap: throw / drop / turn, hop off, piece upgrades, the build help strip, belt laying and moving, the pickup's bed, 'too far', and the three opening hints. The build help strip redraws when a key is set. The English text is the key of every translation, so the eleven tables and the translators' context notes carry the same placeholders (extract.py --strict: nothing missing, no placeholder mismatch). Turkish drops the case endings that hung on the key letter. Ctl: C no longer means 'down' in the cheat fly mode (it is Cruise; the console's help already said Ctrl), and ShakePressed, which nothing called, is gone. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@ -172,7 +172,7 @@ namespace GrassCutter
|
||||
_buildCats = UIK.El("build-cats", _build);
|
||||
_buildRow = UIK.El("build-row", _build);
|
||||
_buildReason = UIK.Text("", "t-body t-outline build-reason", _build, false);
|
||||
_buildHelp = UIK.Text(Loc.T("WHEEL piece · LMB place · R rotate · T move · MMB copy · RMB remove · CTRL+WHEEL height · F free"), "t-small t-outline", _build, false);
|
||||
_buildHelp = UIK.Text(BuildHelp(), "t-small t-outline", _build, false);
|
||||
_build.style.display = DisplayStyle.None;
|
||||
|
||||
// how wide the blade in hand cuts, drawn to scale across the aim
|
||||
@ -227,8 +227,13 @@ namespace GrassCutter
|
||||
{
|
||||
foreach (var (cap, act) in _caps) cap.text = Binds.Cap(act);
|
||||
if (_hints != null) _hints.style.display = GameSettings.KeyHints ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
if (_buildHelp != null) _buildHelp.text = BuildHelp();
|
||||
}
|
||||
|
||||
/// <summary>The line under the build palette, with the player's own keys.</summary>
|
||||
static string BuildHelp() => Loc.F("WHEEL piece · {0} place · {1} rotate · {2} move · {3} copy · {4} remove · CTRL+WHEEL height · {5} free",
|
||||
Binds.Cap(Act.Use), Binds.Cap(Act.Rotate), Binds.Cap(Act.MovePiece), Binds.Cap(Act.Copy), Binds.Cap(Act.Alt), Binds.Cap(Act.Free));
|
||||
|
||||
// ───────────────────────── static api ─────────────────────────
|
||||
|
||||
/// <summary>Every toast off the screen at once.</summary>
|
||||
@ -620,12 +625,12 @@ namespace GrassCutter
|
||||
// only when it matters: standing still, unloading, feeding a belt or full. The markers show where to go.
|
||||
var v = p.Vehicle;
|
||||
bool still = v && v.Body && v.Body.linearVelocity.magnitude < 0.6f;
|
||||
if (v && v.Def.bed > 0) { key = Binds.Cap(Act.MovePiece); prompt = v.Bed.Count > 0 ? Loc.T("Tip the bundles out behind") : still ? Loc.T("Empty bed · E with a bundle in your arms loads it") : null; }
|
||||
if (v && v.Def.bed > 0) { key = Binds.Cap(Act.MovePiece); prompt = v.Bed.Count > 0 ? Loc.T("Tip the bundles out behind") : still ? Loc.F("Empty bed · {0} with a bundle in your arms loads it", Binds.Cap(Act.Interact)) : null; }
|
||||
else if (v && v.Baling) { key = ""; prompt = Loc.T("Baling onto the belt…"); }
|
||||
else if (v && v.Unloading) { key = ""; prompt = Loc.T("Unloading…"); hot = true; }
|
||||
else if (v && v.Capacity > 0f && v.Load >= v.Capacity * 0.9f) { key = ""; prompt = Loc.T("Hopper full: drive to an UNLOAD marker"); }
|
||||
else if (v && VehicleShed.Near(v.transform.position)) { key = Binds.Cap(Act.Boots); prompt = Loc.T("Garage: upgrade this machine"); hot = true; }
|
||||
else if (still) prompt = Loc.T("Hop off [R] View");
|
||||
else if (still) prompt = Loc.F("Hop off [{0}] View", Binds.Cap(Act.View));
|
||||
}
|
||||
else if (active && p.Grab.Holding)
|
||||
{
|
||||
@ -638,7 +643,8 @@ namespace GrassCutter
|
||||
else
|
||||
{
|
||||
key = Binds.Cap(Act.Use);
|
||||
prompt = bundle ? Loc.T("Throw it in the DEPOT or onto a belt [E] Drop [R] Turn") : Loc.T("Throw [E] Drop [R] Turn");
|
||||
string drop = Binds.Cap(Act.Interact), turn = Binds.Cap(Act.Rotate);
|
||||
prompt = bundle ? Loc.F("Throw it in the DEPOT or onto a belt [{0}] Drop [{1}] Turn", drop, turn) : Loc.F("Throw [{0}] Drop [{1}] Turn", drop, turn);
|
||||
}
|
||||
}
|
||||
else if (active && p.HasAim && p.AimHit.collider)
|
||||
@ -653,7 +659,7 @@ namespace GrassCutter
|
||||
if (aimed && !building)
|
||||
{
|
||||
string tier = aimed.Upgrades != UpgradeKind.None ? aimed.Switched ? Loc.F("{0}, stopped", GameDefs.TierName(aimed.Tier.Value)) : GameDefs.TierName(aimed.Tier.Value) : "";
|
||||
prompt = Loc.F("{0} [T] Upgrades & settings", prompt ?? aimed.Def.name + (tier.Length > 0 ? " " + tier : ""));
|
||||
prompt = Loc.F("{0} [{1}] Upgrades & settings", prompt ?? aimed.Def.name + (tier.Length > 0 ? " " + tier : ""), Binds.Cap(Act.MovePiece));
|
||||
}
|
||||
else if (prompt == null && p.AimGrabbable && !p.AimGrabbable.IsHeld)
|
||||
{
|
||||
@ -664,7 +670,7 @@ namespace GrassCutter
|
||||
}
|
||||
else if (active && !tools.IsCutting && Ctl.UseHeld && tools.OutOfRange && GameDefs.IsBlade(tools.Current))
|
||||
{
|
||||
key = "LMB";
|
||||
key = Binds.Cap(Act.Use);
|
||||
prompt = Loc.T("Too far — get closer to the grass");
|
||||
}
|
||||
|
||||
@ -843,19 +849,19 @@ namespace GrassCutter
|
||||
float cap = tools.CurrentCap;
|
||||
if (tools.Belt.Count == 0)
|
||||
{
|
||||
hint = Loc.T("Empty hands! Walk to the SUPPLY WALL on the west side of the deck and take the nail scissors (E).");
|
||||
hint = Loc.F("Empty hands! Walk to the SUPPLY WALL on the west side of the deck and take the nail scissors ({0}).", Binds.Cap(Act.Interact));
|
||||
voice = "asst_tools";
|
||||
}
|
||||
else if (ts.Shipped.Value < 5d)
|
||||
{
|
||||
if (GameDefs.IsBlade(tools.Current) && _local.Tank.Value >= cap - 0.01f)
|
||||
{
|
||||
hint = Loc.T("Container full! Press E at the DEPOT to hand it all in, or Q to tie a 1 kg bundle you can carry and throw.");
|
||||
hint = Loc.F("Container full! Press {0} at the DEPOT to hand it all in, or {1} to tie a 1 kg bundle you can carry and throw.", Binds.Cap(Act.Interact), Binds.Cap(Act.Pack));
|
||||
voice = "asst_full";
|
||||
}
|
||||
else if (GameDefs.IsBlade(tools.Current) && _local.Tank.Value < 0.01f)
|
||||
{
|
||||
hint = Loc.T("Hop down to the meadow (SPACE at the railing) and HOLD LEFT CLICK: sweep the blade over the grass. Earth needs every blade of it.");
|
||||
hint = Loc.F("Hop down to the meadow ({0} at the railing) and HOLD {1}: sweep the blade over the grass. Earth needs every blade of it.", Binds.Cap(Act.Jump), Binds.Cap(Act.Use));
|
||||
voice = "asst_mow";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user