-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'dev/main'
- Loading branch information
Showing
128 changed files
with
2,926 additions
and
604 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import funkin.backend.utils.DiscordUtil; | ||
|
||
function onGameOver() { | ||
DiscordUtil.changePresence('Game Over', PlayState.SONG.meta.displayName + " (" + PlayState.difficulty + ")"); | ||
} | ||
|
||
function onDiscordPresenceUpdate(e) { | ||
var data = e.presence; | ||
|
||
if(data.button1Label == null) | ||
data.button1Label = "Codename Engine Discord"; | ||
if(data.button1Url == null) | ||
data.button1Url = "https://discord.gg/2NTCdsQvx4"; | ||
} | ||
|
||
function onPlayStateUpdate() { | ||
DiscordUtil.changeSongPresence( | ||
PlayState.instance.detailsText, | ||
(PlayState.instance.paused ? "Paused - " : "") + PlayState.SONG.meta.displayName + " (" + PlayState.difficulty + ")", | ||
PlayState.instance.inst, | ||
PlayState.instance.getIconRPC() | ||
); | ||
} | ||
|
||
function onMenuLoaded(name:String) { | ||
// Name is either "Main Menu", "Freeplay", "Title Screen", "Options Menu", "Credits Menu", "Beta Warning", "Update Available Screen", "Update Screen" | ||
DiscordUtil.changePresenceSince("In the Menus", null); | ||
} | ||
|
||
function onEditorTreeLoaded(name:String) { | ||
switch(name) { | ||
case "Character Editor": | ||
DiscordUtil.changePresenceSince("Choosing a Character", null); | ||
case "Chart Editor": | ||
DiscordUtil.changePresenceSince("Choosing a Chart", null); | ||
case "Stage Editor": | ||
DiscordUtil.changePresenceSince("Choosing a Stage", null); | ||
} | ||
} | ||
|
||
function onEditorLoaded(name:String, editingThing:String) { | ||
switch(name) { | ||
case "Character Editor": | ||
DiscordUtil.changePresenceSince("Editing a Character", editingThing); | ||
case "Chart Editor": | ||
DiscordUtil.changePresenceSince("Editing a Chart", editingThing); | ||
case "Stage Editor": | ||
DiscordUtil.changePresenceSince("Editing a Stage", editingThing); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// | ||
function update(elapsed:Float) | ||
if (FlxG.keys.justPressed.F5) FlxG.resetState(); | ||
if (FlxG.keys.justPressed.F5) FlxG.resetState(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.