mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Fix mindslaver effects.
- Fix bug where game would become unsreponsive after mind slaving ends; - Fix bug where players could concede for mind-slaved opponents; - Cleanup, managed to remove some fields.
This commit is contained in:
@@ -244,7 +244,6 @@ public final class CMatchUI
|
||||
|
||||
private void initMatch(final FCollectionView<PlayerView> sortedPlayers, final Collection<PlayerView> myPlayers) {
|
||||
this.sortedPlayers = sortedPlayers;
|
||||
this.setLocalPlayers(myPlayers);
|
||||
allHands = sortedPlayers.size() == getLocalPlayerCount();
|
||||
|
||||
final String[] indices = FModel.getPreferences().getPref(FPref.UI_AVATARS).split(",");
|
||||
|
||||
@@ -59,31 +59,26 @@ public class ControlWinLose {
|
||||
|
||||
/** Action performed when "continue" button is pressed in default win/lose UI. */
|
||||
public void actionOnContinue() {
|
||||
SOverlayUtils.hideOverlay();
|
||||
saveOptions();
|
||||
for (final IGameController controller : matchUI.getGameControllers()) {
|
||||
controller.nextGameDecision(NextGameDecision.CONTINUE);
|
||||
}
|
||||
nextGameAction(NextGameDecision.CONTINUE);
|
||||
}
|
||||
|
||||
/** Action performed when "restart" button is pressed in default win/lose UI. */
|
||||
public void actionOnRestart() {
|
||||
SOverlayUtils.hideOverlay();
|
||||
saveOptions();
|
||||
for (final IGameController controller : matchUI.getGameControllers()) {
|
||||
controller.nextGameDecision(NextGameDecision.NEW);
|
||||
}
|
||||
nextGameAction(NextGameDecision.NEW);
|
||||
}
|
||||
|
||||
/** Action performed when "quit" button is pressed in default win/lose UI. */
|
||||
public void actionOnQuit() {
|
||||
// Reset other stuff
|
||||
saveOptions();
|
||||
for (final IGameController controller : matchUI.getGameControllers()) {
|
||||
controller.nextGameDecision(NextGameDecision.QUIT);
|
||||
}
|
||||
nextGameAction(NextGameDecision.QUIT);
|
||||
Singletons.getControl().setCurrentScreen(FScreen.HOME_SCREEN);
|
||||
}
|
||||
|
||||
private void nextGameAction(final NextGameDecision decision) {
|
||||
SOverlayUtils.hideOverlay();
|
||||
saveOptions();
|
||||
for (final IGameController controller : matchUI.getOriginalGameControllers()) {
|
||||
controller.nextGameDecision(decision);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user