Content PR for auto-componentstate sourcegen (#14845)
* Content PR for auto-componentstate sourcegen # Conflicts: # Content.Shared/Chat/TypingIndicator/TypingIndicatorComponent.cs # Content.Shared/Content.Shared.csproj # SpaceStation14.sln * shared file too * afterautohandlestate example * oops * anudda * access fixed * smart
This commit is contained in:
@@ -6,28 +6,18 @@ using Robust.Shared.Serialization;
|
||||
namespace Content.Shared.Access.Components
|
||||
{
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[AutoGenerateComponentState]
|
||||
[Access(typeof(SharedIdCardSystem), typeof(SharedPDASystem), typeof(SharedAgentIdCardSystem))]
|
||||
public sealed class IdCardComponent : Component
|
||||
public sealed partial class IdCardComponent : Component
|
||||
{
|
||||
[DataField("fullName")]
|
||||
[AutoNetworkedField]
|
||||
[Access(typeof(SharedIdCardSystem), typeof(SharedPDASystem), typeof(SharedAgentIdCardSystem),
|
||||
Other = AccessPermissions.ReadWrite)] // FIXME Friends
|
||||
public string? FullName;
|
||||
|
||||
[DataField("jobTitle")]
|
||||
[AutoNetworkedField]
|
||||
public string? JobTitle;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class IdCardComponentState : ComponentState
|
||||
{
|
||||
public string? FullName;
|
||||
public string? JobTitle;
|
||||
|
||||
public IdCardComponentState(string? fullName, string? jobTitle)
|
||||
{
|
||||
FullName = fullName;
|
||||
JobTitle = jobTitle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user