From 2589a27cb55ca9eb94c1ec8ca78851f85ed89262 Mon Sep 17 00:00:00 2001 From: Folker <63218676+GlennFolker@users.noreply.github.com> Date: Mon, 1 Feb 2021 21:27:24 +0700 Subject: [PATCH] Create FileTreeInitEvent (#4489) * filetree init event * actions do your thing --- core/src/mindustry/game/EventType.java | 2 ++ core/src/mindustry/mod/Mods.java | 1 + 2 files changed, 3 insertions(+) diff --git a/core/src/mindustry/game/EventType.java b/core/src/mindustry/game/EventType.java index 405398c370..73590f3679 100644 --- a/core/src/mindustry/game/EventType.java +++ b/core/src/mindustry/game/EventType.java @@ -68,6 +68,8 @@ public class EventType{ public static class ContentInitEvent{} /** Called when the client game is first loaded. */ public static class ClientLoadEvent{} + /** Called *after* all the modded files have been added into Vars.tree */ + public static class FileTreeInitEvent{} /** Called when a game begins and the world is loaded. */ public static class WorldLoadEvent{} diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index e73dc85b9c..166de21166 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -347,6 +347,7 @@ public class Mods implements Loadable{ } } } + Events.fire(new FileTreeInitEvent()); //add new keys to each bundle I18NBundle bundle = Core.bundle;