mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-18 09:34:04 +01:00
Only reset timers for rounds after combat ends, and not when changing maps.
* Previously, if you started conversation, entered some other activity or dialog, the round timers were reset each time, making the rounds less likely to happen.
This commit is contained in:
@@ -45,16 +45,9 @@ public final class Dialogs {
|
||||
context.gameRoundController.resume();
|
||||
}
|
||||
});
|
||||
//setBlurrywindow(d);
|
||||
d.show();
|
||||
}
|
||||
|
||||
/*
|
||||
private static void setBlurrywindow(Dialog d) {
|
||||
d.getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
|
||||
}
|
||||
*/
|
||||
|
||||
public static void showKeyArea(final MainActivity currentActivity, final ControllerContext context, String phraseID) {
|
||||
showConversation(currentActivity, context, phraseID, null);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
currentActiveMonster = null;
|
||||
world.model.uiSelections.selectedPosition = null;
|
||||
world.model.uiSelections.selectedMonster = null;
|
||||
controllers.gameRoundController.resetRoundTimers();
|
||||
if (pickupLootBags && totalExpThisFight > 0) {
|
||||
controllers.itemController.lootMonsterBags(killedMonsterBags, totalExpThisFight);
|
||||
} else {
|
||||
|
||||
@@ -27,7 +27,7 @@ public final class GameRoundController implements TimedMessageTask.Callback {
|
||||
if (world.model.uiSelections.isInCombat) return false;
|
||||
|
||||
onNewTick();
|
||||
|
||||
|
||||
--ticksUntilNextRound;
|
||||
if (ticksUntilNextRound <= 0) {
|
||||
onNewRound();
|
||||
@@ -42,13 +42,16 @@ public final class GameRoundController implements TimedMessageTask.Callback {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void resume() {
|
||||
world.model.uiSelections.isMainActivityVisible = true;
|
||||
|
||||
public void resetRoundTimers() {
|
||||
restartWaitForNextRound();
|
||||
restartWaitForNextFullRound();
|
||||
}
|
||||
|
||||
public void resume() {
|
||||
world.model.uiSelections.isMainActivityVisible = true;
|
||||
roundTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
private void restartWaitForNextFullRound() {
|
||||
ticksUntilNextFullRound = Constants.TICKS_PER_FULLROUND;
|
||||
|
||||
@@ -89,6 +89,7 @@ public final class MapController {
|
||||
m.resetTemporaryData();
|
||||
}
|
||||
controllers.monsterSpawnController.spawnAll(world.model.currentMap, world.model.currentTileMap);
|
||||
controllers.gameRoundController.resetRoundTimers();
|
||||
}
|
||||
|
||||
public void rest(MapObject area) {
|
||||
|
||||
@@ -129,6 +129,7 @@ public final class Savegames {
|
||||
controllers.actorStatsController.recalculatePlayerStats(world.model.player);
|
||||
controllers.mapController.resetMapsNotRecentlyVisited();
|
||||
controllers.movementController.prepareMapAsCurrentMap(world.model.currentMap, res, false);
|
||||
controllers.gameRoundController.resetRoundTimers();
|
||||
}
|
||||
|
||||
public static FileHeader quickload(Context androidContext, int slot) {
|
||||
|
||||
Reference in New Issue
Block a user