Booster QoL

Remove open confirmation and disable leaving inventory scene when opening boosters.

Change Booster Pack Inventory Name

Old:
Booster Pack: WAR

New:
War of the Sparks Booster

Final

Tweak
This commit is contained in:
Meta
2024-10-15 11:26:00 -04:00
parent 8669859706
commit 0a08650393
2 changed files with 6 additions and 12 deletions

View File

@@ -180,7 +180,7 @@ public class InventoryScene extends UIScene {
Deck data = (deckLocation.get(selected));
if (data == null) return;
done();
//done();
setSelected(null);
RewardScene.instance().loadRewards(data, RewardScene.Type.Loot, null, data.getTags().contains("noSell"));
Forge.switchScene(RewardScene.instance());
@@ -206,15 +206,7 @@ public class InventoryScene extends UIScene {
Deck data = deckLocation.get(selected);
if (data == null)
return;
if (openDialog == null) {
openDialog = createGenericDialog("", null, Forge.getLocalizer().getMessage("lblYes"),
Forge.getLocalizer().getMessage("lblNo"), () -> {
this.openBooster();
removeDialog();
}, this::removeDialog);
openDialog.getContentTable().add(Controls.newTextraLabel("Open Booster Pack?"));
}
showDialog(openDialog);
}
}
@@ -277,7 +269,7 @@ public class InventoryScene extends UIScene {
useButton.layout();
equipButton.setDisabled(true);
itemDescription.setText("Card Pack - " + data.getName() + "\n[%98]" + (data.getComment() == null?"":data.getComment()+" - ") + data.getAllCardsInASinglePool().countAll() + " cards");
itemDescription.setText(data.getName() + "\n[%98]" + (data.getComment() == null?"":data.getComment()+" - ") + data.getAllCardsInASinglePool().countAll() + " cards");
}

View File

@@ -11,6 +11,7 @@ import forge.item.SealedTemplate;
import forge.item.generation.BoosterGenerator;
import forge.item.generation.UnOpenedProduct;
import forge.model.CardBlock;
import forge.model.FModel;
import forge.util.Aggregates;
import java.io.Serializable;
@@ -136,7 +137,8 @@ public class AdventureEventController implements Serializable {
List<PaperCard> cards = BoosterGenerator.getBoosterPack(StaticData.instance().getBoosters().get(setCode));
Deck output = new Deck();
output.getMain().add(cards);
output.setName("Booster Pack: " + setCode);
String editionName = FModel.getMagicDb().getEditions().get(setCode).getName();
output.setName(editionName + " Booster");
output.setComment(setCode);
return output;
}