remove async from onUpdate for now
This commit is contained in:
@@ -321,10 +321,10 @@ public class DialogueCallbacks(
|
||||
throw new NotImplementedException(); // Not implemented in Node
|
||||
}
|
||||
|
||||
public Task<bool> OnUpdate(long timeSinceLastRun)
|
||||
public bool OnUpdate(long timeSinceLastRun)
|
||||
{
|
||||
_dialogueController.Update();
|
||||
return Task.FromResult(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
public string GetRoute()
|
||||
|
||||
@@ -161,16 +161,16 @@ public class HideoutCallbacks(
|
||||
return _hideoutController.HideoutCustomizationSetMannequinPose(sessionId, pmcData, request);
|
||||
}
|
||||
|
||||
public Task<bool> OnUpdate(long timeSinceLastRun)
|
||||
public bool OnUpdate(long timeSinceLastRun)
|
||||
{
|
||||
if (timeSinceLastRun > _hideoutConfig.RunIntervalSeconds)
|
||||
{
|
||||
// TODO
|
||||
// _hideoutController.Update();
|
||||
return Task.FromResult(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
return Task.FromResult(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
public string GetRoute()
|
||||
|
||||
@@ -49,16 +49,16 @@ public class InsuranceCallbacks(
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<bool> OnUpdate(long timeSinceLastRun)
|
||||
public bool OnUpdate(long timeSinceLastRun)
|
||||
{
|
||||
if (timeSinceLastRun > Math.Max(_insuranceConfig.RunIntervalSeconds, 1))
|
||||
{
|
||||
// _insuranceController.ProcessReturn();
|
||||
// TODO: InsuranceController is not implemented rn
|
||||
return Task.FromResult(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
return Task.FromResult(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
public string GetRoute()
|
||||
|
||||
@@ -24,8 +24,13 @@ public class ItemEventCallbacks(HttpResponseUtil _httpResponseUtil, ItemEventRou
|
||||
/// </summary>
|
||||
/// <param name="warnings">The list of warnings to check for critical errors</param>
|
||||
/// <returns></returns>
|
||||
public bool IsCriticalError(List<Warning> warnings)
|
||||
public bool IsCriticalError(List<Warning>? warnings)
|
||||
{
|
||||
if (warnings is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// List of non-critical error codes, we return true if any error NOT included is passed in
|
||||
var nonCriticalErrorCodes = new List<BackendErrorCodes> { BackendErrorCodes.NotEnoughSpace };
|
||||
|
||||
|
||||
@@ -24,9 +24,10 @@ public class RagfairCallbacks(
|
||||
{
|
||||
private RagfairConfig _ragfairConfig = _configServer.GetConfig<RagfairConfig>();
|
||||
|
||||
public async Task OnLoad()
|
||||
public Task OnLoad()
|
||||
{
|
||||
// await _ragfairServer.Load();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public string GetRoute()
|
||||
@@ -34,7 +35,7 @@ public class RagfairCallbacks(
|
||||
return "spt-ragfair";
|
||||
}
|
||||
|
||||
public async Task<bool> OnUpdate(long timeSinceLastRun)
|
||||
public bool OnUpdate(long timeSinceLastRun)
|
||||
{
|
||||
if (timeSinceLastRun > _ragfairConfig.RunIntervalSeconds) {
|
||||
// There is a flag inside this class that only makes it run once.
|
||||
@@ -44,7 +45,7 @@ public class RagfairCallbacks(
|
||||
_ragfairController.Update();
|
||||
|
||||
// Process all offers / expire offers
|
||||
await _ragfairServer.Update();
|
||||
_ragfairServer.Update();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -23,15 +23,15 @@ public class SaveCallbacks(
|
||||
_saveServer.Load();
|
||||
}
|
||||
|
||||
public Task<bool> OnUpdate(long secondsSinceLastRun)
|
||||
public bool OnUpdate(long secondsSinceLastRun)
|
||||
{
|
||||
if (secondsSinceLastRun > _coreConfig.ProfileSaveIntervalInSeconds)
|
||||
{
|
||||
_saveServer.Save();
|
||||
return Task.FromResult(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
return Task.FromResult(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
public string GetRoute()
|
||||
|
||||
@@ -25,9 +25,9 @@ public class TraderCallbacks(
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task<bool> OnUpdate(long _)
|
||||
public bool OnUpdate(long _)
|
||||
{
|
||||
return Task.FromResult(_traderController.Update());
|
||||
return _traderController.Update();
|
||||
}
|
||||
|
||||
public string GetRoute()
|
||||
|
||||
Reference in New Issue
Block a user