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:
Bonchellon
2026-11-22 19:51:30 +03:00
parent 755faf3c62
commit c7ca594b53
18 changed files with 277 additions and 270 deletions

View File

@ -80,7 +80,8 @@ namespace GrassCutter
static bool s_sprintOn;
static int s_sprintFrame = -1;
public static bool JumpHeld => !Blocked && (Binds.Held(Act.Jump) || (G != null && G.buttonSouth.isPressed));
public static bool DownHeld => !Blocked && ((K != null && (K.leftCtrlKey.isPressed || K.cKey.isPressed)) || (G != null && G.buttonEast.isPressed));
/// <summary>Down while flying (the cheat fly mode). Ctrl only: C is Cruise.</summary>
public static bool DownHeld => !Blocked && ((K != null && K.leftCtrlKey.isPressed) || (G != null && G.buttonEast.isPressed));
/// <summary>~ / Ё (the key under Esc) or F1: the cheat console. Works even while UI is open.</summary>
public static bool ConsolePressed => Application.isFocused && !Typing && K != null && (K.backquoteKey.wasPressedThisFrame || K.f1Key.wasPressedThisFrame);
public static bool JumpPressed => BotJumpPressed || !Blocked && (Binds.Pressed(Act.Jump) || (G != null && G.buttonSouth.wasPressedThisFrame));
@ -89,7 +90,6 @@ namespace GrassCutter
public static bool AltPressed => BotAltPressed || !Blocked && (Binds.Pressed(Act.Alt) || (G != null && G.leftTrigger.wasPressedThisFrame));
public static bool AltHeld => BotAltHeld || !Blocked && (Binds.Held(Act.Alt) || (G != null && G.leftTrigger.isPressed));
public static bool RotatePressed => !Blocked && (Binds.Pressed(Act.Rotate) || (G != null && G.buttonNorth.wasPressedThisFrame));
public static bool ShakePressed => !Blocked && ((K != null && K.fKey.wasPressedThisFrame) || (G != null && G.dpad.up.wasPressedThisFrame));
public static bool BuildPressed => !Blocked && Binds.Pressed(Act.Build);
public static bool BotMovePressed, BotCopyPressed;
public static bool CtrlHeld => !Blocked && K != null && K.leftCtrlKey.isPressed;

View File

@ -339,7 +339,8 @@ namespace GrassCutter
{
HideGhosts();
Valid = false;
Reason = Target ? (Target.Def.company ? Loc.T("Company property") : Target.Run ? Loc.F("{0:0.#} m of belt · MMB copy · RMB remove", Target.Run.Metres) : Loc.T("T move · MMB copy · RMB remove")) : null;
Reason = Target ? (Target.Def.company ? Loc.T("Company property") : Target.Run ? Loc.F("{0:0.#} m of belt · {1} copy · {2} remove", Target.Run.Metres, Binds.Cap(Act.Copy), Binds.Cap(Act.Alt))
: Loc.F("{0} move · {1} copy · {2} remove", Binds.Cap(Act.MovePiece), Binds.Cap(Act.Copy), Binds.Cap(Act.Alt))) : null;
}
static void Refuse(string reason)
@ -375,7 +376,7 @@ namespace GrassCutter
var at = port ? from.at : Lifted();
Valid = port || BuildRules.CutUnder(at);
Reason = Valid ? null : BuildRules.Uncut;
Note = port ? Loc.T("LMB: go on from this end") : Loc.F("LMB where the belt starts · height {0:0.0} m", Height);
Note = port ? Loc.F("{0}: go on from this end", Binds.Cap(Act.Use)) : Loc.F("{1} where the belt starts · height {0:0.0} m", Height, Binds.Cap(Act.Use));
ShowRun(at, at + (port ? from.dir : Heading(Planet.Up(at))), Valid);
if (!Ctl.UsePressed) return;
if (Valid) { _from = at; Laying = true; }
@ -396,7 +397,7 @@ namespace GrassCutter
double price = GameDefs.BeltPrice(Vector3.Distance(_from, to));
if (Valid && ts && ts.Money.Value < price) { Valid = false; reason = Loc.T("Not enough cash"); }
Reason = reason;
Note = Loc.F("{0:0.#} m, {1} · height {2:0.0} m · RMB stops", Vector3.Distance(_from, to), UIK.Money(price), Height);
Note = Loc.F("{0:0.#} m, {1} · height {2:0.0} m · {3} stops", Vector3.Distance(_from, to), UIK.Money(price), Height, Binds.Cap(Act.Alt));
ShowRun(_from, to, Valid);
if (!Ctl.UsePressed) return;
if (!Valid) { Refuse(reason); return; }
@ -586,7 +587,7 @@ namespace GrassCutter
{
var p = Moving;
if (!p || !p.IsSpawned || Ctl.AltPressed) { EndMove(); HideGhosts(); return; }
Note = Loc.F("Moving {0}: LMB put down · R rotate · RMB cancel", p.Def.name);
Note = Loc.F("Moving {0}: {1} put down · {2} rotate · {3} cancel", p.Def.name, Binds.Cap(Act.Use), Binds.Cap(Act.Rotate), Binds.Cap(Act.Alt));
if (!_aimed) { HideGhosts(); Valid = false; Reason = null; return; }
Spot(p.piece, out var at, out var rot);
Valid = BuildRules.CanPlace(p.Def, at, rot, p, out var reason);