Насрали
This commit is contained in:
@@ -245,7 +245,7 @@ public sealed partial class ArtifactSystem
|
|||||||
/// WD.
|
/// WD.
|
||||||
/// Generate an Artifact tree with fully developed nodes.
|
/// Generate an Artifact tree with fully developed nodes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void GenerateSafeArtifactNodeTree(EntityUid artifact, List<ArtifactNode> allNodes, int nodesToCreate)
|
private void GenerateSafeArtifactNodeTree(EntityUid artifact, ref List<ArtifactNode> allNodes, int nodesToCreate)
|
||||||
{
|
{
|
||||||
if (nodesToCreate < 1)
|
if (nodesToCreate < 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -300,12 +300,12 @@ public sealed partial class ArtifactSystem : EntitySystem
|
|||||||
/// WD. Randomize a given artifact.
|
/// WD. Randomize a given artifact.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public void SafeRandomizeArtifact(EntityUid uid, ArtifactComponent component)
|
public void SafeRandomizeArtifact(EntityUid uid, ref ArtifactComponent component)
|
||||||
{
|
{
|
||||||
component.NodesMax = 5;
|
component.NodesMax = 5;
|
||||||
var nodeAmount = _random.Next(component.NodesMin, component.NodesMax);
|
var nodeAmount = _random.Next(component.NodesMin, component.NodesMax);
|
||||||
|
|
||||||
GenerateSafeArtifactNodeTree(uid, component.NodeTree, nodeAmount);
|
GenerateSafeArtifactNodeTree(uid, ref component.NodeTree, nodeAmount);
|
||||||
var firstNode = GetRootNode(component.NodeTree);
|
var firstNode = GetRootNode(component.NodeTree);
|
||||||
EnterNode(uid, ref firstNode, component);
|
EnterNode(uid, ref firstNode, component);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Content.Shared.Stacks;
|
|||||||
using Content.Shared.Item;
|
using Content.Shared.Item;
|
||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
using Robust.Server.GameObjects;
|
||||||
|
|
||||||
namespace Content.Server._White.RandomArtifacts;
|
namespace Content.Server._White.RandomArtifacts;
|
||||||
|
|
||||||
@@ -61,8 +62,11 @@ public sealed class RandomArtifactsSystem : EntitySystem
|
|||||||
if (HasComp<StackComponent>(entity))
|
if (HasComp<StackComponent>(entity))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (HasComp<PointLightComponent>(entity))
|
||||||
|
continue;
|
||||||
|
|
||||||
var artifactComponent = EnsureComp<ArtifactComponent>(entity);
|
var artifactComponent = EnsureComp<ArtifactComponent>(entity);
|
||||||
_artifactsSystem.SafeRandomizeArtifact(entity, artifactComponent);
|
_artifactsSystem.SafeRandomizeArtifact(entity, ref artifactComponent);
|
||||||
|
|
||||||
EnsureComp<DamageableComponent>(entity);
|
EnsureComp<DamageableComponent>(entity);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user