namespace BlueLaminate.Core.CsMoney; /// /// Maps between the catalogue's full wear names (SkinCondition.Condition) and /// cs.money's short wear codes (the quality field, also used in market search). /// public static class Wear { private static readonly Dictionary NameToCode = new(StringComparer.OrdinalIgnoreCase) { ["Factory New"] = "fn", ["Minimal Wear"] = "mw", ["Field-Tested"] = "ft", ["Well-Worn"] = "ww", ["Battle-Scarred"] = "bs", }; /// "Field-Tested" → "ft". Null/unknown → null. public static string? ToCode(string? conditionName) => conditionName is not null && NameToCode.TryGetValue(conditionName, out var code) ? code : null; }