Cloning error messages and prediction based timing (#4013)

* Cloning error messages and prediction based timing

* Cloning error messages & prediction based timing: Fix problems mentioned in reviews
This commit is contained in:
20kdc
2021-06-05 18:32:59 +01:00
committed by GitHub
parent 62ce603858
commit 561a5bc0f2
6 changed files with 178 additions and 38 deletions

View File

@@ -14,13 +14,25 @@ namespace Content.Shared.GameObjects.Components.Medical
public class CloningPodBoundUserInterfaceState : BoundUserInterfaceState
{
public readonly Dictionary<int, string?> MindIdName;
// When this state was created.
// The reason this is used rather than a start time is because cloning can be interrupted.
public readonly TimeSpan ReferenceTime;
// Both of these are in seconds.
// They're not TimeSpans because of complicated reasons.
// CurTime of receipt is combined with Progress.
public readonly float Progress;
public readonly float Maximum;
// If true, cloning is progressing (predict clone progress)
public readonly bool Progressing;
public readonly bool MindPresent;
public CloningPodBoundUserInterfaceState(Dictionary<int, string?> mindIdName, float progress, bool mindPresent)
public CloningPodBoundUserInterfaceState(Dictionary<int, string?> mindIdName, TimeSpan refTime, float progress, float maximum, bool progressing, bool mindPresent)
{
MindIdName = mindIdName;
ReferenceTime = refTime;
Progress = progress;
Maximum = maximum;
Progressing = progressing;
MindPresent = mindPresent;
}
}