mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* Remove Shared System IPrototypeManager instances * Remove RecipeManager IPrototypeManager instance * Fix ItemSystem IPrototypeManager refs, use TryComp * SharedItemSystem changes, EntWhitelist CompName * HasComponent->HasComp
18 lines
665 B
C#
18 lines
665 B
C#
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.EntityConditions;
|
|
|
|
/// <summary>
|
|
/// Entity condition API counterpart using <see cref="EntityConditionPrototype"/> instead of <see cref="EntityCondition"/>.
|
|
/// </summary>
|
|
public sealed partial class SharedEntityConditionsSystem
|
|
{
|
|
/// <summary>
|
|
/// <c>TryCondition</c> overload that uses a <see cref="EntityConditionPrototype"/> instead of <see cref="EntityCondition"/>.
|
|
/// </summary>
|
|
public bool TryCondition(EntityUid target, [ForbidLiteral] ProtoId<EntityConditionPrototype> id)
|
|
{
|
|
var proto = ProtoMan.Index(id);
|
|
return TryCondition(target, proto.Condition);
|
|
}
|
|
}
|