MSCO 2.9.1: fixes without MSCLoader, admin teleport, MSCO branding
- Own JSON reader (MiniJson) instead of Newtonsoft.Json - the server browser failed with "Could not load System.Runtime.Serialization" once MSCLoader was gone - Mouse cursor visible in admin menu/chat/console (PlayerInMenu) - Intro "Press any key" screen replaced by an MSCO loading screen; hook PlayMakerFSM.Awake too - Join links while the game runs: picked up from MSCO\join.txt (written by the launcher) - Admin menu: TELEPORT tab (home, shop, repair shop, inspection, villages, events, Satsuma) - Window title/icon "MSCO - My Summer Car Online", MSCO logo in the main menu - In-game UI restyled like the keymaster website (rounded cards, pills, glow, slim scrollbars) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+16
-1
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using Harmony;
|
||||
using HutongGames.PlayMaker;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MSCO
|
||||
@@ -20,7 +21,7 @@ namespace MSCO
|
||||
|
||||
static readonly List<Behaviour> disabled = new List<Behaviour>();
|
||||
static bool locked;
|
||||
static bool previousVisible;
|
||||
static bool previousVisible, previousInMenu;
|
||||
static CursorLockMode previousLock;
|
||||
static bool patched;
|
||||
|
||||
@@ -37,6 +38,8 @@ namespace MSCO
|
||||
PatchCursorActions();
|
||||
previousVisible = Cursor.visible;
|
||||
previousLock = Cursor.lockState;
|
||||
FsmBool inMenu = PlayerInMenu();
|
||||
previousInMenu = inMenu != null && inMenu.Value;
|
||||
GameObject player = GameObject.Find("PLAYER");
|
||||
if (player != null)
|
||||
{
|
||||
@@ -57,6 +60,8 @@ namespace MSCO
|
||||
PlayMakerGUI.HideCursor = !previousVisible;
|
||||
Cursor.visible = previousVisible;
|
||||
Cursor.lockState = previousLock;
|
||||
FsmBool inMenu = PlayerInMenu();
|
||||
if (inMenu != null) inMenu.Value = previousInMenu;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +76,16 @@ namespace MSCO
|
||||
PlayMakerGUI.HideCursor = false;
|
||||
Cursor.visible = true;
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
// So zeigt MSC selbst den Mauszeiger (Pausemenü, Kasse ...) - ohne MSCLoader brauchen wir das auch
|
||||
FsmBool inMenu = PlayerInMenu();
|
||||
if (inMenu != null) inMenu.Value = true;
|
||||
}
|
||||
|
||||
/// <summary>Globale Spielvariable "PlayerInMenu": true = Zeiger frei, Mausblick aus.</summary>
|
||||
static FsmBool PlayerInMenu()
|
||||
{
|
||||
try { return FsmVariables.GlobalVariables.FindFsmBool("PlayerInMenu"); }
|
||||
catch { return null; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user