mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-23 23:33:55 +00:00
Changed RPC !html and added Debug Status
This commit is contained in:
parent
34a5175ce5
commit
b1993259bf
|
@ -77,6 +77,6 @@ class DiscordClient
|
||||||
endTimestamp : Std.int(endTimestamp / 1000)
|
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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package;
|
package;
|
||||||
|
|
||||||
#if !html
|
#if desktop
|
||||||
import Discord.DiscordClient;
|
import Discord.DiscordClient;
|
||||||
#end
|
#end
|
||||||
import flash.text.TextField;
|
import flash.text.TextField;
|
||||||
|
@ -48,9 +48,9 @@ class FreeplayState extends MusicBeatState
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !html
|
#if desktop
|
||||||
// Updating Discord Rich Presence
|
// Updating Discord Rich Presence
|
||||||
DiscordClient.changePresence("In the menus.", null);
|
DiscordClient.changePresence("In the Menus", null);
|
||||||
#end
|
#end
|
||||||
|
|
||||||
var isDebug:Bool = false;
|
var isDebug:Bool = false;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package;
|
package;
|
||||||
|
|
||||||
#if !html
|
#if desktop
|
||||||
import Discord.DiscordClient;
|
import Discord.DiscordClient;
|
||||||
#end
|
#end
|
||||||
import Section.SwagSection;
|
import Section.SwagSection;
|
||||||
|
@ -125,7 +125,7 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
var inCutscene:Bool = false;
|
var inCutscene:Bool = false;
|
||||||
|
|
||||||
#if !html
|
#if desktop
|
||||||
// Discord RPC variables
|
// Discord RPC variables
|
||||||
var storyDifficultyText:String = "";
|
var storyDifficultyText:String = "";
|
||||||
var iconRPC:String = "";
|
var iconRPC:String = "";
|
||||||
|
@ -185,7 +185,7 @@ class PlayState extends MusicBeatState
|
||||||
dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue'));
|
dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue'));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !html
|
#if desktop
|
||||||
// Making difficulty text for Discord Rich Presence.
|
// Making difficulty text for Discord Rich Presence.
|
||||||
switch (storyDifficulty)
|
switch (storyDifficulty)
|
||||||
{
|
{
|
||||||
|
@ -1021,7 +1021,7 @@ class PlayState extends MusicBeatState
|
||||||
FlxG.sound.music.onComplete = endSong;
|
FlxG.sound.music.onComplete = endSong;
|
||||||
vocals.play();
|
vocals.play();
|
||||||
|
|
||||||
#if !html
|
#if desktop
|
||||||
// Song duration in a float, useful for the time left feature
|
// Song duration in a float, useful for the time left feature
|
||||||
songLength = FlxG.sound.music.length;
|
songLength = FlxG.sound.music.length;
|
||||||
|
|
||||||
|
@ -1269,7 +1269,7 @@ class PlayState extends MusicBeatState
|
||||||
startTimer.active = true;
|
startTimer.active = true;
|
||||||
paused = false;
|
paused = false;
|
||||||
|
|
||||||
#if !html
|
#if desktop
|
||||||
if (startTimer.finished)
|
if (startTimer.finished)
|
||||||
{
|
{
|
||||||
DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC, true, songLength - Conductor.songPosition);
|
DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC, true, songLength - Conductor.songPosition);
|
||||||
|
@ -1286,7 +1286,7 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
override public function onFocus():Void
|
override public function onFocus():Void
|
||||||
{
|
{
|
||||||
#if !html
|
#if desktop
|
||||||
if (health > 0 && !paused)
|
if (health > 0 && !paused)
|
||||||
{
|
{
|
||||||
if (Conductor.songPosition > 0.0)
|
if (Conductor.songPosition > 0.0)
|
||||||
|
@ -1305,7 +1305,7 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
override public function onFocusLost():Void
|
override public function onFocusLost():Void
|
||||||
{
|
{
|
||||||
#if !html
|
#if desktop
|
||||||
if (health > 0 && !paused)
|
if (health > 0 && !paused)
|
||||||
{
|
{
|
||||||
DiscordClient.changePresence(detailsPausedText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
|
DiscordClient.changePresence(detailsPausedText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
|
||||||
|
@ -1378,7 +1378,7 @@ class PlayState extends MusicBeatState
|
||||||
else
|
else
|
||||||
openSubState(new PauseSubState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
openSubState(new PauseSubState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
||||||
|
|
||||||
#if !html
|
#if desktop
|
||||||
DiscordClient.changePresence(detailsPausedText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
|
DiscordClient.changePresence(detailsPausedText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
@ -1386,6 +1386,10 @@ class PlayState extends MusicBeatState
|
||||||
if (FlxG.keys.justPressed.SEVEN)
|
if (FlxG.keys.justPressed.SEVEN)
|
||||||
{
|
{
|
||||||
FlxG.switchState(new ChartingState());
|
FlxG.switchState(new ChartingState());
|
||||||
|
|
||||||
|
#if desktop
|
||||||
|
DiscordClient.changePresence("Chart Editor", null, null, true);
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
// FlxG.watch.addQuick('VOL', vocals.amplitudeLeft);
|
// FlxG.watch.addQuick('VOL', vocals.amplitudeLeft);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package;
|
package;
|
||||||
|
|
||||||
#if !html
|
#if desktop
|
||||||
import Discord.DiscordClient;
|
import Discord.DiscordClient;
|
||||||
#end
|
#end
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
|
@ -112,9 +112,10 @@ class StoryMenuState extends MusicBeatState
|
||||||
add(grpLocks);
|
add(grpLocks);
|
||||||
|
|
||||||
trace("Line 70");
|
trace("Line 70");
|
||||||
#if !html
|
|
||||||
|
#if desktop
|
||||||
// Updating Discord Rich Presence
|
// Updating Discord Rich Presence
|
||||||
DiscordClient.changePresence("In the menus.", null);
|
DiscordClient.changePresence("In the Menus", null);
|
||||||
#end
|
#end
|
||||||
|
|
||||||
for (i in 0...weekData.length)
|
for (i in 0...weekData.length)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package;
|
package;
|
||||||
|
|
||||||
#if !html5
|
#if desktop
|
||||||
import Discord.DiscordClient;
|
import Discord.DiscordClient;
|
||||||
import sys.thread.Thread;
|
import sys.thread.Thread;
|
||||||
#end
|
#end
|
||||||
|
@ -94,7 +94,7 @@ class TitleState extends MusicBeatState
|
||||||
});
|
});
|
||||||
#end
|
#end
|
||||||
|
|
||||||
#if !html
|
#if desktop
|
||||||
DiscordClient.initialize();
|
DiscordClient.initialize();
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue