XenoArch [Science Overhaul] (#12204)

* multi-node xeno artifacts

* refactor existing artifact effects

* more tweaks to generation

* more shit plus fix tests

* more generation stuff plus threat levels

* doink

* now make it build

* defer the artifact activation to not cause errors

also pricing

* some changes

* all of the yaml + ui stuff for artifact analyzer

* machine linking and starting to make the ui functional

* artifact analyzer display

* a shit ton of artifact analyzer stuff

* more changes; making destroy work properly; progress bar tweaks

* getting shit going!

ALL RIGHT

* small tweaks that didn't help much

* Komm susser todd: the end of analysis

* recipes and hints and ui, oh my!

* add some in-game sources

gotta prepare for day 1 launch

* node data + ditch random seed in place of id

* bunch of triggers

* finish off the last few triggers

* implement machine examine verb

* knock, flicker, blink, throw

* shatter, foam, shuffle, heat

* fix all the shit i broke

* *some* of these have to be good, no?

25 effects

* callin' it there for effects

* comments + reword some trigger hints

* don't mind this little commit here

* byref event

* fix brokey node entry

* fix low pressure trigger

* mirror review plus fixing 0x40's bug

also the throw artifact threw incorrectly

* randomize the event message a teeny bit
This commit is contained in:
Nemanja
2022-11-06 18:05:44 -05:00
committed by GitHub
parent 0d4a605a94
commit 273e0968e4
107 changed files with 3321 additions and 358 deletions

View File

@@ -1,5 +1,6 @@
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
using Content.Shared.Xenoarchaeology.XenoArtifacts;
using Robust.Server.GameObjects;
using Robust.Shared.Random;
using Robust.Shared.Timing;
@@ -9,6 +10,7 @@ public sealed class RandomArtifactSpriteSystem : EntitySystem
{
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IGameTiming _time = default!;
[Dependency] private readonly AppearanceSystem _appearance = default!;
public override void Initialize()
{
@@ -29,7 +31,7 @@ public sealed class RandomArtifactSpriteSystem : EntitySystem
var timeDif = _time.CurTime - component.ActivationStart.Value;
if (timeDif.Seconds >= component.ActivationTime)
{
appearance.SetData(SharedArtifactsVisuals.IsActivated, false);
_appearance.SetData(appearance.Owner, SharedArtifactsVisuals.IsActivated, false, appearance);
component.ActivationStart = null;
}
}
@@ -37,19 +39,13 @@ public sealed class RandomArtifactSpriteSystem : EntitySystem
private void OnMapInit(EntityUid uid, RandomArtifactSpriteComponent component, MapInitEvent args)
{
if (!TryComp(uid, out AppearanceComponent? appearance))
return;
var randomSprite = _random.Next(component.MinSprite, component.MaxSprite + 1);
appearance.SetData(SharedArtifactsVisuals.SpriteIndex, randomSprite);
_appearance.SetData(uid, SharedArtifactsVisuals.SpriteIndex, randomSprite);
}
private void OnActivated(EntityUid uid, RandomArtifactSpriteComponent component, ArtifactActivatedEvent args)
{
if (!TryComp(uid, out AppearanceComponent? appearance))
return;
appearance.SetData(SharedArtifactsVisuals.IsActivated, true);
_appearance.SetData(uid, SharedArtifactsVisuals.IsActivated, true);
component.ActivationStart = _time.CurTime;
}
}