Converted FlagCultistCircleCraftAsComplete into extension method
This commit is contained in:
@@ -41,4 +41,17 @@ public static class ProductionExtensions
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Craft has completed, update its properties to reflect its new state
|
||||
/// </summary>
|
||||
/// <param name="production">Craft to update</param>
|
||||
public static void FlagCultistCircleCraftAsComplete(this Production production)
|
||||
{
|
||||
production.AvailableForFinish = true;
|
||||
|
||||
// The client expects `Progress` to be 0, and `inProgress` to be false when a circle is complete
|
||||
production.Progress = 0;
|
||||
production.InProgress = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,24 +511,14 @@ public class HideoutHelper(
|
||||
// Check if craft is complete
|
||||
if (production.Progress >= production.ProductionTime)
|
||||
{
|
||||
FlagCultistCircleCraftAsComplete(production);
|
||||
production.FlagCultistCircleCraftAsComplete();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Craft in complete
|
||||
FlagCultistCircleCraftAsComplete(production);
|
||||
}
|
||||
|
||||
protected static void FlagCultistCircleCraftAsComplete(Production production)
|
||||
{
|
||||
// Craft is complete, flag as such
|
||||
production.AvailableForFinish = true;
|
||||
|
||||
// The client expects `Progress` to be 0, and `inProgress` to be false when a circle is complete
|
||||
production.Progress = 0;
|
||||
production.InProgress = false;
|
||||
// Craft is complete
|
||||
production.FlagCultistCircleCraftAsComplete();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user