Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

Commit

Permalink
2.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SpunBlue committed Jun 8, 2022
1 parent 10c7fe9 commit 4a0001d
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<assets path="dlls/" rename='' if="linux"/>
<assets path="plugins/" rename='' if="windows"/>
<assets path="dlls/" rename='' if="windows"/>
<assets path="include/" rename=''/>
<assets path="include/" rename='' embed="false"/>

<assets path="assets/preload" rename="assets" exclude="*.ogg" if="web"/>
<assets path="assets/preload" rename="assets" exclude="*.mp3" unless="web"/>
Expand Down
2 changes: 1 addition & 1 deletion assets/preload/data/characterList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ senpai-angry
spirit
tankman
bf-holding-gf
picoSpeaker
picoSpeaker
4 changes: 1 addition & 3 deletions include/mods/data/test/events.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
150:setSongSpeed:3.5
170:gfCheer
200:lightningStrike
150:setSongSpeed:2.8
1 change: 0 additions & 1 deletion include/mods/songs.txt

This file was deleted.

5 changes: 5 additions & 0 deletions source/Character.hx
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package;

import openfl.display.Graphics;
import openfl.display.GraphicsPath;
import sys.io.File;
import sys.FileSystem;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.animation.FlxBaseAnimation;
import flixel.graphics.frames.FlxAtlasFrames;
import openfl.display.Graphics;

using StringTools;

Expand Down
10 changes: 10 additions & 0 deletions source/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ class ChartingState extends MusicBeatState
var leftIcon:HealthIcon;
var rightIcon:HealthIcon;

var stepText:FlxText;

override function create()
{
hitSound = new FlxSound();
Expand Down Expand Up @@ -152,6 +154,11 @@ class ChartingState extends MusicBeatState
bpmTxt.scrollFactor.set();
add(bpmTxt);

// current step text
stepText = new FlxText(1000, 150, 0, "", 16);
stepText.scrollFactor.set();
add(stepText);

strumLine = new FlxSprite(0, 50).makeGraphic(Std.int(FlxG.width / 2), 4);
add(strumLine);

Expand Down Expand Up @@ -514,6 +521,9 @@ class ChartingState extends MusicBeatState
}
}

// set step text to current step
stepText.text = "Step: " + curStep;

curStep = recalculateSteps();

Conductor.songPosition = FlxG.sound.music.time;
Expand Down
39 changes: 20 additions & 19 deletions source/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ class FreeplayState extends MusicBeatState

for (song in FileSystem.readDirectory("mods/data/")) {
var tempArray = song.split(':');
addSong(tempArray[0], 69420, "none"); //if the week is 69420, its a mod.

addSong(tempArray[0], 69420, "MOD"); //if the week is 69420, its a mod.
}

// LOAD MUSIC
Expand Down Expand Up @@ -104,22 +105,15 @@ class FreeplayState extends MusicBeatState
songText.targetY = i;
grpSongs.add(songText);

var icon:HealthIcon = new HealthIcon(songs[i].songCharacter);
icon.sprTracker = songText;

var array = CoolUtil.coolTextFile(Paths.txt('healthcolors'));

/*for (i in 0...array.length) {
var eugh = array[i].split(':');
if (songs[i].songCharacter.toLowerCase() != "mod"){
var icon:HealthIcon = new HealthIcon(songs[i].songCharacter);
icon.sprTracker = songText;

if (songs[i].songCharacter.toLowerCase().startsWith(eugh[0])) {
colors.push(Std.parseInt(eugh[1]));
}
}*/
iconArray.push(icon);
add(icon);
}

// using a FlxGroup is too much fuss!
iconArray.push(icon);
add(icon);
var array = CoolUtil.coolTextFile(Paths.txt('healthcolors'));

updateColor();

Expand Down Expand Up @@ -264,6 +258,7 @@ class FreeplayState extends MusicBeatState

if (songs[curSelected].week == 69420){
PlayState.SONG = Song.loadFromModJson(poop, songs[curSelected].songName.toLowerCase());

PlayState.isMod = true;
}
else{
Expand All @@ -276,7 +271,7 @@ class FreeplayState extends MusicBeatState
FlxG.sound.play(Paths.sound('GF_1', 'shared'));
trace('Just because you heard the sound, doesn\'t mean you\'ve found the secret!');
}

PlayState.isStoryMode = false;
PlayState.storyDifficulty = curDifficulty;

Expand Down Expand Up @@ -363,7 +358,8 @@ class FreeplayState extends MusicBeatState
iconArray[i].alpha = 0.6;
}

iconArray[curSelected].alpha = 1;
if (iconArray[curSelected] != null)
iconArray[curSelected].alpha = 1;

for (item in grpSongs.members)
{
Expand All @@ -385,8 +381,13 @@ class FreeplayState extends MusicBeatState
if (!bruh.startsWith('#')) {
var eugh = bruh.split(':');

if (songs[curSelected].songCharacter.toLowerCase().startsWith(eugh[0])) {
tcolor = new FlxColor(Std.parseInt(eugh[1]));
if (songs[curSelected].songCharacter.toLowerCase() != "mod"){
if (songs[curSelected].songCharacter.toLowerCase().startsWith(eugh[0])) {
tcolor = new FlxColor(Std.parseInt(eugh[1]));
}
}
else{
tcolor = new FlxColor(FlxColor.LIME);
}
}
}
Expand Down
13 changes: 10 additions & 3 deletions source/GameOverSubstate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,18 @@ class GameOverSubstate extends MusicBeatSubstate
{
FlxG.sound.music.stop();

if (PlayState.isStoryMode)
if (PlayState.isStoryMode){
PlayState.secretMode = false; // reset secret mode
PlayState.isMod = false;

FlxG.switchState(new StoryMenuState());
else
PlayState.secretMode = false; //disable this shit
}
else{
PlayState.secretMode = false; // reset secret mode
PlayState.isMod = false;

FlxG.switchState(new FreeplayState());
}
}

if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.curFrame == 12)
Expand Down
2 changes: 1 addition & 1 deletion source/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MainMenuState extends MusicBeatState
var camFollow:FlxObject;

//VERSION
public static var nightly:String = "PRE-RELEASE | Modding Update";
public static var nightly:String = "";
public static var gameVer:String = "2.15.0";

override function create()
Expand Down
23 changes: 16 additions & 7 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ class PlayState extends MusicBeatState
var shits:Int = 0;
var scoreTxt:FlxText;

var songScrollSpeed:Float = SONG.speed;

public static var campaignScore:Int = 0;

var defaultCamZoom:Float = 1.05;
Expand Down Expand Up @@ -161,6 +163,8 @@ class PlayState extends MusicBeatState
public static var isMod:Bool = false;
var events = [];

var alreadyLoaded:Bool = false;

public static var secretMode:Bool = false;

override public function create()
Expand Down Expand Up @@ -188,7 +192,7 @@ class PlayState extends MusicBeatState
SONG = Song.loadFromJson('tutorial');

if (FlxG.save.data.downScroll == null)
FlxG.save.data.downScroll = !FlxG.save.data.downScroll;
FlxG.save.data.downScroll = false;

Conductor.mapBPMChanges(SONG);
Conductor.changeBPM(SONG.bpm);
Expand Down Expand Up @@ -665,6 +669,9 @@ class PlayState extends MusicBeatState

var camPos:FlxPoint = new FlxPoint(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y);

var daCamY:Int = 0;
var daCamX:Int = 0;

switch (SONG.player2)
{
case 'gf':
Expand Down Expand Up @@ -816,6 +823,9 @@ class PlayState extends MusicBeatState
else if (FileSystem.exists(Paths.file("data/" + SONG.song.toLowerCase() + "/events.txt")))
events = CoolUtil.coolTextFile(Paths.file('data/' + SONG.song.toLowerCase() + '/events.txt'));

if (songScrollSpeed != PlayState.SONG.speed)
songScrollSpeed = PlayState.SONG.speed;

// add(strumLine);

camFollow = new FlxObject(0, 0, 1, 1);
Expand Down Expand Up @@ -1595,7 +1605,6 @@ class PlayState extends MusicBeatState

super.update(elapsed);


scoreTxt.text = 'Score: $songScore | Misses: $misses | S/G/B/S: $sicks/$goods/$bads/$shits | Combo: $combo | ${calculateRating()}';

if (FlxG.keys.justPressed.ENTER && startedCountdown && canPause)
Expand Down Expand Up @@ -1892,9 +1901,9 @@ class PlayState extends MusicBeatState
}

if (!FlxG.save.data.downScroll)
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(songScrollSpeed, 2)));
else
daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(songScrollSpeed, 2)));

// i am so fucking sorry for this if condition
if (FlxG.save.data.downScroll == false ? daNote.isSustainNote
Expand Down Expand Up @@ -2078,7 +2087,7 @@ class PlayState extends MusicBeatState
}

// WIP interpolation shit? Need to fix the pause issue
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * songScrollSpeed));

//-strumLine.y - 16

Expand Down Expand Up @@ -2856,8 +2865,8 @@ class PlayState extends MusicBeatState
if (Std.parseInt(tempStep[0]) == curStep){
switch(tempStep[1].toLowerCase()){
case 'setsongspeed':
PlayState.SONG.speed = Std.parseFloat(tempStep[2]);
trace("SET SPEED TO " + PlayState.SONG.speed);
songScrollSpeed = Std.parseFloat(tempStep[2]);
trace("SET SPEED TO " + songScrollSpeed);
case 'gfcheer':
gf.playAnim('cheer', true);
trace("GF CHEER");
Expand Down
7 changes: 7 additions & 0 deletions source/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,13 @@ class TitleState extends MusicBeatState
#end
}

#if debug
if (controls.CHEAT){
FlxG.save.erase();
FlxG.resetState();
}
#end

if (pressedEnter && !transitioning && skippedIntro)
{
titleText.animation.play('press');
Expand Down

0 comments on commit 4a0001d

Please sign in to comment.