mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Ability to dump the current game state to a file in dev mode.
This commit is contained in:
@@ -61,6 +61,16 @@ public enum CDev implements ICDoc {
|
||||
public void setupGameState() {
|
||||
MatchUtil.getHumanController().cheat().setupGameState();
|
||||
}
|
||||
|
||||
private final MouseListener madDump = new MouseAdapter() {
|
||||
@Override
|
||||
public void mousePressed(final MouseEvent e) {
|
||||
dumpGameState();
|
||||
}
|
||||
};
|
||||
public void dumpGameState() {
|
||||
MatchUtil.getHumanController().cheat().dumpGameState();
|
||||
}
|
||||
|
||||
private final MouseListener madTutor = new MouseAdapter() {
|
||||
@Override
|
||||
@@ -181,6 +191,7 @@ public enum CDev implements ICDoc {
|
||||
VDev.SINGLETON_INSTANCE.getLblViewAll().addMouseListener(madViewAll);
|
||||
VDev.SINGLETON_INSTANCE.getLblGenerateMana().addMouseListener(madMana);
|
||||
VDev.SINGLETON_INSTANCE.getLblSetupGame().addMouseListener(madSetup);
|
||||
VDev.SINGLETON_INSTANCE.getLblDumpGame().addMouseListener(madDump);
|
||||
VDev.SINGLETON_INSTANCE.getLblTutor().addMouseListener(madTutor);
|
||||
VDev.SINGLETON_INSTANCE.getLblCardToHand().addMouseListener(madCardToHand);
|
||||
VDev.SINGLETON_INSTANCE.getLblCounterPermanent().addMouseListener(madCounter);
|
||||
|
||||
@@ -60,6 +60,7 @@ public enum VDev implements IVDoc<CDev> {
|
||||
private final DevLabel lblViewAll = new DevLabel("View All Cards");
|
||||
private final DevLabel lblGenerateMana = new DevLabel("Generate Mana");
|
||||
private final DevLabel lblSetupGame = new DevLabel("Setup Game State");
|
||||
private final DevLabel lblDumpGame = new DevLabel("Dump Game State");
|
||||
private final DevLabel lblTutor = new DevLabel("Tutor for Card");
|
||||
private final DevLabel lblCounterPermanent = new DevLabel("Add Counters to Permanent");
|
||||
private final DevLabel lblTapPermanent = new DevLabel("Tap Permanents");
|
||||
@@ -86,6 +87,7 @@ public enum VDev implements IVDoc<CDev> {
|
||||
viewport.add(this.lblSetLife, halfConstraintsLeft);
|
||||
viewport.add(this.lblWinGame, halfConstraints);
|
||||
viewport.add(this.lblSetupGame, constraints);
|
||||
viewport.add(this.lblDumpGame, constraints);
|
||||
viewport.add(this.lblUnlimitedLands, constraints);
|
||||
viewport.add(this.lblCounterPermanent, constraints);
|
||||
viewport.add(this.lblTapPermanent, halfConstraintsLeft);
|
||||
@@ -157,6 +159,11 @@ public enum VDev implements IVDoc<CDev> {
|
||||
return this.lblSetupGame;
|
||||
}
|
||||
|
||||
/** @return {@link forge.screens.match.views.VDev.DevLabel} */
|
||||
public DevLabel getLblDumpGame() {
|
||||
return this.lblDumpGame;
|
||||
}
|
||||
|
||||
/** @return {@link forge.screens.match.views.VDev.DevLabel} */
|
||||
public DevLabel getLblTutor() {
|
||||
return this.lblTutor;
|
||||
|
||||
Reference in New Issue
Block a user