mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-04 05:17:28 +00:00
* Add announce message length to UI and make a cvar for it
* Update comm console server-side trim to use the cvar
* Rely on the new OnTextChanged event
Because OnKeyBindUp only works for keys that have binds
* Add a similar indicator to nukies' war declaration UI
* Remove message length indicators for now cuz it requires the engine update
* Rename cvar slightly
* Refactor duplicated code to a helper method
* Remove message trimming from *Window class as it's better to live in the BoundUserInterface where the other message handling happens
* Rename to chat.max_announcement_length
(cherry picked from commit 8c5898b006)
45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
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]
|
|
public string Message;
|
|
|
|
/// <summary>
|
|
/// Permission to customize message text
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField]
|
|
public bool AllowEditingMessage = true;
|
|
|
|
/// <summary>
|
|
/// War declarement text color
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField]
|
|
public Color Color = Color.Red;
|
|
|
|
/// <summary>
|
|
/// War declarement sound file path
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Announcements/war.ogg");
|
|
|
|
/// <summary>
|
|
/// Fluent ID for the declarement title
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField]
|
|
public LocId Title = "comms-console-announcement-title-nukie";
|
|
}
|