Files
sbox-public/engine/Sandbox.Engine/Game/Mount/MountConfig.cs
Sol Williams 7d827ecab6 Frontend mounts (#5061)
* 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
2026-06-13 15:25:21 +01:00

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 );
}
}