Skip to content
This repository has been archived by the owner on Aug 29, 2022. It is now read-only.

Commit

Permalink
1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
notweuz committed May 15, 2022
1 parent fd484df commit ac285e3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 12 deletions.
2 changes: 1 addition & 1 deletion source/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using StringTools;

class MainMenuState extends MusicBeatState
{
public static var osEngineVesrion:String = '1.1.0'; //This is also used for Discord RPC
public static var osEngineVesrion:String = '1.2.0'; //This is also used for Discord RPC
public static var curSelected:Int = 0;

var menuItems:FlxTypedGroup<FlxSprite>;
Expand Down
8 changes: 6 additions & 2 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2172,7 +2172,7 @@ class PlayState extends MusicBeatState
}
}

if (FlxG.keys.anyJustPressed(debugKeysChart) && !endingSong && !inCutscene)
if (FlxG.keys.anyJustPressed(debugKeysChart) && !endingSong && !inCutscene && !SONG.disableDebugButtons)
{
openChartEditor();
}
Expand Down Expand Up @@ -3401,7 +3401,11 @@ class PlayState extends MusicBeatState
sortedNotesList.push(daNote);
//notesDatas.push(daNote.noteData);
}
canMiss = true;
if (!SONG.disableAntiMash) {
canMiss = true;
} else { // best code ever
canMiss = false;
}
}
});
sortedNotesList.sort((a, b) -> Std.int(a.strumTime - b.strumTime));
Expand Down
4 changes: 4 additions & 0 deletions source/Song.hx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ typedef SwagSong =
var cameraMoveOnNotes:Bool;
var healthdrain:Float;
var songInstVolume:Float;
var disableAntiMash:Bool;
var disableDebugButtons:Bool;
}

class Song
Expand All @@ -52,6 +54,8 @@ class Song
public var stage:String;
public var healthdrainKill:Bool = false;
public var characterTrails:Bool = false;
public var disableAntiMash:Bool = false;
public var disableDebugButtons:Bool = false;

public var player1:String = 'bf';
public var player2:String = 'dad';
Expand Down
36 changes: 27 additions & 9 deletions source/editors/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ class ChartingState extends MusicBeatState
gfVersion: 'gf',
speed: 1,
stage: 'stage',
validScore: false
validScore: false,
disableAntiMash: false,
disableDebugButtons: false
};
addSection();
PlayState.SONG = _song;
Expand Down Expand Up @@ -481,6 +483,18 @@ class ChartingState extends MusicBeatState
{
_song.characterTrails = check_Trails.checked;
};
var check_antiMash = new FlxUICheckBox(reloadSong.x + 90, reloadSong.y, null, null, "Disable Antimash", 100);
check_antiMash.checked = _song.disableAntiMash;
check_antiMash.callback = function()
{
_song.disableAntiMash = check_antiMash.checked;
};
var check_disableDebug = new FlxUICheckBox(reloadSongJson.x + 90, reloadSongJson.y, null, null, "Disable Debugmenu Buttons", 100);
check_disableDebug.checked = _song.disableDebugButtons;
check_disableDebug.callback = function()
{
_song.disableDebugButtons = check_disableDebug.checked;
};
var check_cameraMove = new FlxUICheckBox(80, loadEventJson.y, null, null, "Move Camera on Note Hits", 100);
check_cameraMove.checked = _song.cameraMoveOnNotes;
check_cameraMove.callback = function()
Expand Down Expand Up @@ -606,13 +620,6 @@ class ChartingState extends MusicBeatState

if(stages.length < 1) stages.push('stage');

stageDropDown = new FlxUIDropDownMenuCustom(player1DropDown.x + 140, player1DropDown.y, FlxUIDropDownMenuCustom.makeStrIdLabelArray(stages, true), function(character:String)
{
_song.stage = stages[Std.parseInt(character)];
});
stageDropDown.selectedLabel = _song.stage;
blockPressWhileScrolling.push(stageDropDown);

var healthdrainOBJ:FlxUINumericStepper = new FlxUINumericStepper(player1DropDown.x + 140, player3DropDown.y, 1, 0, 0, 99, 0);
healthdrainOBJ.value = _song.healthdrain;
healthdrainOBJ.name = 'health_drain';
Expand All @@ -630,14 +637,21 @@ class ChartingState extends MusicBeatState
noteSkinInputText = new FlxUIInputText(player2DropDown.x, player2DropDown.y + 50, 150, skin, 8);
blockPressWhileTypingOn.push(noteSkinInputText);

var songinstVolumeOBJ:FlxUINumericStepper = new FlxUINumericStepper(noteSkinInputText.x + 180, noteSkinInputText.y, 0.1, 1.0, 0.1, 1, 1);
var songinstVolumeOBJ:FlxUINumericStepper = new FlxUINumericStepper(player1DropDown.x + 140, player1DropDown.y, 0.1, 1.0, 0.1, 1, 1);
if (_song.songInstVolume > 0 ) songinstVolumeOBJ.value = _song.songInstVolume; else songinstVolumeOBJ.value = 1;
songinstVolumeOBJ.name = 'instplay_Volume';
blockPressWhileTypingOnStepper.push(songinstVolumeOBJ);

noteSplashesInputText = new FlxUIInputText(noteSkinInputText.x, noteSkinInputText.y + 35, 150, _song.splashSkin, 8);
blockPressWhileTypingOn.push(noteSplashesInputText);

stageDropDown = new FlxUIDropDownMenuCustom(noteSplashesInputText.x + 170, noteSplashesInputText.y, FlxUIDropDownMenuCustom.makeStrIdLabelArray(stages, true), function(character:String)
{
_song.stage = stages[Std.parseInt(character)];
});
stageDropDown.selectedLabel = _song.stage;
blockPressWhileScrolling.push(stageDropDown);

var reloadNotesButton:FlxButton = new FlxButton(noteSplashesInputText.x + 5, noteSplashesInputText.y + 20, 'Change Notes', function() {
_song.arrowSkin = noteSkinInputText.text;
updateGrid();
Expand All @@ -656,6 +670,8 @@ class ChartingState extends MusicBeatState
tab_group_song.add(reloadSongJson);
tab_group_song.add(loadAutosaveBtn);
tab_group_song.add(check_Trails);
tab_group_song.add(check_antiMash);
tab_group_song.add(check_disableDebug);
tab_group_song.add(check_cameraMove);
tab_group_song.add(loadEventJson);
tab_group_song.add(stepperBPM);
Expand Down Expand Up @@ -2894,6 +2910,8 @@ class ChartingState extends MusicBeatState
cameraMoveOnNotes: _song.cameraMoveOnNotes,
healthdrain: _song.healthdrain,
healthdrainKill: _song.healthdrainKill,
disableAntiMash: _song.disableAntiMash,
disableDebugButtons: _song.disableDebugButtons,

player1: _song.player1,
player2: _song.player2,
Expand Down

0 comments on commit ac285e3

Please sign in to comment.