MSCO 2.10.0: mod support, ESC no longer quits from the main menu

- MscoMod API (ModApi.cs) and ModLoader: own mods from MSCO\Mods, hooks for menu/game/update/GUI,
  session and player events, Send/OnMessage between players (MsgType.ModMessage)
- Server mods: ModList before Welcome, consent prompt (INSTALL & JOIN), download with SHA-256 check
  into MSCO\Mods\Servers, active only on that server; game start waits for the download
- Mods page in the MSCO menu, console command "mods"
- Server browser: MODS pill, VANILLA/MODDED filters, mod list in the server profile
- PlayMaker ApplicationQuit is ignored in the main menu (ESC used to close the game)
- MODDING.md and examples/HelloMod

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 01:00:16 +02:00
co-authored by Claude Opus 5.5
parent 027296d27c
commit 4c1366b5d9
16 changed files with 815 additions and 15 deletions
+25 -1
View File
@@ -64,6 +64,7 @@ namespace MSCO
try
{
string name = new AssemblyName(args.Name).Name;
if (name == typeof(Bootstrap).Assembly.GetName().Name) return typeof(Bootstrap).Assembly; // Mods verweisen auf MSCO
string file = Path.Combine(folder, name + ".dll");
if (File.Exists(file)) return Assembly.LoadFrom(file);
}
@@ -141,6 +142,23 @@ namespace MSCO
return;
}
MultiplayerManager.Ensure();
SceneChanged(scene);
}
/// <summary>Mods: beim ersten Hauptmenü laden, dann Menü/Spiel melden.</summary>
static void SceneChanged(string scene)
{
if (scene == "MainMenu")
{
ModLoader.LoadLocal();
ModLoader.MenuLoad();
}
else if (scene == "GAME") ModLoader.GameLoad();
}
void FixedUpdate()
{
ModLoader.FixedUpdate();
}
bool skipping, loadingScreen;
@@ -150,6 +168,7 @@ namespace MSCO
void Update()
{
ModLoader.Update();
if (!skipping || Time.frameCount < skipFrame + 2) return;
skipping = false;
loadingScreen = true;
@@ -158,7 +177,11 @@ namespace MSCO
void OnGUI()
{
if (!skipping && !loadingScreen) return;
if (!skipping && !loadingScreen)
{
ModLoader.OnGUI();
return;
}
GUI.depth = -10000;
if (black == null)
{
@@ -183,6 +206,7 @@ namespace MSCO
MenuBranding.ApplyWindow();
if (Application.loadedLevelName == "MainMenu") StartCoroutine(BrandMenu());
MultiplayerManager.Ensure();
SceneChanged(Application.loadedLevelName);
}
/// <summary>Logo im Hauptmenü ersetzen - ein paar Mal, falls das Menü es erst nach dem Laden zeigt.</summary>