mlm: fix rock obstacles not being marked on load
This commit is contained in:
@@ -376,9 +376,7 @@ public class MotherlodePlugin extends Plugin
|
||||
// on region changes the tiles get set to null
|
||||
veins.clear();
|
||||
rocks.clear();
|
||||
}
|
||||
else if (event.getGameState() == GameState.LOGGED_IN)
|
||||
{
|
||||
|
||||
inMlm = checkInMlm();
|
||||
}
|
||||
else if (event.getGameState() == GameState.LOGIN_SCREEN)
|
||||
@@ -461,7 +459,9 @@ public class MotherlodePlugin extends Plugin
|
||||
|
||||
private boolean checkInMlm()
|
||||
{
|
||||
if (client.getGameState() != GameState.LOGGED_IN)
|
||||
GameState gameState = client.getGameState();
|
||||
if (gameState != GameState.LOGGED_IN
|
||||
&& gameState != GameState.LOADING)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class MotherlodePluginTest
|
||||
{
|
||||
// set inMlm
|
||||
GameStateChanged gameStateChanged = new GameStateChanged();
|
||||
gameStateChanged.setGameState(GameState.LOGGED_IN);
|
||||
gameStateChanged.setGameState(GameState.LOADING);
|
||||
motherlodePlugin.onGameStateChanged(gameStateChanged);
|
||||
|
||||
// Initial sack count
|
||||
@@ -163,4 +163,4 @@ public class MotherlodePluginTest
|
||||
when(item.getQuantity()).thenReturn(quantity);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user