mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* documentation pass on content.server -> E! * APi pass on content.server for the E folder. * documentation pass on content.shared for e. * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * fixing documentation according to review part 1. * typo * Very minor fixes * And a short explanation about EUI --------- Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
19 lines
757 B
C#
19 lines
757 B
C#
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.EntityEffects;
|
|
|
|
/// <summary>
|
|
/// Entity effects API counterparts using <see cref="EntityEffectPrototype"/> instead of <see cref="EntityEffect"/>.
|
|
/// </summary>
|
|
public sealed partial class SharedEntityEffectsSystem
|
|
{
|
|
/// <summary>
|
|
/// <c>TryApplyEffect</c> overload using a <see cref="EntityEffectPrototype"/> instead of <see cref="EntityEffect"/>.
|
|
/// </summary>
|
|
public void TryApplyEffect(EntityUid target, [ForbidLiteral] ProtoId<EntityEffectPrototype> id, float scale = 1f, EntityUid? user = null)
|
|
{
|
|
var proto = ProtoMan.Index(id);
|
|
if (_condition.TryConditions(target, proto.Conditions))
|
|
ApplyEffects(target, proto.Effects, scale, user);
|
|
}
|
|
}
|