mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge branch 'master' of https://github.com/goaaats/Dalamud
This commit is contained in:
commit
f99ea1dac8
1 changed files with 17 additions and 0 deletions
|
|
@ -115,6 +115,23 @@ namespace Dalamud.Data
|
|||
return this.Excel.GetSheet<T>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get an <see cref="ExcelSheet{T}"/> with the given Excel sheet row type with a specified language.
|
||||
/// </summary>
|
||||
/// <param name="language">Language of the sheet to get.</param>
|
||||
/// <typeparam name="T">The excel sheet type to get.</typeparam>
|
||||
/// <returns>The <see cref="ExcelSheet{T}"/>, giving access to game rows.</returns>
|
||||
public ExcelSheet<T> GetExcelSheet<T>(ClientLanguage language) where T : IExcelRow {
|
||||
var lang = language switch {
|
||||
ClientLanguage.Japanese => Language.Japanese,
|
||||
ClientLanguage.English => Language.English,
|
||||
ClientLanguage.German => Language.German,
|
||||
ClientLanguage.French => Language.French,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(this.language), "Unknown Language: " + this.language)
|
||||
};
|
||||
return this.Excel.GetSheet<T>(lang);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a <see cref="FileResource"/> with the given path.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue