mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
re-disable buying and selling cards when the full catalog is being displayed in the spell shop
This commit is contained in:
@@ -301,7 +301,8 @@ public final class CEditorQuestCardShop extends ACEditorBase<InventoryItem, Deck
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addCard(InventoryItem item) {
|
public void addCard(InventoryItem item) {
|
||||||
if (item == null) {
|
// disallow "buying" cards while showing the full catalog
|
||||||
|
if (item == null || showingFullCatalog) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,7 +358,7 @@ public final class CEditorQuestCardShop extends ACEditorBase<InventoryItem, Deck
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void removeCard(InventoryItem item) {
|
public void removeCard(InventoryItem item) {
|
||||||
if ((item == null) || !(item instanceof CardPrinted)) {
|
if ((item == null) || !(item instanceof CardPrinted) || showingFullCatalog) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,6 +374,10 @@ public final class CEditorQuestCardShop extends ACEditorBase<InventoryItem, Deck
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void removeCards(List<Map.Entry<InventoryItem, Integer>> cardsToRemove) {
|
public void removeCards(List<Map.Entry<InventoryItem, Integer>> cardsToRemove) {
|
||||||
|
if (showingFullCatalog) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.getTableDeck().removeCards(cardsToRemove);
|
this.getTableDeck().removeCards(cardsToRemove);
|
||||||
this.getTableCatalog().addCards(cardsToRemove);
|
this.getTableCatalog().addCards(cardsToRemove);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user