* 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
45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using System.Text;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared._CP14.MagicRitual.Actions;
|
|
|
|
/// <summary>
|
|
/// Adds a key-orb to the ritual.
|
|
/// </summary>
|
|
public sealed partial class AddOrb : CP14RitualAction
|
|
{
|
|
[DataField(required: true)]
|
|
public Dictionary<EntProtoId, int> Orbs = new();
|
|
|
|
public override string? GetGuidebookEffectDescription(IPrototypeManager prototype, IEntitySystemManager entSys)
|
|
{
|
|
var sb = new StringBuilder();
|
|
sb.Append(Loc.GetString("cp14-ritual-effect-add-orb")+ "\n");
|
|
foreach (var orb in Orbs)
|
|
{
|
|
if (!prototype.TryIndex(orb.Key, out var indexedOrb))
|
|
continue;
|
|
|
|
sb.Append(Loc.GetString("cp14-ritual-entry-item", ("name", indexedOrb.Name), ("count", orb.Value)) + "\n");
|
|
}
|
|
|
|
return sb.ToString();
|
|
}
|
|
|
|
public override void Effect(EntityManager entManager, SharedTransformSystem transform, Entity<CP14MagicRitualPhaseComponent> phase)
|
|
{
|
|
if (phase.Comp.Ritual is null)
|
|
return;
|
|
|
|
var ritual = entManager.System<CP14SharedRitualSystem>();
|
|
|
|
foreach (var orb in Orbs)
|
|
{
|
|
for (var i = 0; i < orb.Value; i++)
|
|
{
|
|
ritual.AddOrbToRitual(phase.Comp.Ritual.Value, orb.Key);
|
|
}
|
|
}
|
|
}
|
|
}
|