Merge remote-tracking branch 'WD-core/master' into upstream-core

This commit is contained in:
BIGZi0348
2025-01-01 19:40:47 +03:00
31 changed files with 298 additions and 54 deletions

View File

@@ -296,4 +296,17 @@ public sealed partial class ArtifactSystem : EntitySystem
{
return allNodes.First(n => n.Depth == 0);
}
/// <summary>
/// WD. Randomize a given artifact.
/// </summary>
[PublicAPI]
public void SafeRandomizeArtifact(EntityUid uid, ref ArtifactComponent component)
{
var nodeAmount = _random.Next(component.NodesMin, component.NodesMax);
GenerateSafeArtifactNodeTree(uid, ref component.NodeTree, nodeAmount);
var firstNode = GetRootNode(component.NodeTree);
EnterNode(uid, ref firstNode, component);
}
}