judgements and combo can now be toggled off in hscript (#439)
* Update PlayState.hx * movin and changin names * the fucking space * e e ee e ee ee SANS?? * mama SANS behind you❤️ help me * brother... * BROTHER... --------- Co-authored-by: ⍚~Nex <87421482+NexIsDumb@users.noreply.github.com>
This commit is contained in:
@@ -455,6 +455,22 @@ class PlayState extends MusicBeatState
|
||||
* Group containing all of the combo sprites.
|
||||
*/
|
||||
public var comboGroup:RotatingSpriteGroup;
|
||||
/**
|
||||
* Whenever the Rating sprites should be shown or not.
|
||||
*
|
||||
* NOTE: This is just a default value for the final value, the final value can be changed through notes hit events.
|
||||
*/
|
||||
public var defDisplayRating:Bool = true;
|
||||
/**
|
||||
* Whenever the Combo sprite should be shown or not (like old Week 7 patches).
|
||||
*
|
||||
* NOTE: This is just a default value for the final value, the final value can be changed through notes hit events.
|
||||
*/
|
||||
public var defDisplayCombo:Bool = false;
|
||||
/**
|
||||
* Minimum Combo Count to display the combo digits. Anything less than 0 means it won't be shown.
|
||||
*/
|
||||
public var minDigitDisplay:Int = 10;
|
||||
/**
|
||||
* Array containing all of the note types names.
|
||||
*/
|
||||
@@ -1645,9 +1661,9 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var event:NoteHitEvent;
|
||||
if (strumLine != null && !strumLine.cpu)
|
||||
event = EventManager.get(NoteHitEvent).recycle(false, !note.isSustainNote, !note.isSustainNote, note, strumLine.characters, true, note.noteType, note.animSuffix.getDefault(note.strumID < strumLine.members.length ? strumLine.members[note.strumID].animSuffix : strumLine.animSuffix), "game/score/", "", note.strumID, score, note.isSustainNote ? null : accuracy, 0.023, daRating, Options.splashesEnabled && !note.isSustainNote && daRating == "sick");
|
||||
event = EventManager.get(NoteHitEvent).recycle(false, !note.isSustainNote, !note.isSustainNote, null, defDisplayRating, defDisplayCombo, note, strumLine.characters, true, note.noteType, note.animSuffix.getDefault(note.strumID < strumLine.members.length ? strumLine.members[note.strumID].animSuffix : strumLine.animSuffix), "game/score/", "", note.strumID, score, note.isSustainNote ? null : accuracy, 0.023, daRating, Options.splashesEnabled && !note.isSustainNote && daRating == "sick");
|
||||
else
|
||||
event = EventManager.get(NoteHitEvent).recycle(false, false, false, note, strumLine.characters, false, note.noteType, note.animSuffix.getDefault(note.strumID < strumLine.members.length ? strumLine.members[note.strumID].animSuffix : strumLine.animSuffix), "game/score/", "", note.strumID, 0, null, 0, daRating, false);
|
||||
event = EventManager.get(NoteHitEvent).recycle(false, false, false, null, defDisplayRating, defDisplayCombo, note, strumLine.characters, false, note.noteType, note.animSuffix.getDefault(note.strumID < strumLine.members.length ? strumLine.members[note.strumID].animSuffix : strumLine.animSuffix), "game/score/", "", note.strumID, 0, null, 0, daRating, false);
|
||||
event.deleteNote = !note.isSustainNote; // work around, to allow sustain notes to be deleted
|
||||
event = scripts.event(strumLine != null && !strumLine.cpu ? "onPlayerHit" : "onDadHit", event);
|
||||
strumLine.onHit.dispatch(event);
|
||||
@@ -1666,7 +1682,8 @@ class PlayState extends MusicBeatState
|
||||
if (event.showRating || (event.showRating == null && event.player))
|
||||
{
|
||||
displayCombo(event);
|
||||
displayRating(event.rating, event);
|
||||
if (event.displayRating)
|
||||
displayRating(event.rating, event);
|
||||
ratingNum += 1;
|
||||
}
|
||||
}
|
||||
@@ -1724,13 +1741,11 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
|
||||
public function displayCombo(?evt:NoteHitEvent = null):Void {
|
||||
var pre:String = evt != null ? evt.ratingPrefix : "";
|
||||
var suf:String = evt != null ? evt.ratingSuffix : "";
|
||||
if (minDigitDisplay >= 0 && (combo == 0 || combo >= minDigitDisplay)) {
|
||||
var pre:String = evt != null ? evt.ratingPrefix : "";
|
||||
var suf:String = evt != null ? evt.ratingSuffix : "";
|
||||
|
||||
var separatedScore:String = Std.string(combo).addZeros(3);
|
||||
|
||||
if (combo == 0 || combo >= 10) {
|
||||
if (combo >= 10) {
|
||||
if (evt.displayCombo) {
|
||||
var comboSpr:FlxSprite = comboGroup.recycleLoop(FlxSprite).loadAnimatedGraphic(Paths.image('${pre}combo${suf}'));
|
||||
comboSpr.resetSprite(comboGroup.x, comboGroup.y);
|
||||
comboSpr.acceleration.y = 600;
|
||||
@@ -1752,6 +1767,7 @@ class PlayState extends MusicBeatState
|
||||
});
|
||||
}
|
||||
|
||||
var separatedScore:String = Std.string(combo).addZeros(3);
|
||||
for (i in 0...separatedScore.length)
|
||||
{
|
||||
var numScore:FlxSprite = comboGroup.recycleLoop(FlxSprite).loadAnimatedGraphic(Paths.image('${pre}num${separatedScore.charAt(i)}${suf}'));
|
||||
|
||||
Reference in New Issue
Block a user