Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion source/funkin/modding/IScriptedClass.hx
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,27 @@ interface ICharacterSelectScriptedClass extends IScriptedClass
interface IDialogueScriptedClass extends IScriptedClass
{
/**
* Called as the dialogue starts, and before the first dialogue text is displayed.
* Called when the dialogue starts, and before the first dialogue text is displayed.
*/
public function onDialogueStart(event:DialogueScriptEvent):Void;

/**
* Called when the dialogue line is completed.
*/
public function onDialogueCompleteLine(event:DialogueScriptEvent):Void;

/**
* Called when the next dialogue line starts.
*/
public function onDialogueLine(event:DialogueScriptEvent):Void;

/**
* Called when the dialogue is skipped.
*/
public function onDialogueSkip(event:DialogueScriptEvent):Void;

/**
* Called when the dialogue is finished.
*/
public function onDialogueEnd(event:DialogueScriptEvent):Void;
}
32 changes: 27 additions & 5 deletions source/funkin/modding/module/Module.hx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package funkin.modding.module;

import funkin.modding.IScriptedClass.IPlayStateScriptedClass;
import funkin.modding.IScriptedClass.IStateChangingScriptedClass;
import funkin.modding.IScriptedClass.IFreeplayScriptedClass;
import funkin.modding.IScriptedClass.ICharacterSelectScriptedClass;
import funkin.modding.IScriptedClass;
import funkin.modding.events.ScriptEvent;

/**
Expand All @@ -24,7 +21,7 @@ typedef ModuleParams =
*/
@:nullSafety
class Module implements IPlayStateScriptedClass implements IStateChangingScriptedClass implements IFreeplayScriptedClass
implements ICharacterSelectScriptedClass
implements ICharacterSelectScriptedClass implements IDialogueScriptedClass
{
/**
* Whether the module is currently active.
Expand Down Expand Up @@ -367,4 +364,29 @@ class Module implements IPlayStateScriptedClass implements IStateChangingScripte
public function onCharacterConfirm(event:CharacterSelectScriptEvent):Void
{
}

/**
* Called when the dialogue starts, and before the first dialogue text is displayed.
*/
public function onDialogueStart(event:DialogueScriptEvent):Void {}

/**
* Called when the dialogue line is completed.
*/
public function onDialogueCompleteLine(event:DialogueScriptEvent):Void {}

/**
* Called when the next dialogue line starts.
*/
public function onDialogueLine(event:DialogueScriptEvent):Void {}

/**
* Called when the dialogue is skipped.
*/
public function onDialogueSkip(event:DialogueScriptEvent):Void {}

/**
* Called when the dialogue is finished.
*/
public function onDialogueEnd(event:DialogueScriptEvent):Void {}
}