Replace string data fields with LocId where relevant (#20883)
This commit is contained in:
@@ -12,37 +12,37 @@ public sealed partial class WarDeclaratorComponent : Component
|
||||
/// Custom war declaration message. If empty, use default.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("message")]
|
||||
[DataField]
|
||||
public string Message;
|
||||
|
||||
/// <summary>
|
||||
/// Permission to customize message text
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("allowEditingMessage")]
|
||||
[DataField]
|
||||
public bool AllowEditingMessage = true;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("maxMessageLength")]
|
||||
[DataField]
|
||||
public int MaxMessageLength = 512;
|
||||
|
||||
/// <summary>
|
||||
/// War declarement text color
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("color")]
|
||||
public Color DeclarementColor = Color.Red;
|
||||
[DataField]
|
||||
public Color Color = Color.Red;
|
||||
|
||||
/// <summary>
|
||||
/// War declarement sound file path
|
||||
/// </summary>
|
||||
[DataField("sound")]
|
||||
public SoundSpecifier DeclarementSound = new SoundPathSpecifier("/Audio/Announcements/war.ogg");
|
||||
[DataField]
|
||||
public SoundSpecifier Sound = 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";
|
||||
[DataField]
|
||||
public LocId Title = "comms-console-announcement-title-nukie";
|
||||
}
|
||||
|
||||
@@ -76,9 +76,9 @@ public sealed class WarDeclaratorSystem : EntitySystem
|
||||
{
|
||||
message = Loc.GetString("war-declarator-default-message");
|
||||
}
|
||||
var title = Loc.GetString(component.DeclarementTitle);
|
||||
var title = Loc.GetString(component.Title);
|
||||
|
||||
_nukeopsRuleSystem.DeclareWar(args.Session.AttachedEntity.Value, message, title, component.DeclarementSound, component.DeclarementColor);
|
||||
_nukeopsRuleSystem.DeclareWar(args.Session.AttachedEntity.Value, message, title, component.Sound, component.Color);
|
||||
|
||||
if (args.Session.AttachedEntity != null)
|
||||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"{ToPrettyString(args.Session.AttachedEntity.Value):player} has declared war with this text: {message}");
|
||||
|
||||
Reference in New Issue
Block a user