From d251d71daa25d25de4a895f2dbc0ddf1a104a56a Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 17 Jul 2023 21:54:58 -0400 Subject: [PATCH 1/2] Asset redirect --- Project.xml | 8 ++++++++ hmm.json | 8 ++++---- source/funkin/modding/PolymodHandler.hx | 22 ++++++++++++++-------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/Project.xml b/Project.xml index 4ffb0355c..f34c9bc06 100644 --- a/Project.xml +++ b/Project.xml @@ -181,6 +181,14 @@ +
+ + +
diff --git a/hmm.json b/hmm.json index a1e3817e0..9edf20d30 100644 --- a/hmm.json +++ b/hmm.json @@ -95,8 +95,8 @@ "name": "lime", "type": "git", "dir": null, - "ref": "5634ad7", - "url": "https://github.com/openfl/lime" + "ref": "acb0334", + "url": "https://github.com/EliteMasterEric/lime" }, { "name": "openfl", @@ -109,7 +109,7 @@ "name": "polymod", "type": "git", "dir": null, - "ref": "6594dd8", + "ref": "491fd0e", "url": "https://github.com/larsiusprime/polymod" }, { @@ -123,4 +123,4 @@ "version": null } ] -} \ No newline at end of file +} diff --git a/source/funkin/modding/PolymodHandler.hx b/source/funkin/modding/PolymodHandler.hx index d90c1386d..cdc67c74c 100644 --- a/source/funkin/modding/PolymodHandler.hx +++ b/source/funkin/modding/PolymodHandler.hx @@ -10,12 +10,15 @@ import polymod.backends.PolymodAssets.PolymodAssetType; import polymod.format.ParseRules.TextFileFormat; import funkin.play.event.SongEventData.SongEventParser; import funkin.util.FileUtil; +import funkin.play.cutscene.dialogue.ConversationDataParser; +import funkin.play.cutscene.dialogue.DialogueBoxDataParser; +import funkin.play.cutscene.dialogue.SpeakerDataParser; class PolymodHandler { /** * The API version that mods should comply with. - * Format this with Semantic Versioning; ... + * Format this with Semantic Versioning; ... * Bug fixes increment the patch version, new features increment the minor version. * Changes that break old mods increment the major version. */ @@ -24,7 +27,9 @@ class PolymodHandler /** * Where relative to the executable that mods are located. */ - static final MOD_FOLDER = "mods"; + static final MOD_FOLDER:String = #if REDIRECT_ASSETS_FOLDER "../../../../example_mods" #else "mods" #end; + + static final CORE_FOLDER:Null = #if REDIRECT_ASSETS_FOLDER "../../../../assets" #else null #end; public static function createModRoot() { @@ -197,9 +202,10 @@ class PolymodHandler { return { assetLibraryPaths: [ - "songs" => "songs", "shared" => "", "tutorial" => "tutorial", "scripts" => "scripts", "week1" => "week1", "week2" => "week2", - "week3" => "week3", "week4" => "week4", "week5" => "week5", "week6" => "week6", "week7" => "week7", "weekend1" => "weekend1", - ] + "default" => "preload", "shared" => "", "songs" => "songs", "tutorial" => "tutorial", "week1" => "week1", "week2" => "week2", "week3" => "week3", + "week4" => "week4", "week5" => "week5", "week6" => "week6", "week7" => "week7", "weekend1" => "weekend1", + ], + coreAssetRedirect: CORE_FOLDER, } } @@ -282,9 +288,9 @@ class PolymodHandler funkin.data.level.LevelRegistry.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(); From 92f3a4823d847b4fe5e181f17da7b41184c2c1cf Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Sat, 22 Jul 2023 20:18:06 -0400 Subject: [PATCH 2/2] Update Polymod to fix lag issues --- hmm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmm.json b/hmm.json index 9edf20d30..5382504a6 100644 --- a/hmm.json +++ b/hmm.json @@ -109,7 +109,7 @@ "name": "polymod", "type": "git", "dir": null, - "ref": "491fd0e", + "ref": "631a363", "url": "https://github.com/larsiusprime/polymod" }, {