diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-09 11:36:51 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-09 11:36:51 +0100 |
commit | 037008e2abec0da50f8552b7196bd43f4c221ff3 (patch) | |
tree | b8c1c306a6552b4ca39dc03f421d1b665811c7b9 /core/src/ch/asynk/rustanddust/game | |
parent | 0072b1bb81bb1dd1d2a23676a986e8192e37da36 (diff) | |
download | RustAndDust-037008e2abec0da50f8552b7196bd43f4c221ff3.zip RustAndDust-037008e2abec0da50f8552b7196bd43f4c221ff3.tar.gz |
Options: remove mustValidate and canCancel
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
6 files changed, 5 insertions, 25 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Config.java b/core/src/ch/asynk/rustanddust/game/Config.java index cd5c0f4..56fa662 100644 --- a/core/src/ch/asynk/rustanddust/game/Config.java +++ b/core/src/ch/asynk/rustanddust/game/Config.java @@ -54,8 +54,6 @@ public class Config public boolean showMoves; public boolean showTargets; public boolean showMoveAssists; - public boolean canCancel; - public boolean mustValidate; public boolean showEnemyPossibilities; public boolean debug; public Battle battle; @@ -69,8 +67,6 @@ public class Config this.showMoves = true; this.showTargets = true; this.showMoveAssists = true; - this.canCancel = false; - this.mustValidate = false; this.showEnemyPossibilities = false; this.graphics = Graphics.MINE; this.battle = null; diff --git a/core/src/ch/asynk/rustanddust/game/states/StateBreak.java b/core/src/ch/asynk/rustanddust/game/states/StateBreak.java index 575903c..bab504d 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateBreak.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateBreak.java @@ -63,13 +63,8 @@ public class StateBreak extends StateCommon if (o == Orientation.KEEP) return; - if (cfg.mustValidate) { - map.hexDirectionsHide(to); - ctrl.hud.actionButtons.show(Buttons.DONE.b); - } else { - doRotation(o); - ctrl.setState(StateType.ANIMATION); - } + doRotation(o); + ctrl.setState(StateType.ANIMATION); } } diff --git a/core/src/ch/asynk/rustanddust/game/states/StateEngage.java b/core/src/ch/asynk/rustanddust/game/states/StateEngage.java index 065f468..0d342ad 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateEngage.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateEngage.java @@ -11,7 +11,6 @@ public class StateEngage extends StateCommon public void enter(StateType prevState) { map.unitsTargetClear(); - ctrl.hud.actionButtons.show(cfg.canCancel ? Buttons.ABORT.b : 0); // activeUnit is the target if (prevState == StateType.SELECT) { @@ -89,7 +88,6 @@ public class StateEngage extends StateCommon activeUnit.showTarget(); map.collectAssists(selectedUnit, activeUnit, ctrl.battle.getPlayer().units); map.unitsAssistShow(); - ctrl.hud.actionButtons.show((cfg.mustValidate ? Buttons.DONE.b : 0) | (cfg.canCancel ? Buttons.ABORT.b : 0)); } else if (unit == activeUnit) { ctrl.setState(StateType.DONE); diff --git a/core/src/ch/asynk/rustanddust/game/states/StateMove.java b/core/src/ch/asynk/rustanddust/game/states/StateMove.java index 7955037..559fc70 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateMove.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateMove.java @@ -12,7 +12,7 @@ public class StateMove extends StateCommon { ctrl.hud.actionButtons.show( ((map.unitsActivatedSize() > 0) ? Buttons.DONE.b : 0) - | (cfg.canCancel ? Buttons.ABORT.b : 0)); + ); if (prevState == StateType.WITHDRAW) { if (map.pathsSize() == 1) diff --git a/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java b/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java index 00ae3e1..419373e 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java @@ -66,7 +66,6 @@ public class StateReinforcement extends StateCommon entryZone.enable(Hex.AREA, false); entryZone = ctrl.battle.getEntryZone(activeUnit); entryZone.enable(Hex.AREA, true); - ctrl.hud.actionButtons.show(((cfg.canCancel) ? Buttons.ABORT.b : 0)); } private void unitEnter(Unit unit) diff --git a/core/src/ch/asynk/rustanddust/game/states/StateRotate.java b/core/src/ch/asynk/rustanddust/game/states/StateRotate.java index 8203725..8385570 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateRotate.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateRotate.java @@ -13,8 +13,6 @@ public class StateRotate extends StateCommon @Override public void enter(StateType prevState) { - ctrl.hud.actionButtons.show((cfg.canCancel && (map.unitsMoveableSize() > 1))? Buttons.ABORT.b : 0); - if (activeUnit == null) activeUnit = selectedUnit; if (to == null) @@ -97,13 +95,7 @@ public class StateRotate extends StateCommon map.pathsSetOrientation(o); rotationSet = true; - - if (cfg.mustValidate) { - map.hexDirectionsHide(to); - ctrl.hud.actionButtons.show(Buttons.DONE.b | ((cfg.canCancel) ? Buttons.ABORT.b : 0)); - } else { - execute(); - ctrl.setState(StateType.ANIMATION); - } + execute(); + ctrl.setState(StateType.ANIMATION); } } |