mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-08-01 08:18:20 -04:00
* New map selector with support for workshops + mounts * New mounts menu on main menu and pause menu to enable/disable mounts * Mount scenes multiplayer support - incl. auto-mounting the game if we can, disconnect if we can't (not installed) * MapInstance supports non-package scenes from LaunchArgs * ResourceLoader: don't use cached result if it's no longer IsValid, like after it's destroyed from a resourcelibrary clear * MapInstance: failing to load from LaunchArgs fallsback to the preconfigured map * Skip SoundFile.Create when IsHeadless * Quake mount: hide non-map bsps
20 lines
442 B
C#
20 lines
442 B
C#
namespace Sandbox.Mounting;
|
|
|
|
internal class MountConfig
|
|
{
|
|
internal static async Task Mount()
|
|
{
|
|
var list = EngineFileSystem.Config.ReadJsonOrDefault( "mounts.json", new string[0] );
|
|
foreach ( var item in list )
|
|
{
|
|
await Directory.Mount( item );
|
|
}
|
|
}
|
|
|
|
internal static void Save()
|
|
{
|
|
var list = Directory.GetAll().Where( x => x.Mounted ).Select( x => x.Ident );
|
|
EngineFileSystem.Config.WriteJson( "mounts.json", list );
|
|
}
|
|
}
|