v1.2.0: fixed dragon's breath not being consumed in stacks of 2+
This commit is contained in:
parent
992df8f179
commit
3f960088d0
|
@ -74,17 +74,17 @@ public class PotionOfDragonsBreath extends ExoticPotion {
|
||||||
|
|
||||||
private CellSelector.Listener targeter = new CellSelector.Listener() {
|
private CellSelector.Listener targeter = new CellSelector.Listener() {
|
||||||
|
|
||||||
private boolean showingWindow = false;
|
private boolean optionSelected = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelect(final Integer cell) {
|
public void onSelect(final Integer cell) {
|
||||||
|
|
||||||
if (showingWindow){
|
if (optionSelected){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cell == null && identifiedByUse){
|
if (cell == null && identifiedByUse){
|
||||||
showingWindow = true;
|
optionSelected = true;
|
||||||
GameScene.show( new WndOptions(new ItemSprite(PotionOfDragonsBreath.this),
|
GameScene.show( new WndOptions(new ItemSprite(PotionOfDragonsBreath.this),
|
||||||
Messages.titleCase(name()),
|
Messages.titleCase(name()),
|
||||||
Messages.get(ExoticPotion.class, "warning"),
|
Messages.get(ExoticPotion.class, "warning"),
|
||||||
|
@ -92,7 +92,7 @@ public class PotionOfDragonsBreath extends ExoticPotion {
|
||||||
Messages.get(ExoticPotion.class, "no") ) {
|
Messages.get(ExoticPotion.class, "no") ) {
|
||||||
@Override
|
@Override
|
||||||
protected void onSelect( int index ) {
|
protected void onSelect( int index ) {
|
||||||
showingWindow = false;
|
optionSelected = false;
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
curUser.spendAndNext(1f);
|
curUser.spendAndNext(1f);
|
||||||
|
@ -108,6 +108,7 @@ public class PotionOfDragonsBreath extends ExoticPotion {
|
||||||
} else if (cell == null && !anonymous){
|
} else if (cell == null && !anonymous){
|
||||||
curItem.collect( curUser.belongings.backpack );
|
curItem.collect( curUser.belongings.backpack );
|
||||||
} else if (cell != null) {
|
} else if (cell != null) {
|
||||||
|
optionSelected = true;
|
||||||
identifiedByUse = false;
|
identifiedByUse = false;
|
||||||
curUser.busy();
|
curUser.busy();
|
||||||
Sample.INSTANCE.play( Assets.Sounds.DRINK );
|
Sample.INSTANCE.play( Assets.Sounds.DRINK );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user