1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-23 15:26:06 +00:00

Merge branch 'master' into master

This commit is contained in:
Cameron Taylor 2020-11-25 00:22:22 -08:00 committed by GitHub
commit ef3fa33717
7 changed files with 30 additions and 11 deletions

View file

@ -3,7 +3,7 @@
<!-- _________________________ Application Settings _________________________ -->
<app title="Friday Night Funkin" file="Funkin" packageName="com.ninjamuffin99.funkin" main="Main" version="0.2.2" company="ninjamuffin99" />
<!--Switch Export with Unique ApplicationID and Icon-->
<set name="APP_ID" value="0x0100f6c013bbc000" />
@ -42,13 +42,16 @@
<assets path="assets/images" />
<assets path="assets/data" />
<assets path="assets/music" include="*.mp3" if="web" />
<assets path="assets/music" include="*.ogg" unless="web" />
<!-- <library name="noPreload" preload='false'/> -->
<!-- <library name="noPreload"/> -->
<assets path="assets/music" include="*.mp3" if="web"/>
<assets path="assets/music" include="*.ogg" unless="web"/>
<assets path="assets/sounds" include="*.mp3" if="web" />
<assets path="assets/sounds" include="*.ogg" unless="web" />
<assets path="CHANGELOG.md"/>
<assets path="assets/fonts/vcr.ttf" embed="true" />
<!-- _______________________________ Libraries ______________________________ -->
@ -62,7 +65,8 @@
<!--In case you want to use the ui package-->
<haxelib name="flixel-ui" />
<haxelib name="newgrounds" />
<haxelib name="faxe" />
<haxelib name="faxe" if='switch'/>
<!-- <haxelib name="markdown" /> -->
<!-- <haxelib name="HtmlParser" /> -->
@ -106,6 +110,7 @@
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
<icon path="art/icon.png" />
<!-- <haxedef name="SKIP_TO_PLAYSTATE" if="debug" /> -->
<haxedef name="NG_LOGIN" if="newgrounds" />

View file

@ -180,10 +180,12 @@ class FreeplayState extends MusicBeatState
if (curDifficulty > 2)
curDifficulty = 0;
#if !switch
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
#end
switch (curDifficulty)
{
case 0:
@ -197,6 +199,7 @@ class FreeplayState extends MusicBeatState
function changeSelection(change:Int = 0)
{
#if !switch
NGio.logEvent('Fresh');
#end
@ -213,11 +216,13 @@ class FreeplayState extends MusicBeatState
// selector.y = (70 * curSelected) + 30;
#if !switch
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
// lerpScore = 0;
#end
FlxG.sound.playMusic('assets/music/' + songs[curSelected] + "_Inst" + TitleState.soundExt, 0);
var bullShit:Int = 0;

View file

@ -10,14 +10,17 @@ class Highscore
public static var songScores:Map<String, Int> = new Map<String, Int>();
#end
public static function saveScore(song:String, score:Int = 0, ?diff:Int = 0):Void
{
var daSong:String = formatSong(song, diff);
#if !switch
NGio.postScore(score, song);
#end
if (songScores.exists(daSong))
{
if (songScores.get(daSong) < score)
@ -29,10 +32,12 @@ class Highscore
public static function saveWeekScore(week:Int = 1, score:Int = 0, ?diff:Int = 0):Void
{
#if !switch
NGio.postScore(score, "Week " + week);
#end
var daWeek:String = formatSong('week' + week, diff);
if (songScores.exists(daWeek))

View file

@ -116,8 +116,10 @@ class MainMenuState extends MusicBeatState
#if linux
Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
#else
FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
#end
}
else
{
@ -151,7 +153,9 @@ class MainMenuState extends MusicBeatState
trace("Story Menu Selected");
case 'freeplay':
FlxG.switchState(new FreeplayState());
trace("Freeplay Menu Selected");
case 'options':
FlxG.switchState(new OptionsMenu());
}

View file

@ -598,9 +598,6 @@ class PlayState extends MusicBeatState
{
super.update(elapsed);
trace("FlxG.sound.music.time: " + FlxG.sound.music.time);
trace("Conductor.songPosition: " + Conductor.songPosition);
scoreTxt.text = "Score:" + songScore;
if (FlxG.keys.justPressed.ENTER && startedCountdown && canPause)
@ -854,6 +851,7 @@ class PlayState extends MusicBeatState
{
canPause = false;
#if !switch
Highscore.saveScore(SONG.song, songScore, storyDifficulty);
#end
@ -872,10 +870,9 @@ class PlayState extends MusicBeatState
StoryMenuState.weekUnlocked[2] = true;
#if !switch
NGio.unlockMedal(60961);
Highscore.saveWeekScore(storyWeek, campaignScore, storyDifficulty);
#end
FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked;
FlxG.save.flush();

View file

@ -296,6 +296,7 @@ class StoryMenuState extends MusicBeatState
// USING THESE WEIRD VALUES SO THAT IT DOESNT FLOAT UP
sprDifficulty.y = leftArrow.y - 15;
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
#if !switch
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
@ -351,9 +352,10 @@ class StoryMenuState extends MusicBeatState
txtTracklist.screenCenter(X);
txtTracklist.x -= FlxG.width * 0.35;
#if !switch
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
#end
}
}

View file

@ -51,7 +51,8 @@ class TitleState extends MusicBeatState
super.create();
#if (web && !debug && NG_LOGIN)
#if (!switch && !debug && NG_LOGIN)
var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey);
#end