22 lines
716 B
C#
22 lines
716 B
C#
namespace NeonSprawl.Server.Game.Gathering;
|
|
|
|
/// <summary>Resets prototype resource-node instance capacity for Bruno and manual QA.</summary>
|
|
public static class ResourceNodeFixtureOperations
|
|
{
|
|
/// <summary>Sets each catalog node's remaining gathers to its <c>maxGathers</c>.</summary>
|
|
public static bool TryApply(
|
|
IResourceNodeDefinitionRegistry nodeRegistry,
|
|
IResourceNodeInstanceStore instanceStore)
|
|
{
|
|
foreach (var definition in nodeRegistry.GetDefinitionsInIdOrder())
|
|
{
|
|
if (!instanceStore.TrySetRemainingGathers(definition.NodeDefId, definition.MaxGathers))
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|