mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
Fixed an issue where dialogue scripts were not being reloaded
This commit is contained in:
parent
00cfeeff72
commit
ba53957191
5 changed files with 47 additions and 21 deletions
|
@ -14,6 +14,16 @@ import funkin.util.macro.MacroUtil;
|
|||
import funkin.util.WindowUtil;
|
||||
import funkin.play.PlayStatePlaylist;
|
||||
import openfl.display.BitmapData;
|
||||
import funkin.data.level.LevelRegistry;
|
||||
import funkin.data.notestyle.NoteStyleRegistry;
|
||||
import funkin.play.event.SongEventData.SongEventParser;
|
||||
import funkin.play.cutscene.dialogue.ConversationDataParser;
|
||||
import funkin.play.cutscene.dialogue.DialogueBoxDataParser;
|
||||
import funkin.play.cutscene.dialogue.SpeakerDataParser;
|
||||
import funkin.play.song.SongData.SongDataParser;
|
||||
import funkin.play.stage.StageData.StageDataParser;
|
||||
import funkin.play.character.CharacterData.CharacterDataParser;
|
||||
import funkin.modding.module.ModuleHandler;
|
||||
#if discord_rpc
|
||||
import Discord.DiscordClient;
|
||||
#end
|
||||
|
@ -180,18 +190,22 @@ class InitState extends FlxTransitionableState
|
|||
//
|
||||
// GAME DATA PARSING
|
||||
//
|
||||
funkin.data.level.LevelRegistry.instance.loadEntries();
|
||||
funkin.play.event.SongEventData.SongEventParser.loadEventCache();
|
||||
funkin.play.cutscene.dialogue.ConversationDataParser.loadConversationCache();
|
||||
funkin.play.cutscene.dialogue.DialogueBoxDataParser.loadDialogueBoxCache();
|
||||
funkin.play.cutscene.dialogue.SpeakerDataParser.loadSpeakerCache();
|
||||
funkin.play.song.SongData.SongDataParser.loadSongCache();
|
||||
funkin.play.stage.StageData.StageDataParser.loadStageCache();
|
||||
funkin.play.character.CharacterData.CharacterDataParser.loadCharacterCache();
|
||||
funkin.modding.module.ModuleHandler.buildModuleCallbacks();
|
||||
funkin.modding.module.ModuleHandler.loadModuleCache();
|
||||
|
||||
funkin.modding.module.ModuleHandler.callOnCreate();
|
||||
// NOTE: Registries and data parsers must be imported and not referenced with fully qualified names,
|
||||
// to ensure build macros work properly.
|
||||
LevelRegistry.instance.loadEntries();
|
||||
NoteStyleRegistry.instance.loadEntries();
|
||||
SongEventParser.loadEventCache();
|
||||
ConversationDataParser.loadConversationCache();
|
||||
DialogueBoxDataParser.loadDialogueBoxCache();
|
||||
SpeakerDataParser.loadSpeakerCache();
|
||||
SongDataParser.loadSongCache();
|
||||
StageDataParser.loadStageCache();
|
||||
CharacterDataParser.loadCharacterCache();
|
||||
ModuleHandler.buildModuleCallbacks();
|
||||
ModuleHandler.loadModuleCache();
|
||||
|
||||
ModuleHandler.callOnCreate();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,6 +10,11 @@ import polymod.backends.PolymodAssets.PolymodAssetType;
|
|||
import polymod.format.ParseRules.TextFileFormat;
|
||||
import funkin.play.event.SongEventData.SongEventParser;
|
||||
import funkin.util.FileUtil;
|
||||
import funkin.data.level.LevelRegistry;
|
||||
import funkin.data.notestyle.NoteStyleRegistry;
|
||||
import funkin.play.cutscene.dialogue.ConversationDataParser;
|
||||
import funkin.play.cutscene.dialogue.DialogueBoxDataParser;
|
||||
import funkin.play.cutscene.dialogue.SpeakerDataParser;
|
||||
|
||||
class PolymodHandler
|
||||
{
|
||||
|
@ -279,12 +284,14 @@ class PolymodHandler
|
|||
|
||||
// TODO: Reload event callbacks
|
||||
|
||||
funkin.data.level.LevelRegistry.instance.loadEntries();
|
||||
// These MUST be imported at the top of the file and not referred to by fully qualified name,
|
||||
// to ensure build macros work properly.
|
||||
LevelRegistry.instance.loadEntries();
|
||||
NoteStyleRegistry.instance.loadEntries();
|
||||
SongEventParser.loadEventCache();
|
||||
// TODO: Uncomment this once conversation data is implemented.
|
||||
// ConversationDataParser.loadConversationCache();
|
||||
// DialogueBoxDataParser.loadDialogueBoxCache();
|
||||
// SpeakerDataParser.loadSpeakerCache();
|
||||
ConversationDataParser.loadConversationCache();
|
||||
DialogueBoxDataParser.loadDialogueBoxCache();
|
||||
SpeakerDataParser.loadSpeakerCache();
|
||||
SongDataParser.loadSongCache();
|
||||
StageDataParser.loadStageCache();
|
||||
CharacterDataParser.loadCharacterCache();
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
package funkin.play.cutscene.dialogue;
|
||||
|
||||
/**
|
||||
* A script that can be tied to a Speaker.
|
||||
* Create a scripted class that extends Speaker to use this.
|
||||
* This allows you to customize how a specific conversation speaker appears.
|
||||
*/
|
||||
@:hscriptClass
|
||||
class ScriptedSpeaker extends Speaker implements polymod.hscript.HScriptedClass {}
|
||||
class ScriptedSpeaker extends funkin.play.cutscene.dialogue.Speaker implements polymod.hscript.HScriptedClass {}
|
||||
|
|
Loading…
Reference in a new issue