using MSCLoader; using UnityEngine; namespace MSCO { public class MSCO : Mod { public const string ModVersion = "2.6"; public override string ID => "MSCO"; // Your (unique) mod ID public override string Name => "MSCO"; // Your mod name public override string Author => "MBM"; // Name of the Author (your name) public override string Version => ModVersion; // Version public override string Description => "Online mod by mbm.wtf"; // Short description of your mod public override Game SupportedGames => Game.MySummerCar; // Logo in der MSCLoader-Modliste (branding/logo-128.png, in die DLL eingebettet) public override byte[] Icon { get { return Branding.LogoPng; } set { } } bool commandAdded; public override void ModSetup() { SetupFunction(Setup.OnMenuLoad, Mod_OnMenuLoad); SetupFunction(Setup.OnLoad, Mod_OnLoad); SetupFunction(Setup.PostLoad, Mod_PostLoad); SetupFunction(Setup.OnSave, Mod_OnSave); SetupFunction(Setup.OnGUI, Mod_OnGUI); SetupFunction(Setup.Update, Mod_Update); SetupFunction(Setup.FixedUpdate, Mod_FixedUpdate); SetupFunction(Setup.ModSettings, Mod_Settings); } /// Taste zum Ein-/Aussteigen als Beifahrer (in den MSCLoader-Einstellungen änderbar). internal static SettingsKeybind PassengerKey; /// MSCO-Konsole (Standard F8) und Chat (Standard T), ebenfalls änderbar. internal static SettingsKeybind ConsoleKey, ChatKey; private void Mod_Settings() { // All settings should be created here. // DO NOT put anything that isn't settings or keybinds in here! PassengerKey = Keybind.Add("passenger", "Ride as passenger (toggle)", KeyCode.P); ChatKey = Keybind.Add("chat", "Open chat", KeyCode.T); ConsoleKey = Keybind.Add("console", "Open MSCO console", KeyCode.F8); } private void Mod_OnMenuLoad() { ModConsole.Print("Welcome to MSCO by mbm.wtf"); // Netzwerk + Lobby leben in einem eigenen Objekt, das Szenenwechsel überlebt MultiplayerManager.Ensure(); if (!commandAdded) { ConsoleCommand.Add(new MpCommand()); commandAdded = true; } } private void Mod_OnLoad() { // Called once, when mod is loading after game is fully loaded } private void Mod_PostLoad() { // Called once, after all mods finished OnLoad } private void Mod_OnSave() { // Called once, when save and quit } private void Mod_OnGUI() { // Lobby/Status zeichnet der MultiplayerManager } private void Mod_Update() { // Netzwerk läuft im MultiplayerManager } private void Mod_FixedUpdate() { // FixedUpdate is called once per fixed frame } } }