Files
crystall-punk-14/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellGodTouch.cs
Red b24ec5bc80 Bugfixes (#1432)
* fix #1428

* CodTenAlt review

* fix map tests

* real this time

* fix #1429

* add wheat and cotton into victorian gardens trade faction

* Update PostMapInitTest.cs
2025-06-15 21:25:58 +03:00

26 lines
834 B
C#

using Content.Shared._CP14.Religion.Components;
using Content.Shared._CP14.Religion.Prototypes;
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellGodTouch : CP14SpellEffect
{
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.Target is null)
return;
if (!entManager.TryGetComponent<CP14ReligionEntityComponent>(args.User, out var god) || god.Religion is null)
return;
var ev = new CP14GodTouchEvent(god.Religion.Value);
entManager.EventBus.RaiseLocalEvent(args.Target.Value, ev);
}
}
public sealed class CP14GodTouchEvent(ProtoId<CP14ReligionPrototype> religion) : EntityEventArgs
{
public ProtoId<CP14ReligionPrototype> Religion = religion;
}