Merge remote-tracking branch 'origin/main' into claude/f6-pannelli
# Conflicts: # client/RailEnterprise.Client/assets/i18n/strings.csv # client/RailEnterprise.Client/scripts/Main.cs # client/RailEnterprise.Client/scripts/Screens/MenuScreen.cs # docs/ARCHITECTURE.md # docs/PROTOCOL.md # docs/STATE.md # src/RailEnterprise.Protocol/Client/ClientWorld.cs
This commit is contained in:
commit
767661957b
52 files changed
+4074
-91
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using Godot;
|
||||
using RailEnterprise.Client.App;
|
||||
using RailEnterprise.Client.Audio;
|
||||
using RailEnterprise.Client.Net;
|
||||
using RailEnterprise.Client.Screens;
|
||||
using RailEnterprise.Core.Data;
|
||||
@@ -27,16 +28,20 @@ public partial class Main : Node
|
||||
Localization.Load(locale);
|
||||
GetWindow().Theme = UiTheme.Build();
|
||||
GetWindow().Title = "Rail Enterprise";
|
||||
var args = OS.GetCmdlineUserArgs();
|
||||
int i = Array.IndexOf(args, "--autopilot");
|
||||
// audio: niente nel pilota automatico e senza schermo (non rallenta il collaudo)
|
||||
var audio = new AudioManager(enabled: i < 0 && DisplayServer.GetName() != "headless");
|
||||
AddChild(audio);
|
||||
try
|
||||
{
|
||||
_data = GodotDataSource.LoadGameData();
|
||||
audio.SetEras(_data.Eras.Eras);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
GD.PrintErr($"Dati del gioco non validi: {e.Message}");
|
||||
}
|
||||
var args = OS.GetCmdlineUserArgs();
|
||||
int i = Array.IndexOf(args, "--autopilot");
|
||||
if (i >= 0 && _data is not null)
|
||||
_autopilot = i + 1 < args.Length ? args[i + 1] : ProjectSettings.GlobalizePath("user://autopilot");
|
||||
// nel collaudo la schermata di connessione non avvia un suo server: lo avvia StartLocal qui sotto
|
||||
@@ -73,6 +78,7 @@ public partial class Main : Node
|
||||
}
|
||||
var screen = new ConnectScreen(_data, autoStart: autoStart, handover: handover);
|
||||
screen.PlayRequested += ShowGame;
|
||||
screen.AudioRequested += () => AudioManager.Instance?.ShowSettings();
|
||||
screen.LanguageChanged += code =>
|
||||
{
|
||||
var cfg = new ConfigFile();
|
||||
|
||||
Reference in new issue
Block a user