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

Commit

Permalink
some minor shit
Browse files Browse the repository at this point in the history
  • Loading branch information
nebulazorua committed Jul 8, 2021
1 parent fcdf142 commit eb225bf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 14 deletions.
12 changes: 8 additions & 4 deletions source/GameOverSubstate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,14 @@ class GameOverSubstate extends MusicBeatSubstate
{
FlxG.sound.music.stop();

if (PlayState.isStoryMode)
FlxG.switchState(new StoryMenuState());
else
FlxG.switchState(new FreeplayState());
var state:MusicBeatState = new FreeplayState();
if(UnlockingItemState.unlocking.length>0){
state = new UnlockingItemState();
}else if(PlayState.isStoryMode){
state = new StoryMenuState();
}

FlxG.switchState(state);
}

if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.curFrame == 12)
Expand Down
18 changes: 11 additions & 7 deletions source/PauseSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PauseSubState extends MusicBeatSubstate
{
var grpMenuShit:FlxTypedGroup<Alphabet>;

var menuItems:Array<String> = ['Resume', 'Restart Song', 'Exit to menu'];
var menuItems:Array<String> = ['Resume', 'Restart Song', 'Restart Song with Cutscene', 'Exit to menu'];
var curSelected:Int = 0;

var pauseMusic:FlxSound;
Expand Down Expand Up @@ -107,18 +107,22 @@ class PauseSubState extends MusicBeatSubstate
close();
case "Restart Song":
FlxG.resetState();
case "Restart Song with Cutscene":
PlayState.didIntro=false;
PlayState.doIntro=true;
FlxG.resetState();
case "Exit to menu":
PlayState.didIntro=false;
FlxG.switchState(new MainMenuState());
var state:MusicBeatState = new MainMenuState();
if(UnlockingItemState.unlocking.length>0){
state = new UnlockingItemState();
}

FlxG.switchState(state);

}
}

if (FlxG.keys.justPressed.J)
{
// for reference later!
// PlayerSettings.player1.controls.replaceBinding(Control.LEFT, Keys, FlxKey.J, null);
}
}

override function destroy()
Expand Down
6 changes: 4 additions & 2 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class PlayState extends MusicBeatState
public static var curStage:String = '';
public static var SONG:SwagSong;
public static var didIntro:Bool = false;
public static var doIntro:Bool=false;

public static var isStoryMode:Bool = false;
public static var storyWeek:Int = 0;
public static var storyPlaylist:Array<String> = [];
Expand Down Expand Up @@ -1876,7 +1878,7 @@ class PlayState extends MusicBeatState
startingSong = true;


if (isStoryMode && !didIntro)
if ((isStoryMode || doIntro) && !didIntro)
{
didIntro=true;
switch (curSong.toLowerCase())
Expand Down Expand Up @@ -1937,7 +1939,7 @@ class PlayState extends MusicBeatState
default:
startCountdown();
}
}else if(isStoryMode && didIntro && SONG.song.toLowerCase()=='last-stand' && blueballs>0){
}else if((isStoryMode || doIntro) && didIntro && SONG.song.toLowerCase()=='last-stand' && blueballs>0){
var shit = CoolUtil.coolTextFile(Paths.txt('last-stand/deathsdialogue'));
var dialogue = [];
for(idx in 0...shit.length){
Expand Down
5 changes: 4 additions & 1 deletion source/StoryMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,12 @@ class StoryMenuState extends MusicBeatState
if(encounterableCameos.length==0 || FlxG.save.data.cameos.contains("Oxidation")){
encounterableCameos.push("Oxidation");
}
trace(encounterableCameos);
}

if(FlxG.save.data.cameos.contains("Oxidation") && encounterableCameos.length>1){
baseCameoChance=0;
}

if (FlxG.sound.music != null)
{
if (!FlxG.sound.music.playing)
Expand Down

0 comments on commit eb225bf

Please sign in to comment.