mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-21 20:56:48 +00:00
Update so that album art works.
This commit is contained in:
parent
84d8c02920
commit
5693d626b5
2
art
2
art
|
@ -1 +1 @@
|
|||
Subproject commit cc347f5630dc8182e62990c66753940a275202f8
|
||||
Subproject commit fbd3e3df77734606d88516770b71b56e6fa04bce
|
|
@ -7,7 +7,7 @@ import sys.thread.Thread;
|
|||
|
||||
class DiscordClient
|
||||
{
|
||||
static final CLIENT_ID:String = "814588678700924999";
|
||||
static final CLIENT_ID:String = "816168432860790794";
|
||||
|
||||
public static var instance(get, never):DiscordClient;
|
||||
static var _instance:Null<DiscordClient> = null;
|
||||
|
@ -96,13 +96,17 @@ class DiscordClient
|
|||
// The large image displaying what the user is doing.
|
||||
// This should probably be album art.
|
||||
// IMPORTANT NOTE: This can be an asset key uploaded to Discord's developer panel OR any URL you like.
|
||||
presence.largeImageKey = cast(params.largeImageKey, Null<String>) ?? "album-volume1";
|
||||
|
||||
trace('[DISCORD] largeImageKey: ${presence.largeImageKey}');
|
||||
|
||||
// TODO: Make this use the song's album art.
|
||||
// presence.largeImageKey = "icon";
|
||||
presence.largeImageKey = "https://f4.bcbits.com/img/a0746694746_16.jpg";
|
||||
// presence.largeImageKey = "https://f4.bcbits.com/img/a0746694746_16.jpg";
|
||||
|
||||
// The small inset image for what the user is doing.
|
||||
// This can be the opponent's health icon?
|
||||
// NOTE: Like largeImageKey, this can be a URL, or an asset key.
|
||||
presence.smallImageKey = cast(params.smallImageKey, Null<String>);
|
||||
|
||||
// NOTE: In previous versions, this showed as "Elapsed", but now shows as playtime and doesn't look good
|
||||
|
|
|
@ -447,6 +447,7 @@ class PlayState extends MusicBeatSubState
|
|||
|
||||
#if FEATURE_DISCORD_RPC
|
||||
// Discord RPC variables
|
||||
var discordRPCAlbum:String = '';
|
||||
var discordRPCIcon:String = '';
|
||||
#end
|
||||
|
||||
|
@ -987,6 +988,7 @@ class PlayState extends MusicBeatSubState
|
|||
|
||||
state: buildDiscordRPCState(),
|
||||
|
||||
largeImageKey: discordRPCAlbum,
|
||||
smallImageKey: discordRPCIcon
|
||||
});
|
||||
#end
|
||||
|
@ -1081,6 +1083,8 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
details: 'Game Over - ${buildDiscordRPCDetails()}',
|
||||
state: buildDiscordRPCState(),
|
||||
|
||||
largeImageKey: discordRPCAlbum,
|
||||
smallImageKey: discordRPCIcon
|
||||
});
|
||||
#end
|
||||
|
@ -1300,7 +1304,9 @@ class PlayState extends MusicBeatSubState
|
|||
DiscordClient.instance.setPresence(
|
||||
{
|
||||
state: buildDiscordRPCState(),
|
||||
details: 'Paused - ${buildDiscordRPCDetails()}',
|
||||
details: buildDiscordRPCDetails(),
|
||||
|
||||
largeImageKey: discordRPCAlbum,
|
||||
smallImageKey: discordRPCIcon
|
||||
});
|
||||
}
|
||||
|
@ -1309,7 +1315,9 @@ class PlayState extends MusicBeatSubState
|
|||
DiscordClient.instance.setPresence(
|
||||
{
|
||||
state: buildDiscordRPCState(),
|
||||
details: 'Paused - ${buildDiscordRPCDetails()}',
|
||||
details: buildDiscordRPCDetails(),
|
||||
|
||||
largeImageKey: discordRPCAlbum,
|
||||
smallImageKey: discordRPCIcon
|
||||
});
|
||||
}
|
||||
|
@ -1345,6 +1353,8 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
state: buildDiscordRPCState(),
|
||||
details: buildDiscordRPCDetails(),
|
||||
|
||||
largeImageKey: discordRPCAlbum,
|
||||
smallImageKey: discordRPCIcon
|
||||
});
|
||||
}
|
||||
|
@ -1354,6 +1364,8 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
state: buildDiscordRPCState(),
|
||||
details: buildDiscordRPCDetails(),
|
||||
|
||||
largeImageKey: discordRPCAlbum,
|
||||
smallImageKey: discordRPCIcon
|
||||
});
|
||||
// DiscordClient.changePresence(detailsText, '${currentChart.songName} ($discordRPCDifficulty)', discordRPCIcon, true,
|
||||
|
@ -1381,6 +1393,8 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
state: buildDiscordRPCState(),
|
||||
details: buildDiscordRPCDetails(),
|
||||
|
||||
largeImageKey: discordRPCAlbum,
|
||||
smallImageKey: discordRPCIcon
|
||||
});
|
||||
}
|
||||
|
@ -1681,7 +1695,8 @@ class PlayState extends MusicBeatSubState
|
|||
iconP2.cameras = [camHUD];
|
||||
|
||||
#if FEATURE_DISCORD_RPC
|
||||
discordRPCIcon = currentCharacterData.opponent;
|
||||
discordRPCAlbum = 'album-${currentChart.album}';
|
||||
discordRPCIcon = 'icon-${currentCharacterData.opponent}';
|
||||
#end
|
||||
}
|
||||
|
||||
|
@ -1807,6 +1822,8 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
state: buildDiscordRPCState(),
|
||||
details: buildDiscordRPCDetails(),
|
||||
|
||||
largeImageKey: discordRPCAlbum,
|
||||
smallImageKey: discordRPCIcon
|
||||
});
|
||||
#end
|
||||
|
@ -2040,6 +2057,8 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
state: buildDiscordRPCState(),
|
||||
details: buildDiscordRPCDetails(),
|
||||
|
||||
largeImageKey: discordRPCAlbum,
|
||||
smallImageKey: discordRPCIcon
|
||||
});
|
||||
// DiscordClient.changePresence(detailsText, '${currentChart.songName} ($discordRPCDifficulty)', discordRPCIcon, true, currentSongLengthMs);
|
||||
|
|
Loading…
Reference in a new issue