mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2026-05-07 21:07:57 +08:00
Fix serialization issue in GadgetType.ToTranslatedString
This commit is contained in:
@@ -88,7 +88,9 @@ namespace GrasscutterTools.Game.Props
|
|||||||
public static string ToTranslatedString(string gadgetType, string language)
|
public static string ToTranslatedString(string gadgetType, string language)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(gadgetType)) gadgetType = "Deprecated";
|
if (string.IsNullOrEmpty(gadgetType)) gadgetType = "Deprecated";
|
||||||
return language.StartsWith("zh") ? TextMapCHS[gadgetType] : gadgetType;
|
if (language.StartsWith("zh") && TextMapCHS.TryGetValue(gadgetType, out var t))
|
||||||
|
return t;
|
||||||
|
return gadgetType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user