-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGuidanceLabels.cs
More file actions
26 lines (22 loc) · 924 Bytes
/
Copy pathGuidanceLabels.cs
File metadata and controls
26 lines (22 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using MissileCameraRemoteControl.Config;
namespace MissileCameraRemoteControl
{
/// <summary>Guidance channel labels for encyclopedia / hangar (not part of weapon display names).</summary>
internal static class GuidanceLabels
{
internal const string DataLink = "DL";
internal const string Satcom = "SATCOM";
internal static string For(RcGuidanceKind kind) =>
kind == RcGuidanceKind.Satcom ? Satcom : DataLink;
internal static bool TryFromWeaponName(string? weaponName, out string label)
{
label = string.Empty;
if (!CloneProfile.TryGetGuidanceFromRcName(weaponName, out RcGuidanceKind kind))
return false;
label = For(kind);
return true;
}
internal static bool TryFromUnitName(string? unitName, out string label) =>
TryFromWeaponName(unitName, out label);
}
}