* ritual cucumber setup
* entities requirements
* try graph???
* Revert "try graph???"
This reverts commit c90c6353cb.
* pipyau
* fixes
* yay, it works
* spawn effect
* regex lower message restrictions
* unique speakers support
* apply entity effect ritual
* ritual chalk
* Update SpawnEntity.cs
* ritual stability
* stability event
* add guidebook description to all ritual actions
* Readability added
* Update RequiredResource.cs
* finish describer
* clean up describer
* Update triggers.ftl
* cave ambient loop
* parry sound update
* rituals end start
* magic ambience add
* global sharedization
* Update phases.yml
* daytime requirement
* Update phases.yml
* start ritual
* fixes
* more ambient work
* rritual visualizer
* end ritual
* magic orbs!
* required orbs
* orbs design
* consume orbs
* setup neutral cluster triggers and edges
* listener proxy
* restucture graph
* fix time triggers
* healing cluster
* fixes
* Create CP14RitualTest.cs
* test errors for check test
* YEEEE
* Fuck triggers, its broken now, YAY
* triggers redo
* fix
* fix test
* Update CP14RitualTest.cs
* Update neutral_cluster.yml
* Update CP14RitualSystem.Triggers.cs
* clean up, documentation
* redo triggers again
* and another one
* species sacrifice trigger
* whitelist trigger
* fix
* describer refactor
* fix memory leaking + hyperlinks
* dd
54 lines
1.8 KiB
C#
54 lines
1.8 KiB
C#
using Content.Shared._CP14.MagicRitual;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.IntegrationTests.Tests._CP14;
|
|
|
|
#nullable enable
|
|
|
|
[TestFixture]
|
|
public sealed class CP14RitualTest
|
|
{
|
|
|
|
/// <summary>
|
|
/// States that all edges of the ritual phase have triggers.
|
|
/// </summary>
|
|
[Test]
|
|
public async Task RitualHasAllTriggersTest()
|
|
{
|
|
await using var pair = await PoolManager.GetServerClient();
|
|
var server = pair.Server;
|
|
|
|
var compFactory = server.ResolveDependency<IComponentFactory>();
|
|
var protoManager = server.ResolveDependency<IPrototypeManager>();
|
|
|
|
await server.WaitAssertion(() =>
|
|
{
|
|
Assert.Multiple(() =>
|
|
{
|
|
foreach (var proto in protoManager.EnumeratePrototypes<EntityPrototype>())
|
|
{
|
|
if (!proto.TryGetComponent(out CP14MagicRitualPhaseComponent? phase, compFactory))
|
|
continue;
|
|
|
|
if (phase.DeadEnd)
|
|
{
|
|
Assert.That(phase.Edges.Count == 0, $"{proto} is a ritual node, but has no paths to other nodes. Either add deadEnd = true, or add paths to other nodes.");
|
|
}
|
|
else
|
|
{
|
|
Assert.That(phase.Edges.Count > 0, $"{proto} is a deadEnd ritual node, but has {phase.Edges.Count} edges! Remove all edges, or make it a non dead-end node");
|
|
}
|
|
|
|
foreach (var edge in phase.Edges)
|
|
{
|
|
Assert.That(edge.Triggers.Count > 0, $"{{proto}} is ritual node, but edge to {edge.Target} has no triggers and cannot be activated.");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
await pair.CleanReturnAsync();
|
|
}
|
|
}
|