Merge branch 'KadeDev:master' into master

This commit is contained in:
CyndaquilDAC 2021-07-01 14:25:08 -05:00 committed by GitHub
commit 530668b66b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 331 additions and 172 deletions

View File

@ -1,4 +1,4 @@
Tutorial:gf:1
Tutorial:gf:0
Bopeebo:dad:1
Fresh:dad:1
Dad Battle:dad:1

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 692 KiB

View File

@ -1,92 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="NOTE_assets.png">
<!-- Created with Adobe Animate version 21.0.0.35450 -->
<!-- Created with Adobe Animate version 21.0.7.42652 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="arrow static instance 10000" x="488" y="238" width="155" height="158"/>
<SubTexture name="arrow static instance 20000" x="647" y="238" width="157" height="155"/>
<SubTexture name="arrow static instance 30000" x="808" y="238" width="155" height="157"/>
<SubTexture name="arrow static instance 40000" x="323" y="240" width="157" height="154"/>
<SubTexture name="blue hold end instance 10000" x="1062" y="452" width="51" height="64"/>
<SubTexture name="blue hold piece instance 10000" x="1282" y="457" width="51" height="44"/>
<SubTexture name="blue instance 10000" x="0" y="240" width="158" height="154"/>
<SubTexture name="down confirm instance 10000" x="0" y="0" width="240" height="236"/>
<SubTexture name="down confirm instance 10001" x="244" y="0" width="240" height="236"/>
<SubTexture name="down confirm instance 10002" x="1206" y="235" width="221" height="218" frameX="-6" frameY="-12" frameWidth="240" frameHeight="236"/>
<SubTexture name="down confirm instance 10003" x="1206" y="235" width="221" height="218" frameX="-6" frameY="-12" frameWidth="240" frameHeight="236"/>
<SubTexture name="down press instance 10000" x="805" y="399" width="143" height="139" frameX="-4" frameY="-3" frameWidth="150" frameHeight="146"/>
<SubTexture name="down press instance 10001" x="805" y="399" width="143" height="139" frameX="-4" frameY="-3" frameWidth="150" frameHeight="146"/>
<SubTexture name="down press instance 10002" x="1898" y="0" width="150" height="146"/>
<SubTexture name="down press instance 10003" x="1898" y="0" width="150" height="146"/>
<SubTexture name="green hold end instance 10000" x="1007" y="452" width="51" height="64"/>
<SubTexture name="green hold piece instance 10000" x="1227" y="457" width="51" height="44"/>
<SubTexture name="green instance 10000" x="162" y="240" width="157" height="154"/>
<SubTexture name="left confirm instance 10000" x="972" y="0" width="230" height="232"/>
<SubTexture name="left confirm instance 10001" x="1438" y="233" width="220" height="222" frameX="-5" frameY="-5" frameWidth="230" frameHeight="232"/>
<SubTexture name="left confirm instance 10002" x="1438" y="0" width="227" height="229" frameX="-2" frameY="-1" frameWidth="230" frameHeight="232"/>
<SubTexture name="left confirm instance 10003" x="1438" y="0" width="227" height="229" frameX="-2" frameY="-1" frameWidth="230" frameHeight="232"/>
<SubTexture name="left press instance 10000" x="1898" y="449" width="139" height="142" frameX="-4" frameY="-3" frameWidth="146" frameHeight="149"/>
<SubTexture name="left press instance 10001" x="1898" y="449" width="139" height="142" frameX="-4" frameY="-3" frameWidth="146" frameHeight="149"/>
<SubTexture name="left press instance 10002" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10003" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10004" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10005" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10006" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10007" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10008" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10009" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10010" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10011" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10012" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10013" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10014" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10015" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10016" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10017" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10018" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press instance 10019" x="1898" y="150" width="146" height="149"/>
<SubTexture name="pruple end hold instance 10000" x="1117" y="452" width="51" height="64"/>
<SubTexture name="purple hold piece instance 10000" x="1337" y="457" width="51" height="44"/>
<SubTexture name="purple instance 10000" x="0" y="398" width="154" height="157"/>
<SubTexture name="red hold end instance 10000" x="952" y="452" width="51" height="64"/>
<SubTexture name="red hold piece instance 10000" x="1172" y="457" width="51" height="44"/>
<SubTexture name="red instance 10000" x="647" y="397" width="154" height="157"/>
<SubTexture name="right confirm instance 10000" x="1669" y="0" width="225" height="228" frameX="-1" frameY="-2" frameWidth="228" frameHeight="231"/>
<SubTexture name="right confirm instance 10001" x="1669" y="232" width="225" height="228" frameX="-1" frameY="-2" frameWidth="228" frameHeight="231"/>
<SubTexture name="right confirm instance 10002" x="1206" y="0" width="228" height="231"/>
<SubTexture name="right confirm instance 10003" x="1206" y="0" width="228" height="231"/>
<SubTexture name="right press instance 10000" x="469" y="400" width="139" height="142" frameX="-3" frameY="-7" frameWidth="149" frameHeight="152"/>
<SubTexture name="right press instance 10001" x="469" y="400" width="139" height="142" frameX="-3" frameY="-7" frameWidth="149" frameHeight="152"/>
<SubTexture name="right press instance 10002" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10003" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10004" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10005" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10006" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10007" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10008" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10009" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10010" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10011" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10012" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10013" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10014" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10015" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10016" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10017" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10018" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10019" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10020" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10021" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10022" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10023" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10024" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10025" x="316" y="398" width="149" height="152"/>
<SubTexture name="right press instance 10026" x="316" y="398" width="149" height="152"/>
<SubTexture name="up confirm instance 10000" x="488" y="0" width="238" height="234"/>
<SubTexture name="up confirm instance 10001" x="730" y="0" width="238" height="234"/>
<SubTexture name="up confirm instance 10002" x="972" y="236" width="216" height="212" frameX="-11" frameY="-11" frameWidth="238" frameHeight="234"/>
<SubTexture name="up confirm instance 10003" x="972" y="236" width="216" height="212" frameX="-11" frameY="-11" frameWidth="238" frameHeight="234"/>
<SubTexture name="up press instance 10000" x="1898" y="303" width="144" height="142" frameX="-6" frameY="-4" frameWidth="154" frameHeight="151"/>
<SubTexture name="up press instance 10001" x="1898" y="303" width="144" height="142" frameX="-6" frameY="-4" frameWidth="154" frameHeight="151"/>
<SubTexture name="up press instance 10002" x="158" y="398" width="154" height="151"/>
<SubTexture name="up press instance 10003" x="158" y="398" width="154" height="151"/>
</TextureAtlas>
<SubTexture name="Blue Active0000" x="5" y="5" width="157" height="154"/>
<SubTexture name="Green Active0000" x="172" y="5" width="157" height="154"/>
<SubTexture name="Purple Active0000" x="339" y="5" width="154" height="157"/>
<SubTexture name="Red Active0000" x="503" y="5" width="154" height="157"/>
<SubTexture name="arrowDOWN0000" x="1809" y="5" width="157" height="154"/>
<SubTexture name="arrowLEFT0000" x="5" y="172" width="155" height="156"/>
<SubTexture name="arrowRIGHT0000" x="170" y="172" width="154" height="157"/>
<SubTexture name="arrowUP0000" x="334" y="172" width="157" height="154"/>
<SubTexture name="blue0000" x="667" y="5" width="157" height="154"/>
<SubTexture name="blue hold end0000" x="834" y="5" width="50" height="64"/>
<SubTexture name="blue hold piece0000" x="894" y="5" width="50" height="44"/>
<SubTexture name="down confirm0000" x="501" y="172" width="244" height="240"/>
<SubTexture name="down confirm0001" x="755" y="172" width="244" height="240"/>
<SubTexture name="down confirm0002" x="1009" y="172" width="214" height="210" frameX="-15" frameY="-15" frameWidth="244" frameHeight="240"/>
<SubTexture name="down press0000" x="1233" y="172" width="142" height="140" frameX="-4" frameY="-2" frameWidth="149" frameHeight="146"/>
<SubTexture name="down press0001" x="1233" y="172" width="142" height="140" frameX="-4" frameY="-2" frameWidth="149" frameHeight="146"/>
<SubTexture name="down press0002" x="1385" y="172" width="149" height="146"/>
<SubTexture name="green0000" x="954" y="5" width="157" height="154"/>
<SubTexture name="green hold end0000" x="1121" y="5" width="50" height="64"/>
<SubTexture name="green hold piece0000" x="1181" y="5" width="50" height="44"/>
<SubTexture name="left confirm0000" x="1544" y="172" width="231" height="235"/>
<SubTexture name="left confirm0001" x="1785" y="172" width="231" height="235"/>
<SubTexture name="left confirm0002" x="5" y="422" width="210" height="214" frameX="-11" frameY="-12" frameWidth="231" frameHeight="235"/>
<SubTexture name="left press0000" x="225" y="422" width="140" height="142" frameX="-3" frameY="-3" frameWidth="146" frameHeight="149"/>
<SubTexture name="left press0001" x="225" y="422" width="140" height="142" frameX="-3" frameY="-3" frameWidth="146" frameHeight="149"/>
<SubTexture name="left press0002" x="375" y="422" width="146" height="149"/>
<SubTexture name="pruple end hold0000" x="1241" y="5" width="50" height="64"/>
<SubTexture name="purple0000" x="1301" y="5" width="154" height="157"/>
<SubTexture name="purple hold piece0000" x="1465" y="5" width="50" height="44"/>
<SubTexture name="red0000" x="1525" y="5" width="154" height="157"/>
<SubTexture name="red hold end0000" x="1689" y="5" width="50" height="64"/>
<SubTexture name="red hold piece0000" x="1749" y="5" width="50" height="44"/>
<SubTexture name="right confirm0000" x="531" y="422" width="237" height="241"/>
<SubTexture name="right confirm0001" x="778" y="422" width="237" height="241"/>
<SubTexture name="right confirm0002" x="1025" y="422" width="210" height="214" frameX="-13" frameY="-14" frameWidth="237" frameHeight="241"/>
<SubTexture name="right press0000" x="1245" y="422" width="138" height="141" frameX="-3" frameY="-7" frameWidth="148" frameHeight="151"/>
<SubTexture name="right press0001" x="1245" y="422" width="138" height="141" frameX="-3" frameY="-7" frameWidth="148" frameHeight="151"/>
<SubTexture name="right press0002" x="1393" y="422" width="148" height="151"/>
<SubTexture name="up confirm0000" x="1551" y="422" width="238" height="234"/>
<SubTexture name="up confirm0001" x="1799" y="422" width="238" height="234"/>
<SubTexture name="up confirm0002" x="5" y="673" width="212" height="209" frameX="-13" frameY="-12" frameWidth="238" frameHeight="234"/>
<SubTexture name="up press0000" x="227" y="673" width="144" height="141" frameX="-5" frameY="-4" frameWidth="153" frameHeight="150"/>
<SubTexture name="up press0001" x="227" y="673" width="144" height="141" frameX="-5" frameY="-4" frameWidth="153" frameHeight="150"/>
<SubTexture name="up press0002" x="381" y="673" width="153" height="150"/>
</TextureAtlas>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -15,8 +15,10 @@ Scroll down to Line 26, or Search (Windows/Linux: `Ctrl+F`, Mac: `Cmd+F`) for "w
---
```haxe
var weekData:Array<Dynamic> = [
static function weekData():Array<Dynamic>
{
return [
['Tutorial'],
['Bopeebo', 'Fresh', 'Dadbattle'],
@ -30,8 +32,9 @@ var weekData:Array<Dynamic> = [
['Cocoa', 'Eggnog', 'Winter-Horrorland'],
['Senpai', 'Roses', 'Thorns']
];
];
}
```
---
@ -45,8 +48,10 @@ Example
---
```haxe
var weekData:Array<Dynamic> = [
static function weekData():Array<Dynamic>
{
return [
['Tutorial'],
['Bopeebo', 'Fresh', 'Dadbattle'],
@ -58,12 +63,13 @@ var weekData:Array<Dynamic> = [
['Satin-Panties', "High", "Milf"],
['Cocoa', 'Eggnog', 'Winter-Horrorland'],
['Senpai', 'Roses', 'Thorns'],
['Ugh', 'Guns', 'Stress']
];
];
}
```
---

View File

@ -155,7 +155,7 @@ class DialogueBox extends FlxSpriteGroup
portraitLeft.visible = false;
if (PlayState.SONG.song.toLowerCase() == 'thorns')
{
portraitLeft.color = FlxColor.BLACK;
portraitLeft.visible = false;
swagDialogue.color = FlxColor.WHITE;
dropText.color = FlxColor.BLACK;
}

View File

@ -32,51 +32,99 @@ class DiffCalc
gottaHitNote = !i.mustHitSection;
if (gottaHitNote)
cleanedNotes.push(new SmallNote(ii[0],ii[1]));
cleanedNotes.push(new SmallNote(ii[0],Math.floor(Math.abs(ii[1]))));
}
}
var handOne:Array<SmallNote> = [];
var handTwo:Array<SmallNote> = [];
cleanedNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime));
var firstNoteTime = cleanedNotes[0].strumTime;
// normalize the notes
for(i in cleanedNotes)
{
i.strumTime = (i.strumTime - firstNoteTime) * 2;
}
for (i in cleanedNotes)
{
switch(i.noteData)
{
case 0:
handOne.push(i);
case 1:
handTwo.push(i);
case 2:
handTwo.push(i);
case 3:
handOne.push(i);
}
}
// length in segments of the song
var length = ((cleanedNotes[cleanedNotes.length - 1].strumTime / 1000) / 0.5);
// hackey way of creating a array with a length
var segments:Array<Int> = new_Array(1,Std.int(length));
var segmentsOne:Array<Int> = new_Array(1,Std.int(length));
var segmentsTwo:Array<Int> = new_Array(1,Std.int(length));
// algo loop
for(i in cleanedNotes)
for(i in handOne)
{
var index = Std.int(((i.strumTime / 1000)));
if (index + 1 > segments.length)
if (index + 1 > segmentsOne.length)
continue;
segments[index] = segments[index] + 1;
segmentsOne[index] = segmentsOne[index] + 1;
}
for(i in handTwo)
{
var index = Std.int(((i.strumTime / 1000)));
if (index + 1 > segmentsTwo.length)
continue;
segmentsTwo[index] = segmentsTwo[index] + 1;
}
// get the average of all of the segments
var sum:Float = 0;
var sumOne:Float = 0;
var sumTwo:Float = 0;
var newLength = segments.length;
for (i in segments)
var lone = segmentsOne.length;
var ltwo = segmentsOne.length;
for (i in segmentsOne)
{
if (i == 0) // remove empty/breaks
{
newLength--;
lone--;
continue;
}
//trace(i);
sum += i / .5; // half it because otherwise instead of nps its just fucking notes per half second which is dumb and stupid
sumOne += i / .5; // half it because otherwise instead of nps its just fucking notes per half second which is dumb and stupid
}
return HelperFunctions.truncateFloat(sum / newLength,2);
for (i in segmentsTwo)
{
if (i == 0) // remove empty/breaks
{
ltwo--;
continue;
}
//trace(i);
sumTwo += i / .5; // half it because otherwise instead of nps its just fucking notes per half second which is dumb and stupid
}
var handOneAvg = sumOne / lone;
var handTwoAvg = sumTwo / ltwo;
return HelperFunctions.truncateFloat(handOneAvg > handTwoAvg ? handOneAvg : handTwoAvg,2);
}
static public function new_Array<T>( ArrayType:T, Length:Int ):Array<T> {

View File

@ -64,20 +64,22 @@ class FreeplayState extends MusicBeatState
{
var data:Array<String> = initSonglist[i].split(':');
var meta = new SongMetadata(data[0], Std.parseInt(data[2]), data[1]);
songs.push(meta);
var format = StringTools.replace(meta.songName, " ", "-");
switch (format) {
case 'Dad-Battle': format = 'Dadbattle';
case 'Philly-Nice': format = 'Philly';
}
if(Std.parseInt(data[2]) <= FlxG.save.data.weekUnlocked - 1)
{
songs.push(meta);
var format = StringTools.replace(meta.songName, " ", "-");
switch (format) {
case 'Dad-Battle': format = 'Dadbattle';
case 'Philly-Nice': format = 'Philly';
}
var diffs = [];
FreeplayState.loadDiff(0,format,meta.songName,diffs);
FreeplayState.loadDiff(1,format,meta.songName,diffs);
FreeplayState.loadDiff(2,format,meta.songName,diffs);
FreeplayState.songData.set(meta.songName,diffs);
trace('loaded diffs for ' + meta.songName);
//diffList += meta.songName + "\nEasy: " + DiffCalc.CalculateDiff(songData.get(meta.songName)[0]) + "\nNormal: " + DiffCalc.CalculateDiff(songData.get(meta.songName)[1]) + "\nHard: " + DiffCalc.CalculateDiff(songData.get(meta.songName)[2]) + "\n\n";
var diffs = [];
FreeplayState.loadDiff(0,format,meta.songName,diffs);
FreeplayState.loadDiff(1,format,meta.songName,diffs);
FreeplayState.loadDiff(2,format,meta.songName,diffs);
FreeplayState.songData.set(meta.songName,diffs);
trace('loaded diffs for ' + meta.songName);
}
}
//trace("\n" + diffList);
@ -300,6 +302,10 @@ class FreeplayState extends MusicBeatState
function changeDiff(change:Int = 0)
{
if (songs[curSelected += change] == null)
return;
curDifficulty += change;
if (curDifficulty < 0)
@ -331,6 +337,9 @@ class FreeplayState extends MusicBeatState
// NGio.logEvent('Fresh');
FlxG.sound.play(Paths.sound('scrollMenu'), 0.4);
if (songs[curSelected += change] == null)
return;
curSelected += change;
if (curSelected < 0)

View File

@ -6,7 +6,10 @@ class KadeEngineData
{
public static function initSave()
{
if (FlxG.save.data.newInput == null)
if (FlxG.save.data.weekUnlocked == null)
FlxG.save.data.weekUnlocked = 7;
if (FlxG.save.data.newInput == null)
FlxG.save.data.newInput = true;
if (FlxG.save.data.downscroll == null)

View File

@ -23,7 +23,7 @@ class Main extends Sprite
var skipSplash:Bool = true; // Whether to skip the flixel splash screen that appears in release mode.
var startFullscreen:Bool = false; // Whether to start the game in fullscreen on desktop targets
public static var watermarks = true; // Whether to put Kade Engine liteartly anywhere
public static var watermarks = true; // Whether to put Kade Engine literally anywhere
// You can pretty much ignore everything from here on - your code should go in your states.

View File

@ -250,7 +250,7 @@ class ModchartState
PlayState.instance.removeObject(PlayState.boyfriend);
PlayState.boyfriend = new Boyfriend(oldboyfriendx, oldboyfriendy, id);
PlayState.instance.addObject(PlayState.boyfriend);
PlayState.instance.iconP2.animation.play(id);
PlayState.instance.iconP1.animation.play(id);
}
function makeAnimatedLuaSprite(spritePath:String,names:Array<String>,prefixes:Array<String>,startAnim:String, id:String)

View File

@ -166,7 +166,7 @@ class Note extends FlxSprite
x -= width / 2;
if (PlayState.curStage.startsWith('school'))
if (noteTypeCheck == 'pixel')
x += 30;
if (prevNote.isSustainNote)

View File

@ -698,3 +698,127 @@ class CamZoomOption extends Option
return "Camera Zoom " + (!FlxG.save.data.camzoom ? "off" : "on");
}
}
class LockWeeksOption extends Option
{
var confirm:Bool = false;
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
if(!confirm)
{
confirm = true;
display = updateDisplay();
return true;
}
FlxG.save.data.weekUnlocked = 1;
StoryMenuState.weekUnlocked = [true, true];
trace('Weeks Locked');
display = updateDisplay();
return true;
}
private override function updateDisplay():String
{
return confirm ? "Confirm Story Reset" : "Reset Story Progress";
}
}
class ResetScoreOption extends Option
{
var confirm:Bool = false;
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
if(!confirm)
{
confirm = true;
display = updateDisplay();
return true;
}
FlxG.save.data.songScores = null;
for(key in Highscore.songScores.keys())
{
Highscore.songScores[key] = 0;
}
FlxG.save.data.songCombos = null;
for(key in Highscore.songCombos.keys())
{
Highscore.songCombos[key] = '';
}
confirm = false;
trace('Highscores Wiped');
display = updateDisplay();
return true;
}
private override function updateDisplay():String
{
return confirm ? "Confirm Score Reset" : "Reset Score";
}
}
class ResetSettings extends Option
{
var confirm:Bool = false;
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
if(!confirm)
{
confirm = true;
display = updateDisplay();
return true;
}
FlxG.save.data.weekUnlocked = null;
FlxG.save.data.newInput = null;
FlxG.save.data.downscroll = null;
FlxG.save.data.dfjk = null;
FlxG.save.data.accuracyDisplay = null;
FlxG.save.data.offset = null;
FlxG.save.data.songPosition = null;
FlxG.save.data.fps = null;
FlxG.save.data.changedHit = null;
FlxG.save.data.fpsRain = null;
FlxG.save.data.fpsCap = null;
FlxG.save.data.scrollSpeed = null;
FlxG.save.data.npsDisplay = null;
FlxG.save.data.frames = null;
FlxG.save.data.accuracyMod = null;
FlxG.save.data.watermark = null;
FlxG.save.data.ghost = null;
FlxG.save.data.distractions = null;
FlxG.save.data.flashing = null;
FlxG.save.data.resetButton = null;
FlxG.save.data.botplay = null;
FlxG.save.data.cpuStrums = null;
FlxG.save.data.strumline = null;
FlxG.save.data.customStrumLine = null;
FlxG.save.data.camzoom = null;
KadeEngineData.initSave();
confirm = false;
trace('All settings have been reset');
display = updateDisplay();
return true;
}
private override function updateDisplay():String
{
return confirm ? "Confirm Settings Reset" : "Reset Settings";
}
}

View File

@ -61,7 +61,13 @@ class OptionsMenu extends MusicBeatState
new ScoreScreen("Show the score screen after the end of a song"),
new ShowInput("Display every single input in the score screen."),
new Optimization("No backgrounds, no characters, centered notes, no player 2."),
new BotPlay("Showcase your charts and mods with autoplay."),
new BotPlay("Showcase your charts and mods with autoplay.")
]),
new OptionCategory("Manage Save Data", [
new ResetScoreOption("Reset your score on all songs and weeks."),
new LockWeeksOption("Reset your storymode progress. (only Tutorial + Week 1 will be unlocked)"),
new ResetSettings("Reset ALL your settings.")
])
];

View File

@ -2318,18 +2318,12 @@ class PlayState extends MusicBeatState
switch (dad.curCharacter)
{
case 'mom':
case 'mom' | 'mom-car':
camFollow.y = dad.getMidpoint().y;
case 'senpai':
camFollow.y = dad.getMidpoint().y - 430;
camFollow.x = dad.getMidpoint().x - 100;
case 'senpai-angry':
case 'senpai' | 'senpai-angry':
camFollow.y = dad.getMidpoint().y - 430;
camFollow.x = dad.getMidpoint().x - 100;
}
if (dad.curCharacter == 'mom')
vocals.volume = 1;
}
if (PlayState.SONG.notes[Std.int(curStep / 16)].mustHitSection && camFollow.x != boyfriend.getMidpoint().x - 100)
@ -2794,17 +2788,13 @@ class PlayState extends MusicBeatState
}
#end
// if ()
StoryMenuState.weekUnlocked[Std.int(Math.min(storyWeek + 1, StoryMenuState.weekUnlocked.length - 1))] = true;
if (SONG.validScore)
{
NGio.unlockMedal(60961);
Highscore.saveWeekScore(storyWeek, campaignScore, storyDifficulty);
}
FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked;
FlxG.save.flush();
StoryMenuState.unlockNextWeek(storyWeek);
}
else
{

View File

@ -24,18 +24,21 @@ class StoryMenuState extends MusicBeatState
{
var scoreText:FlxText;
var weekData:Array<Dynamic> = [
['Tutorial'],
['Bopeebo', 'Fresh', 'Dad Battle'],
['Spookeez', 'South', "Monster"],
['Pico', 'Philly Nice', "Blammed"],
['Satin Panties', "High", "Milf"],
['Cocoa', 'Eggnog', 'Winter Horrorland'],
['Senpai', 'Roses', 'Thorns']
];
static function weekData():Array<Dynamic>
{
return [
['Tutorial'],
['Bopeebo', 'Fresh', 'Dad Battle'],
['Spookeez', 'South', "Monster"],
['Pico', 'Philly Nice', "Blammed"],
['Satin Panties', "High", "Milf"],
['Cocoa', 'Eggnog', 'Winter Horrorland'],
['Senpai', 'Roses', 'Thorns']
];
}
var curDifficulty:Int = 1;
public static var weekUnlocked:Array<Bool> = [true, true, true, true, true, true, true];
public static var weekUnlocked:Array<Bool> = [];
var weekCharacters:Array<Dynamic> = [
['', 'bf', 'gf'],
@ -73,8 +76,21 @@ class StoryMenuState extends MusicBeatState
var leftArrow:FlxSprite;
var rightArrow:FlxSprite;
function unlockWeeks():Array<Bool>
{
var weeks:Array<Bool> = [true];
for(i in 0...FlxG.save.data.weekUnlocked)
{
weeks.push(true);
}
return weeks;
}
override function create()
{
weekUnlocked = unlockWeeks();
#if windows
// Updating Discord Rich Presence
DiscordClient.changePresence("In the Story Mode Menu", null);
@ -120,7 +136,7 @@ class StoryMenuState extends MusicBeatState
trace("Line 70");
for (i in 0...weekData.length)
for (i in 0...weekData().length)
{
var weekThing:MenuItem = new MenuItem(0, yellowBG.y + yellowBG.height + 10, i);
weekThing.y += ((weekThing.height + 20) * i);
@ -134,6 +150,7 @@ class StoryMenuState extends MusicBeatState
// Needs an offset thingie
if (!weekUnlocked[i])
{
trace('locking week ' + i);
var lock:FlxSprite = new FlxSprite(weekThing.width + 10 + weekThing.x);
lock.frames = ui_tex;
lock.animation.addByPrefix('lock', 'lock');
@ -314,7 +331,7 @@ class StoryMenuState extends MusicBeatState
stopspamming = true;
}
PlayState.storyPlaylist = weekData[curWeek];
PlayState.storyPlaylist = weekData()[curWeek];
PlayState.isStoryMode = true;
selectedWeek = true;
@ -388,10 +405,10 @@ class StoryMenuState extends MusicBeatState
{
curWeek += change;
if (curWeek >= weekData.length)
if (curWeek >= weekData().length)
curWeek = 0;
if (curWeek < 0)
curWeek = weekData.length - 1;
curWeek = weekData().length - 1;
var bullShit:Int = 0;
@ -417,7 +434,7 @@ class StoryMenuState extends MusicBeatState
grpWeekCharacters.members[2].setCharacter(weekCharacters[curWeek][2]);
txtTracklist.text = "Tracks\n";
var stringThing:Array<String> = weekData[curWeek];
var stringThing:Array<String> = weekData()[curWeek];
for (i in stringThing)
txtTracklist.text += "\n" + i;
@ -433,4 +450,16 @@ class StoryMenuState extends MusicBeatState
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
#end
}
public static function unlockNextWeek(week:Int):Void
{
if(week <= weekData().length - 1 && FlxG.save.data.weekUnlocked == week)
{
weekUnlocked.push(true);
trace('Week ' + week + ' beat (Week ' + (week + 1) + ' unlocked)');
}
FlxG.save.data.weekUnlocked = weekUnlocked.length - 1;
FlxG.save.flush();
}
}

View File

@ -102,20 +102,6 @@ class TitleState extends MusicBeatState
Highscore.load();
if (FlxG.save.data.weekUnlocked != null)
{
// FIX LATER!!!
// WEEK UNLOCK PROGRESSION!!
// StoryMenuState.weekUnlocked = FlxG.save.data.weekUnlocked;
if (StoryMenuState.weekUnlocked.length < 4)
StoryMenuState.weekUnlocked.insert(0, true);
// QUICK PATCH OOPS!
if (!StoryMenuState.weekUnlocked[0])
StoryMenuState.weekUnlocked[0] = true;
}
#if FREEPLAY
FlxG.switchState(new FreeplayState());
#elseif CHARTING