1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-23 15:26:06 +00:00

Changed RPC !html and added Debug Status

This commit is contained in:
WorstAquaPlayer 2021-02-27 21:06:30 -03:00
parent 34a5175ce5
commit b1993259bf
5 changed files with 22 additions and 17 deletions

View file

@ -77,6 +77,6 @@ class DiscordClient
endTimestamp : Std.int(endTimestamp / 1000)
});
trace('Discord RPC Updated. Argument: $details, $state, $smallImageKey, $hasStartTimestamp, $endTimestamp');
//trace('Discord RPC Updated. Arguments: $details, $state, $smallImageKey, $hasStartTimestamp, $endTimestamp');
}
}

View file

@ -1,6 +1,6 @@
package;
#if !html
#if desktop
import Discord.DiscordClient;
#end
import flash.text.TextField;
@ -48,9 +48,9 @@ class FreeplayState extends MusicBeatState
}
*/
#if !html
#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("In the menus.", null);
DiscordClient.changePresence("In the Menus", null);
#end
var isDebug:Bool = false;

View file

@ -1,6 +1,6 @@
package;
#if !html
#if desktop
import Discord.DiscordClient;
#end
import Section.SwagSection;
@ -125,7 +125,7 @@ class PlayState extends MusicBeatState
var inCutscene:Bool = false;
#if !html
#if desktop
// Discord RPC variables
var storyDifficultyText:String = "";
var iconRPC:String = "";
@ -185,7 +185,7 @@ class PlayState extends MusicBeatState
dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue'));
}
#if !html
#if desktop
// Making difficulty text for Discord Rich Presence.
switch (storyDifficulty)
{
@ -1021,7 +1021,7 @@ class PlayState extends MusicBeatState
FlxG.sound.music.onComplete = endSong;
vocals.play();
#if !html
#if desktop
// Song duration in a float, useful for the time left feature
songLength = FlxG.sound.music.length;
@ -1269,7 +1269,7 @@ class PlayState extends MusicBeatState
startTimer.active = true;
paused = false;
#if !html
#if desktop
if (startTimer.finished)
{
DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC, true, songLength - Conductor.songPosition);
@ -1286,7 +1286,7 @@ class PlayState extends MusicBeatState
override public function onFocus():Void
{
#if !html
#if desktop
if (health > 0 && !paused)
{
if (Conductor.songPosition > 0.0)
@ -1305,7 +1305,7 @@ class PlayState extends MusicBeatState
override public function onFocusLost():Void
{
#if !html
#if desktop
if (health > 0 && !paused)
{
DiscordClient.changePresence(detailsPausedText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
@ -1378,7 +1378,7 @@ class PlayState extends MusicBeatState
else
openSubState(new PauseSubState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
#if !html
#if desktop
DiscordClient.changePresence(detailsPausedText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
#end
}
@ -1386,6 +1386,10 @@ class PlayState extends MusicBeatState
if (FlxG.keys.justPressed.SEVEN)
{
FlxG.switchState(new ChartingState());
#if desktop
DiscordClient.changePresence("Chart Editor", null, null, true);
#end
}
// FlxG.watch.addQuick('VOL', vocals.amplitudeLeft);

View file

@ -1,6 +1,6 @@
package;
#if !html
#if desktop
import Discord.DiscordClient;
#end
import flixel.FlxG;
@ -112,9 +112,10 @@ class StoryMenuState extends MusicBeatState
add(grpLocks);
trace("Line 70");
#if !html
#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("In the menus.", null);
DiscordClient.changePresence("In the Menus", null);
#end
for (i in 0...weekData.length)

View file

@ -1,6 +1,6 @@
package;
#if !html5
#if desktop
import Discord.DiscordClient;
import sys.thread.Thread;
#end
@ -94,7 +94,7 @@ class TitleState extends MusicBeatState
});
#end
#if !html
#if desktop
DiscordClient.initialize();
#end
}