Added FSO.Files for use with the API server

Don't ask me. FreeSO is the prime example of dependency hell.
This commit is contained in:
Tony Bark 2024-05-01 04:38:12 -04:00
parent 4b5e584eeb
commit 8fec258215
104 changed files with 14653 additions and 163 deletions

28
server/tso.files/HIT/Patch.cs Executable file
View file

@ -0,0 +1,28 @@
namespace FSO.Files.HIT
{
public class Patch
{
public string Name;
public string Filename;
public bool Looped;
public bool Piano;
public uint FileID; //patches are stubbed out in TSO.
public bool TSO;
public Patch(uint id)
{
FileID = id;
TSO = true;
}
public Patch(string patchString)
{
var elems = patchString.Split(',');
if (elems.Length > 1) Name = elems[1];
if (elems.Length > 2) Filename = elems[2].Substring(1, elems[2].Length-2).Replace('\\', '/');
if (elems.Length > 3) Looped = elems[3] != "0";
if (elems.Length > 4) Piano = elems[4] != "0";
}
}
}