diff --git a/MekHQ/docs/Stratcon and Against the Bot/AtB documentation.19_8 (WIP).txt b/MekHQ/docs/Stratcon and Against the Bot/AtB documentation.19_8 (WIP).txt index d30692700e..aa3dbceb18 100644 --- a/MekHQ/docs/Stratcon and Against the Bot/AtB documentation.19_8 (WIP).txt +++ b/MekHQ/docs/Stratcon and Against the Bot/AtB documentation.19_8 (WIP).txt @@ -94,7 +94,7 @@ The first hired mekwarrior is the force commanding officer and gets a +1 bonus t Meks can be generated in several ways (or not at all) although I recommend to use the system detailed in the rules file under Company_Creation for the first time. If this file is not available a roll on the Chosen Rat can be an alternative. To add a mek Marketplace -> Purchase Unit, select Unit Type "Mek" and the desired weight class finish by using the "Add (GM)" button. Before accepting a contract it is necessary to fill out the TO&E, in order to do so mekwarriors need to be assigned to their rides, in the Personnel tab right-click on the pilot -> assign to unit -> select desired unit. As soon as all available meks are assigned to a pilot you must sort them into lances in the TO&E tab. By right-clicking on the "My Campaign" force icon new forces can be added. A 12 mek company usually consists of three lances with four meks each, every lance must be commanded by an officer. There are certain size and weight limits to lances see the rules file for more information. -The unit is now established yet there is more preparation to be done. I recommend to use "Add Funds (GM)" under the Finance tab to add some starting capital, 5%-20% of your starting net worth is reasonable. Before the cash can be spend the options turned off during creation must be turned on again. +The unit is now established yet there is more preparation to be done. I recommend to use "Add Transaction (GM)" under the Finance tab to add some starting capital, 5%-20% of your starting net worth is reasonable. Before the cash can be spend the options turned off during creation must be turned on again. File -> Campaign Options "Finance" Tab diff --git a/MekHQ/resources/mekhq/resources/AddFundsDialog.properties b/MekHQ/resources/mekhq/resources/AddFundsDialog.properties index cbf872da74..27310f7d58 100644 --- a/MekHQ/resources/mekhq/resources/AddFundsDialog.properties +++ b/MekHQ/resources/mekhq/resources/AddFundsDialog.properties @@ -1,6 +1,6 @@ label.text=Funds to add : btnAddFunds.actionCommand=AddFunds -btnAddFunds.text=Add Funds -fundsQuantityField.toolTipText=Quantity of funds to add to treasury. Negative amounts remove money. +btnAddFunds.text=Add Transaction +fundsQuantityField.toolTipText=Quantity of funds to add to the treasury. Negative amounts remove money. fundsQuantityField.text=0 -Form.title=Add Funds +Form.title=Add Transaction diff --git a/MekHQ/src/mekhq/gui/FinancesTab.java b/MekHQ/src/mekhq/gui/FinancesTab.java index 0c089d7075..69b644c769 100644 --- a/MekHQ/src/mekhq/gui/FinancesTab.java +++ b/MekHQ/src/mekhq/gui/FinancesTab.java @@ -36,7 +36,6 @@ import mekhq.gui.model.FinanceTableModel; import mekhq.gui.model.LoanTableModel; import mekhq.gui.utilities.JScrollPaneWithSpeed; - import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; @@ -75,7 +74,7 @@ public final class FinancesTab extends CampaignGuiTab { private FinanceTableModel financeModel; private LoanTableModel loanModel; - private static final transient ResourceBundle resourceMap = ResourceBundle.getBundle("mekhq.resources.FinancesTab", + private static final ResourceBundle resourceMap = ResourceBundle.getBundle("mekhq.resources.FinancesTab", MekHQ.getMHQOptions().getLocale()); //region Constructors @@ -169,7 +168,7 @@ public void initTab() { JPanel panelFinanceRight = new JPanel(new BorderLayout()); JPanel pnlFinanceBtns = new JPanel(new GridLayout(2, 2)); - btnAddFunds = new JButton("Add Funds (GM)"); + btnAddFunds = new JButton("Add Transaction (GM)"); btnAddFunds.addActionListener(ev -> addFundsActionPerformed()); btnAddFunds.setEnabled(getCampaign().isGM()); pnlFinanceBtns.add(btnAddFunds); @@ -303,8 +302,7 @@ private JFreeChart createAmountChart(XYDataset dataset) { plot.setRangeCrosshairVisible(true); XYItemRenderer r = plot.getRenderer(); - if (r instanceof XYLineAndShapeRenderer) { - XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r; + if (r instanceof XYLineAndShapeRenderer renderer) { renderer.setDefaultShapesVisible(true); renderer.setDefaultShapesFilled(true); renderer.setDrawSeriesLineAsPath(true); @@ -401,43 +399,43 @@ public String getFormattedFinancialReport() { longest = Math.max( netWorth.toAmountAndSymbolString().length(), longest); - String formatted = "%1$" + longest + "s"; + String formatted = "%1$" + longest + 's'; sb.append("Net Worth................ ") .append(String.format(formatted, netWorth.toAmountAndSymbolString())).append("\n\n"); sb.append(" Assets............... ") - .append(String.format(formatted, assets.toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, assets.toAmountAndSymbolString())).append('\n'); sb.append(" Cash.............. ") - .append(String.format(formatted, r.getCash().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getCash().toAmountAndSymbolString())).append('\n'); if (r.getMekValue().isPositive()) { sb.append(" Meks............. ") - .append(String.format(formatted, r.getMekValue().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getMekValue().toAmountAndSymbolString())).append('\n'); } if (r.getVeeValue().isPositive()) { sb.append(" Vehicles.......... ") - .append(String.format(formatted, r.getVeeValue().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getVeeValue().toAmountAndSymbolString())).append('\n'); } if (r.getBattleArmorValue().isPositive()) { sb.append(" BattleArmor....... ") - .append(String.format(formatted, r.getBattleArmorValue().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getBattleArmorValue().toAmountAndSymbolString())).append('\n'); } if (r.getInfantryValue().isPositive()) { sb.append(" Infantry.......... ") - .append(String.format(formatted, r.getInfantryValue().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getInfantryValue().toAmountAndSymbolString())).append('\n'); } if (r.getProtoMekValue().isPositive()) { sb.append(" ProtoMeks........ ") - .append(String.format(formatted, r.getProtoMekValue().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getProtoMekValue().toAmountAndSymbolString())).append('\n'); } if (r.getSmallCraftValue().isPositive()) { sb.append(" Small Craft....... ") - .append(String.format(formatted, r.getSmallCraftValue().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getSmallCraftValue().toAmountAndSymbolString())).append('\n'); } if (r.getLargeCraftValue().isPositive()) { sb.append(" Large Craft....... ") - .append(String.format(formatted, r.getLargeCraftValue().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getLargeCraftValue().toAmountAndSymbolString())).append('\n'); } sb.append(" Spare Parts....... ") - .append(String.format(formatted, r.getSparePartsValue().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getSparePartsValue().toAmountAndSymbolString())).append('\n'); if (!getCampaign().getFinances().getAssets().isEmpty()) { for (Asset asset : getCampaign().getFinances().getAssets()) { @@ -453,12 +451,12 @@ public String getFormattedFinancialReport() { assetName += " "; sb.append(" ").append(assetName) .append(String.format(formatted, asset.getValue().toAmountAndSymbolString())) - .append("\n"); + .append('\n'); } } - sb.append("\n"); + sb.append('\n'); sb.append(" Liabilities.......... ") - .append(String.format(formatted, liabilities.toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, liabilities.toAmountAndSymbolString())).append('\n'); sb.append(" Loans............. ") .append(String.format(formatted, r.getLoans().toAmountAndSymbolString())).append("\n\n\n"); @@ -466,24 +464,24 @@ public String getFormattedFinancialReport() { .append(String.format(formatted, r.getMonthlyIncome().minus(r.getMonthlyExpenses()).toAmountAndSymbolString())) .append("\n\n"); sb.append("Monthly Income........... ") - .append(String.format(formatted, r.getMonthlyIncome().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getMonthlyIncome().toAmountAndSymbolString())).append('\n'); sb.append(" Contract Payments.... ") .append(String.format(formatted, r.getContracts().toAmountAndSymbolString())).append("\n\n"); sb.append("Monthly Expenses......... ") - .append(String.format(formatted, r.getMonthlyExpenses().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getMonthlyExpenses().toAmountAndSymbolString())).append('\n'); sb.append(" Salaries............. ") - .append(String.format(formatted, r.getSalaries().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getSalaries().toAmountAndSymbolString())).append('\n'); sb.append(" Maintenance.......... ") - .append(String.format(formatted, r.getMaintenance().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getMaintenance().toAmountAndSymbolString())).append('\n'); sb.append(" Overhead............. ") - .append(String.format(formatted, r.getOverheadCosts().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getOverheadCosts().toAmountAndSymbolString())).append('\n'); if (getCampaign().getCampaignOptions().isUsePeacetimeCost()) { sb.append(" Spare Parts.......... ") - .append(String.format(formatted, r.getMonthlySparePartCosts().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getMonthlySparePartCosts().toAmountAndSymbolString())).append('\n'); sb.append(" Training Munitions... ") - .append(String.format(formatted, r.getMonthlyAmmoCosts().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getMonthlyAmmoCosts().toAmountAndSymbolString())).append('\n'); sb.append(" Fuel................. ") - .append(String.format(formatted, r.getMonthlyFuelCosts().toAmountAndSymbolString())).append("\n"); + .append(String.format(formatted, r.getMonthlyFuelCosts().toAmountAndSymbolString())).append('\n'); } return sb.toString();