Skip to content

Commit ff78629

Browse files
committed
2 again
1 parent 3823f73 commit ff78629

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

source/PlayState.hx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ class PlayState extends MusicBeatState
19011901
}
19021902

19031903
if (generatedMusic) {
1904-
Scripting.runModchartUpdateOnScripts();
1904+
Scripting.runModchartUpdateOnScripts("modchartUpdate");
19051905
var speed = (0.45 * FlxMath.roundDecimal(scrollSpeed, 3));
19061906
if (Options.instance.downScroll)
19071907
speed = 0 - speed;
@@ -1989,6 +1989,7 @@ class PlayState extends MusicBeatState
19891989
break;
19901990
}
19911991
}
1992+
Scripting.runModchartUpdateOnScripts("modchartPostUpdate");
19921993
}
19931994

19941995
if (camIsFollowing) {

source/Scripting.hx

+6-4
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ class Scripting {
207207
}
208208
}
209209

210-
public static function runModchartUpdateOnScripts() {
210+
public static function runModchartUpdateOnScripts(name:String) {
211211
if (!Options.instance.modchartEnabled)
212212
return;
213213
for (script in scripts) {
214-
script.runValidFunction("modchartUpdate", [FlxG.elapsed]);
214+
script.runValidFunction(name, [FlxG.elapsed]);
215215
}
216216
}
217217

@@ -279,6 +279,7 @@ class Scripting {
279279
"update",
280280
"updatePost",
281281
"modchartUpdate",
282+
"modchartPostUpdate",
282283
"destroy",
283284
"beatHit",
284285
"stageInit",
@@ -291,6 +292,7 @@ class Scripting {
291292
"noteMiss",
292293
"goodNoteHit",
293294
"charNoteHit",
295+
"opponentNoteHit",
294296
"preCreateMenuButtons",
295297
"checkUnlocks",
296298
"titleText",
@@ -328,9 +330,9 @@ class Scripting {
328330
return Reflect.isFunction(interp.variables.get(funcName)) ? Reflect.callMethod(this, interp.variables.get(funcName), args) : null;
329331
}
330332

331-
public inline function runModchartUpdate() {
333+
public inline function runModchartUpdate(name:String) {
332334
if (Options.instance.modchartEnabled)
333-
runValidFunction("modchartUpdate", [FlxG.elapsed]);
335+
runValidFunction(name, [FlxG.elapsed]);
334336
}
335337

336338
/*public inline function runStatePostInit(arr:Array<String>) {

0 commit comments

Comments
 (0)