diff --git a/source/CreditsPopUp.hx b/source/CreditsPopUp.hx index beddf7659fb..e98f1cf8541 100644 --- a/source/CreditsPopUp.hx +++ b/source/CreditsPopUp.hx @@ -22,15 +22,13 @@ class CreditsPopUp extends FlxSpriteGroup public var funnyText:FlxText; var curHeading:SongHeading; - public function new(x:Float, y:Float) + public function new(x:Float, y:Float, title:String = '', songCreator:String = '') { super(x, y); bg = new FlxSprite().makeGraphic(400, 50, FlxColor.WHITE); add(bg); - var songCreator:String = ''; var headingPath:SongHeading = null; - songCreator = PlayState.SONG.songCredit; headingPath = {path: 'JSEHeading', antiAliasing: false, iconOffset: 0}; if (headingPath != null) @@ -39,7 +37,7 @@ class CreditsPopUp extends FlxSpriteGroup bg.antialiasing = headingPath.antiAliasing; curHeading = headingPath; } - createHeadingText("Song by" + ' ' + songCreator); + createHeadingText(title + "\nComposed by" + ' ' + songCreator); if (PlayState.instance != null) bg.color = FlxColor.fromRGB(PlayState.instance.dad.healthColorArray[0], PlayState.instance.dad.healthColorArray[1], PlayState.instance.dad.healthColorArray[2]); rescaleBG(); diff --git a/source/PlayState.hx b/source/PlayState.hx index 130831264a6..f0f8fe41a11 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -3750,9 +3750,9 @@ class PlayState extends MusicBeatState }); FlxG.sound.play(Paths.sound('introGo' + introSoundsSuffix), 0.6); case 4: - if (SONG.songCredit != null) + if (SONG.songCredit != null && SONG.songCredit != '') { - var creditsPopup:CreditsPopUp = new CreditsPopUp(FlxG.width, 200); + var creditsPopup:CreditsPopUp = new CreditsPopUp(FlxG.width, 200, SONG.song, SONG.songCredit); creditsPopup.camera = camHUD; creditsPopup.scrollFactor.set(); creditsPopup.x = creditsPopup.width * -1; @@ -5027,6 +5027,8 @@ if (ClientPrefs.showNPS) { compactUpdateFrame = 0; scoreTxtUpdateFrame = 0; + if (deathCounter < 0) botplayTxt.text = 'DEAR GOD YOU OVERFLOWED THE DEATH COUNTER; + if (shownScore != songScore && ClientPrefs.hudType == 'JS Engine' && Math.abs(shownScore - songScore) >= 10) { shownScore = FlxMath.lerp(shownScore, songScore, 0.4 / (ClientPrefs.framerate / 60)); lerpingScore = true; // Indicate that lerping is in progress @@ -5976,10 +5978,6 @@ if (unspawnNotes[0] != null && (Conductor.songPosition + 1800 / songSpeed) >= fi } daNote.hitByOpponent = true; - if (opponentDrain && health > 0.1 && !practiceMode || opponentDrain && practiceMode) { - health -= daNote.hitHealth * hpDrainLevel * polyphony; - if (ClientPrefs.healthDisplay && !ClientPrefs.hideScore && scoreTxtUpdateFrame <= 4 && scoreTxt != null) updateScore(); - } callOnLuas('opponentNoteHit', [notes.members.indexOf(daNote), Math.abs(daNote.noteData), daNote.noteType, daNote.isSustainNote]); callOnLuas((opponentChart ? 'goodNoteHitFix' : 'opponentNoteHitFix'), [notes.members.indexOf(daNote), Math.abs(daNote.noteData), daNote.noteType, daNote.isSustainNote]); @@ -6003,6 +6001,12 @@ if (unspawnNotes[0] != null && (Conductor.songPosition + 1800 / songSpeed) >= fi daNote.destroy(); } } + if (opponentDrain && health > 0.1 && !practiceMode || opponentDrain && practiceMode) { + health -= daNote.hitHealth * hpDrainLevel * polyphony; + if (ClientPrefs.healthDisplay && !ClientPrefs.hideScore && scoreTxtUpdateFrame <= 4 && scoreTxt != null) updateScore(); + } + if (ClientPrefs.ratingCounter && judgeCountUpdateFrame <= 4) updateRatingCounter(); + if (ClientPrefs.compactNumbers && compactUpdateFrame <= 4) updateCompactNumbers(); } if (ClientPrefs.showcaseMode && !ClientPrefs.charsAndBG) { @@ -6406,6 +6410,22 @@ if (unspawnNotes[0] != null && (Conductor.songPosition + 1800 / songSpeed) >= fi case 'Disable Camera Bop': camZooming = false; + case 'Credits Popup': + { + var creditsPopup:CreditsPopUp = new CreditsPopUp(FlxG.width, 200, value1, value2); + creditsPopup.camera = camHUD; + creditsPopup.scrollFactor.set(); + creditsPopup.x = creditsPopup.width * -1; + add(creditsPopup); + + FlxTween.tween(creditsPopup, {x: 0}, 0.5, {ease: FlxEase.backOut, onComplete: function(tweeen:FlxTween) + { + FlxTween.tween(creditsPopup, {x: creditsPopup.width * -1} , 1, {ease: FlxEase.backIn, onComplete: function(tween:FlxTween) + { + creditsPopup.destroy(); + }, startDelay: 3}); + }}); + } case 'Camera Bopping': var _interval:Int = Std.parseInt(value1); if (Math.isNaN(_interval)) diff --git a/source/editors/ChartingState.hx b/source/editors/ChartingState.hx index 1e84206e761..57921bf5e8e 100644 --- a/source/editors/ChartingState.hx +++ b/source/editors/ChartingState.hx @@ -98,6 +98,7 @@ class ChartingState extends MusicBeatState ['Alt Idle Animation', "Sets a specified suffix after the idle animation name.\nYou can use this to trigger 'idle-alt' if you set\nValue 2 to -alt\n\nValue 1: Character to set (Dad, BF or GF)\nValue 2: New suffix (Leave it blank to disable)"], ['Enable Camera Bop', "Enables camera bopping. Useful if you don't want the\nopponent to hit a note, but you want camera bouncing."], ['Disable Camera Bop', "Same thing as 'Enable Camera Bopping', but disables it\ninstead."], + ['Credits Popup', "Makes some credits pop up. \n\nValue 1: The title. \nValue 2: The composer(s)"], ['Screen Shake', "Value 1: Camera shake\nValue 2: HUD shake\n\nEvery value works as the following example: \"1, 0.05\".\nThe first number (1) is the duration.\nThe second number (0.05) is the intensity."], ['Camera Bopping', "Makes the camera do funny bopping\n\nValue 1: Bopping Speed (how many beats you want before it bops)\nValue 2: Bopping Intensity (how hard you want it to bop, default is 1)\n\nTo reset camera bopping, place a new event and put both values as '4' and '1' respectively."], ['Change Note Multiplier', "Changes the amount of notes played every time you hit a note.\n\nValue 1: Note Multiplier that you want."],