mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-21 09:29:41 +00:00
Updated compile defines to use feature flag system
This commit is contained in:
parent
6b9bdb5f2a
commit
200b3c963b
|
@ -113,7 +113,7 @@ class Main extends Sprite
|
|||
|
||||
addChild(game);
|
||||
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
game.debugger.interaction.addTool(new funkin.util.TrackerToolButtonUtil());
|
||||
#end
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import funkin.util.CLIUtil;
|
|||
import funkin.util.CLIUtil.CLIParams;
|
||||
import funkin.util.TimerUtil;
|
||||
import funkin.util.TrackerUtil;
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
import Discord.DiscordClient;
|
||||
#end
|
||||
|
||||
|
@ -123,7 +123,7 @@ class InitState extends FlxState
|
|||
//
|
||||
// DISCORD API SETUP
|
||||
//
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
DiscordClient.initialize();
|
||||
|
||||
Application.current.onExit.add(function(exitCode) {
|
||||
|
@ -144,7 +144,7 @@ class InitState extends FlxState
|
|||
// Plugins provide a useful interface for globally active Flixel objects,
|
||||
// that receive update events regardless of the current state.
|
||||
// TODO: Move scripted Module behavior to a Flixel plugin.
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
funkin.util.plugins.MemoryGCPlugin.initialize();
|
||||
#end
|
||||
funkin.util.plugins.EvacuateDebugPlugin.initialize();
|
||||
|
@ -374,11 +374,16 @@ class InitState extends FlxState
|
|||
//
|
||||
// FLIXEL DEBUG SETUP
|
||||
//
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
// Make errors and warnings less annoying.
|
||||
// Forcing this always since I have never been happy to have the debugger to pop up
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
trace('Initializing Flixel debugger...');
|
||||
|
||||
#if !debug
|
||||
// Make errors less annoying on release builds.
|
||||
LogStyle.ERROR.openConsole = false;
|
||||
LogStyle.ERROR.errorSound = null;
|
||||
#end
|
||||
|
||||
// Make errors and warnings less annoying.
|
||||
LogStyle.WARNING.openConsole = false;
|
||||
LogStyle.WARNING.errorSound = null;
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package funkin.api.discord;
|
||||
|
||||
import Sys.sleep;
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
import discord_rpc.DiscordRpc;
|
||||
#end
|
||||
|
||||
class DiscordClient
|
||||
{
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
public function new()
|
||||
{
|
||||
trace("Discord Client starting...");
|
||||
|
|
|
@ -24,7 +24,7 @@ class NGUnsafe
|
|||
NG.core.calls.event.logEvent(event).send();
|
||||
trace('should have logged: ' + event);
|
||||
#else
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
trace('event:$event - not logged, missing NG.io lib');
|
||||
#end
|
||||
#end
|
||||
|
@ -39,7 +39,7 @@ class NGUnsafe
|
|||
if (!medal.unlocked) medal.sendUnlock();
|
||||
}
|
||||
#else
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
trace('medal:$id - not unlocked, missing NG.io lib');
|
||||
#end
|
||||
#end
|
||||
|
@ -63,7 +63,7 @@ class NGUnsafe
|
|||
}
|
||||
}
|
||||
#else
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
trace('Song:$song, Score:$score - not posted, missing NG.io lib');
|
||||
#end
|
||||
#end
|
||||
|
|
|
@ -239,7 +239,7 @@ class NGio
|
|||
NG.core.calls.event.logEvent(event).send();
|
||||
trace('should have logged: ' + event);
|
||||
#else
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
trace('event:$event - not logged, missing NG.io lib');
|
||||
#end
|
||||
#end
|
||||
|
@ -254,7 +254,7 @@ class NGio
|
|||
if (!medal.unlocked) medal.sendUnlock();
|
||||
}
|
||||
#else
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
trace('medal:$id - not unlocked, missing NG.io lib');
|
||||
#end
|
||||
#end
|
||||
|
@ -278,7 +278,7 @@ class NGio
|
|||
}
|
||||
}
|
||||
#else
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
trace('Song:$song, Score:$score - not posted, missing NG.io lib');
|
||||
#end
|
||||
#end
|
||||
|
|
|
@ -93,9 +93,9 @@ typedef LevelPropData =
|
|||
* The frequency to bop at, in beats.
|
||||
* 1 = every beat, 2 = every other beat, etc.
|
||||
* Supports up to 0.25 precision.
|
||||
* @default 0.0
|
||||
* @default 1.0
|
||||
*/
|
||||
@:default(0.0)
|
||||
@:default(1.0)
|
||||
@:optional
|
||||
var danceEvery:Float;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class FlxAtlasSprite extends FlxAnimate
|
|||
FrameRate: 24.0,
|
||||
Reversed: false,
|
||||
// ?OnComplete:Void -> Void,
|
||||
ShowPivot: #if debug false #else false #end,
|
||||
ShowPivot: false,
|
||||
Antialiasing: true,
|
||||
ScrollFactor: null,
|
||||
// Offset: new FlxPoint(0, 0), // This is just FlxSprite.offset
|
||||
|
|
|
@ -356,9 +356,10 @@ class Controls extends FlxActionSet
|
|||
|
||||
public function check(name:Action, trigger:FlxInputState = JUST_PRESSED, gamepadOnly:Bool = false):Bool
|
||||
{
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
if (!byName.exists(name)) throw 'Invalid name: $name';
|
||||
#end
|
||||
|
||||
var action = byName[name];
|
||||
if (gamepadOnly) return action.checkFiltered(trigger, GAMEPAD);
|
||||
else
|
||||
|
@ -367,7 +368,7 @@ class Controls extends FlxActionSet
|
|||
|
||||
public function getKeysForAction(name:Action):Array<FlxKey>
|
||||
{
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
if (!byName.exists(name)) throw 'Invalid name: $name';
|
||||
#end
|
||||
|
||||
|
@ -382,7 +383,7 @@ class Controls extends FlxActionSet
|
|||
|
||||
public function getButtonsForAction(name:Action):Array<FlxGamepadInputID>
|
||||
{
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
if (!byName.exists(name)) throw 'Invalid name: $name';
|
||||
#end
|
||||
|
||||
|
|
|
@ -28,11 +28,10 @@ class PolymodHandler
|
|||
{
|
||||
/**
|
||||
* The API version that mods should comply with.
|
||||
* Format this with Semantic Versioning; <MAJOR>.<MINOR>.<PATCH>.
|
||||
* Bug fixes increment the patch version, new features increment the minor version.
|
||||
* Changes that break old mods increment the major version.
|
||||
* Indicates which mods are compatible with this version of the game.
|
||||
* Minor updates rarely impact mods but major versions often do.
|
||||
*/
|
||||
static final API_VERSION:String = '0.1.0';
|
||||
static final API_VERSION:String = "0.5.0"; // Constants.VERSION;
|
||||
|
||||
/**
|
||||
* Where relative to the executable that mods are located.
|
||||
|
@ -178,7 +177,7 @@ class PolymodHandler
|
|||
loadedModIds.push(mod.id);
|
||||
}
|
||||
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
var fileList:Array<String> = Polymod.listModFiles(PolymodAssetType.IMAGE);
|
||||
trace('Installed mods have replaced ${fileList.length} images.');
|
||||
for (item in fileList)
|
||||
|
@ -258,8 +257,29 @@ class PolymodHandler
|
|||
// Unserializerr.DEFAULT_RESOLVER.resolveClass() can access blacklisted packages
|
||||
Polymod.blacklistImport('Unserializer');
|
||||
|
||||
// `lime.system.CFFI`
|
||||
// Can load and execute compiled binaries.
|
||||
Polymod.blacklistImport('lime.system.CFFI');
|
||||
|
||||
// `lime.system.JNI`
|
||||
// Can load and execute compiled binaries.
|
||||
Polymod.blacklistImport('lime.system.JNI');
|
||||
|
||||
// `lime.system.System`
|
||||
// System.load() can load malicious DLLs
|
||||
Polymod.blacklistImport('lime.system.System');
|
||||
|
||||
// `lime.utils.Assets`
|
||||
// Literally just has a private `resolveClass` function for some reason?
|
||||
Polymod.blacklistImport('lime.utils.Assets');
|
||||
Polymod.blacklistImport('openfl.utils.Assets');
|
||||
|
||||
// `openfl.desktop.NativeProcess`
|
||||
// Can load native processes on the host operating system.
|
||||
Polymod.blacklistImport('openfl.desktop.NativeProcess');
|
||||
|
||||
// `polymod.*`
|
||||
// You can probably unblacklist a module
|
||||
// Contains functions which may allow for un-blacklisting other modules.
|
||||
for (cls in ClassMacro.listClassesInPackage('polymod'))
|
||||
{
|
||||
if (cls == null) continue;
|
||||
|
@ -268,6 +288,7 @@ class PolymodHandler
|
|||
}
|
||||
|
||||
// `sys.*`
|
||||
// Access to system utilities such as the file system.
|
||||
for (cls in ClassMacro.listClassesInPackage('sys'))
|
||||
{
|
||||
if (cls == null) continue;
|
||||
|
|
|
@ -430,7 +430,7 @@ class PauseSubState extends MusicBeatSubState
|
|||
resume(this);
|
||||
}
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
// to pause the game and get screenshots easy, press H on pause menu!
|
||||
if (FlxG.keys.justPressed.H)
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ import lime.ui.Haptic;
|
|||
import openfl.display.BitmapData;
|
||||
import openfl.geom.Rectangle;
|
||||
import openfl.Lib;
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
import Discord.DiscordClient;
|
||||
#end
|
||||
|
||||
|
@ -445,7 +445,7 @@ class PlayState extends MusicBeatSubState
|
|||
*/
|
||||
public var vocals:VoicesGroup;
|
||||
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
// Discord RPC variables
|
||||
var storyDifficultyText:String = '';
|
||||
var iconRPC:String = '';
|
||||
|
@ -698,7 +698,7 @@ class PlayState extends MusicBeatSubState
|
|||
initStrumlines();
|
||||
initPopups();
|
||||
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
// Initialize Discord Rich Presence.
|
||||
initDiscord();
|
||||
#end
|
||||
|
@ -738,7 +738,7 @@ class PlayState extends MusicBeatSubState
|
|||
rightWatermarkText.cameras = [camHUD];
|
||||
|
||||
// Initialize some debug stuff.
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
// Display the version number (and git commit hash) in the bottom right corner.
|
||||
this.rightWatermarkText.text = Constants.VERSION;
|
||||
|
||||
|
@ -977,7 +977,7 @@ class PlayState extends MusicBeatSubState
|
|||
// boyfriendPos.put(); // TODO: Why is this here?
|
||||
}
|
||||
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
DiscordClient.changePresence(detailsPausedText, currentSong.song + ' (' + storyDifficultyText + ')', iconRPC);
|
||||
#end
|
||||
}
|
||||
|
@ -1036,7 +1036,7 @@ class PlayState extends MusicBeatSubState
|
|||
|
||||
// Disable updates, preventing animations in the background from playing.
|
||||
persistentUpdate = false;
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
if (FlxG.keys.pressed.THREE)
|
||||
{
|
||||
// TODO: Change the key or delete this?
|
||||
|
@ -1047,7 +1047,7 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
#end
|
||||
persistentDraw = false;
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
}
|
||||
#end
|
||||
|
||||
|
@ -1066,7 +1066,7 @@ class PlayState extends MusicBeatSubState
|
|||
moveToGameOver();
|
||||
}
|
||||
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
// Game Over doesn't get his own variable because it's only used here
|
||||
DiscordClient.changePresence('Game Over - ' + detailsText, currentSong.song + ' (' + storyDifficultyText + ')', iconRPC);
|
||||
#end
|
||||
|
@ -1179,9 +1179,9 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Function called before opening a new substate.
|
||||
* @param subState The substate to open.
|
||||
*/
|
||||
* Function called before opening a new substate.
|
||||
* @param subState The substate to open.
|
||||
*/
|
||||
public override function openSubState(subState:FlxSubState):Void
|
||||
{
|
||||
// If there is a substate which requires the game to continue,
|
||||
|
@ -1237,9 +1237,9 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Function called before closing the current substate.
|
||||
* @param subState
|
||||
*/
|
||||
* Function called before closing the current substate.
|
||||
* @param subState
|
||||
*/
|
||||
public override function closeSubState():Void
|
||||
{
|
||||
if (Std.isOfType(subState, PauseSubState))
|
||||
|
@ -1278,7 +1278,7 @@ class PlayState extends MusicBeatSubState
|
|||
// Resume the countdown.
|
||||
Countdown.resumeCountdown();
|
||||
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
if (startTimer.finished)
|
||||
{
|
||||
DiscordClient.changePresence(detailsText, '${currentChart.songName} ($storyDifficultyText)', iconRPC, true,
|
||||
|
@ -1301,8 +1301,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Function called when the game window gains focus.
|
||||
*/
|
||||
* Function called when the game window gains focus.
|
||||
*/
|
||||
public override function onFocus():Void
|
||||
{
|
||||
if (VideoCutscene.isPlaying() && FlxG.autoPause && isGamePaused) VideoCutscene.pauseVideo();
|
||||
|
@ -1311,7 +1311,7 @@ class PlayState extends MusicBeatSubState
|
|||
VideoCutscene.resumeVideo();
|
||||
#end
|
||||
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
if (health > Constants.HEALTH_MIN && !paused && FlxG.autoPause)
|
||||
{
|
||||
if (Conductor.instance.songPosition > 0.0) DiscordClient.changePresence(detailsText, currentSong.song
|
||||
|
@ -1329,15 +1329,15 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Function called when the game window loses focus.
|
||||
*/
|
||||
* Function called when the game window loses focus.
|
||||
*/
|
||||
public override function onFocusLost():Void
|
||||
{
|
||||
#if html5
|
||||
if (FlxG.autoPause) VideoCutscene.pauseVideo();
|
||||
#end
|
||||
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
if (health > Constants.HEALTH_MIN && !paused && FlxG.autoPause) DiscordClient.changePresence(detailsPausedText,
|
||||
currentSong.song + ' (' + storyDifficultyText + ')', iconRPC);
|
||||
#end
|
||||
|
@ -1346,8 +1346,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Call this by pressing F5 on a debug build.
|
||||
*/
|
||||
* Call this by pressing F5 on a debug build.
|
||||
*/
|
||||
override function reloadAssets():Void
|
||||
{
|
||||
funkin.modding.PolymodHandler.forceReloadAssets();
|
||||
|
@ -1459,8 +1459,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Initializes the game and HUD cameras.
|
||||
*/
|
||||
* Initializes the game and HUD cameras.
|
||||
*/
|
||||
function initCameras():Void
|
||||
{
|
||||
camGame = new FunkinCamera('playStateCamGame');
|
||||
|
@ -1484,8 +1484,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Initializes the health bar on the HUD.
|
||||
*/
|
||||
* Initializes the health bar on the HUD.
|
||||
*/
|
||||
function initHealthBar():Void
|
||||
{
|
||||
var healthBarYPos:Float = Preferences.downscroll ? FlxG.height * 0.1 : FlxG.height * 0.9;
|
||||
|
@ -1516,8 +1516,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Generates the stage and all its props.
|
||||
*/
|
||||
* Generates the stage and all its props.
|
||||
*/
|
||||
function initStage():Void
|
||||
{
|
||||
loadStage(currentStageId);
|
||||
|
@ -1537,10 +1537,10 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Loads stage data from cache, assembles the props,
|
||||
* and adds it to the state.
|
||||
* @param id
|
||||
*/
|
||||
* Loads stage data from cache, assembles the props,
|
||||
* and adds it to the state.
|
||||
* @param id
|
||||
*/
|
||||
function loadStage(id:String):Void
|
||||
{
|
||||
currentStage = StageRegistry.instance.fetchEntry(id);
|
||||
|
@ -1558,7 +1558,7 @@ class PlayState extends MusicBeatSubState
|
|||
// Add the stage to the scene.
|
||||
this.add(currentStage);
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
FlxG.console.registerObject('stage', currentStage);
|
||||
#end
|
||||
}
|
||||
|
@ -1581,8 +1581,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Generates the character sprites and adds them to the stage.
|
||||
*/
|
||||
* Generates the character sprites and adds them to the stage.
|
||||
*/
|
||||
function initCharacters():Void
|
||||
{
|
||||
if (currentSong == null || currentChart == null)
|
||||
|
@ -1661,7 +1661,7 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
currentStage.addCharacter(girlfriend, GF);
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
FlxG.console.registerObject('gf', girlfriend);
|
||||
#end
|
||||
}
|
||||
|
@ -1670,7 +1670,7 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
currentStage.addCharacter(boyfriend, BF);
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
FlxG.console.registerObject('bf', boyfriend);
|
||||
#end
|
||||
}
|
||||
|
@ -1681,7 +1681,7 @@ class PlayState extends MusicBeatSubState
|
|||
// Camera starts at dad.
|
||||
cameraFollowPoint.setPosition(dad.cameraFocusPoint.x, dad.cameraFocusPoint.y);
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
FlxG.console.registerObject('dad', dad);
|
||||
#end
|
||||
}
|
||||
|
@ -1692,8 +1692,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs the strumlines for each player.
|
||||
*/
|
||||
* Constructs the strumlines for each player.
|
||||
*/
|
||||
function initStrumlines():Void
|
||||
{
|
||||
var noteStyleId:String = currentChart.noteStyle;
|
||||
|
@ -1725,8 +1725,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Configures the judgement and combo popups.
|
||||
*/
|
||||
* Configures the judgement and combo popups.
|
||||
*/
|
||||
function initPopups():Void
|
||||
{
|
||||
var noteStyleId:String = currentChart.noteStyle;
|
||||
|
@ -1740,11 +1740,11 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Initializes the Discord Rich Presence.
|
||||
*/
|
||||
* Initializes the Discord Rich Presence.
|
||||
*/
|
||||
function initDiscord():Void
|
||||
{
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
storyDifficultyText = difficultyString();
|
||||
iconRPC = currentSong.player2;
|
||||
|
||||
|
@ -1775,9 +1775,9 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Initializes the song (applying the chart, generating the notes, etc.)
|
||||
* Should be done before the countdown starts.
|
||||
*/
|
||||
* Initializes the song (applying the chart, generating the notes, etc.)
|
||||
* Should be done before the countdown starts.
|
||||
*/
|
||||
function generateSong():Void
|
||||
{
|
||||
if (currentChart == null)
|
||||
|
@ -1808,8 +1808,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Read note data from the chart and generate the notes.
|
||||
*/
|
||||
* Read note data from the chart and generate the notes.
|
||||
*/
|
||||
function regenNoteData(startTime:Float = 0):Void
|
||||
{
|
||||
Highscore.tallies.combo = 0;
|
||||
|
@ -1862,10 +1862,10 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Prepares to start the countdown.
|
||||
* Ends any running cutscenes, creates the strumlines, and starts the countdown.
|
||||
* This is public so that scripts can call it.
|
||||
*/
|
||||
* Prepares to start the countdown.
|
||||
* Ends any running cutscenes, creates the strumlines, and starts the countdown.
|
||||
* This is public so that scripts can call it.
|
||||
*/
|
||||
public function startCountdown():Void
|
||||
{
|
||||
// If Countdown.performCountdown returns false, then the countdown was canceled by a script.
|
||||
|
@ -1879,9 +1879,9 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Displays a dialogue cutscene with the given ID.
|
||||
* This is used by song scripts to display dialogue.
|
||||
*/
|
||||
* Displays a dialogue cutscene with the given ID.
|
||||
* This is used by song scripts to display dialogue.
|
||||
*/
|
||||
public function startConversation(conversationId:String):Void
|
||||
{
|
||||
isInCutscene = true;
|
||||
|
@ -1901,8 +1901,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Handler function called when a conversation ends.
|
||||
*/
|
||||
* Handler function called when a conversation ends.
|
||||
*/
|
||||
function onConversationComplete():Void
|
||||
{
|
||||
isInCutscene = false;
|
||||
|
@ -1921,8 +1921,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Starts playing the song after the countdown has completed.
|
||||
*/
|
||||
* Starts playing the song after the countdown has completed.
|
||||
*/
|
||||
function startSong():Void
|
||||
{
|
||||
startingSong = false;
|
||||
|
@ -1957,7 +1957,7 @@ class PlayState extends MusicBeatSubState
|
|||
vocals.pitch = playbackRate;
|
||||
resyncVocals();
|
||||
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
// Updating Discord Rich Presence (with Time Left)
|
||||
DiscordClient.changePresence(detailsText, '${currentChart.songName} ($storyDifficultyText)', iconRPC, true, currentSongLengthMs);
|
||||
#end
|
||||
|
@ -1972,8 +1972,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Resyncronize the vocal tracks if they have become offset from the instrumental.
|
||||
*/
|
||||
* Resyncronize the vocal tracks if they have become offset from the instrumental.
|
||||
*/
|
||||
function resyncVocals():Void
|
||||
{
|
||||
if (vocals == null) return;
|
||||
|
@ -1992,8 +1992,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates the position and contents of the score display.
|
||||
*/
|
||||
* Updates the position and contents of the score display.
|
||||
*/
|
||||
function updateScoreText():Void
|
||||
{
|
||||
// TODO: Add functionality for modules to update the score text.
|
||||
|
@ -2010,8 +2010,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates the values of the health bar.
|
||||
*/
|
||||
* Updates the values of the health bar.
|
||||
*/
|
||||
function updateHealthBar():Void
|
||||
{
|
||||
if (isBotPlayMode)
|
||||
|
@ -2025,8 +2025,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Callback executed when one of the note keys is pressed.
|
||||
*/
|
||||
* Callback executed when one of the note keys is pressed.
|
||||
*/
|
||||
function onKeyPress(event:PreciseInputEvent):Void
|
||||
{
|
||||
if (isGamePaused) return;
|
||||
|
@ -2036,8 +2036,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Callback executed when one of the note keys is released.
|
||||
*/
|
||||
* Callback executed when one of the note keys is released.
|
||||
*/
|
||||
function onKeyRelease(event:PreciseInputEvent):Void
|
||||
{
|
||||
if (isGamePaused) return;
|
||||
|
@ -2047,8 +2047,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Handles opponent note hits and player note misses.
|
||||
*/
|
||||
* Handles opponent note hits and player note misses.
|
||||
*/
|
||||
function processNotes(elapsed:Float):Void
|
||||
{
|
||||
if (playerStrumline?.notes?.members == null || opponentStrumline?.notes?.members == null) return;
|
||||
|
@ -2266,8 +2266,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Spitting out the input for ravy 🙇♂️!!
|
||||
*/
|
||||
* Spitting out the input for ravy 🙇♂️!!
|
||||
*/
|
||||
var inputSpitter:Array<ScoreInput> = [];
|
||||
|
||||
function handleSkippedNotes():Void
|
||||
|
@ -2291,9 +2291,9 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* PreciseInputEvents are put into a queue between update() calls,
|
||||
* and then processed here.
|
||||
*/
|
||||
* PreciseInputEvents are put into a queue between update() calls,
|
||||
* and then processed here.
|
||||
*/
|
||||
function processInputQueue():Void
|
||||
{
|
||||
if (inputPressQueue.length + inputReleaseQueue.length == 0) return;
|
||||
|
@ -2435,9 +2435,9 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Called when a note leaves the screen and is considered missed by the player.
|
||||
* @param note
|
||||
*/
|
||||
* Called when a note leaves the screen and is considered missed by the player.
|
||||
* @param note
|
||||
*/
|
||||
function onNoteMiss(note:NoteSprite, playSound:Bool = false, healthChange:Float):Void
|
||||
{
|
||||
// If we are here, we already CALLED the onNoteMiss script hook!
|
||||
|
@ -2493,13 +2493,13 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Called when a player presses a key with no note present.
|
||||
* Scripts can modify the amount of health/score lost, whether player animations or sounds are used,
|
||||
* or even cancel the event entirely.
|
||||
*
|
||||
* @param direction
|
||||
* @param hasPossibleNotes
|
||||
*/
|
||||
* Called when a player presses a key with no note present.
|
||||
* Scripts can modify the amount of health/score lost, whether player animations or sounds are used,
|
||||
* or even cancel the event entirely.
|
||||
*
|
||||
* @param direction
|
||||
* @param hasPossibleNotes
|
||||
*/
|
||||
function ghostNoteMiss(direction:NoteDirection, hasPossibleNotes:Bool = true):Void
|
||||
{
|
||||
var event:GhostMissNoteScriptEvent = new GhostMissNoteScriptEvent(direction, // Direction missed in.
|
||||
|
@ -2548,11 +2548,11 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Debug keys. Disabled while in cutscenes.
|
||||
*/
|
||||
* Debug keys. Disabled while in cutscenes.
|
||||
*/
|
||||
function debugKeyShit():Void
|
||||
{
|
||||
#if CHART_EDITOR_SUPPORTED
|
||||
#if FEATURE_CHART_EDITOR
|
||||
// Open the stage editor overlaying the current state.
|
||||
if (controls.DEBUG_STAGE)
|
||||
{
|
||||
|
@ -2582,7 +2582,7 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
#end
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
// H: Hide the HUD.
|
||||
if (FlxG.keys.justPressed.H) camHUD.visible = !camHUD.visible;
|
||||
|
||||
|
@ -2599,7 +2599,7 @@ class PlayState extends MusicBeatSubState
|
|||
// 9: Toggle the old icon.
|
||||
if (FlxG.keys.justPressed.NINE) iconP1.toggleOldIcon();
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
// PAGEUP: Skip forward two sections.
|
||||
// SHIFT+PAGEUP: Skip forward twenty sections.
|
||||
if (FlxG.keys.justPressed.PAGEUP) changeSection(FlxG.keys.pressed.SHIFT ? 20 : 2);
|
||||
|
@ -2612,8 +2612,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Handles applying health, score, and ratings.
|
||||
*/
|
||||
* Handles applying health, score, and ratings.
|
||||
*/
|
||||
function applyScore(score:Int, daRating:String, healthChange:Float, isComboBreak:Bool)
|
||||
{
|
||||
switch (daRating)
|
||||
|
@ -2645,8 +2645,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Handles rating popups when a note is hit.
|
||||
*/
|
||||
* Handles rating popups when a note is hit.
|
||||
*/
|
||||
function popUpScore(daRating:String, ?combo:Int):Void
|
||||
{
|
||||
if (daRating == 'miss')
|
||||
|
@ -2703,10 +2703,10 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Handle keyboard inputs during cutscenes.
|
||||
* This includes advancing conversations and skipping videos.
|
||||
* @param elapsed Time elapsed since last game update.
|
||||
*/
|
||||
* Handle keyboard inputs during cutscenes.
|
||||
* This includes advancing conversations and skipping videos.
|
||||
* @param elapsed Time elapsed since last game update.
|
||||
*/
|
||||
function handleCutsceneKeys(elapsed:Float):Void
|
||||
{
|
||||
if (isGamePaused) return;
|
||||
|
@ -2750,20 +2750,20 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Handle logic for actually skipping a video cutscene after it has been held.
|
||||
*/
|
||||
* Handle logic for actually skipping a video cutscene after it has been held.
|
||||
*/
|
||||
function skipVideoCutscene():Void
|
||||
{
|
||||
VideoCutscene.finishVideo();
|
||||
}
|
||||
|
||||
/**
|
||||
* End the song. Handle saving high scores and transitioning to the results screen.
|
||||
*
|
||||
* Broadcasts an `onSongEnd` event, which can be cancelled to prevent the song from ending (for a cutscene or something).
|
||||
* Remember to call `endSong` again when the song should actually end!
|
||||
* @param rightGoddamnNow If true, don't play the fancy animation where you zoom onto Girlfriend. Used after a cutscene.
|
||||
*/
|
||||
* End the song. Handle saving high scores and transitioning to the results screen.
|
||||
*
|
||||
* Broadcasts an `onSongEnd` event, which can be cancelled to prevent the song from ending (for a cutscene or something).
|
||||
* Remember to call `endSong` again when the song should actually end!
|
||||
* @param rightGoddamnNow If true, don't play the fancy animation where you zoom onto Girlfriend. Used after a cutscene.
|
||||
*/
|
||||
public function endSong(rightGoddamnNow:Bool = false):Void
|
||||
{
|
||||
if (FlxG.sound.music != null) FlxG.sound.music.volume = 0;
|
||||
|
@ -2978,8 +2978,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Perform necessary cleanup before leaving the PlayState.
|
||||
*/
|
||||
* Perform necessary cleanup before leaving the PlayState.
|
||||
*/
|
||||
function performCleanup():Void
|
||||
{
|
||||
// If the camera is being tweened, stop it.
|
||||
|
@ -3037,8 +3037,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Play the camera zoom animation and then move to the results screen once it's done.
|
||||
*/
|
||||
* Play the camera zoom animation and then move to the results screen once it's done.
|
||||
*/
|
||||
function zoomIntoResultsScreen(isNewHighscore:Bool, ?prevScoreData:SaveScoreData):Void
|
||||
{
|
||||
trace('WENT TO RESULTS SCREEN!');
|
||||
|
@ -3102,17 +3102,17 @@ class PlayState extends MusicBeatSubState
|
|||
// Zoom over to the Results screen.
|
||||
// TODO: Re-enable this.
|
||||
/*
|
||||
FlxTween.tween(FlxG.camera, {zoom: 1200}, 1.1,
|
||||
{
|
||||
ease: FlxEase.expoIn,
|
||||
});
|
||||
*/
|
||||
FlxTween.tween(FlxG.camera, {zoom: 1200}, 1.1,
|
||||
{
|
||||
ease: FlxEase.expoIn,
|
||||
});
|
||||
*/
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Move to the results screen right goddamn now.
|
||||
*/
|
||||
* Move to the results screen right goddamn now.
|
||||
*/
|
||||
function moveToResultsScreen(isNewHighscore:Bool, ?prevScoreData:SaveScoreData):Void
|
||||
{
|
||||
persistentUpdate = false;
|
||||
|
@ -3152,8 +3152,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Pauses music and vocals easily.
|
||||
*/
|
||||
* Pauses music and vocals easily.
|
||||
*/
|
||||
public function pauseMusic():Void
|
||||
{
|
||||
if (FlxG.sound.music != null) FlxG.sound.music.pause();
|
||||
|
@ -3161,8 +3161,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Resets the camera's zoom level and focus point.
|
||||
*/
|
||||
* Resets the camera's zoom level and focus point.
|
||||
*/
|
||||
public function resetCamera(?resetZoom:Bool = true, ?cancelTweens:Bool = true):Void
|
||||
{
|
||||
// Cancel camera tweens if any are active.
|
||||
|
@ -3184,8 +3184,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the camera follow point's position and tweens the camera there.
|
||||
*/
|
||||
* Sets the camera follow point's position and tweens the camera there.
|
||||
*/
|
||||
public function tweenCameraToPosition(?x:Float, ?y:Float, ?duration:Float, ?ease:Null<Float->Float>):Void
|
||||
{
|
||||
cameraFollowPoint.setPosition(x, y);
|
||||
|
@ -3193,8 +3193,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Disables camera following and tweens the camera to the follow point manually.
|
||||
*/
|
||||
* Disables camera following and tweens the camera to the follow point manually.
|
||||
*/
|
||||
public function tweenCameraToFollowPoint(?duration:Float, ?ease:Null<Float->Float>):Void
|
||||
{
|
||||
// Cancel the current tween if it's active.
|
||||
|
@ -3231,8 +3231,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Tweens the camera zoom to the desired amount.
|
||||
*/
|
||||
* Tweens the camera zoom to the desired amount.
|
||||
*/
|
||||
public function tweenCameraZoom(?zoom:Float, ?duration:Float, ?direct:Bool, ?ease:Null<Float->Float>):Void
|
||||
{
|
||||
// Cancel the current tween if it's active.
|
||||
|
@ -3263,8 +3263,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
/**
|
||||
* Cancel all active camera tweens simultaneously.
|
||||
*/
|
||||
* Cancel all active camera tweens simultaneously.
|
||||
*/
|
||||
public function cancelAllCameraTweens()
|
||||
{
|
||||
cancelCameraFollowTween();
|
||||
|
@ -3274,8 +3274,8 @@ class PlayState extends MusicBeatSubState
|
|||
var prevScrollTargets:Array<Dynamic> = []; // used to snap scroll speed when things go unruely
|
||||
|
||||
/**
|
||||
* The magical function that shall tween the scroll speed.
|
||||
*/
|
||||
* The magical function that shall tween the scroll speed.
|
||||
*/
|
||||
public function tweenScrollSpeed(?speed:Float, ?duration:Float, ?ease:Null<Float->Float>, strumlines:Array<String>):Void
|
||||
{
|
||||
// Cancel the current tween if it's active.
|
||||
|
@ -3325,12 +3325,12 @@ class PlayState extends MusicBeatSubState
|
|||
scrollSpeedTweens = [];
|
||||
}
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
/**
|
||||
* Jumps forward or backward a number of sections in the song.
|
||||
* Accounts for BPM changes, does not prevent death from skipped notes.
|
||||
* @param sections The number of sections to jump, negative to go backwards.
|
||||
*/
|
||||
* Jumps forward or backward a number of sections in the song.
|
||||
* Accounts for BPM changes, does not prevent death from skipped notes.
|
||||
* @param sections The number of sections to jump, negative to go backwards.
|
||||
*/
|
||||
function changeSection(sections:Int):Void
|
||||
{
|
||||
// FlxG.sound.music.pause();
|
||||
|
|
|
@ -386,7 +386,7 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass implements
|
|||
{
|
||||
if (character == null) return;
|
||||
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
// Temporary marker that shows where the character's location is relative to.
|
||||
// Should display at the stage position of the character (before any offsets).
|
||||
// TODO: Make this a toggle? It's useful to turn on from time to time.
|
||||
|
@ -451,7 +451,7 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass implements
|
|||
character.cameraFocusPoint.x += stageCharData.cameraOffsets[0];
|
||||
character.cameraFocusPoint.y += stageCharData.cameraOffsets[1];
|
||||
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
// Draw the debug icon at the character's feet.
|
||||
if (charType == BF || charType == DAD)
|
||||
{
|
||||
|
@ -468,7 +468,7 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass implements
|
|||
|
||||
ScriptEventDispatcher.callEvent(character, new ScriptEvent(ADDED, false));
|
||||
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
debugIconGroup.add(debugIcon);
|
||||
debugIconGroup.add(debugIcon2);
|
||||
#end
|
||||
|
|
|
@ -54,7 +54,7 @@ class DebugMenuSubState extends MusicBeatSubState
|
|||
|
||||
// Create each menu item.
|
||||
// Call onMenuChange when the first item is created to move the camera .
|
||||
#if CHART_EDITOR_SUPPORTED
|
||||
#if FEATURE_CHART_EDITOR
|
||||
onMenuChange(createItem("CHART EDITOR", openChartEditor));
|
||||
#end
|
||||
// createItem("Input Offset Testing", openInputOffsetTesting);
|
||||
|
|
|
@ -3327,7 +3327,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
handleTestKeybinds();
|
||||
handleHelpKeybinds();
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
handleQuickWatch();
|
||||
#end
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ class FreeplayDJ extends FlxAtlasSprite
|
|||
// I shit myself.
|
||||
}
|
||||
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
if (FlxG.keys.pressed.CONTROL)
|
||||
{
|
||||
if (FlxG.keys.justPressed.LEFT)
|
||||
|
|
|
@ -291,14 +291,14 @@ class FreeplayState extends MusicBeatSubState
|
|||
stickerSubState.degenStickers();
|
||||
}
|
||||
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
// Updating Discord Rich Presence
|
||||
DiscordClient.changePresence('In the Menus', null);
|
||||
#end
|
||||
|
||||
var isDebug:Bool = false;
|
||||
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
isDebug = true;
|
||||
#end
|
||||
|
||||
|
@ -871,7 +871,7 @@ class FreeplayState extends MusicBeatSubState
|
|||
return str.songName.toLowerCase().startsWith(songFilter.filterData ?? '');
|
||||
});
|
||||
case ALL:
|
||||
// no filter!
|
||||
// no filter!
|
||||
case FAVORITE:
|
||||
songsToFilter = songsToFilter.filter(str -> {
|
||||
if (str == null) return true; // Random
|
||||
|
@ -1198,7 +1198,7 @@ class FreeplayState extends MusicBeatSubState
|
|||
{
|
||||
super.update(elapsed);
|
||||
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
if (FlxG.keys.justPressed.T)
|
||||
{
|
||||
rankAnimStart(fromResultsParams ??
|
||||
|
@ -1772,7 +1772,7 @@ class FreeplayState extends MusicBeatSubState
|
|||
var targetInstId:String = baseInstrumentalId;
|
||||
|
||||
// TODO: Make this a UI element.
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
if (altInstrumentalIds.length > 0 && FlxG.keys.pressed.CONTROL)
|
||||
{
|
||||
targetInstId = altInstrumentalIds[0];
|
||||
|
@ -1833,7 +1833,7 @@ class FreeplayState extends MusicBeatSubState
|
|||
practiceMode: false,
|
||||
minimalMode: false,
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
botPlayMode: FlxG.keys.pressed.SHIFT,
|
||||
#else
|
||||
botPlayMode: false,
|
||||
|
@ -1942,7 +1942,7 @@ class FreeplayState extends MusicBeatSubState
|
|||
var instSuffix:String = baseInstrumentalId;
|
||||
|
||||
// TODO: Make this a UI element.
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
if (altInstrumentalIds.length > 0 && FlxG.keys.pressed.CONTROL)
|
||||
{
|
||||
instSuffix = altInstrumentalIds[0];
|
||||
|
|
|
@ -27,7 +27,7 @@ import funkin.ui.title.TitleState;
|
|||
import funkin.ui.story.StoryMenuState;
|
||||
import funkin.ui.Prompt;
|
||||
import funkin.util.WindowUtil;
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
import Discord.DiscordClient;
|
||||
#end
|
||||
#if newgrounds
|
||||
|
@ -54,7 +54,7 @@ class MainMenuState extends MusicBeatState
|
|||
|
||||
override function create():Void
|
||||
{
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
// Updating Discord Rich Presence
|
||||
DiscordClient.changePresence("In the Menus", null);
|
||||
#end
|
||||
|
@ -344,7 +344,7 @@ class MainMenuState extends MusicBeatState
|
|||
}
|
||||
}
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
// Open the debug menu, defaults to ` / ~
|
||||
if (controls.DEBUG_MENU)
|
||||
{
|
||||
|
|
|
@ -216,7 +216,7 @@ class StoryMenuState extends MusicBeatState
|
|||
changeLevel();
|
||||
refresh();
|
||||
|
||||
#if discord_rpc
|
||||
#if FEATURE_DISCORD_RPC
|
||||
// Updating Discord Rich Presence
|
||||
DiscordClient.changePresence('In the Menus', null);
|
||||
#end
|
||||
|
|
|
@ -174,7 +174,7 @@ class LoadingState extends MusicBeatSubState
|
|||
FlxG.watch.addQuick('percentage?', callbacks.numRemaining / callbacks.length);
|
||||
}
|
||||
|
||||
#if debug
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
if (FlxG.keys.justPressed.SPACE) trace('fired: ' + callbacks.getFired() + ' unfired:' + callbacks.getUnfired());
|
||||
#end
|
||||
}
|
||||
|
|
|
@ -41,9 +41,9 @@ class Constants
|
|||
* A suffix to add to the game version.
|
||||
* Add a suffix to prototype builds and remove it for releases.
|
||||
*/
|
||||
public static final VERSION_SUFFIX:String = #if (DEBUG || FORCE_DEBUG_VERSION) ' PROTOTYPE' #else '' #end;
|
||||
public static final VERSION_SUFFIX:String = #if FEATURE_DEBUG_FUNCTIONS ' PROTOTYPE' #else '' #end;
|
||||
|
||||
#if (debug || FORCE_DEBUG_VERSION)
|
||||
#if FEATURE_DEBUG_FUNCTIONS
|
||||
static function get_VERSION():String
|
||||
{
|
||||
return 'v${Application.current.meta.get('version')} (${GIT_BRANCH} : ${GIT_HASH}${GIT_HAS_LOCAL_CHANGES ? ' : MODIFIED' : ''})' + VERSION_SUFFIX;
|
||||
|
@ -384,11 +384,7 @@ class Constants
|
|||
* 1 = The preloader waits for 1 second before moving to the next step.
|
||||
* The progress bare is automatically rescaled to match.
|
||||
*/
|
||||
#if debug
|
||||
public static final PRELOADER_MIN_STAGE_TIME:Float = 0.0;
|
||||
#else
|
||||
public static final PRELOADER_MIN_STAGE_TIME:Float = 0.1;
|
||||
#end
|
||||
|
||||
/**
|
||||
* HEALTH VALUES
|
||||
|
|
Loading…
Reference in a new issue