xenoarch inhands + a few effects (#12655)

This commit is contained in:
Nemanja
2022-11-17 18:10:45 -05:00
committed by GitHub
parent 786a4d461c
commit 257a9db5c1
33 changed files with 229 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
using Content.Shared.Item;
using Content.Shared.Xenoarchaeology.XenoArtifacts;
using Robust.Server.GameObjects;
using Robust.Shared.Random;
@@ -11,6 +12,7 @@ public sealed class RandomArtifactSpriteSystem : EntitySystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IGameTiming _time = default!;
[Dependency] private readonly AppearanceSystem _appearance = default!;
[Dependency] private readonly SharedItemSystem _item = default!;
public override void Initialize()
{
@@ -41,6 +43,7 @@ public sealed class RandomArtifactSpriteSystem : EntitySystem
{
var randomSprite = _random.Next(component.MinSprite, component.MaxSprite + 1);
_appearance.SetData(uid, SharedArtifactsVisuals.SpriteIndex, randomSprite);
_item.SetHeldPrefix(uid, "ano" + randomSprite.ToString("D2")); //set item artifact inhands
}
private void OnActivated(EntityUid uid, RandomArtifactSpriteComponent component, ArtifactActivatedEvent args)