mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-03-15 14:51:21 +00:00
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
43 lines
1.1 KiB
C#
Executable file
43 lines
1.1 KiB
C#
Executable file
namespace FSO.Common.Content
|
|
{
|
|
/// <summary>
|
|
/// Represents the ID of a content resource.
|
|
/// Consists of two parts: TypeID (uint) and FileID (uint).
|
|
/// </summary>
|
|
public class ContentID
|
|
{
|
|
public uint TypeID;
|
|
public uint FileID;
|
|
public string FileName;
|
|
private long v;
|
|
|
|
|
|
/// <summary>
|
|
/// Creates a new ContentID instance.
|
|
/// </summary>
|
|
/// <param name="typeID">The TypeID of the content resource.</param>
|
|
/// <param name="fileID">The FileID of the content resource.</param>
|
|
public ContentID(uint typeID, uint fileID)
|
|
{
|
|
this.TypeID = typeID;
|
|
this.FileID = fileID;
|
|
}
|
|
|
|
public ContentID(string name)
|
|
{
|
|
this.FileName = name;
|
|
}
|
|
|
|
public ContentID(long v)
|
|
{
|
|
this.TypeID = (uint)v;
|
|
this.FileID = (uint)(v >> 32);
|
|
}
|
|
|
|
public ulong Shift()
|
|
{
|
|
var fileIDLong = ((ulong)FileID) << 32;
|
|
return fileIDLong | TypeID;
|
|
}
|
|
}
|
|
}
|