NPC refactor (#10122)

Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2022-09-06 00:28:23 +10:00
committed by GitHub
parent 138e328c04
commit 0286b88388
290 changed files with 13842 additions and 5939 deletions

View File

@@ -7,9 +7,7 @@ namespace Content.Server.CPUJob.JobQueues.Queues
{
private readonly IStopwatch _stopwatch;
public JobQueue() : this(new Stopwatch())
{
}
public JobQueue() : this(new Stopwatch()) {}
public JobQueue(IStopwatch stopwatch)
{
@@ -19,7 +17,7 @@ namespace Content.Server.CPUJob.JobQueues.Queues
/// <summary>
/// How long the job's allowed to run for before suspending
/// </summary>
public virtual double MaxTime => 0.002;
public virtual double MaxTime { get; } = 0.002;
private readonly Queue<IJob> _pendingQueue = new();
private readonly List<IJob> _waitingJobs = new();