mirror of
https://github.com/waynebian01/Shigure.git
synced 2026-09-02 22:39:01 +08:00
- Modified warrior keymap to change the unit for "拳击" and ensure proper formatting. - Introduced a new ReservedUnit class to manage reserved units and their display names. - Added a comprehensive priest keymap with multiple skills and corresponding hotkeys, enhancing gameplay functionality.
45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
namespace Shigure;
|
|
|
|
internal static class ModuleDisplay
|
|
{
|
|
public static string FormatListItem(ModuleDefinition module)
|
|
{
|
|
return module.Name;
|
|
}
|
|
|
|
public static string FormatMatch(ModuleMatch match)
|
|
{
|
|
return $"{FormatMatchValue(match.ClassId)}/{FormatMatchValue(match.SpecId)}/{FormatPartyTypeValue(match.PartyType)}/{FormatMatchValue(match.HeroTalent)}";
|
|
}
|
|
|
|
public static string FormatState(RenderSnapshot snapshot)
|
|
{
|
|
var classText = snapshot.ClassName is null
|
|
? FormatMatchValue(snapshot.ClassId)
|
|
: $"{snapshot.ClassName} ({snapshot.ClassId})";
|
|
var specText = snapshot.SpecName is null
|
|
? FormatMatchValue(snapshot.SpecId)
|
|
: $"{snapshot.SpecName} ({snapshot.SpecId})";
|
|
var partyType = snapshot.State?.GetInt("队伍类型");
|
|
var heroTalent = snapshot.State?.GetInt("英雄天赋");
|
|
return $"{classText} / {specText} / {FormatPartyTypeValue(partyType?.ToString())} / {FormatMatchValue(heroTalent)}";
|
|
}
|
|
|
|
private static string FormatMatchValue(int? value)
|
|
{
|
|
return value?.ToString() ?? "*";
|
|
}
|
|
|
|
private static string FormatPartyTypeValue(string? value)
|
|
{
|
|
return ModuleMatch.NormalizePartyTypeValue(value) switch
|
|
{
|
|
null => "*",
|
|
"0" => "单人",
|
|
"1-40" => "团队",
|
|
"46" => "队伍",
|
|
var other => other
|
|
};
|
|
}
|
|
}
|