Release checklist: no cheat console for players, Steam required, Steam's language wins when changed, menu links, head bob toggle

- The cheat console opens only in the editor, a development build, or with -gcdev
- Without steam_appid.txt next to the exe, a failed Steam start says so and quits instead of running offline; -nosteam only works in our own builds
- A language picked in the game's Steam properties overrides the one saved in the game, if it changed since
- Main menu: language button, Steam page (overlay, else browser), feedback (Steam discussions); "early build" and the AppID gone from the footer
- Settings > Game: head bob on/off
- The cursor stays inside the window while it's free
- -resetsettings puts every setting back as it comes out of the box

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NiemandKG
2026-11-17 18:45:17 +06:00
parent d97f2e844d
commit ad2154b38c
21 changed files with 311 additions and 191 deletions

View File

@ -126,14 +126,26 @@ namespace GrassCutter
const string Pref = "s_lang";
/// <summary>Saved choice, else Steam's language for this game, else the system's, else English.</summary>
/// <summary>Steam's language when the choice was saved: a new one picked in the game's Steam properties wins over it.</summary>
const string SteamPref = "s_lang_steam";
/// <summary>Saved choice, else Steam's language for this game, else the system's, else English. A language
/// changed in Steam's properties since the choice was saved overrides the choice.</summary>
public static void Init()
{
if (_ready) return;
_ready = true;
string code = CommandLine.Get("-demolang") ?? CommandLine.Get("-lang");
string steam = FromSteam(), steamThen = PlayerPrefs.GetString(SteamPref, "");
if (Find(code) == null && Find(steam) != null && steamThen.Length > 0 && steamThen != steam)
{
code = steam;
PlayerPrefs.SetString(Pref, Find(steam).code);
PlayerPrefs.SetString(SteamPref, steam);
PlayerPrefs.Save();
}
if (Find(code) == null) code = PlayerPrefs.GetString(Pref, "");
if (Find(code) == null) code = FromSteam();
if (Find(code) == null) code = steam;
if (Find(code) == null) code = FromSystem();
Load(Find(code) ?? All[0]);
}
@ -152,6 +164,7 @@ namespace GrassCutter
if (remember)
{
PlayerPrefs.SetString(Pref, l.code);
PlayerPrefs.SetString(SteamPref, FromSteam() ?? "");
PlayerPrefs.Save();
}
_ready = true;