Skip to content

Commit

Permalink
Update for game version 1.35.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DJDavid98 committed Mar 23, 2024
1 parent ea63240 commit 1e79172
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 41 deletions.
6 changes: 5 additions & 1 deletion Configuration/PluginConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class MapTypeValues
public virtual MapTypeValues MapType { get; set; } = new MapTypeValues();

[UseConverter(typeof(ListConverter<string>))]
public virtual List<string> DetailsFormat { get; set; } = new List<string>() { "{{songName}}", "{{songSubName}}", "by {{songAuthor}}", "[{{mapper}}]", "{{difficulty}}", "{{stars}}" };
public virtual List<string> DetailsFormat { get; set; } = new List<string>() { "{{songName}}", "{{songSubName}}", "by {{songAuthor}}", "[{{mapper}}]", "{{difficulty}}", "{{ranked}}", "{{qualified}}", "{{stars}}" };

[NonNullable]
public virtual string DetailsSeparator { get; set; } = " ";
Expand All @@ -79,6 +79,10 @@ public class MapTypeValues
[NonNullable]
public virtual string FullComboValue { get; set; } = "✅FC";
[NonNullable]
public virtual string RankedValue { get; set; } = "";
[NonNullable]
public virtual string QualifiedValue { get; set; } = "";
[NonNullable]
public virtual string MainMenuValue { get; set; } = "Main Menu";
[NonNullable]
public virtual string MultiplayerLobbyValue { get; set; } = "Multiplayer Lobby";
Expand Down
10 changes: 8 additions & 2 deletions DataMappers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ internal static string GetValueForFormat(string key)
case "songSubName": return MapData.Instance.SongSubName;
case "songAuthor": return MapData.Instance.SongAuthor;
case "mapper": return MapData.Instance.Mapper;
case "mappers": return MapData.Instance.Mappers.Count > 0 ? string.Join(", ", MapData.Instance.Mappers) : "";
case "lighters": return MapData.Instance.Lighters.Count > 0 ? string.Join(", ", MapData.Instance.Lighters) : "";
case "difficulty": return GetReadableDifficulty(MapData.Instance.Difficulty);
case "customDifficulty": return MapData.Instance.CustomDifficultyLabel;
case "stars": return MapData.Instance.Star > 0 ? $"{MapData.Instance.Star:N2}" : "";
case "stars": return MapData.Instance.RankedState.ScoresaberStars > 0 ? $"{MapData.Instance.RankedState.ScoresaberStars:N2}" : "";
case "blstars": return MapData.Instance.RankedState.BeatleaderStars > 0 ? $"{MapData.Instance.RankedState.BeatleaderStars:N2}" : "";
case "pp": return MapData.Instance.PP > 0 ? $"{MapData.Instance.PP:N2}" : "";
case "playState": return GetPlayState();
case "modifiersState": return GetModifiersState();
Expand All @@ -63,6 +66,8 @@ internal static string GetValueForFormat(string key)
case "rank": return GetReadableRank(LiveData.Instance.Rank);
case "bsr": return MapData.Instance.BSRKey;
case "fc": return LiveData.Instance.FullCombo ? PluginConfig.Instance.FullComboValue : "";
case "ranked": return MapData.Instance.RankedState.Ranked ? PluginConfig.Instance.RankedValue : "";
case "qualified": return MapData.Instance.RankedState.Qualified ? PluginConfig.Instance.QualifiedValue : "";
case "gameVersion": return Regex.Replace(MapData.GameVersion, @"_\d+$", "");
case "pluginVersion": return MapData.PluginVersion;
default: return $"{{{key}}}";
Expand Down Expand Up @@ -358,7 +363,8 @@ internal static string GetLargeImage()
{
if (PluginConfig.Instance.LargeImageSongCover)
{
if (MapData.Instance.CoverImage != null && MapData.Instance.CoverImage.Length > 0)
var coverImageUrl = MapData.Instance.CoverImage;
if (coverImageUrl != null && coverImageUrl.Length > 0 && coverImageUrl.StartsWith("https"))
{
return MapData.Instance.CoverImage;
}
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
66 changes: 36 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,33 +66,39 @@ Each string in the list will only be appended to the final output in case it has

The strings also have configurable separators that go between each valid item. By default this is a space for `DetailsFormat` and `StateFormat`, and a slash surrounded by spaces (` / `) for `LargeTextFormat` and `SmallTextFormat`. You can also disable displaying the individual lines by setting them to `null` instead of the list.

| Variable | Description | Example | Additional formatting | Validity criteria |
| -------------- | ----------------------------- | ------------- | --------------------- | ----------------- |
| songName | Title of the song | Country Roads | | Not empty |
| songSubName | Sub-name of the song | Squeepo Remix | | Not empty |
| songAuthor | Author of the song | Jaroslav Beck, Kings & Folk | | Not empty |
| mapper | Mapper name (custom songs ) | Mawntee | | Not empty |
| difficulty | Human-readable difficulty | Expert | "ExpertPlus" replaced by "Expert+" | Not empty |
| Variable | Description | Example | Additional formatting | Validity criteria |
|------------------| ----------------------------- | ------------- | --------------------- | ----------------- |
| songName | Title of the song | Country Roads | | Not empty |
| songSubName | Sub-name of the song | Squeepo Remix | | Not empty |
| songAuthor | Author of the song | Jaroslav Beck, Kings & Folk | | Not empty |
| mapper | Mapper + lighter names (comma separated) | Mawntee, tychailatte | | Not empty |
| mappers | Mapper names (comma separated) | altrevin, Freek | | Not empty |
| lighters | Lighter names (comma separated) | altrevin, Freek | | Not empty |
| contentRating | Map content rating | Safe | | Not empty |
| difficulty | Human-readable difficulty | Expert | "ExpertPlus" replaced by "Expert+" | Not empty |
| customDifficulty | Custom difficulty name | Lawless | | Not empty |
| stars | ScoreSaber ranked stars | 4,22 | Up to two decimals | Greater than 0 |
| pp | ScoreSaber perofrmance points | 167,89 | Up to two decimals | Greater than 0 |
| playState | Emoji indicating play state | ▶️ | Based on configuration | Not empty |
| modifiersState | Emojis indicating modifiers | 🧘 | Based on configuration | Not empty |
| lobbyType | Single/multiplayer or practice | 👤 | Based on configuration | Not empty |
| mapType | Type of the current map | One Saber | Based on configuration | Not empty |
| score | Total score | 123,456 | | Greater than 0 |
| topScore | Top score for mode and difficulty | 156,789 | | Greater than 0 |
| combo | Consecutive hits without misses | 234 | No decimals | Greater than 0 |
| misses | Totall misses & bad cuts | 12 | No decimals | Greater than 0 |
| energy | Player health | 90 | 0-100, no % sign | |
| bpm | Song beats per minute | 180 | No decimals | Greater than 0 |
| njs | Song note jump speed | 14,21 | Up to two decimals | Greater than 0 |
| accuracy | Current accuracy | 86,24 | Two decimals, excluding % sign | |
| rank | Accuracy ranking letter | SS | | Not empty |
| bsr | BSR key of custom maps | 97f6 | | Not empty |
| fc | Full combo text | ✅FC | | No misses & not empty |
| gameVersion | Version of the game | 1.29.1 | | Not empty |
| pluginVersion | Version of the mod | 1.1.2 | | Not empty |
| ranked | Ranked text || Based on configuration | If map is ranked |
| qualified | Qualified text || Based on configuration | If map is ranked |
| stars | ScoreSaber ranked stars | 4,22 | Up to two decimals | Greater than 0 |
| blstars | BeatLeader ranked stars | 6,98 | Up to two decimals | Greater than 0 |
| pp | ScoreSaber perofrmance points | 167,89 | Up to two decimals | Greater than 0 |
| playState | Emoji indicating play state | ▶️ | Based on configuration | Not empty |
| modifiersState | Emojis indicating modifiers | 🧘 | Based on configuration | Not empty |
| lobbyType | Single/multiplayer or practice | 👤 | Based on configuration | Not empty |
| mapType | Type of the current map | One Saber | Based on configuration | Not empty |
| score | Total score | 123,456 | | Greater than 0 |
| topScore | Top score for mode and difficulty | 156,789 | | Greater than 0 |
| combo | Consecutive hits without misses | 234 | No decimals | Greater than 0 |
| misses | Totall misses & bad cuts | 12 | No decimals | Greater than 0 |
| energy | Player health | 90 | 0-100, no % sign | |
| bpm | Song beats per minute | 180 | No decimals | Greater than 0 |
| njs | Song note jump speed | 14,21 | Up to two decimals | Greater than 0 |
| accuracy | Current accuracy | 86,24 | Two decimals, excluding % sign | |
| rank | Accuracy ranking letter | SS | | Not empty |
| bsr | BSR key of custom maps | 97f6 | | Not empty |
| fc | Full combo text | ✅FC | Based on configuration | No misses & not empty |
| gameVersion | Version of the game | 1.29.1 | | Not empty |
| pluginVersion | Version of the mod | 1.1.2 | | Not empty |

### `FullComboValue`

Expand All @@ -113,7 +119,7 @@ The `PlayStateEmoji`, `ModifierEmoji` and `LobbyTypeEmoji` options allow you to

## Dependencies

* BSIPA v4.3.0 (ModAssistant)
* BeatSaberMarkupLanguage v1.7.3 (ModAssistant)
* DiscordCore v3.0.3 (https://github.com/DJDavid98/DiscordCore/releases/tag/v3.0.1)
* DataPuller v2.1.5 (https://github.com/DJDavid98/BSDataPuller/releases/tag/2.1.4)
* BSIPA v4.3.3 (ModAssistant)
* BeatSaberMarkupLanguage v1.9.0 (ModAssistant)
* DiscordCore v3.0.5 (https://github.com/DJDavid98/DiscordCore/releases/tag/v3.0.5)
* DataPuller v2.1.14 (https://github.com/DJDavid98/BSDataPuller/releases/tag/2.1.14)
12 changes: 6 additions & 6 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"id": "bsrpc",
"name": "bsrpc",
"author": "DJDavid98",
"version": "1.1.4",
"version": "1.1.5",
"description": "Discord Rich Presence integration for Beat Saber",
"gameVersion": "1.34.2",
"gameVersion": "1.35.0",
"dependsOn": {
"BSIPA": "^4.3.0",
"DataPuller": "^2.1.7",
"DiscordCore": "^3.0.4",
"BeatSaberMarkupLanguage": "^1.8.1"
"BSIPA": "^4.3.3",
"DataPuller": "^2.1.14",
"DiscordCore": "^3.0.5",
"BeatSaberMarkupLanguage": "^1.9.0"
},
"links": {
"project-source": "https://github.com/DJDavid98/bsrpc"
Expand Down

0 comments on commit 1e79172

Please sign in to comment.