Give nukies the ability to declare war for a TC boost (#19291)

Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
This commit is contained in:
Morb
2023-08-30 10:56:20 +03:00
committed by GitHub
parent 5bb6a64dbd
commit c99e365ce7
23 changed files with 831 additions and 18 deletions

View File

@@ -0,0 +1,48 @@
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)]
[DataField("message")]
public string Message;
/// <summary>
/// Permission to customize message text
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("allowEditingMessage")]
public bool AllowEditingMessage = true;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("maxMessageLength")]
public int MaxMessageLength = 512;
/// <summary>
/// War declarement text color
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("color")]
public Color DeclarementColor = Color.Red;
/// <summary>
/// War declarement sound file path
/// </summary>
[DataField("sound")]
public SoundSpecifier DeclarementSound = new SoundPathSpecifier("/Audio/Announcements/war.ogg");
/// <summary>
/// Fluent ID for the declarement title
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("title")]
public string DeclarementTitle = "comms-console-announcement-title-nukie";
}