GameLocale.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. public static class GameLocale
  2. {
  3. public static string ModeName(string modeKey)
  4. {
  5. return L.Get("defs.mode." + modeKey + ".name");
  6. }
  7. public static string ModeDescription(string modeKey)
  8. {
  9. return L.Get("defs.mode." + modeKey + ".desc");
  10. }
  11. public static string ModeTag(string modeKey)
  12. {
  13. return modeKey switch
  14. {
  15. GameDefinitions.ClassicMode => L.Get("defs.tag.no_timer"),
  16. GameDefinitions.RushMode => L.Get("defs.tag.timed"),
  17. GameDefinitions.SealedMode => L.Get("defs.tag.chained"),
  18. _ => ""
  19. };
  20. }
  21. public static string PreviewMoves(int moves)
  22. {
  23. return L.F("defs.preview.moves", moves);
  24. }
  25. public static string PreviewFruits(int count)
  26. {
  27. return L.F("defs.preview.fruits", count);
  28. }
  29. public static string PowerUpName(string itemKey)
  30. {
  31. return L.Get("defs.item." + itemKey + ".name");
  32. }
  33. public static string PowerUpShortName(string itemKey)
  34. {
  35. if (itemKey == GameDefinitions.KeyItem)
  36. return L.Get("defs.item.key.short");
  37. return PowerUpName(itemKey);
  38. }
  39. public static string PowerUpDescription(string itemKey)
  40. {
  41. return L.Get("defs.item." + itemKey + ".desc");
  42. }
  43. public static string ModeLevelLine(string modeKey, int level)
  44. {
  45. return L.F("game.mode_level", ModeName(modeKey), level);
  46. }
  47. }