mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Fix (sortof) bug with mana abilities that require user input
This commit is contained in:
@@ -50,12 +50,15 @@ public class InputQueue extends Observable {
|
||||
return inputStack.isEmpty() ? null : inputStack.peek();
|
||||
}
|
||||
|
||||
/*pfps sometimes this is being called twice for the same input */
|
||||
public final void removeInput(final Input inp) {
|
||||
final Input topMostInput = inputStack.isEmpty() ? null : inputStack.pop();
|
||||
final Input topMostInput = inputStack.isEmpty() ? null : inputStack.peek();
|
||||
|
||||
if (topMostInput != inp) {
|
||||
System.out.println("Cannot remove input " + inp.getClass().getSimpleName() + " because it's not on top of stack. Stack = " + inputStack );
|
||||
}
|
||||
} else {
|
||||
inputStack.pop();
|
||||
}
|
||||
updateObservers();
|
||||
}
|
||||
|
||||
|
||||
@@ -54,4 +54,4 @@ public abstract class InputSyncronizedBase extends InputBase implements InputSyn
|
||||
}
|
||||
|
||||
protected void onStop() { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user