From 57afaee5418a4c55b59a05811971987131d47f3a Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Thu, 2 Jul 2020 18:48:52 -0700 Subject: [PATCH] Fixed a crash with MapViewer tool due to Map not have dependencies injected --- tools/src/com/riiablo/map/MapViewer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/src/com/riiablo/map/MapViewer.java b/tools/src/com/riiablo/map/MapViewer.java index 6dc28bf7..a9534192 100644 --- a/tools/src/com/riiablo/map/MapViewer.java +++ b/tools/src/com/riiablo/map/MapViewer.java @@ -206,9 +206,9 @@ public class MapViewer extends ApplicationAdapter { .with(new EventSystem()) .with(new TagManager()) .with(mapManager) + .with(new ItemManager()) .with(new CofManager()) .with(new ObjectInitializer()) - .with(new ItemManager()) .with(new ObjectInteractor(), new WarpInteractor(), new ItemInteractor()) .with(new MenuManager(), new DialogManager()) @@ -248,7 +248,8 @@ public class MapViewer extends ApplicationAdapter { Riiablo.engine = engine = new World(config); mPosition = engine.getMapper(Position.class); - engine.getInjector().inject(Act1MapBuilder.INSTANCE); + engine.inject(map); + engine.inject(Act1MapBuilder.INSTANCE); map.setAct(act); map.load();