mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
31 lines
908 B
C#
31 lines
908 B
C#
using System;
|
|
|
|
namespace Robust.Shared.GameObjects;
|
|
|
|
/*
|
|
* Obsoleted because this has a massive performance cost and it is not worth it.
|
|
*/
|
|
|
|
/// <summary>
|
|
/// Marks a component as having a specific reference type,
|
|
/// for use with <see cref="RegisterComponentAttribute"/>.
|
|
/// </summary>
|
|
[Obsolete("Refactor your code to not use component references.")]
|
|
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
|
|
public sealed class ComponentReferenceAttribute : Attribute
|
|
{
|
|
/// <summary>
|
|
/// The type this component is a reference to.
|
|
/// </summary>
|
|
public Type ReferenceType { get; }
|
|
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
/// <param name="referenceType">The type this component is a reference to.</param>
|
|
public ComponentReferenceAttribute(Type referenceType)
|
|
{
|
|
ReferenceType = referenceType;
|
|
}
|
|
}
|