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)) if (!player.getZone(ZoneType.Hand).contains(card))
return; return;
game.getInputQueue().lockAndInvokeGameAction(new Runnable() { game.getInputQueue().invokeGameAction(new Runnable() {
@Override @Override
public void run() { public void run() {
card.getController().discard(card, null); card.getController().discard(card, null);

View File

@@ -183,10 +183,10 @@ public abstract class InputPayManaBase extends InputSyncronizedBase implements I
@Override @Override
public void run() { public void run() {
HumanPlay.playSpellAbility(chosen.getActivatingPlayer(), chosen); HumanPlay.playSpellAbility(chosen.getActivatingPlayer(), chosen);
onManaAbilityPlayed(chosen); onManaAbilityPlayed(chosen);
} }
}; };
game.getInputQueue().lockAndInvokeGameAction(proc); game.getInputQueue().invokeGameAction(proc);
// EDT that removes lockUI from input stack will call our showMessage() method // 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(); 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) { public void invokeGameAction(final Runnable proc) {
if(FThreads.isEDT()) { if(FThreads.isEDT()) {
FThreads.invokeInNewThread(proc); FThreads.invokeInNewThread(proc);