-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCctvLine.cs
More file actions
18 lines (16 loc) · 775 Bytes
/
Copy pathCctvLine.cs
File metadata and controls
18 lines (16 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System.Globalization;
using RustPlusBot.Features.ItemData.Data;
namespace RustPlusBot.Features.Commands.Formatting;
/// <summary>Formats a monument's CCTV reply: a header line then one code per line (source order).</summary>
internal static class CctvLine
{
/// <summary>Lists a monument's camera codes under a header. The wildcard note is added by the
/// caller (it is localized and surface-specific), not here.</summary>
/// <param name="monument">The monument (with at least one code).</param>
public static string Format(CctvMonument monument)
{
ArgumentNullException.ThrowIfNull(monument);
return string.Create(CultureInfo.InvariantCulture,
$"{monument.Name} CCTV:\n{string.Join("\n", monument.Codes)}");
}
}