Merge branch 'master' into 'master'

Fix formatting in Jhoira fix and integrate it

See merge request core-developers/forge!1353
This commit is contained in:
Michael Kamensky
2019-02-03 05:21:01 +00:00

View File

@@ -351,20 +351,27 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
} }
private boolean useSelectCardsInput(final FCollectionView<? extends GameEntity> sourceList) { private boolean useSelectCardsInput(final FCollectionView<? extends GameEntity> sourceList) {
if ( FThreads.isGuiThread() ) { return false; } // can't use InputSelect from GUI thread (e.g., DevMode Tutor) // can't use InputSelect from GUI thread (e.g., DevMode Tutor)
if ( FThreads.isGuiThread() ) { return false; }
// if UI_SELECT_FROM_CARD_DISPLAYS not set use InputSelect only for battlefield and player hand // if UI_SELECT_FROM_CARD_DISPLAYS not set use InputSelect only for battlefield and player hand
// if UI_SELECT_FROM_CARD_DISPLAYS set and using desktop GUI use InputSelect for any zone that can be shown // if UI_SELECT_FROM_CARD_DISPLAYS set and using desktop GUI use InputSelect for any zone that can be shown
for (final GameEntity c : sourceList) { for (final GameEntity c : sourceList) {
if (c instanceof Player) { if (c instanceof Player) {
continue; continue;
} }
if (!(c instanceof Card)) { if (!(c instanceof Card)) {
return false; return false;
} }
final Zone cz = ((Card) c).getZone(); final Zone cz = ((Card) c).getZone();
// Don't try to draw the UI point of a card if it doesn't exist in any zone.
if (cz == null) {
return false;
}
final boolean useUiPointAtCard = final boolean useUiPointAtCard =
cz != null && (FModel.getPreferences().getPrefBoolean(FPref.UI_SELECT_FROM_CARD_DISPLAYS) && (!GuiBase.getInterface().isLibgdxPort())) ?
(FModel.getPreferences().getPrefBoolean(FPref.UI_SELECT_FROM_CARD_DISPLAYS) && (!GuiBase.getInterface().isLibgdxPort()) ) ?
(cz.is(ZoneType.Battlefield) || cz.is(ZoneType.Hand) || cz.is(ZoneType.Library) || (cz.is(ZoneType.Battlefield) || cz.is(ZoneType.Hand) || cz.is(ZoneType.Library) ||
cz.is(ZoneType.Graveyard) || cz.is(ZoneType.Exile) || cz.is(ZoneType.Flashback) || cz.is(ZoneType.Command)) : cz.is(ZoneType.Graveyard) || cz.is(ZoneType.Exile) || cz.is(ZoneType.Flashback) || cz.is(ZoneType.Command)) :
(cz.is(ZoneType.Hand) && cz.getPlayer() == player || cz.is(ZoneType.Battlefield)); (cz.is(ZoneType.Hand) && cz.getPlayer() == player || cz.is(ZoneType.Battlefield));