Skip to content

Commit

Permalink
Explicit flag for use of Discord assets
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Aug 22, 2023
1 parent 99d02d6 commit c305f3c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
7 changes: 4 additions & 3 deletions Refresh.GameServer/Configuration/RichPresenceConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ namespace Refresh.GameServer.Configuration;

public class RichPresenceConfig : Config
{
public override int CurrentConfigVersion => 1;
public override int Version { get; set; } = 0;
public override int CurrentConfigVersion => 2;
public override int Version { get; set; }
protected override void Migrate(int oldVer, dynamic oldConfig)
{

}

public long ApplicationId { get; set; } = 1138956002037866648;
public bool UseApplicationAssets { get; set; } = true;
public string? PodAsset { get; set; }
public string? MoonAsset { get; set; }
public string? RemoteMoonAsset { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ namespace Refresh.GameServer.Types.RichPresence;
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
public class RichPresenceAssetConfiguration : IApiResponse
{
public string? PodAsset { get; set; }
public string? MoonAsset { get; set; }
public string? RemoteMoonAsset { get; set; }
public string? DeveloperAsset { get; set; }
public string? DeveloperAdventureAsset { get; set; }
public string? DlcAsset { get; set; }
public string? FallbackAsset { get; set; }
public required bool UseApplicationAssets { get; set; }
public required string? PodAsset { get; set; }
public required string? MoonAsset { get; set; }
public required string? RemoteMoonAsset { get; set; }
public required string? DeveloperAsset { get; set; }
public required string? DeveloperAdventureAsset { get; set; }
public required string? DlcAsset { get; set; }
public required string? FallbackAsset { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public static RichPresenceConfiguration Create(GameServerConfig gameConfig, Rich
ApplicationId = richConfig.ApplicationId.ToString(),
Assets = new RichPresenceAssetConfiguration
{
UseApplicationAssets = true,
PodAsset = richConfig.PodAsset,
MoonAsset = richConfig.MoonAsset,
RemoteMoonAsset = richConfig.RemoteMoonAsset,
Expand Down

0 comments on commit c305f3c

Please sign in to comment.