Merge branch 'master' of https://github.com/KadeDev/Kade-Engine
This commit is contained in:
commit
0bb2c88c7e
@ -9,7 +9,7 @@ install:
|
||||
- cd /home/appveyor
|
||||
- sudo add-apt-repository ppa:haxe/releases -y
|
||||
- sudo apt update
|
||||
- sudo apt install neko tar gcc-multilib g++-multilib -y
|
||||
- sudo apt install neko tar gcc-7 g++-7 gcc-7-multilib g++-7-multilib -y
|
||||
- wget https://github.com/HaxeFoundation/haxe/releases/download/4.1.5/haxe-4.1.5-linux64.tar.gz
|
||||
- mkdir $HAXE_INSTALLDIR
|
||||
- tar -xf haxe-4.1.5-linux64.tar.gz -C $HAXE_INSTALLDIR
|
||||
|
@ -37,8 +37,9 @@ install:
|
||||
- haxelib run lime rebuild extension-webm windows
|
||||
- haxelib install linc_luajit
|
||||
- haxelib install actuate
|
||||
- haxelib git extension-webm https://github.com/KadeDev/extension-webm
|
||||
- lime rebuild extension-webm windows
|
||||
#- haxelib git extension-webm https://github.com/KadeDev/extension-webm
|
||||
#- haxelib run lime rebuild extension-webm windows
|
||||
#why here's dublicate lmao
|
||||
- haxelib list
|
||||
|
||||
# No tests idk lol
|
||||
|
@ -1,4 +1,4 @@
|
||||
Tutorial:gf:1
|
||||
Tutorial:gf:0
|
||||
Bopeebo:dad:1
|
||||
Fresh:dad:1
|
||||
Dad Battle:dad:1
|
||||
|
@ -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']
|
||||
|
||||
];
|
||||
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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)
|
||||
|
@ -166,7 +166,7 @@ class Note extends FlxSprite
|
||||
|
||||
x -= width / 2;
|
||||
|
||||
if (PlayState.curStage.startsWith('school'))
|
||||
if (noteTypeCheck == 'pixel')
|
||||
x += 30;
|
||||
|
||||
if (prevNote.isSustainNote)
|
||||
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
@ -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.")
|
||||
])
|
||||
|
||||
];
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user