Skip to content

Commit

Permalink
discor
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesisfeline committed Nov 7, 2023
1 parent 310d531 commit 279f58a
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 14 deletions.
2 changes: 1 addition & 1 deletion source/backend/Discord.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class DiscordClient
public static var clientID(default, set):String = _defaultID;

private static var _options:Dynamic = {
details: "In the Menus",
details: "Starting",
state: null,
largeImageKey: 'icon',
largeImageText: "Psych Engine",
Expand Down
2 changes: 1 addition & 1 deletion source/states/CreditsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CreditsState extends MusicBeatState
{
#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("In the Menus", null);
DiscordClient.changePresence("Credits Menu", null);
#end

persistentUpdate = true;
Expand Down
2 changes: 1 addition & 1 deletion source/states/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class FreeplayState extends MusicBeatState

#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("In the Menus", null);
DiscordClient.changePresence("Freeplay Menu", null);
#end

for (i in 0...WeekData.weeksList.length) {
Expand Down
5 changes: 2 additions & 3 deletions source/states/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class MainMenuState extends MusicBeatState

#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("In the Menus", null);
DiscordClient.changePresence("In the Main Menu", null);
#end

transIn = FlxTransitionableState.defaultTransIn;
Expand Down Expand Up @@ -91,8 +91,7 @@ class MainMenuState extends MusicBeatState
magenta.color = 0xFFfd719b;
add(magenta);


var grid:FlxBackdrop = new FlxBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33FFFFFF, 0x0));
var grid:FlxBackdrop = new FlxBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33525252, 0x0));
grid.velocity.set(40, 40);
grid.alpha = 0;
FlxTween.tween(grid, {alpha: 1}, 0.5, {ease: FlxEase.quadOut});
Expand Down
2 changes: 1 addition & 1 deletion source/states/ModsMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ModsMenuState extends MusicBeatState

#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("In the Mod Menu", null);
DiscordClient.changePresence("Mods Menu", null);
#end

bg = new FlxSprite().loadGraphic(Paths.image('menuDesat'));
Expand Down
4 changes: 1 addition & 3 deletions source/states/StoryMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class StoryMenuState extends MusicBeatState

#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("In the Menus", null);
DiscordClient.changePresence("Story Mode Menu", null);
#end

var num:Int = 0;
Expand Down Expand Up @@ -192,8 +192,6 @@ class StoryMenuState extends MusicBeatState

scoreText.text = "(" + ((curWeek + 1) + "/" + loadedWeeks.length) + ") | WEEK SCORE:" + lerpScore;

// FlxG.watch.addQuick('font', scoreText.font);

if (!movedBack && !selectedWeek)
{
var upP = controls.UI_UP_P;
Expand Down
11 changes: 11 additions & 0 deletions source/states/ThanksState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ class ThanksState extends MusicBeatState

override function create()
{
#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("Thanks Menu", null);
#end

var bg:FlxSprite = new FlxSprite(-80).loadGraphic(Paths.image('menuDesat'));
bg.scrollFactor.x = 0;
bg.scrollFactor.y = 0.10;
Expand All @@ -30,6 +35,12 @@ class ThanksState extends MusicBeatState
bg.antialiasing = ClientPrefs.data.antialiasing;
add(bg);

var grid:FlxBackdrop = new FlxBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33525252, 0x0));
grid.velocity.set(40, 40);
grid.alpha = 0;
FlxTween.tween(grid, {alpha: 1}, 0.5, {ease: FlxEase.quadOut});
add(grid);

var theLogoThing:FlxSprite = new FlxSprite(FlxG.width, 0);
theLogoThing.frames = Paths.getSparrowAtlas('logoBumpin');
theLogoThing.scale.y = 0.3;
Expand Down
5 changes: 5 additions & 0 deletions source/states/editors/NoteSplashDebugState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ class NoteSplashDebugState extends MusicBeatState
selection.alpha = 0.4;
add(selection);

#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("Note Splash Menu", null);
#end

notes = new FlxTypedGroup<StrumNote>();
add(notes);

Expand Down
6 changes: 6 additions & 0 deletions source/substates/GameplayChangersSubstate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ class GameplayChangersSubstate extends MusicBeatSubstate
bg.alpha = 0.6;
add(bg);

var grid:FlxBackdrop = new FlxBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33FFFFFF, 0x0));
grid.velocity.set(40, 40);
grid.alpha = 0;
FlxTween.tween(grid, {alpha: 1}, 0.5, {ease: FlxEase.quadOut});
add(grid);

// avoids lagspikes while scrolling through menus!
grpOptions = new FlxTypedGroup<Alphabet>();
add(grpOptions);
Expand Down
6 changes: 6 additions & 0 deletions source/substates/PauseSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ class PauseSubState extends MusicBeatSubstate
bg.scrollFactor.set();
add(bg);

var grid:FlxBackdrop = new FlxBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33FFFFFF, 0x0));
grid.velocity.set(40, 40);
grid.alpha = 0;
FlxTween.tween(grid, {alpha: 1}, 0.5, {ease: FlxEase.quadOut});
add(grid);

var levelInfo:FlxText = new FlxText(20, 15, 0, PlayState.SONG.song, 32);
levelInfo.scrollFactor.set();
levelInfo.setFormat(Paths.font("vcr.ttf"), 32);
Expand Down
5 changes: 1 addition & 4 deletions source/substates/Prompt.hx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ class Prompt extends MusicBeatSubstate
{
super.create();
if (goAnyway){


if(okc != null)okc();
if(okc != null)okc();
close();

}else{
panel = new FlxSprite(0, 0);
panelbg = new FlxSprite(0, 0);
Expand Down
6 changes: 6 additions & 0 deletions source/substates/ResetScoreSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ class ResetScoreSubState extends MusicBeatSubstate
bg.scrollFactor.set();
add(bg);

var grid:FlxBackdrop = new FlxBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33FFFFFF, 0x0));
grid.velocity.set(40, 40);
grid.alpha = 0;
FlxTween.tween(grid, {alpha: 1}, 0.5, {ease: FlxEase.quadOut});
add(grid);

var tooLong:Float = (name.length > 18) ? 0.8 : 1; //Fucking Winter Horrorland
var text:Alphabet = new Alphabet(0, 180, "Reset the score of", true);
text.screenCenter(X);
Expand Down

0 comments on commit 279f58a

Please sign in to comment.