0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-13 09:50:43 -05:00

33 lines
786 B
C#
Raw Normal View History

2023-03-03 19:25:33 +00:00
/* PatchResultInfo.cs
* License: NCSA Open Source License
*
2024-05-21 20:15:19 +01:00
* Copyright: SPT
2023-03-03 19:25:33 +00:00
* AUTHORS:
* waffle.lord
*/
2024-05-21 20:15:19 +01:00
using SPT.ByteBanger;
2023-03-03 19:25:33 +00:00
2024-05-21 20:15:19 +01:00
namespace SPT.Launcher.Models.Launcher
2023-03-03 19:25:33 +00:00
{
public class PatchResultInfo
{
public PatchResultType Status { get; }
public int NumCompleted { get; }
public int NumTotal { get; }
public bool OK => (Status == PatchResultType.Success) || (Status == PatchResultType.AlreadyPatched);
public int PercentComplete => (NumCompleted * 100) / NumTotal;
public PatchResultInfo(PatchResultType Status, int NumCompleted, int NumTotal)
{
this.Status = Status;
this.NumCompleted = NumCompleted;
this.NumTotal = NumTotal;
}
}
}