Files
sbox-public/engine/Sandbox.Engine/Game/Mount/MountInfo.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

58 lines
1.2 KiB
C#

namespace Sandbox.Mounting;
/// <summary>
/// Information about a single mount
/// </summary>
public struct MountInfo
{
/// <summary>
/// A short, lowercase string that will be used to uniquely identify this asset source
/// </summary>
public string Ident { get; init; }
/// <summary>
/// The display name of this
/// </summary>
public string Title { get; init; }
/// <summary>
/// Is this source available, is this game installed? Can we mount it?
/// </summary>
public bool Available { get; init; }
/// <summary>
/// Is this active and mounted?
/// </summary>
public bool Mounted { get; init; }
public MountInfo( BaseGameMount e )
{
Ident = e.Ident;
Title = e.Title;
Available = e.IsInstalled;
Mounted = e.IsMounted;
}
}
/// <summary>
/// Information about a mount resource
/// </summary>
public struct MountResourceInfo
{
/// <inheritdoc cref="ResourceLoader.Path" />
public string Path { get; init; }
/// <inheritdoc cref="ResourceLoader.Name" />
public string Name { get; init; }
/// <inheritdoc cref="ResourceLoader.Flags" />
public ResourceFlags Flags { get; init; }
public MountResourceInfo( ResourceLoader e )
{
Name = e.Name;
Path = e.Path;
Flags = e.Flags;
}
}