DEADSOFTWARE

Add crafting
[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / MainConfig.java
index b48b78df896ebe46b878bc1675dcc44007fdafdc..6577f297254f82928b2e18d28f29911d32764750 100644 (file)
@@ -2,12 +2,17 @@ package ru.deadsoftware.cavedroid;
 
 import ru.deadsoftware.cavedroid.game.GameUiWindow;
 
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 
 @Singleton
 public class MainConfig {
 
+    private final CaveGame mCaveGame;
+
+    @CheckForNull
     private MainComponent mMainComponent;
 
     private GameUiWindow mGameUiWindow;
@@ -20,13 +25,23 @@ public class MainConfig {
     private float mWidth;
     private float mHeight;
 
+    @Nullable
+    private String mAssetsPackPath = null;
+
     @Inject
-    public MainConfig() {
+    public MainConfig(CaveGame caveGame) {
+        mCaveGame = caveGame;
+
         mGameUiWindow = GameUiWindow.NONE;
         mGameFolder = "";
     }
 
+    public CaveGame getCaveGame() {
+        return mCaveGame;
+    }
+
     public MainComponent getMainComponent() {
+        assert mMainComponent != null;
         return mMainComponent;
     }
 
@@ -38,10 +53,6 @@ public class MainConfig {
         return mGameUiWindow == gameUiWindow;
     }
 
-    public GameUiWindow getGameUiWindow() {
-        return mGameUiWindow;
-    }
-
     public void setGameUiWindow(GameUiWindow gameUiWindow) {
         mGameUiWindow = gameUiWindow;
     }
@@ -93,4 +104,13 @@ public class MainConfig {
     public void setShowMap(boolean showMap) {
         mShowMap = showMap;
     }
+
+    @Nullable
+    public String getAssetsPackPath() {
+        return mAssetsPackPath;
+    }
+
+    public void setAssetsPackPath(@Nullable String assetsPackPath) {
+        mAssetsPackPath = assetsPackPath;
+    }
 }