mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-07 07:00:33 -04:00
Removed NioTSO client and server
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
This commit is contained in:
parent
f12ba1502b
commit
22191ce648
591 changed files with 53264 additions and 3362 deletions
36
server/FSO.Server.Api.Core/Models/EventCreateModel.cs
Executable file
36
server/FSO.Server.Api.Core/Models/EventCreateModel.cs
Executable file
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FSO.Server.Api.Core.Models
|
||||
{
|
||||
public class EventCreateModel
|
||||
{
|
||||
public string title;
|
||||
public string description;
|
||||
public DateTime start_day;
|
||||
public DateTime end_day;
|
||||
public string type;
|
||||
public int value;
|
||||
public int value2;
|
||||
public string mail_subject;
|
||||
public string mail_message;
|
||||
public int mail_sender;
|
||||
public string mail_sender_name;
|
||||
}
|
||||
|
||||
public class PresetCreateModel
|
||||
{
|
||||
public string name;
|
||||
public string description;
|
||||
public int flags;
|
||||
public List<PresetItemModel> items;
|
||||
}
|
||||
|
||||
public class PresetItemModel
|
||||
{
|
||||
public string tuning_type;
|
||||
public int tuning_table;
|
||||
public int tuning_index;
|
||||
public float value;
|
||||
}
|
||||
}
|
10
server/FSO.Server.Api.Core/Models/FSOUpdateManifest.cs
Executable file
10
server/FSO.Server.Api.Core/Models/FSOUpdateManifest.cs
Executable file
|
@ -0,0 +1,10 @@
|
|||
using FSO.Files.Utils;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FSO.Server.Api.Core.Models
|
||||
{
|
||||
public class FSOUpdateManifest {
|
||||
public string Version;
|
||||
public List<FileDiff> Diffs;
|
||||
}
|
||||
}
|
14
server/FSO.Server.Api.Core/Models/UpdateCreateModel.cs
Executable file
14
server/FSO.Server.Api.Core/Models/UpdateCreateModel.cs
Executable file
|
@ -0,0 +1,14 @@
|
|||
namespace FSO.Server.Api.Core.Models
|
||||
{
|
||||
public class UpdateCreateModel
|
||||
{
|
||||
public int branchID;
|
||||
public uint scheduledEpoch;
|
||||
public string catalog;
|
||||
|
||||
public bool contentOnly;
|
||||
public bool includeMonogameDelta;
|
||||
public bool disableIncremental;
|
||||
public bool minorVersion;
|
||||
}
|
||||
}
|
69
server/FSO.Server.Api.Core/Models/UpdateGenerationStatus.cs
Executable file
69
server/FSO.Server.Api.Core/Models/UpdateGenerationStatus.cs
Executable file
|
@ -0,0 +1,69 @@
|
|||
using FSO.Server.Database.DA.Updates;
|
||||
|
||||
namespace FSO.Server.Api.Core.Models
|
||||
{
|
||||
public class UpdateGenerationStatus
|
||||
{
|
||||
public int TaskID;
|
||||
public UpdateCreateModel Request;
|
||||
public UpdateGenerationStatusCode Code;
|
||||
public float EstimatedProgress;
|
||||
|
||||
public DbUpdate Result;
|
||||
public string Failure;
|
||||
|
||||
public UpdateGenerationStatus(int taskID, UpdateCreateModel request)
|
||||
{
|
||||
TaskID = taskID;
|
||||
Request = request;
|
||||
}
|
||||
|
||||
public void UpdateStatus(UpdateGenerationStatusCode code, float progress)
|
||||
{
|
||||
Code = code;
|
||||
EstimatedProgress = progress;
|
||||
}
|
||||
|
||||
public void UpdateStatus(UpdateGenerationStatusCode code)
|
||||
{
|
||||
UpdateStatus(code, ((float)code - 1) / ((float)UpdateGenerationStatusCode.SUCCESS - 1));
|
||||
}
|
||||
|
||||
public void SetResult(DbUpdate result)
|
||||
{
|
||||
UpdateStatus(UpdateGenerationStatusCode.SUCCESS);
|
||||
Result = result;
|
||||
}
|
||||
|
||||
public void SetFailure(string failure)
|
||||
{
|
||||
UpdateStatus(UpdateGenerationStatusCode.FAILURE, 0);
|
||||
Failure = failure;
|
||||
}
|
||||
}
|
||||
|
||||
public enum UpdateGenerationStatusCode
|
||||
{
|
||||
FAILURE = 0,
|
||||
|
||||
PREPARING = 1,
|
||||
DOWNLOADING_CLIENT,
|
||||
DOWNLOADING_SERVER,
|
||||
DOWNLOADING_CLIENT_ADDON,
|
||||
DOWNLOADING_SERVER_ADDON,
|
||||
EXTRACTING_CLIENT,
|
||||
EXTRACTING_CLIENT_ADDON,
|
||||
BUILDING_DIFF,
|
||||
BUILDING_INCREMENTAL_UPDATE,
|
||||
BUILDING_CLIENT,
|
||||
PUBLISHING_CLIENT,
|
||||
|
||||
EXTRACTING_SERVER,
|
||||
EXTRACTING_SERVER_ADDON,
|
||||
BUILDING_SERVER,
|
||||
PUBLISHING_SERVER,
|
||||
|
||||
SCHEDULING_UPDATE,
|
||||
SUCCESS
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue