2023-09-11 09:42:41 +10:00
|
|
|
using Robust.Shared.Serialization;
|
2023-07-27 22:25:55 +02:00
|
|
|
|
2023-07-26 21:49:38 +03:00
|
|
|
namespace Content.Shared.MassMedia.Systems;
|
|
|
|
|
|
2024-01-12 19:04:55 +11:00
|
|
|
public abstract class SharedNewsSystem : EntitySystem
|
|
|
|
|
{
|
2024-02-27 02:38:00 +01:00
|
|
|
public const int MaxTitleLength = 25;
|
|
|
|
|
public const int MaxContentLength = 2048;
|
2024-01-12 19:04:55 +11:00
|
|
|
}
|
|
|
|
|
|
2023-09-11 09:42:41 +10:00
|
|
|
[Serializable, NetSerializable]
|
2023-07-26 21:49:38 +03:00
|
|
|
public struct NewsArticle
|
|
|
|
|
{
|
2024-02-27 02:38:00 +01:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public string Title;
|
|
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-07-26 21:49:38 +03:00
|
|
|
public string Content;
|
2024-02-27 02:38:00 +01:00
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-07-27 22:25:55 +02:00
|
|
|
public string? Author;
|
2024-02-27 02:38:00 +01:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2023-09-11 09:42:41 +10:00
|
|
|
public ICollection<(NetEntity, uint)>? AuthorStationRecordKeyIds;
|
2024-02-27 02:38:00 +01:00
|
|
|
|
|
|
|
|
[ViewVariables]
|
2023-07-26 21:49:38 +03:00
|
|
|
public TimeSpan ShareTime;
|
|
|
|
|
}
|
2024-02-27 02:38:00 +01:00
|
|
|
|
|
|
|
|
[ByRefEvent]
|
|
|
|
|
public record struct NewsArticlePublishedEvent(NewsArticle Article);
|
|
|
|
|
|
|
|
|
|
[ByRefEvent]
|
|
|
|
|
public record struct NewsArticleDeletedEvent;
|