Skip to content

Commit

Permalink
feat: adding blurb for acar
Browse files Browse the repository at this point in the history
  • Loading branch information
Scoppio committed Jan 8, 2025
1 parent b42b7a9 commit e497f23
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 15 deletions.
7 changes: 4 additions & 3 deletions megamek/i18n/megamek/client/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -848,12 +848,13 @@ ChatLounge.compact.velocity=Vel
ChatLounge.popup.quirks=Quirks...

# ACAR for Megamek
ChatLounge.name.autoResolveSetup=Auto Resolve

ChatLounge.name.autoResolveSetup=Abstract Combat Auto Resolution
ChatLounge.name.autoResolveSetup.tooltip=Simulate the combat between all forces loaded in the lobby. It converts all units to alpha strike for the simulation and uses the current board and player starting positions.
ChatLounge.name.autoResolveSetup.blurb=Simulate combat with all loaded forces using ACAR rules.
ChatLounge.butRunAutoResolve=Run Simulation
ChatLounge.chkAutoResolve=Calculate chances
ChatLounge.autoresolve.parallelism=Parallelism
ChatLounge.autoresolve.tooltip=Initialize locally the abstract combat auto resolution engine, ACAR uses Alpha Strike data instead.
ChatLounge.autoresolve.tooltip=Run locally the abstract combat auto resolution, it uses Alpha Strike models as proxies for TW units.
ChatLounge.autoresolve.numOfSimulations=Simulation Runs
ChatLounge.autoresolve.numOfSimulations.tooltip=Number of simulations to run before the auto resolve. Values beyond 100 runs can be slow on very larger armies.

Expand Down
42 changes: 30 additions & 12 deletions megamek/src/megamek/client/ui/swing/lobby/ChatLounge.java
Original file line number Diff line number Diff line change
Expand Up @@ -617,19 +617,37 @@ private void setupAutoResolveConfig() {
spnThreadNumber.setEnabled(enabled);
});

JPanel panAcarLabels = new JPanel(new GridLayout(4, 2, 2, 2));
panAcarLabels.add(new JLabel(Messages.getString("ChatLounge.autoresolve.numOfSimulations")));
panAcarLabels.add(spnSimulationRuns);
panAcarLabels.add(new JLabel(Messages.getString("ChatLounge.autoresolve.parallelism")));
panAcarLabels.add(spnThreadNumber);
panAcarLabels.add(new JLabel(Messages.getString("ChatLounge.chkAutoResolve")));
panAcarLabels.add(chkAutoResolve);
panAcarLabels.add(butRunAutoResolve);

panAutoResolveInfo = new FixedYPanel(new GridLayout(1, 1, 2, 2));
JPanel row1 = new JPanel(new GridLayout(1, 1, 2, 2));
row1.setBorder(new EmptyBorder(0, 2, 0, 1));
row1.add(new JLabel(Messages.getString("ChatLounge.name.autoResolveSetup.blurb")));

JPanel row2 = new JPanel(new GridLayout(1, 2, 2, 2));
row2.setBorder(new EmptyBorder(0, 2, 0, 1));
row2.add(new JLabel(Messages.getString("ChatLounge.autoresolve.numOfSimulations")));
row2.add(spnSimulationRuns);

JPanel row3 = new JPanel(new GridLayout(1, 2, 2, 2));
row3.setBorder(new EmptyBorder(0, 2, 0, 1));
row3.add(new JLabel(Messages.getString("ChatLounge.autoresolve.parallelism")));
row3.add(spnThreadNumber);

JPanel row4 = new JPanel(new GridLayout(1, 2, 2, 2));
row4.setBorder(new EmptyBorder(0, 2, 0, 1));
row4.add(new JLabel(Messages.getString("ChatLounge.chkAutoResolve")));
row4.add(chkAutoResolve);

JPanel row5 = new JPanel(new GridLayout(1, 1, 2, 2));
row5.setBorder(new EmptyBorder(0, 2, 0, 1));
row5.add(butRunAutoResolve);

panAutoResolveInfo = new FixedYPanel(new GridLayout(5, 1, 2, 2));
panAutoResolveInfo.setBorder(BorderFactory.createTitledBorder(Messages.getString("ChatLounge.name.autoResolveSetup")));

panAutoResolveInfo.add(panAcarLabels);
panAutoResolveInfo.setToolTipText(Messages.getString("ChatLounge.name.autoResolveSetup.tooltip"));
panAutoResolveInfo.add(row1);
panAutoResolveInfo.add(row2);
panAutoResolveInfo.add(row3);
panAutoResolveInfo.add(row4);
panAutoResolveInfo.add(row5);

refreshPlayerTable();
}
Expand Down

0 comments on commit e497f23

Please sign in to comment.