add 👷 JobCondition system for reagents (#29023)
* hell 💀 * you're right i'm dumb * use the beautiful protoid and or in localization 🥩 * 🙏
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Globalization;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -119,6 +119,20 @@ namespace Content.Shared.Localizations
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Formats a list as per english grammar rules, but uses or instead of and.
|
||||
/// </summary>
|
||||
public static string FormatListToOr(List<string> list)
|
||||
{
|
||||
return list.Count switch
|
||||
{
|
||||
<= 0 => string.Empty,
|
||||
1 => list[0],
|
||||
2 => $"{list[0]} or {list[1]}",
|
||||
_ => $"{string.Join(" or ", list)}"
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Formats a direction struct as a human-readable string.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user