Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Commit

Permalink
wont need those
Browse files Browse the repository at this point in the history
  • Loading branch information
MaybeMaru committed Jan 2, 2024
1 parent 663900c commit 0011fb4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
6 changes: 4 additions & 2 deletions source/FlxFunkGame.hx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ class FlxFunkGame extends FlxGame {
transition.update(FlxG.elapsed);
console.update(FlxG.elapsed);

for (i in 0...updateObjects.length) {
updateObjects[i].update(FlxG.elapsed);
if (updateObjects.length > 0) {
for (i in 0...updateObjects.length) {
updateObjects[i].update(FlxG.elapsed);
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion source/funkin/objects/NotesGroup.hx
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ class NotesGroup extends FlxGroup
for (badNote in removeList) badNote.removeNote();
final onGhost = isPlayState ? PlayState.instance.ghostTapEnabled : true;

possibleNotes.sort(CoolUtil.sortByStrumTime);
if (possibleNotes.length > 0) {
if (!onGhost) {
for (i in 0...controlArray.length) {
Expand Down
11 changes: 1 addition & 10 deletions source/funkin/util/modding/FunkScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,7 @@ class FunkScript extends hscript.Script implements IFlxDestroyable {
});

set('getBlendMode', function(blendType:String):openfl.display.BlendMode {
switch(blendType.toLowerCase().trim()) {
case 'add': return ADD; case 'alpha': return ALPHA;
case 'darken': return DARKEN; case 'difference': return DIFFERENCE;
case 'erase': return ERASE; case 'hardlight': return HARDLIGHT;
case 'invert': return INVERT; case 'layer': return LAYER;
case 'lighten': return LIGHTEN; case 'multiply': return MULTIPLY;
case 'overlay': return OVERLAY; case 'screen': return SCREEN;
case 'shader': return SHADER; case 'subtract': return SUBTRACT;
default: return NORMAL;
}
return ScriptUtil.stringToBlend(blendType);
});

set('parseJson', function (value:String):Dynamic {
Expand Down
13 changes: 13 additions & 0 deletions source/funkin/util/modding/ScriptUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,17 @@ class ScriptUtil {
skipTransClose: skipTransClose ?? skipTransOpen
}
}

public inline static function stringToBlend(value:String):openfl.display.BlendMode {
return switch(value.toLowerCase().trim()) {
case 'add': ADD; case 'alpha': ALPHA;
case 'darken': DARKEN; case 'difference': DIFFERENCE;
case 'erase': ERASE; case 'hardlight': HARDLIGHT;
case 'invert': INVERT; case 'layer': LAYER;
case 'lighten': LIGHTEN; case 'multiply': MULTIPLY;
case 'overlay': OVERLAY; case 'screen': SCREEN;
case 'shader': SHADER; case 'subtract': SUBTRACT;
default: NORMAL;
}
}
}

0 comments on commit 0011fb4

Please sign in to comment.