Merge remote-tracking branch 'upstream/master' into ed-17-06-2024-upstream

# Conflicts:
#	Resources/Prototypes/Maps/oasis.yml
This commit is contained in:
Ed
2024-06-17 14:20:38 +03:00
351 changed files with 27677 additions and 9596 deletions

View File

@@ -129,6 +129,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>