mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-14 10:11:58 -04:00
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:
parent
4b5e584eeb
commit
8fec258215
104 changed files with 14653 additions and 163 deletions
28
server/tso.files/HIT/Patch.cs
Executable file
28
server/tso.files/HIT/Patch.cs
Executable 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";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue