public AbstractAreaLayer(GridPanel gridPanel) { super(gridPanel); DebugConfig debugConfig = getClient().getConfig().getDebug(); if (debugConfig != null && "figure".equals(debugConfig.getArea_highlight())) { figureHighlight = true; } }
public void handleSave() { JFileChooser fc = new JFileChooser(System.getProperty("user.dir") + System.getProperty("file.separator") + "saves"); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); fc.setDialogTitle(_("Save game")); fc.setDialogType(JFileChooser.SAVE_DIALOG); fc.setFileFilter(new SavegameFileFilter()); fc.setLocale(getLocale()); int returnVal = fc.showSaveDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); if (file != null) { if (!file.getName().endsWith(".jcz")) { file = new File(file.getAbsolutePath() + ".jcz"); } try { Snapshot snapshot = new Snapshot(game, getClientId()); DebugConfig debugConfig = getConfig().getDebug(); if (debugConfig != null && "plain".equals(debugConfig.getSave_format())) { snapshot.setGzipOutput(false); } snapshot.save(file); } catch (Exception ex) { logger.error(ex.getMessage(), ex); JOptionPane.showMessageDialog(this, ex.getLocalizedMessage(), _("Error"), JOptionPane.ERROR_MESSAGE); } } } }
public DrawPhase(Game game, GameController controller) { super(game, controller); DebugConfig debugConfig = getDebugConfig(); if (debugConfig != null) { debugTiles = debugConfig.getDraw(); } bazaarCap = game.getCapability(BazaarCapability.class); abbeyCap = game.getCapability(AbbeyCapability.class); }