2023-08-30 10:56:20 +03:00
|
|
|
|
using Robust.Shared.Audio;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.NukeOps;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Used with NukeOps game rule to send war declaration announcement
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
|
public sealed partial class WarDeclaratorComponent : Component
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Custom war declaration message. If empty, use default.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
2023-08-30 10:56:20 +03:00
|
|
|
|
public string Message;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Permission to customize message text
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
2023-08-30 10:56:20 +03:00
|
|
|
|
public bool AllowEditingMessage = true;
|
|
|
|
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
2023-08-30 10:56:20 +03:00
|
|
|
|
public int MaxMessageLength = 512;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// War declarement text color
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
|
|
|
|
|
public Color Color = Color.Red;
|
2023-08-30 10:56:20 +03:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// War declarement sound file path
|
|
|
|
|
|
/// </summary>
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
|
|
|
|
|
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Announcements/war.ogg");
|
2023-08-30 10:56:20 +03:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Fluent ID for the declarement title
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
|
|
|
|
|
public LocId Title = "comms-console-announcement-title-nukie";
|
2023-08-30 10:56:20 +03:00
|
|
|
|
}
|