lock and invokeGameAction removed, removed input locks in PayManaBase ('cause HumanPlaySA sets these locks internally)

This commit is contained in:
Maxmtg
2013-05-27 15:52:13 +00:00
parent 8809a5bdb6
commit cc921eb269
3 changed files with 3 additions and 15 deletions

View File

@@ -74,7 +74,7 @@ public class InputCleanup extends InputPassPriorityBase {
if (!player.getZone(ZoneType.Hand).contains(card))
return;
game.getInputQueue().lockAndInvokeGameAction(new Runnable() {
game.getInputQueue().invokeGameAction(new Runnable() {
@Override
public void run() {
card.getController().discard(card, null);

View File

@@ -186,7 +186,7 @@ public abstract class InputPayManaBase extends InputSyncronizedBase implements I
onManaAbilityPlayed(chosen);
}
};
game.getInputQueue().lockAndInvokeGameAction(proc);
game.getInputQueue().invokeGameAction(proc);
// EDT that removes lockUI from input stack will call our showMessage() method
}

View File

@@ -199,18 +199,6 @@ public class InputQueue extends MyObservable implements java.io.Serializable {
input.awaitLatchRelease();
}
public void lockAndInvokeGameAction(final Runnable proc) {
Runnable toRun = new Runnable() {
@Override
public void run() {
InputQueue.this.lock();
proc.run();
InputQueue.this.unlock();
}
};
invokeGameAction(toRun);
}
public void invokeGameAction(final Runnable proc) {
if(FThreads.isEDT()) {
FThreads.invokeInNewThread(proc);