37 lines
885 B
C#
37 lines
885 B
C#
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.MassMedia.Systems;
|
|
|
|
public abstract class SharedNewsSystem : EntitySystem
|
|
{
|
|
public const int MaxTitleLength = 40; //Sunrise_Edit
|
|
public const int MaxContentLength = 8192; //Sunrise_Edit
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public struct NewsArticle
|
|
{
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public string Title;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public string Content;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public string? Author;
|
|
|
|
[ViewVariables]
|
|
public ICollection<(NetEntity, uint)>? AuthorStationRecordKeyIds;
|
|
|
|
[ViewVariables]
|
|
public TimeSpan ShareTime;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public List<string>? PhotoPaths;
|
|
}
|
|
|
|
[ByRefEvent]
|
|
public record struct NewsArticlePublishedEvent(NewsArticle Article);
|
|
|
|
[ByRefEvent]
|
|
public record struct NewsArticleDeletedEvent;
|