From 8e5e697cbdb960e57ccfe8cc97d405f55d472536 Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Sun, 13 Apr 2025 02:59:44 -0700 Subject: [PATCH 01/14] ship formation selector --- .../github/manolo8/darkbot/config/Config.java | 46 +++++++-- .../manolo8/darkbot/config/NpcInfo.java | 32 ++++-- .../darkbot/core/manager/HeroManager.java | 14 ++- .../darkbot/gui/tree/EditorProvider.java | 1 + .../gui/tree/editors/ShipModeEditor.java | 51 +++++----- .../darkbot/gui/tree/utils/TableHelpers.java | 3 + .../utils/table/FormationNpcInfoEditor.java | 99 +++++++++++++++++++ 7 files changed, 199 insertions(+), 47 deletions(-) create mode 100644 src/main/java/com/github/manolo8/darkbot/gui/utils/table/FormationNpcInfoEditor.java diff --git a/src/main/java/com/github/manolo8/darkbot/config/Config.java b/src/main/java/com/github/manolo8/darkbot/config/Config.java index ae05ee051..ce87b28fe 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/Config.java +++ b/src/main/java/com/github/manolo8/darkbot/config/Config.java @@ -12,7 +12,6 @@ import com.github.manolo8.darkbot.core.manager.StarManager; import com.github.manolo8.darkbot.core.utils.Lazy; import com.github.manolo8.darkbot.gui.MainGui; -import com.github.manolo8.darkbot.gui.tree.editors.CharacterEditor; import com.github.manolo8.darkbot.gui.tree.utils.NpcTableModel; import com.github.manolo8.darkbot.gui.tree.utils.TableHelpers; import com.github.manolo8.darkbot.utils.OSUtil; @@ -41,6 +40,7 @@ import java.util.LinkedList; import java.util.Locale; import java.util.Map; +import java.util.Optional; import java.util.Queue; import java.util.Set; @@ -80,16 +80,16 @@ public static class General { @Option @Dropdown(options = ModuleSupplier.class) public String CURRENT_MODULE = LootCollectorModule.class.getCanonicalName(); public @Option @Dropdown(options = StarManager.MapOptions.class) int WORKING_MAP = 26; - public @Option ShipConfig OFFENSIVE = new ShipConfig(1, '8'); - public @Option ShipConfig ROAM = new ShipConfig(1, '9'); - public @Option ShipConfig RUN = new ShipConfig(2, '9'); + public @Option ShipConfig OFFENSIVE = new ShipConfig(HeroAPI.Configuration.FIRST, SelectableItem.Formation.STANDARD); + public @Option ShipConfig ROAM = new ShipConfig(HeroAPI.Configuration.SECOND, SelectableItem.Formation.STANDARD); + public @Option ShipConfig RUN = new ShipConfig(HeroAPI.Configuration.SECOND, SelectableItem.Formation.STANDARD); public @Option Safety SAFETY = new Safety(); public static class Safety { public @Option PercentRange REPAIR_HP_RANGE = new PercentRange(0.4, 0.95); public @Option @Percentage double REPAIR_HP_NO_NPC = 0.5; public @Option @Percentage double REPAIR_TO_SHIELD = 1; - public @Option ShipConfig REPAIR = new ShipConfig(1, '9'); + public @Option ShipConfig REPAIR = new ShipConfig(HeroAPI.Configuration.FIRST, SelectableItem.Formation.STANDARD); public @Option @Number(min = 1, max = 9999) @Number.Disabled(value = -1, def = 10) int MAX_DEATHS = 10; @Deprecated public long REVIVE_LOCATION = 1L; @@ -312,7 +312,16 @@ public static class ShipConfig implements LegacyShipMode { public int CONFIG = 1; public Character FORMATION; + private HeroAPI.Configuration newConfiguration; + private SelectableItem.Formation newFormation; + public ShipConfig() {} + + public ShipConfig(HeroAPI.Configuration configuration, SelectableItem.Formation formation) { + this.newConfiguration = configuration; + this.newFormation = formation; + } + public ShipConfig(int CONFIG, Character FORMATION) { this.CONFIG = CONFIG; this.FORMATION = FORMATION; @@ -320,25 +329,44 @@ public ShipConfig(int CONFIG, Character FORMATION) { @Override public HeroAPI.Configuration getConfiguration() { - return HeroAPI.Configuration.of(CONFIG); + if (CONFIG != -1) { + newConfiguration = HeroAPI.Configuration.of(CONFIG); + CONFIG = -1; + } + return newConfiguration != null ? newConfiguration : HeroAPI.Configuration.FIRST; } @Override public SelectableItem.Formation getFormation() { - return ItemUtils.findAssociatedItem(ItemCategory.DRONE_FORMATIONS, FORMATION) - .map(it -> SelectableItem.Formation.of(it.id)) + // find original keybind to drone formation + if (FORMATION != null) { + ItemUtils.findAssociatedItem(ItemCategory.DRONE_FORMATIONS, FORMATION) + .map(it -> SelectableItem.Formation.of(it.id)) + .map(formation -> { + FORMATION = null; + newFormation = formation; + return formation; + }); + } + // Return new formation if available + return Optional.ofNullable(newFormation) .orElse(SelectableItem.Formation.STANDARD); } @Override public String toString() { - return "Config: " + CONFIG + " Formation: " + CharacterEditor.getDisplay(FORMATION); + return "Config: " + newConfiguration + " " + newFormation.name(); } @Override public @Nullable Character getLegacyFormation() { return FORMATION; } + + @Override + public boolean isLegacyFormation() { + return FORMATION != null; + } } public static class PercentRange implements eu.darkbot.api.config.types.PercentRange { diff --git a/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java b/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java index 990c8be64..7953830a5 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java +++ b/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java @@ -26,8 +26,11 @@ public class NpcInfo implements eu.darkbot.api.config.types.NpcInfo { public boolean kill; @Option("config.loot.npc_table.attack_key") public Character attackKey; + // @Option("config.loot.npc_table.attack_formation") + @Option.Ignore + private Character attackFormation; @Option("config.loot.npc_table.attack_formation") - public Character attackFormation; + public SelectableItem.Formation attackFormationNew; public ExtraNpcInfo extra = new ExtraNpcInfo(); public transient String name; @@ -54,12 +57,12 @@ public void set(Double radius, Integer priority, Boolean kill, Character attackK set(radius, priority, kill, attackKey, null, extra); } - public void set(Double radius, Integer priority, Boolean kill, Character attackKey, Character attackFormation, ExtraNpcInfo extra) { + public void set(Double radius, Integer priority, Boolean kill, Character attackKey, SelectableItem.Formation attackFormation, ExtraNpcInfo extra) { if (radius != null) this.radius = radius; if (priority != null) this.priority = priority; if (kill != null) this.kill = kill; if (attackKey != null) this.attackKey = attackKey; - if (attackFormation != null) this.attackFormation = attackFormation; + if (attackFormation != null) this.attackFormationNew = attackFormation; if (extra != null) this.extra = extra; } @@ -68,7 +71,7 @@ public void copyOf(NpcInfo other) { this.priority = other.priority; this.kill = other.kill; this.attackKey = other.attackKey; - this.attackFormation = other.attackFormation; + this.attackFormationNew = other.attackFormationNew; this.extra.flags = new HashSet<>(other.extra.flags); } @@ -109,7 +112,23 @@ public Optional getAmmo() { @Override public Optional getFormation() { - return getHeroItems().getItem(attackFormation, ItemCategory.DRONE_FORMATIONS, SelectableItem.Formation.class); + if (attackFormation != null) { + // Try to find associated formation and update state if found + Optional associatedFormation = getHeroItems() + .getItem(attackFormation, ItemCategory.DRONE_FORMATIONS, SelectableItem.Formation.class) + .map(formation -> { + attackFormation = null; + attackFormationNew = formation; + return formation; + }); + } + + // If we have a new formation, use it and clear the old one + return Optional.of(attackFormationNew); + } + + public void setAttackFormation(SelectableItem.Formation formation) { + this.attackFormationNew = formation; } private static HeroItemsAPI getHeroItems() { @@ -168,7 +187,8 @@ public static String getId(Enum flag) { public static class ExtraNpcInfo { private Set flags = new HashSet<>(); - public ExtraNpcInfo() {} + public ExtraNpcInfo() { + } public ExtraNpcInfo(NpcExtraFlag... flags) { for (NpcExtraFlag flag : flags) set(flag, true); diff --git a/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java b/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java index e3eaa1a4a..51166b416 100644 --- a/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java +++ b/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java @@ -199,10 +199,16 @@ public boolean attackMode(Npc target) { Config.ShipConfig config = this.main.config.GENERAL.OFFENSIVE; boolean otherConfig = target.npcInfo.extra.has(NpcExtra.OPPOSITE_CONFIG); - return setMode( - otherConfig ? ((config.CONFIG % 2) + 1) : config.CONFIG, - target.npcInfo.attackFormation != null ? - target.npcInfo.attackFormation : config.FORMATION); + + HeroAPI.Configuration newConfig = HeroAPI.Configuration.of( + otherConfig ? (config.getConfiguration().ordinal() % 2) + 1 : config.getConfiguration().ordinal() + ); + + SelectableItem.Formation formation = target.npcInfo.attackFormationNew != null ? + target.npcInfo.attackFormationNew : + config.getFormation(); + + return setMode(new ShipMode.ShipModeImpl(newConfig, formation)); } public boolean runMode() { diff --git a/src/main/java/com/github/manolo8/darkbot/gui/tree/EditorProvider.java b/src/main/java/com/github/manolo8/darkbot/gui/tree/EditorProvider.java index e1563ea83..2e19452c4 100644 --- a/src/main/java/com/github/manolo8/darkbot/gui/tree/EditorProvider.java +++ b/src/main/java/com/github/manolo8/darkbot/gui/tree/EditorProvider.java @@ -77,6 +77,7 @@ public EditorProvider(PluginAPI api, defaultEditors.put(ShipMode.class, ShipModeEditor.class); defaultEditors.put(Config.ShipConfig.class, ShipModeEditor.class); + defaultEditors.put(ShipMode.ShipModeImpl.class, ShipModeEditor.class); defaultEditors.put(ImageWrapper.class, ImagePicker.class); diff --git a/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java b/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java index 8a1d47937..773693c53 100644 --- a/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java +++ b/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java @@ -1,15 +1,16 @@ package com.github.manolo8.darkbot.gui.tree.editors; -import com.github.manolo8.darkbot.config.Config; import com.github.manolo8.darkbot.gui.AdvancedConfig; import com.github.manolo8.darkbot.gui.tree.utils.SizedLabel; import eu.darkbot.api.config.ConfigSetting; import eu.darkbot.api.config.types.ShipMode; import eu.darkbot.api.config.util.OptionEditor; +import eu.darkbot.api.game.items.SelectableItem; import eu.darkbot.api.managers.HeroAPI; import javax.swing.*; import java.awt.*; +import java.awt.event.ItemEvent; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; @@ -22,41 +23,31 @@ public class ShipModeEditor extends JPanel implements OptionEditor { .filter(c -> c != HeroAPI.Configuration.UNKNOWN) .map(ConfigButton::new).collect(Collectors.toList()); - private final CharacterEditor formationField = new CharacterEditor(); + private SelectableItem.Formation formation; + + private final JComboBox comboBox = new JComboBox<>(SelectableItem.Formation.values()); public ShipModeEditor() { super(new FlowLayout(FlowLayout.LEFT, 0, 0)); setOpaque(false); - for (ConfigButton configButton : configButtons) { - add(configButton); - configButton.addKeyListener(formationField); // Relay key presses to formation + for (ConfigButton configButton : this.configButtons) { + this.add(configButton); } - add(new SizedLabel(" Formation ")); - add(formationField); + this.comboBox.addItemListener(item -> { + if (item.getStateChange() == ItemEvent.SELECTED) { + setFormation((SelectableItem.Formation) item.getItem()); + } + }); + this.add(new SizedLabel(" ")); + this.add(this.comboBox); } - @Override - public JComponent getEditorComponent(ConfigSetting mode) { - ShipMode value = mode.getValue(); - + public JComponent getEditorComponent(ConfigSetting shipConfig) { + ShipMode value = shipConfig.getValue(); setConfig(value.getConfiguration()); - - if (value instanceof Config.ShipConfig) { - formationField.setValue(((Config.ShipConfig) value).FORMATION); - } else { - // TODO: show a formation selection dropdown? - // we cannot use old & new formats interchangeably here, because - // converting key to formation or formation to key can only be done while the - // bot is running. If running in no-op mode it's impossible to convert. - // Old format must stay old format not to break plugins, and new format can't be - // expressed with old format because it is unknown before runtime. - // The only real solution is to have different editors for old & new format, - // one that is key based, and one that is formation based. - formationField.setValue(null); - } - + setFormation(value.getFormation()); return this; } @@ -65,9 +56,14 @@ private void setConfig(HeroAPI.Configuration config) { configButtons.forEach(ConfigButton::repaint); } + private void setFormation(SelectableItem.Formation formation) { + this.formation = formation; + this.comboBox.setSelectedItem(formation); + } + @Override public ShipMode getEditorValue() { - return new Config.ShipConfig(config.ordinal(), formationField.getEditorValue()); + return ShipMode.of(config, formation); } @Override @@ -97,5 +93,4 @@ public boolean isDefaultButton() { return ShipModeEditor.this.config == config; } } - } diff --git a/src/main/java/com/github/manolo8/darkbot/gui/tree/utils/TableHelpers.java b/src/main/java/com/github/manolo8/darkbot/gui/tree/utils/TableHelpers.java index 9718ccd54..01a61d02d 100644 --- a/src/main/java/com/github/manolo8/darkbot/gui/tree/utils/TableHelpers.java +++ b/src/main/java/com/github/manolo8/darkbot/gui/tree/utils/TableHelpers.java @@ -4,8 +4,10 @@ import com.github.manolo8.darkbot.config.NpcInfo; import com.github.manolo8.darkbot.gui.utils.MultiTableRowSorter; import com.github.manolo8.darkbot.gui.utils.table.ExtraNpcInfoEditor; +import com.github.manolo8.darkbot.gui.utils.table.FormationNpcInfoEditor; import eu.darkbot.api.config.ConfigSetting; import eu.darkbot.api.config.annotations.Table; +import eu.darkbot.api.game.items.SelectableItem; import eu.darkbot.api.managers.ConfigAPI; import eu.darkbot.api.managers.StarSystemAPI; import org.jetbrains.annotations.Nullable; @@ -76,6 +78,7 @@ public void handle(JTable jTable, JScrollPane jScrollPane, new RowSorter.SortKey(2, SortOrder.ASCENDING), new RowSorter.SortKey(0, SortOrder.DESCENDING))); + jTable.setDefaultEditor(SelectableItem.Formation.class, new FormationNpcInfoEditor()); jTable.setDefaultEditor(NpcInfo.ExtraNpcInfo.class, new ExtraNpcInfoEditor()); } } diff --git a/src/main/java/com/github/manolo8/darkbot/gui/utils/table/FormationNpcInfoEditor.java b/src/main/java/com/github/manolo8/darkbot/gui/utils/table/FormationNpcInfoEditor.java new file mode 100644 index 000000000..2ee5af65f --- /dev/null +++ b/src/main/java/com/github/manolo8/darkbot/gui/utils/table/FormationNpcInfoEditor.java @@ -0,0 +1,99 @@ +package com.github.manolo8.darkbot.gui.utils.table; + +import com.github.manolo8.darkbot.gui.utils.PopupMenuListenerAdapter; +import eu.darkbot.api.game.items.SelectableItem; + +import javax.swing.JLabel; +import javax.swing.JMenuItem; +import javax.swing.JPopupMenu; +import javax.swing.JTable; +import javax.swing.SwingUtilities; +import javax.swing.ToolTipManager; +import javax.swing.event.PopupMenuEvent; + +import java.awt.Rectangle; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +public class FormationNpcInfoEditor extends TableDelegateEditor { + + private static final ToolTipManager TOOLTIPS = ToolTipManager.sharedInstance(); + private final JPopupMenu popupMenu = new JPopupMenu(); + private SelectableItem.Formation selectedFormation; + private int tooltipDelay = -1; + + public FormationNpcInfoEditor() { + super(new JLabel()); + + popupMenu.addPopupMenuListener(new PopupMenuListenerAdapter() { + @Override + public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { + if (tooltipDelay != -1) { + TOOLTIPS.setInitialDelay(tooltipDelay); // Restore original delay + } + } + }); + + // "None" option to clear selection + JMenuItem noneItem = new JMenuItem("None"); + noneItem.addActionListener(e -> { + selectedFormation = null; + delegate.setText("None"); + stopCellEditing(); + }); + popupMenu.add(noneItem); + popupMenu.addSeparator(); + + // Add all formations as selectable menu items + for (SelectableItem.Formation formation : SelectableItem.Formation.values()) { + JMenuItem menuItem = new JMenuItem(formation.toString()); + menuItem.setToolTipText("Select formation: " + formation); // Set tooltip + menuItem.addActionListener(new FormationSelectionHandler(formation)); + popupMenu.add(menuItem); + } + } + + @Override + protected void setValue(Object val) { + if (val instanceof SelectableItem.Formation) { + selectedFormation = (SelectableItem.Formation) val; + delegate.setText(selectedFormation.name()); + } else { + selectedFormation = null; + delegate.setText("None"); + } + } + + @Override + protected Object getValue() { + return selectedFormation; + } + + public void startEditing(JTable table, Object value, boolean isSelected, int row, int column) { + SwingUtilities.invokeLater(() -> { + if (!table.isShowing()) return; + + Rectangle cellRect = table.getCellRect(row, column, false); + int x = cellRect.x; + int y = cellRect.y + cellRect.height; + + popupMenu.show(table, x, y); + }); + } + + private class FormationSelectionHandler implements ActionListener { + private final SelectableItem.Formation formation; + + public FormationSelectionHandler(SelectableItem.Formation formation) { + this.formation = formation; + } + + @Override + public void actionPerformed(ActionEvent e) { + selectedFormation = formation; + delegate.setText(formation.toString()); + stopCellEditing(); + } + } +} + From dfcc20e81403217496058b5fae9ebac33a0ec6c1 Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Sun, 13 Apr 2025 03:01:45 -0700 Subject: [PATCH 02/14] Update NpcInfo.java --- src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java b/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java index 7953830a5..38aada483 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java +++ b/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java @@ -114,8 +114,7 @@ public Optional getAmmo() { public Optional getFormation() { if (attackFormation != null) { // Try to find associated formation and update state if found - Optional associatedFormation = getHeroItems() - .getItem(attackFormation, ItemCategory.DRONE_FORMATIONS, SelectableItem.Formation.class) + getHeroItems().getItem(attackFormation, ItemCategory.DRONE_FORMATIONS, SelectableItem.Formation.class) .map(formation -> { attackFormation = null; attackFormationNew = formation; From 14f2bf965a7c77f3dd0ded6bab984b16bd4daac6 Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Sat, 26 Apr 2025 16:27:43 -0700 Subject: [PATCH 03/14] clean up select formation npc --- .../com/github/manolo8/darkbot/core/manager/HeroManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java b/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java index 51166b416..1fc2c076b 100644 --- a/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java +++ b/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java @@ -204,9 +204,7 @@ public boolean attackMode(Npc target) { otherConfig ? (config.getConfiguration().ordinal() % 2) + 1 : config.getConfiguration().ordinal() ); - SelectableItem.Formation formation = target.npcInfo.attackFormationNew != null ? - target.npcInfo.attackFormationNew : - config.getFormation(); + SelectableItem.Formation formation = target.npcInfo.getFormation().orElse(config.getFormation()); return setMode(new ShipMode.ShipModeImpl(newConfig, formation)); } From 2c596ee016cee850cf3020a1da7f640e196fc28d Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Sat, 26 Apr 2025 21:22:11 -0700 Subject: [PATCH 04/14] provide opposite config --- .../github/manolo8/darkbot/config/Config.java | 235 +++++++++++++----- .../darkbot/core/manager/HeroManager.java | 4 +- 2 files changed, 172 insertions(+), 67 deletions(-) diff --git a/src/main/java/com/github/manolo8/darkbot/config/Config.java b/src/main/java/com/github/manolo8/darkbot/config/Config.java index ce87b28fe..a32b097d0 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/Config.java +++ b/src/main/java/com/github/manolo8/darkbot/config/Config.java @@ -76,44 +76,71 @@ public class Config implements eu.darkbot.api.config.legacy.Config { public transient long changedAt; public @Option General GENERAL = new General(); + public static class General { - @Option @Dropdown(options = ModuleSupplier.class) + @Option + @Dropdown(options = ModuleSupplier.class) public String CURRENT_MODULE = LootCollectorModule.class.getCanonicalName(); - public @Option @Dropdown(options = StarManager.MapOptions.class) int WORKING_MAP = 26; + public @Option + @Dropdown(options = StarManager.MapOptions.class) int WORKING_MAP = 26; public @Option ShipConfig OFFENSIVE = new ShipConfig(HeroAPI.Configuration.FIRST, SelectableItem.Formation.STANDARD); public @Option ShipConfig ROAM = new ShipConfig(HeroAPI.Configuration.SECOND, SelectableItem.Formation.STANDARD); public @Option ShipConfig RUN = new ShipConfig(HeroAPI.Configuration.SECOND, SelectableItem.Formation.STANDARD); public @Option Safety SAFETY = new Safety(); + public static class Safety { public @Option PercentRange REPAIR_HP_RANGE = new PercentRange(0.4, 0.95); - public @Option @Percentage double REPAIR_HP_NO_NPC = 0.5; - public @Option @Percentage double REPAIR_TO_SHIELD = 1; + public @Option + @Percentage double REPAIR_HP_NO_NPC = 0.5; + public @Option + @Percentage double REPAIR_TO_SHIELD = 1; public @Option ShipConfig REPAIR = new ShipConfig(HeroAPI.Configuration.FIRST, SelectableItem.Formation.STANDARD); - public @Option @Number(min = 1, max = 9999) @Number.Disabled(value = -1, def = 10) int MAX_DEATHS = 10; + public @Option + @Number(min = 1, max = 9999) + @Number.Disabled(value = -1, def = 10) int MAX_DEATHS = 10; @Deprecated public long REVIVE_LOCATION = 1L; - public @Option("config.general.safety.revive_location") @Dropdown ReviveLocation REVIVE = ReviveLocation.BASE; - public @Option @Visibility(Level.INTERMEDIATE) @Number(min = 5, max = 60, step = 10) int WAIT_BEFORE_REVIVE = 5; - public @Option @Visibility(Level.INTERMEDIATE) @Number(min = 3, max = 15 * 60, step = 10) int WAIT_AFTER_REVIVE = 90; - public @Option @Visibility(Level.INTERMEDIATE) - @Number(min = 0, max = 99999, step = 50) @Number.Disabled(value = 0, def = 500) int INSTANT_REPAIR = 0; + public @Option("config.general.safety.revive_location") + @Dropdown ReviveLocation REVIVE = ReviveLocation.BASE; + public @Option + @Visibility(Level.INTERMEDIATE) + @Number(min = 5, max = 60, step = 10) int WAIT_BEFORE_REVIVE = 5; + public @Option + @Visibility(Level.INTERMEDIATE) + @Number(min = 3, max = 15 * 60, step = 10) int WAIT_AFTER_REVIVE = 90; + public @Option + @Visibility(Level.INTERMEDIATE) + @Number(min = 0, max = 99999, step = 50) + @Number.Disabled(value = 0, def = 500) int INSTANT_REPAIR = 0; } public @Option Running RUNNING = new Running(); + public static class Running { public @Option boolean RUN_FROM_ENEMIES = true; - public @Option @Tag(Tag.Default.NONE) PlayerTag ENEMIES_TAG = null; - public @Option @Visibility(Level.INTERMEDIATE) @Number(max = 24 * 60 * 60, step = 300) int REMEMBER_ENEMIES_FOR = 300; + public @Option + @Tag(Tag.Default.NONE) PlayerTag ENEMIES_TAG = null; + public @Option + @Visibility(Level.INTERMEDIATE) + @Number(max = 24 * 60 * 60, step = 300) int REMEMBER_ENEMIES_FOR = 300; public @Option boolean RUN_FROM_ENEMIES_SIGHT = false; public @Option boolean STOP_RUNNING_NO_SIGHT = true; - public @Option @Visibility(Level.INTERMEDIATE) @Number(min = 500, max = 20000, step = 500) int MAX_SIGHT_DISTANCE = 4000; + public @Option + @Visibility(Level.INTERMEDIATE) + @Number(min = 500, max = 20000, step = 500) int MAX_SIGHT_DISTANCE = 4000; public @Option Character SHIP_ABILITY; - public @Option @Visibility(Level.INTERMEDIATE) @Number(max = 20000, step = 500) int SHIP_ABILITY_MIN = 1500; - public @Option @Visibility(Level.INTERMEDIATE) @Number(max = 20000, step = 500) int RUN_FURTHEST_PORT = 1500; + public @Option + @Visibility(Level.INTERMEDIATE) + @Number(max = 20000, step = 500) int SHIP_ABILITY_MIN = 1500; + public @Option + @Visibility(Level.INTERMEDIATE) + @Number(max = 20000, step = 500) int RUN_FURTHEST_PORT = 1500; } - public @Option @Visibility(Level.INTERMEDIATE) Roaming ROAMING = new Roaming(); + public @Option + @Visibility(Level.INTERMEDIATE) Roaming ROAMING = new Roaming(); + public static class Roaming { public @Option boolean KEEP = true; public @Option boolean SEQUENTIAL = false; @@ -123,11 +150,13 @@ public static class Roaming { } public @Option Collect COLLECT = new Collect(); + public static class Collect { public @Option boolean STAY_AWAY_FROM_ENEMIES; public @Option boolean AUTO_CLOACK; public @Option Character AUTO_CLOACK_KEY; - public @Option @Number(max = 10000, step = 50) int RADIUS = 400; + public @Option + @Number(max = 10000, step = 50) int RADIUS = 400; public @Option boolean IGNORE_CONTESTED_BOXES = true; @Option @@ -137,25 +166,37 @@ public static class Collect { } public @Option Loot LOOT = new Loot(); + public static class Loot { public @Option Sab SAB = new Sab(); public @Option Rsb RSB = new Rsb(); + public static class Sab { public @Option boolean ENABLED = false; public @Option Character KEY = '2'; - public @Option @Percentage double PERCENT = 0.8; - public @Option @Number(min = 500, max = 1_000_000, step = 1000) int NPC_AMOUNT = 12000; - public @Option @Visibility(Level.ADVANCED) Condition CONDITION; + public @Option + @Percentage double PERCENT = 0.8; + public @Option + @Number(min = 500, max = 1_000_000, step = 1000) int NPC_AMOUNT = 12000; + public @Option + @Visibility(Level.ADVANCED) Condition CONDITION; } + public static class Rsb { public @Option boolean ENABLED = false; public @Option Character KEY = '3'; public @Deprecated int AMMO_REFRESH = 3500; } + public @Option Character AMMO_KEY = '1'; - public @Option @Visibility(Level.INTERMEDIATE) Character SHIP_ABILITY; - public @Option @Visibility(Level.INTERMEDIATE) @Number(min = 50_000, max = 5_000_000, step = 50_000) int SHIP_ABILITY_MIN = 150_000; - public @Option @Visibility(Level.ADVANCED) @Number(max = 10, step = 1) int MAX_CIRCLE_ITERATIONS = 5; + public @Option + @Visibility(Level.INTERMEDIATE) Character SHIP_ABILITY; + public @Option + @Visibility(Level.INTERMEDIATE) + @Number(min = 50_000, max = 5_000_000, step = 50_000) int SHIP_ABILITY_MIN = 150_000; + public @Option + @Visibility(Level.ADVANCED) + @Number(max = 10, step = 1) int MAX_CIRCLE_ITERATIONS = 5; public @Option boolean RUN_CONFIG_IN_CIRCLE = true; public @Option boolean GROUP_NPCS = true; @@ -166,20 +207,27 @@ public static class Rsb { public @Option Map NPC_INFOS = new HashMap<>(); public transient Lazy MODIFIED_NPC = new Lazy.NoCache<>(); - public @Option @Visibility(Level.INTERMEDIATE) @Number(min = 1000, max = 20000, step = 500) int NPC_DISTANCE_IGNORE = 3000; + public @Option + @Visibility(Level.INTERMEDIATE) + @Number(min = 1000, max = 20000, step = 500) int NPC_DISTANCE_IGNORE = 3000; } public @Option PetSettings PET = new PetSettings(); + public static class PetSettings { public @Option boolean ENABLED = false; - public @Option @Dropdown(options = PetGears.class) PetGear MODULE_ID = PetGear.PASSIVE; + public @Option + @Dropdown(options = PetGears.class) PetGear MODULE_ID = PetGear.PASSIVE; } public @Option GroupSettings GROUP = new GroupSettings(); + public static class GroupSettings { public @Option boolean ACCEPT_INVITES = false; - public @Option @Tag(Tag.Default.ALL) PlayerTag WHITELIST_TAG = null; - public @Option @Tag(Tag.Default.NONE) PlayerTag INVITE_TAG = null; + public @Option + @Tag(Tag.Default.ALL) PlayerTag WHITELIST_TAG = null; + public @Option + @Tag(Tag.Default.NONE) PlayerTag INVITE_TAG = null; public @Option boolean OPEN_INVITES = false; public @Option boolean BLOCK_INVITES = false; public @Option boolean LEAVE_NO_WHITELISTED = false; @@ -188,34 +236,55 @@ public static class GroupSettings { } public @Option Miscellaneous MISCELLANEOUS = new Miscellaneous(); + public static class Miscellaneous { public @Option boolean REFRESH_AFTER_REVIVE = false; - public @Option @Number(max = 60 * 12, step = 10) int REFRESH_TIME = 60; - public @Option @Number(max = 60 * 12, step = 10) int PAUSE_FOR = 0; + public @Option + @Number(max = 60 * 12, step = 10) int REFRESH_TIME = 60; + public @Option + @Number(max = 60 * 12, step = 10) int PAUSE_FOR = 0; public @Option boolean RESET_REFRESH = true; public @Option boolean SOLVE_BACKPAGE_CAPTCHA = false; - public @Option @Visibility(Level.INTERMEDIATE) boolean UPDATE_STATS_WHILE_PAUSED = true; - public @Option @Visibility(Level.INTERMEDIATE) @Percentage double DRONE_REPAIR_PERCENTAGE = 0.9; - public @Option @Visibility(Level.INTERMEDIATE) boolean HONOR_LOST_EXACT = true; - public @Option @Visibility(Level.INTERMEDIATE) boolean LOG_CHAT = false; - public @Option @Visibility(Level.INTERMEDIATE) boolean LOG_DEATHS = false; - public @Option @Visibility(Level.INTERMEDIATE) boolean AVOID_MINES = true; - public @Option @Visibility(Level.INTERMEDIATE) boolean AVOID_CBS = true; - public @Option @Visibility(Level.INTERMEDIATE) boolean AVOID_RADIATION = true; - public @Option @Visibility(Level.INTERMEDIATE) boolean USERNAME_ON_TITLE = false; - public @Option @Visibility(Level.ADVANCED) boolean AUTO_REFINE = false; + public @Option + @Visibility(Level.INTERMEDIATE) boolean UPDATE_STATS_WHILE_PAUSED = true; + public @Option + @Visibility(Level.INTERMEDIATE) + @Percentage double DRONE_REPAIR_PERCENTAGE = 0.9; + public @Option + @Visibility(Level.INTERMEDIATE) boolean HONOR_LOST_EXACT = true; + public @Option + @Visibility(Level.INTERMEDIATE) boolean LOG_CHAT = false; + public @Option + @Visibility(Level.INTERMEDIATE) boolean LOG_DEATHS = false; + public @Option + @Visibility(Level.INTERMEDIATE) boolean AVOID_MINES = true; + public @Option + @Visibility(Level.INTERMEDIATE) boolean AVOID_CBS = true; + public @Option + @Visibility(Level.INTERMEDIATE) boolean AVOID_RADIATION = true; + public @Option + @Visibility(Level.INTERMEDIATE) boolean USERNAME_ON_TITLE = false; + public @Option + @Visibility(Level.ADVANCED) boolean AUTO_REFINE = false; } public @Option BotSettings BOT_SETTINGS = new BotSettings(); + public static class BotSettings { public @Option BotGui BOT_GUI = new BotGui(); + public static class BotGui { - @Option @Dropdown(options = LanguageSupplier.class) + @Option + @Dropdown(options = LanguageSupplier.class) public Locale LOCALE = new Locale(Locale.getDefault().getLanguage()); - public @Option @Visibility(Level.INTERMEDIATE) boolean CONFIRM_EXIT = true; - public @Option @Visibility(Level.INTERMEDIATE) boolean SAVE_GUI_POS = false; - public @Option @Visibility(Level.ADVANCED) @Number(min = 1, max = 20, step = 1) int BUTTON_SIZE = 4; + public @Option + @Visibility(Level.INTERMEDIATE) boolean CONFIRM_EXIT = true; + public @Option + @Visibility(Level.INTERMEDIATE) boolean SAVE_GUI_POS = false; + public @Option + @Visibility(Level.ADVANCED) + @Number(min = 1, max = 20, step = 1) int BUTTON_SIZE = 4; public boolean ALWAYS_ON_TOP = true; // No @Option. Edited via button public WindowPosition MAIN_GUI_WINDOW = new WindowPosition(); @@ -230,9 +299,12 @@ public static class WindowPosition { } } - public @Option @Visibility(Level.ADVANCED) APIConfig API_CONFIG = new APIConfig(); + public @Option + @Visibility(Level.ADVANCED) APIConfig API_CONFIG = new APIConfig(); + public static class APIConfig { - public @Option @Dropdown BrowserApi BROWSER_API = OSUtil.getDefaultAPI(); + public @Option + @Dropdown BrowserApi BROWSER_API = OSUtil.getDefaultAPI(); public @Option boolean FULLY_HIDE_API = true; public @Option boolean FORCE_GAME_LANGUAGE = false; public @Option boolean ENFORCE_HW_ACCEL = true; @@ -247,7 +319,9 @@ public static class APIConfig { public GameAPI.Handler.GameQuality gameQuality = GameAPI.Handler.GameQuality.LOW; public transient int transparency = 100, volume = 100; - public @Option @Table @Visibility(Level.DEVELOPER) Map BLOCK_PATTERNS = new HashMap<>(); + public @Option + @Table + @Visibility(Level.DEVELOPER) Map BLOCK_PATTERNS = new HashMap<>(); @Configuration("config.bot_settings.api_config.block_patterns") public static class PatternInfo { @@ -258,53 +332,77 @@ public static class PatternInfo { } public @Option MapDisplay MAP_DISPLAY = new MapDisplay(); + public static class MapDisplay { - @Option @Dropdown(multi = true) + @Option + @Dropdown(multi = true) public Set TOGGLE = EnumSet.of( HERO_NAME, HP_SHIELD_NUM, ZONES, STATS_AREA, BOOSTER_AREA, GROUP_NAMES, GROUP_AREA, SHOW_PET); - public @Option @Visibility(Level.INTERMEDIATE) @Number(max = 300, step = 1) int TRAIL_LENGTH = 15; - public @Option @Visibility(Level.INTERMEDIATE) boolean ROUND_ENTITIES = false; - public @Option @Visibility(Level.INTERMEDIATE) @Percentage double MAP_ZOOM = 1; - public @Option @Visibility(Level.ADVANCED) @Number(min = 1, step = 1, max = 25) int REFRESH_DELAY = 1; - public @Option @Visibility(Level.INTERMEDIATE) boolean MAP_START_STOP = false; - public @Option("colors") @Visibility(Level.ADVANCED) ColorScheme cs = new ColorScheme(); + public @Option + @Visibility(Level.INTERMEDIATE) + @Number(max = 300, step = 1) int TRAIL_LENGTH = 15; + public @Option + @Visibility(Level.INTERMEDIATE) boolean ROUND_ENTITIES = false; + public @Option + @Visibility(Level.INTERMEDIATE) + @Percentage double MAP_ZOOM = 1; + public @Option + @Visibility(Level.ADVANCED) + @Number(min = 1, step = 1, max = 25) int REFRESH_DELAY = 1; + public @Option + @Visibility(Level.INTERMEDIATE) boolean MAP_START_STOP = false; + public @Option("colors") + @Visibility(Level.ADVANCED) ColorScheme cs = new ColorScheme(); } - public @Option @Visibility(Level.INTERMEDIATE) CustomBackground CUSTOM_BACKGROUND = new CustomBackground(); + public @Option + @Visibility(Level.INTERMEDIATE) CustomBackground CUSTOM_BACKGROUND = new CustomBackground(); + public static class CustomBackground { public @Option boolean ENABLED = false; public @Option boolean USE_GAME_BACKGROUND = false; - public @Option @Percentage double OPACITY = 0.3f; + public @Option + @Percentage double OPACITY = 0.3f; public @Option ImageWrapper IMAGE = new ImageWrapper(); } public @Option Performance PERFORMANCE = new Performance(); + public static class Performance { public @Option boolean ALWAYS_ENABLED = true; public @Option("config.bot_settings.api_config.disable_render") boolean DISABLE_RENDER = false; public @Option("config.bot_settings.api_config.max_fps") - @Number(min = 1, max = 60) @Number.Disabled(value = 0, def = 15) int MAX_FPS = 0; + @Number(min = 1, max = 60) + @Number.Disabled(value = 0, def = 15) int MAX_FPS = 0; - public @Option("config.bot_settings.other.min_tick") @Visibility(Level.ADVANCED) - @Number(min = 10, max = 250) @Number.Disabled(value = 15, def = 15) int MIN_TICK = 15; + public @Option("config.bot_settings.other.min_tick") + @Visibility(Level.ADVANCED) + @Number(min = 10, max = 250) + @Number.Disabled(value = 15, def = 15) int MIN_TICK = 15; } - public @Option @Visibility(Level.INTERMEDIATE) Other OTHER = new Other(); + public @Option + @Visibility(Level.INTERMEDIATE) Other OTHER = new Other(); + public static class Other { public @Option boolean SHOW_INSTRUCTIONS = true; public @Option boolean DISABLE_MASTER_PASSWORD = false; public @Option boolean ALWAYS_SHOW_CAPTCHA = false; - public @Option @Number(min = 10, max = 300) int ZONE_RESOLUTION = 30; - public @Option @Visibility(Level.ADVANCED) boolean DEV_STUFF = false; + public @Option + @Number(min = 10, max = 300) int ZONE_RESOLUTION = 30; + public @Option + @Visibility(Level.ADVANCED) boolean DEV_STUFF = false; } } public /*@Option("Extra actions")*/ ExtraActions EXTRA = new ExtraActions(); + public static class ExtraActions { // Dummy testing condition public @Option Condition CONDITION; - public @Option @Table Map ACTION_INFOS = new HashMap<>(); + public @Option + @Table Map ACTION_INFOS = new HashMap<>(); public transient Lazy MODIFIED_ACTIONS = new Lazy.NoCache<>(); } @@ -315,7 +413,8 @@ public static class ShipConfig implements LegacyShipMode { private HeroAPI.Configuration newConfiguration; private SelectableItem.Formation newFormation; - public ShipConfig() {} + public ShipConfig() { + } public ShipConfig(HeroAPI.Configuration configuration, SelectableItem.Formation formation) { this.newConfiguration = configuration; @@ -336,6 +435,12 @@ public HeroAPI.Configuration getConfiguration() { return newConfiguration != null ? newConfiguration : HeroAPI.Configuration.FIRST; } + public HeroAPI.Configuration getOppositeConfiguration() { + return getConfiguration() == HeroAPI.Configuration.FIRST ? + HeroAPI.Configuration.SECOND : + HeroAPI.Configuration.FIRST; + } + @Override public SelectableItem.Formation getFormation() { // find original keybind to drone formation @@ -372,7 +477,9 @@ public boolean isLegacyFormation() { public static class PercentRange implements eu.darkbot.api.config.types.PercentRange { public double min, max; - public PercentRange() {} + public PercentRange() { + } + public PercentRange(double min, double max) { this.min = min; this.max = max; diff --git a/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java b/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java index 1fc2c076b..ccb702fe4 100644 --- a/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java +++ b/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java @@ -200,9 +200,7 @@ public boolean attackMode(Npc target) { boolean otherConfig = target.npcInfo.extra.has(NpcExtra.OPPOSITE_CONFIG); - HeroAPI.Configuration newConfig = HeroAPI.Configuration.of( - otherConfig ? (config.getConfiguration().ordinal() % 2) + 1 : config.getConfiguration().ordinal() - ); + HeroAPI.Configuration newConfig = otherConfig ? config.getOppositeConfiguration() : config.getConfiguration(); SelectableItem.Formation formation = target.npcInfo.getFormation().orElse(config.getFormation()); From 65aa27a99eb5533bd3a6b079a78d9c3035f3ab1e Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Sat, 26 Apr 2025 21:41:00 -0700 Subject: [PATCH 05/14] honor new shipmode, keep old stuff behind --- .../github/manolo8/darkbot/config/Config.java | 19 +++++++++---------- .../gui/tree/editors/ShipModeEditor.java | 12 ++++++------ 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/github/manolo8/darkbot/config/Config.java b/src/main/java/com/github/manolo8/darkbot/config/Config.java index a32b097d0..f82c85a6f 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/Config.java +++ b/src/main/java/com/github/manolo8/darkbot/config/Config.java @@ -428,10 +428,11 @@ public ShipConfig(int CONFIG, Character FORMATION) { @Override public HeroAPI.Configuration getConfiguration() { - if (CONFIG != -1) { - newConfiguration = HeroAPI.Configuration.of(CONFIG); - CONFIG = -1; + if (newConfiguration != null) { + return newConfiguration; } + + newConfiguration = HeroAPI.Configuration.of(CONFIG); return newConfiguration != null ? newConfiguration : HeroAPI.Configuration.FIRST; } @@ -443,15 +444,13 @@ public HeroAPI.Configuration getOppositeConfiguration() { @Override public SelectableItem.Formation getFormation() { + if (newFormation != null) { + return newFormation; + } // find original keybind to drone formation if (FORMATION != null) { - ItemUtils.findAssociatedItem(ItemCategory.DRONE_FORMATIONS, FORMATION) - .map(it -> SelectableItem.Formation.of(it.id)) - .map(formation -> { - FORMATION = null; - newFormation = formation; - return formation; - }); + newFormation = ItemUtils.findAssociatedItem(ItemCategory.DRONE_FORMATIONS, FORMATION) + .map(item -> SelectableItem.Formation.of(item.id)).orElse(null); } // Return new formation if available return Optional.ofNullable(newFormation) diff --git a/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java b/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java index 773693c53..629428274 100644 --- a/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java +++ b/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java @@ -17,13 +17,13 @@ public class ShipModeEditor extends JPanel implements OptionEditor { - private HeroAPI.Configuration config; + private HeroAPI.Configuration newConfig; private final List configButtons = Arrays.stream(HeroAPI.Configuration.values()) .filter(c -> c != HeroAPI.Configuration.UNKNOWN) .map(ConfigButton::new).collect(Collectors.toList()); - private SelectableItem.Formation formation; + private SelectableItem.Formation newFormation; private final JComboBox comboBox = new JComboBox<>(SelectableItem.Formation.values()); @@ -52,18 +52,18 @@ public JComponent getEditorComponent(ConfigSetting shipConfig) { } private void setConfig(HeroAPI.Configuration config) { - this.config = config; + this.newConfig = config; configButtons.forEach(ConfigButton::repaint); } private void setFormation(SelectableItem.Formation formation) { - this.formation = formation; + this.newFormation = formation; this.comboBox.setSelectedItem(formation); } @Override public ShipMode getEditorValue() { - return ShipMode.of(config, formation); + return ShipMode.of(newConfig, newFormation); } @Override @@ -90,7 +90,7 @@ private class ConfigButton extends JButton { @Override public boolean isDefaultButton() { - return ShipModeEditor.this.config == config; + return ShipModeEditor.this.newConfig == config; } } } From 5481bfa338da566430a82f12f884a7f779f43e55 Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Sat, 26 Apr 2025 21:45:23 -0700 Subject: [PATCH 06/14] keep config updated --- src/main/java/com/github/manolo8/darkbot/config/Config.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/github/manolo8/darkbot/config/Config.java b/src/main/java/com/github/manolo8/darkbot/config/Config.java index f82c85a6f..b6cc6682a 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/Config.java +++ b/src/main/java/com/github/manolo8/darkbot/config/Config.java @@ -10,6 +10,7 @@ import com.github.manolo8.darkbot.config.utils.ItemUtils; import com.github.manolo8.darkbot.core.api.GameAPI; import com.github.manolo8.darkbot.core.manager.StarManager; +import com.github.manolo8.darkbot.core.objects.facades.SlotBarsProxy; import com.github.manolo8.darkbot.core.utils.Lazy; import com.github.manolo8.darkbot.gui.MainGui; import com.github.manolo8.darkbot.gui.tree.utils.NpcTableModel; @@ -429,6 +430,7 @@ public ShipConfig(int CONFIG, Character FORMATION) { @Override public HeroAPI.Configuration getConfiguration() { if (newConfiguration != null) { + CONFIG = newConfiguration.ordinal(); return newConfiguration; } From c15b23feca4cd2aca94a4e880a65aa2a5b4697fb Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Sat, 26 Apr 2025 21:58:51 -0700 Subject: [PATCH 07/14] keep formation updated --- .../java/com/github/manolo8/darkbot/config/Config.java | 1 + .../com/github/manolo8/darkbot/config/utils/ItemUtils.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/com/github/manolo8/darkbot/config/Config.java b/src/main/java/com/github/manolo8/darkbot/config/Config.java index b6cc6682a..f9001beed 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/Config.java +++ b/src/main/java/com/github/manolo8/darkbot/config/Config.java @@ -447,6 +447,7 @@ public HeroAPI.Configuration getOppositeConfiguration() { @Override public SelectableItem.Formation getFormation() { if (newFormation != null) { + FORMATION = ItemUtils.findAssociatedItem(ItemCategory.DRONE_FORMATIONS, newFormation); return newFormation; } // find original keybind to drone formation diff --git a/src/main/java/com/github/manolo8/darkbot/config/utils/ItemUtils.java b/src/main/java/com/github/manolo8/darkbot/config/utils/ItemUtils.java index 75494a893..137e5a2d2 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/utils/ItemUtils.java +++ b/src/main/java/com/github/manolo8/darkbot/config/utils/ItemUtils.java @@ -5,6 +5,7 @@ import com.github.manolo8.darkbot.core.objects.slotbars.CategoryBar; import com.github.manolo8.darkbot.core.objects.slotbars.Item; import eu.darkbot.api.game.items.ItemCategory; +import eu.darkbot.api.game.items.SelectableItem; import org.jetbrains.annotations.Nullable; import java.util.Optional; @@ -34,4 +35,10 @@ public static Optional findAssociatedItem(@Nullable ItemCategory category, .findAny(); } + public static Character findAssociatedItem(@Nullable ItemCategory category, SelectableItem selectableItem) { + Main main = Main.INSTANCE; + + return main.facadeManager.slotBars.getKeyBind(selectableItem); + } + } From 786f14b1feacffdf10dc95c8c9e347398e97590d Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Tue, 26 Aug 2025 21:02:36 -0700 Subject: [PATCH 08/14] add future icon --- .../github/manolo8/darkbot/config/Config.java | 6 +- .../manolo8/darkbot/config/NpcInfo.java | 3 +- .../darkbot/core/manager/HeroManager.java | 2 +- .../gui/tree/editors/ShipModeEditor.java | 57 ++++++++++++++----- 4 files changed, 50 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/github/manolo8/darkbot/config/Config.java b/src/main/java/com/github/manolo8/darkbot/config/Config.java index f9001beed..c8bad45d0 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/Config.java +++ b/src/main/java/com/github/manolo8/darkbot/config/Config.java @@ -10,7 +10,6 @@ import com.github.manolo8.darkbot.config.utils.ItemUtils; import com.github.manolo8.darkbot.core.api.GameAPI; import com.github.manolo8.darkbot.core.manager.StarManager; -import com.github.manolo8.darkbot.core.objects.facades.SlotBarsProxy; import com.github.manolo8.darkbot.core.utils.Lazy; import com.github.manolo8.darkbot.gui.MainGui; import com.github.manolo8.darkbot.gui.tree.utils.NpcTableModel; @@ -25,6 +24,7 @@ import eu.darkbot.api.config.annotations.Tag; import eu.darkbot.api.config.annotations.Visibility; import eu.darkbot.api.config.annotations.Visibility.Level; +import eu.darkbot.api.config.types.ShipMode; import eu.darkbot.api.game.enums.PetGear; import eu.darkbot.api.game.items.ItemCategory; import eu.darkbot.api.game.items.SelectableItem; @@ -460,6 +460,10 @@ public SelectableItem.Formation getFormation() { .orElse(SelectableItem.Formation.STANDARD); } + public ShipMode getShipMode(){ + return ShipMode.of(newConfiguration, newFormation); + } + @Override public String toString() { return "Config: " + newConfiguration + " " + newFormation.name(); diff --git a/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java b/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java index 38aada483..529550cd0 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java +++ b/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java @@ -13,6 +13,7 @@ import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; +import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; @@ -121,9 +122,9 @@ public Optional getFormation() { return formation; }); } + return Optional.of(Objects.requireNonNullElse(attackFormationNew, SelectableItem.Formation.STANDARD)); // If we have a new formation, use it and clear the old one - return Optional.of(attackFormationNew); } public void setAttackFormation(SelectableItem.Formation formation) { diff --git a/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java b/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java index ccb702fe4..d13e90b0f 100644 --- a/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java +++ b/src/main/java/com/github/manolo8/darkbot/core/manager/HeroManager.java @@ -217,7 +217,7 @@ public boolean roamMode() { @Deprecated public boolean setMode(Config.ShipConfig config) { - return setMode(config.CONFIG, config.FORMATION); + return setMode(config.getShipMode()); } @Deprecated diff --git a/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java b/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java index 629428274..27bb4d4a4 100644 --- a/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java +++ b/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java @@ -1,12 +1,14 @@ package com.github.manolo8.darkbot.gui.tree.editors; +import com.github.manolo8.darkbot.config.Config; import com.github.manolo8.darkbot.gui.AdvancedConfig; -import com.github.manolo8.darkbot.gui.tree.utils.SizedLabel; +import com.github.manolo8.darkbot.gui.utils.UIUtils; import eu.darkbot.api.config.ConfigSetting; import eu.darkbot.api.config.types.ShipMode; import eu.darkbot.api.config.util.OptionEditor; import eu.darkbot.api.game.items.SelectableItem; import eu.darkbot.api.managers.HeroAPI; +import net.miginfocom.swing.MigLayout; import javax.swing.*; import java.awt.*; @@ -21,29 +23,33 @@ public class ShipModeEditor extends JPanel implements OptionEditor { private final List configButtons = Arrays.stream(HeroAPI.Configuration.values()) .filter(c -> c != HeroAPI.Configuration.UNKNOWN) - .map(ConfigButton::new).collect(Collectors.toList()); + .map(ConfigButton::new) + .collect(Collectors.toList()); private SelectableItem.Formation newFormation; private final JComboBox comboBox = new JComboBox<>(SelectableItem.Formation.values()); public ShipModeEditor() { - super(new FlowLayout(FlowLayout.LEFT, 0, 0)); + super(new MigLayout("gap 0, ins 0", "[][]5px[]", "[17px]")); + + this.newConfig = HeroAPI.Configuration.FIRST; + this.newFormation = SelectableItem.Formation.STANDARD; + setOpaque(false); - for (ConfigButton configButton : this.configButtons) { - this.add(configButton); - } - this.comboBox.addItemListener(item -> { + configButtons.forEach(button -> add(button, "wmax 17, hmax 17")); + + comboBox.setRenderer(new FormationRenderer()); + comboBox.addItemListener(item -> { if (item.getStateChange() == ItemEvent.SELECTED) { setFormation((SelectableItem.Formation) item.getItem()); } }); - this.add(new SizedLabel(" ")); - this.add(this.comboBox); + add(comboBox, "hmax 17"); } - + @Override public JComponent getEditorComponent(ConfigSetting shipConfig) { ShipMode value = shipConfig.getValue(); setConfig(value.getConfiguration()); @@ -56,14 +62,14 @@ private void setConfig(HeroAPI.Configuration config) { configButtons.forEach(ConfigButton::repaint); } - private void setFormation(SelectableItem.Formation formation) { - this.newFormation = formation; - this.comboBox.setSelectedItem(formation); + private void setFormation(SelectableItem.Formation newFormation) { + this.newFormation = newFormation; + this.comboBox.setSelectedItem(newFormation); } @Override public ShipMode getEditorValue() { - return ShipMode.of(newConfig, newFormation); + return new Config.ShipConfig(newConfig, newFormation); } @Override @@ -93,4 +99,25 @@ public boolean isDefaultButton() { return ShipModeEditor.this.newConfig == config; } } -} + + private static class FormationRenderer extends DefaultListCellRenderer { + @Override + public Component getListCellRendererComponent(JList list, Object value, int index, + boolean isSelected, boolean cellHasFocus) { + super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + + if (value instanceof SelectableItem.Formation) { + SelectableItem.Formation newFormation = (SelectableItem.Formation) value; + + String iconName = newFormation.name().toLowerCase(); + Icon icon = UIUtils.getIcon("formations/" + iconName); + + setIcon(icon); + setText(newFormation.toString()); + setIconTextGap(3); + } + + return this; + } + } +} \ No newline at end of file From 1f86999bf8d1f09ea0dfb5275d4d82af94fe0640 Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Tue, 26 Aug 2025 22:56:29 -0700 Subject: [PATCH 09/14] add formations to npc table --- .../darkbot/gui/tree/editors/ShipModeEditor.java | 13 ++++++++++--- .../github/manolo8/darkbot/gui/utils/UIUtils.java | 4 ++++ .../gui/utils/table/FormationNpcInfoEditor.java | 14 +++++++++----- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java b/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java index 27bb4d4a4..78f24ac2e 100644 --- a/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java +++ b/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java @@ -10,8 +10,15 @@ import eu.darkbot.api.managers.HeroAPI; import net.miginfocom.swing.MigLayout; -import javax.swing.*; -import java.awt.*; +import javax.swing.DefaultListCellRenderer; +import javax.swing.Icon; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JList; +import javax.swing.JPanel; +import java.awt.Component; +import java.awt.Dimension; import java.awt.event.ItemEvent; import java.util.Arrays; import java.util.List; @@ -110,7 +117,7 @@ public Component getListCellRendererComponent(JList list, Object value, int i SelectableItem.Formation newFormation = (SelectableItem.Formation) value; String iconName = newFormation.name().toLowerCase(); - Icon icon = UIUtils.getIcon("formations/" + iconName); + Icon icon = UIUtils.getFormationIcon(iconName); setIcon(icon); setText(newFormation.toString()); diff --git a/src/main/java/com/github/manolo8/darkbot/gui/utils/UIUtils.java b/src/main/java/com/github/manolo8/darkbot/gui/utils/UIUtils.java index df9e295ac..1baf9ca15 100644 --- a/src/main/java/com/github/manolo8/darkbot/gui/utils/UIUtils.java +++ b/src/main/java/com/github/manolo8/darkbot/gui/utils/UIUtils.java @@ -44,6 +44,10 @@ public static Icon getIcon(String name) { return getSvgIcon(url, 16, 16); } + public static Icon getFormationIcon(String name){ + return getIcon("formations/" + name); + } + private static FlatSVGIcon getSvgIcon(URL url, int width, int height) { return new FlatSVGIcon(url).derive(width, height); } diff --git a/src/main/java/com/github/manolo8/darkbot/gui/utils/table/FormationNpcInfoEditor.java b/src/main/java/com/github/manolo8/darkbot/gui/utils/table/FormationNpcInfoEditor.java index 2ee5af65f..051319357 100644 --- a/src/main/java/com/github/manolo8/darkbot/gui/utils/table/FormationNpcInfoEditor.java +++ b/src/main/java/com/github/manolo8/darkbot/gui/utils/table/FormationNpcInfoEditor.java @@ -1,8 +1,10 @@ package com.github.manolo8.darkbot.gui.utils.table; import com.github.manolo8.darkbot.gui.utils.PopupMenuListenerAdapter; +import com.github.manolo8.darkbot.gui.utils.UIUtils; import eu.darkbot.api.game.items.SelectableItem; +import javax.swing.Icon; import javax.swing.JLabel; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; @@ -10,13 +12,11 @@ import javax.swing.SwingUtilities; import javax.swing.ToolTipManager; import javax.swing.event.PopupMenuEvent; - import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class FormationNpcInfoEditor extends TableDelegateEditor { - private static final ToolTipManager TOOLTIPS = ToolTipManager.sharedInstance(); private final JPopupMenu popupMenu = new JPopupMenu(); private SelectableItem.Formation selectedFormation; @@ -44,10 +44,15 @@ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { popupMenu.add(noneItem); popupMenu.addSeparator(); - // Add all formations as selectable menu items + // Add all formations as selectable menu items with icons for (SelectableItem.Formation formation : SelectableItem.Formation.values()) { JMenuItem menuItem = new JMenuItem(formation.toString()); - menuItem.setToolTipText("Select formation: " + formation); // Set tooltip + + // Add icon to menu item + Icon icon = UIUtils.getFormationIcon(formation.name().toLowerCase()); + menuItem.setIcon(icon); + + menuItem.setToolTipText("Select formation: " + formation); menuItem.addActionListener(new FormationSelectionHandler(formation)); popupMenu.add(menuItem); } @@ -96,4 +101,3 @@ public void actionPerformed(ActionEvent e) { } } } - From 6ebf03b0b0c04ee0e4c9acf6620d36ab8f7b53fc Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Fri, 6 Feb 2026 12:51:53 -0800 Subject: [PATCH 10/14] add none to formation selector + fix popup issue --- .../github/manolo8/darkbot/config/Config.java | 13 +++--- .../manolo8/darkbot/config/NpcInfo.java | 3 +- .../gui/tree/editors/ShipModeEditor.java | 45 ++++++++++++++----- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/github/manolo8/darkbot/config/Config.java b/src/main/java/com/github/manolo8/darkbot/config/Config.java index 0305c279c..99ed11930 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/Config.java +++ b/src/main/java/com/github/manolo8/darkbot/config/Config.java @@ -414,14 +414,14 @@ public static class ShipConfig implements LegacyShipMode { private HeroAPI.Configuration newConfiguration; private SelectableItem.Formation newFormation; - public ShipConfig() { - } + public ShipConfig() {} public ShipConfig(HeroAPI.Configuration configuration, SelectableItem.Formation formation) { this.newConfiguration = configuration; this.newFormation = formation; } + @Deprecated public ShipConfig(int CONFIG, Character FORMATION) { this.CONFIG = CONFIG; this.FORMATION = FORMATION; @@ -455,9 +455,8 @@ public SelectableItem.Formation getFormation() { newFormation = ItemUtils.findAssociatedItem(ItemCategory.DRONE_FORMATIONS, FORMATION) .map(item -> SelectableItem.Formation.of(item.id)).orElse(null); } - // Return new formation if available - return Optional.ofNullable(newFormation) - .orElse(SelectableItem.Formation.STANDARD); + // Return new formation if available, or null for "None" + return newFormation; } public ShipMode getShipMode(){ @@ -466,7 +465,7 @@ public ShipMode getShipMode(){ @Override public String toString() { - return "Config: " + newConfiguration + " " + newFormation.name(); + return "Config: " + newConfiguration + " " + (newFormation != null ? newFormation.name() : "None"); } @Override @@ -476,7 +475,7 @@ public String toString() { @Override public boolean isLegacyFormation() { - return FORMATION != null; + return FORMATION != null && newFormation == null; } } diff --git a/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java b/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java index 529550cd0..095a6bc76 100644 --- a/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java +++ b/src/main/java/com/github/manolo8/darkbot/config/NpcInfo.java @@ -122,8 +122,7 @@ public Optional getFormation() { return formation; }); } - return Optional.of(Objects.requireNonNullElse(attackFormationNew, SelectableItem.Formation.STANDARD)); - + return Optional.ofNullable(attackFormationNew); // If we have a new formation, use it and clear the old one } diff --git a/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java b/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java index 78f24ac2e..51bbe123f 100644 --- a/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java +++ b/src/main/java/com/github/manolo8/darkbot/gui/tree/editors/ShipModeEditor.java @@ -11,7 +11,6 @@ import net.miginfocom.swing.MigLayout; import javax.swing.DefaultListCellRenderer; -import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JComponent; @@ -19,6 +18,8 @@ import javax.swing.JPanel; import java.awt.Component; import java.awt.Dimension; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; import java.awt.event.ItemEvent; import java.util.Arrays; import java.util.List; @@ -35,7 +36,7 @@ public class ShipModeEditor extends JPanel implements OptionEditor { private SelectableItem.Formation newFormation; - private final JComboBox comboBox = new JComboBox<>(SelectableItem.Formation.values()); + private final JComboBox comboBox; public ShipModeEditor() { super(new MigLayout("gap 0, ins 0", "[][]5px[]", "[17px]")); @@ -47,10 +48,30 @@ public ShipModeEditor() { configButtons.forEach(button -> add(button, "wmax 17, hmax 17")); + // Build combo box items: "None" + all formations + Object[] items = new Object[SelectableItem.Formation.values().length + 1]; + items[0] = "None"; + System.arraycopy(SelectableItem.Formation.values(), 0, items, 1, SelectableItem.Formation.values().length); + + comboBox = new JComboBox<>(items); comboBox.setRenderer(new FormationRenderer()); + + // FIX: Add focus listener to show popup immediately + comboBox.addFocusListener(new FocusAdapter() { + @Override + public void focusGained(FocusEvent e) { + comboBox.showPopup(); + } + }); + comboBox.addItemListener(item -> { if (item.getStateChange() == ItemEvent.SELECTED) { - setFormation((SelectableItem.Formation) item.getItem()); + Object selected = item.getItem(); + if (selected instanceof SelectableItem.Formation) { + setFormation((SelectableItem.Formation) selected); + } else { + setFormation(null); // "None" selected + } } }); add(comboBox, "hmax 17"); @@ -71,7 +92,7 @@ private void setConfig(HeroAPI.Configuration config) { private void setFormation(SelectableItem.Formation newFormation) { this.newFormation = newFormation; - this.comboBox.setSelectedItem(newFormation); + this.comboBox.setSelectedItem(newFormation == null ? "None" : newFormation); } @Override @@ -114,16 +135,16 @@ public Component getListCellRendererComponent(JList list, Object value, int i super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value instanceof SelectableItem.Formation) { - SelectableItem.Formation newFormation = (SelectableItem.Formation) value; - - String iconName = newFormation.name().toLowerCase(); - Icon icon = UIUtils.getFormationIcon(iconName); - - setIcon(icon); - setText(newFormation.toString()); - setIconTextGap(3); + SelectableItem.Formation formation = (SelectableItem.Formation) value; + setIcon(UIUtils.getFormationIcon(formation.name().toLowerCase())); + setText(formation.toString()); + } else { + // "None" or any other value + setIcon(UIUtils.getFormationIcon("default")); + setText(String.valueOf(value)); } + setIconTextGap(3); return this; } } From cd6d55b75909ff69c68ce6e3938aacb5cf21434d Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Fri, 6 Feb 2026 12:55:29 -0800 Subject: [PATCH 11/14] add formation svg --- src/main/resources/formations/arrow.svg | 12 ++++++++++++ src/main/resources/formations/barrage.svg | 12 ++++++++++++ src/main/resources/formations/bat.svg | 12 ++++++++++++ src/main/resources/formations/chevron.svg | 12 ++++++++++++ src/main/resources/formations/crab.svg | 12 ++++++++++++ src/main/resources/formations/default.svg | 12 ++++++++++++ src/main/resources/formations/diamond.svg | 12 ++++++++++++ src/main/resources/formations/dome.svg | 12 ++++++++++++ src/main/resources/formations/double_arrow.svg | 12 ++++++++++++ src/main/resources/formations/drill.svg | 12 ++++++++++++ src/main/resources/formations/heart.svg | 12 ++++++++++++ src/main/resources/formations/lance.svg | 12 ++++++++++++ src/main/resources/formations/mosquito.svg | 12 ++++++++++++ src/main/resources/formations/moth.svg | 12 ++++++++++++ src/main/resources/formations/pincer.svg | 12 ++++++++++++ src/main/resources/formations/ring.svg | 12 ++++++++++++ src/main/resources/formations/standard.svg | 12 ++++++++++++ src/main/resources/formations/star.svg | 12 ++++++++++++ src/main/resources/formations/turtle.svg | 12 ++++++++++++ src/main/resources/formations/veteran.svg | 12 ++++++++++++ src/main/resources/formations/wavy.svg | 12 ++++++++++++ src/main/resources/formations/wheel.svg | 12 ++++++++++++ src/main/resources/formations/x.svg | 12 ++++++++++++ src/main/resources/formations/x2.svg | 12 ++++++++++++ 24 files changed, 288 insertions(+) create mode 100644 src/main/resources/formations/arrow.svg create mode 100644 src/main/resources/formations/barrage.svg create mode 100644 src/main/resources/formations/bat.svg create mode 100644 src/main/resources/formations/chevron.svg create mode 100644 src/main/resources/formations/crab.svg create mode 100644 src/main/resources/formations/default.svg create mode 100644 src/main/resources/formations/diamond.svg create mode 100644 src/main/resources/formations/dome.svg create mode 100644 src/main/resources/formations/double_arrow.svg create mode 100644 src/main/resources/formations/drill.svg create mode 100644 src/main/resources/formations/heart.svg create mode 100644 src/main/resources/formations/lance.svg create mode 100644 src/main/resources/formations/mosquito.svg create mode 100644 src/main/resources/formations/moth.svg create mode 100644 src/main/resources/formations/pincer.svg create mode 100644 src/main/resources/formations/ring.svg create mode 100644 src/main/resources/formations/standard.svg create mode 100644 src/main/resources/formations/star.svg create mode 100644 src/main/resources/formations/turtle.svg create mode 100644 src/main/resources/formations/veteran.svg create mode 100644 src/main/resources/formations/wavy.svg create mode 100644 src/main/resources/formations/wheel.svg create mode 100644 src/main/resources/formations/x.svg create mode 100644 src/main/resources/formations/x2.svg diff --git a/src/main/resources/formations/arrow.svg b/src/main/resources/formations/arrow.svg new file mode 100644 index 000000000..b69d05cce --- /dev/null +++ b/src/main/resources/formations/arrow.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/barrage.svg b/src/main/resources/formations/barrage.svg new file mode 100644 index 000000000..e2c5eca1d --- /dev/null +++ b/src/main/resources/formations/barrage.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/bat.svg b/src/main/resources/formations/bat.svg new file mode 100644 index 000000000..04bbe78d8 --- /dev/null +++ b/src/main/resources/formations/bat.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/chevron.svg b/src/main/resources/formations/chevron.svg new file mode 100644 index 000000000..87609200c --- /dev/null +++ b/src/main/resources/formations/chevron.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/crab.svg b/src/main/resources/formations/crab.svg new file mode 100644 index 000000000..4c53d09f5 --- /dev/null +++ b/src/main/resources/formations/crab.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/default.svg b/src/main/resources/formations/default.svg new file mode 100644 index 000000000..2d938e40a --- /dev/null +++ b/src/main/resources/formations/default.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/diamond.svg b/src/main/resources/formations/diamond.svg new file mode 100644 index 000000000..75df310c1 --- /dev/null +++ b/src/main/resources/formations/diamond.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/dome.svg b/src/main/resources/formations/dome.svg new file mode 100644 index 000000000..58e41bd6a --- /dev/null +++ b/src/main/resources/formations/dome.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/double_arrow.svg b/src/main/resources/formations/double_arrow.svg new file mode 100644 index 000000000..585da1218 --- /dev/null +++ b/src/main/resources/formations/double_arrow.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/drill.svg b/src/main/resources/formations/drill.svg new file mode 100644 index 000000000..4289c08d2 --- /dev/null +++ b/src/main/resources/formations/drill.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/heart.svg b/src/main/resources/formations/heart.svg new file mode 100644 index 000000000..dd2dc6f43 --- /dev/null +++ b/src/main/resources/formations/heart.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/lance.svg b/src/main/resources/formations/lance.svg new file mode 100644 index 000000000..ee9976d6f --- /dev/null +++ b/src/main/resources/formations/lance.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/mosquito.svg b/src/main/resources/formations/mosquito.svg new file mode 100644 index 000000000..2d938e40a --- /dev/null +++ b/src/main/resources/formations/mosquito.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/moth.svg b/src/main/resources/formations/moth.svg new file mode 100644 index 000000000..0127fca85 --- /dev/null +++ b/src/main/resources/formations/moth.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/pincer.svg b/src/main/resources/formations/pincer.svg new file mode 100644 index 000000000..75bdf081c --- /dev/null +++ b/src/main/resources/formations/pincer.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/ring.svg b/src/main/resources/formations/ring.svg new file mode 100644 index 000000000..1bab90729 --- /dev/null +++ b/src/main/resources/formations/ring.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/standard.svg b/src/main/resources/formations/standard.svg new file mode 100644 index 000000000..21f80775e --- /dev/null +++ b/src/main/resources/formations/standard.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/star.svg b/src/main/resources/formations/star.svg new file mode 100644 index 000000000..4f0c08fdd --- /dev/null +++ b/src/main/resources/formations/star.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/turtle.svg b/src/main/resources/formations/turtle.svg new file mode 100644 index 000000000..2ed561f70 --- /dev/null +++ b/src/main/resources/formations/turtle.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/veteran.svg b/src/main/resources/formations/veteran.svg new file mode 100644 index 000000000..42e6c336f --- /dev/null +++ b/src/main/resources/formations/veteran.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/wavy.svg b/src/main/resources/formations/wavy.svg new file mode 100644 index 000000000..8e08b53d6 --- /dev/null +++ b/src/main/resources/formations/wavy.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/wheel.svg b/src/main/resources/formations/wheel.svg new file mode 100644 index 000000000..31f6ddc6d --- /dev/null +++ b/src/main/resources/formations/wheel.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/x.svg b/src/main/resources/formations/x.svg new file mode 100644 index 000000000..726ef199e --- /dev/null +++ b/src/main/resources/formations/x.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/x2.svg b/src/main/resources/formations/x2.svg new file mode 100644 index 000000000..2d938e40a --- /dev/null +++ b/src/main/resources/formations/x2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file From 7c4a096168ba8477acf5ff22bacaf7c842c6dc80 Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Sat, 7 Feb 2026 13:52:13 -0800 Subject: [PATCH 12/14] formations grey color --- src/main/resources/formations/arrow.svg | 20 +++++++++---------- src/main/resources/formations/barrage.svg | 20 +++++++++---------- src/main/resources/formations/bat.svg | 20 +++++++++---------- src/main/resources/formations/chevron.svg | 20 +++++++++---------- src/main/resources/formations/crab.svg | 20 +++++++++---------- src/main/resources/formations/default.svg | 11 +--------- src/main/resources/formations/diamond.svg | 20 +++++++++---------- src/main/resources/formations/dome.svg | 20 +++++++++---------- .../resources/formations/double_arrow.svg | 20 +++++++++---------- src/main/resources/formations/drill.svg | 20 +++++++++---------- src/main/resources/formations/heart.svg | 20 +++++++++---------- src/main/resources/formations/lance.svg | 20 +++++++++---------- src/main/resources/formations/mosquito.svg | 20 +++++++++---------- src/main/resources/formations/moth.svg | 20 +++++++++---------- src/main/resources/formations/pincer.svg | 20 +++++++++---------- src/main/resources/formations/ring.svg | 20 +++++++++---------- src/main/resources/formations/standard.svg | 20 +++++++++---------- src/main/resources/formations/star.svg | 20 +++++++++---------- src/main/resources/formations/turtle.svg | 20 +++++++++---------- src/main/resources/formations/veteran.svg | 20 +++++++++---------- src/main/resources/formations/wavy.svg | 20 +++++++++---------- src/main/resources/formations/wheel.svg | 20 +++++++++---------- src/main/resources/formations/x.svg | 20 +++++++++---------- src/main/resources/formations/x2.svg | 20 +++++++++---------- 24 files changed, 231 insertions(+), 240 deletions(-) diff --git a/src/main/resources/formations/arrow.svg b/src/main/resources/formations/arrow.svg index b69d05cce..62edabbea 100644 --- a/src/main/resources/formations/arrow.svg +++ b/src/main/resources/formations/arrow.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/barrage.svg b/src/main/resources/formations/barrage.svg index e2c5eca1d..f3876f0b5 100644 --- a/src/main/resources/formations/barrage.svg +++ b/src/main/resources/formations/barrage.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/bat.svg b/src/main/resources/formations/bat.svg index 04bbe78d8..74df209eb 100644 --- a/src/main/resources/formations/bat.svg +++ b/src/main/resources/formations/bat.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/chevron.svg b/src/main/resources/formations/chevron.svg index 87609200c..2f13a8d75 100644 --- a/src/main/resources/formations/chevron.svg +++ b/src/main/resources/formations/chevron.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/crab.svg b/src/main/resources/formations/crab.svg index 4c53d09f5..c625b58bb 100644 --- a/src/main/resources/formations/crab.svg +++ b/src/main/resources/formations/crab.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/default.svg b/src/main/resources/formations/default.svg index 2d938e40a..4bc8d84f8 100644 --- a/src/main/resources/formations/default.svg +++ b/src/main/resources/formations/default.svg @@ -1,12 +1,3 @@ - - - - - - - - - - + \ No newline at end of file diff --git a/src/main/resources/formations/diamond.svg b/src/main/resources/formations/diamond.svg index 75df310c1..bf0551417 100644 --- a/src/main/resources/formations/diamond.svg +++ b/src/main/resources/formations/diamond.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/dome.svg b/src/main/resources/formations/dome.svg index 58e41bd6a..add703105 100644 --- a/src/main/resources/formations/dome.svg +++ b/src/main/resources/formations/dome.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/double_arrow.svg b/src/main/resources/formations/double_arrow.svg index 585da1218..6982a391b 100644 --- a/src/main/resources/formations/double_arrow.svg +++ b/src/main/resources/formations/double_arrow.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/drill.svg b/src/main/resources/formations/drill.svg index 4289c08d2..9c6743db4 100644 --- a/src/main/resources/formations/drill.svg +++ b/src/main/resources/formations/drill.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/heart.svg b/src/main/resources/formations/heart.svg index dd2dc6f43..bd7ecf5e5 100644 --- a/src/main/resources/formations/heart.svg +++ b/src/main/resources/formations/heart.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/lance.svg b/src/main/resources/formations/lance.svg index ee9976d6f..0f116c094 100644 --- a/src/main/resources/formations/lance.svg +++ b/src/main/resources/formations/lance.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/mosquito.svg b/src/main/resources/formations/mosquito.svg index 2d938e40a..33606ee0e 100644 --- a/src/main/resources/formations/mosquito.svg +++ b/src/main/resources/formations/mosquito.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/moth.svg b/src/main/resources/formations/moth.svg index 0127fca85..472a558c1 100644 --- a/src/main/resources/formations/moth.svg +++ b/src/main/resources/formations/moth.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/pincer.svg b/src/main/resources/formations/pincer.svg index 75bdf081c..7b2dd7d01 100644 --- a/src/main/resources/formations/pincer.svg +++ b/src/main/resources/formations/pincer.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/ring.svg b/src/main/resources/formations/ring.svg index 1bab90729..a30b38ba8 100644 --- a/src/main/resources/formations/ring.svg +++ b/src/main/resources/formations/ring.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/standard.svg b/src/main/resources/formations/standard.svg index 21f80775e..53820bf9a 100644 --- a/src/main/resources/formations/standard.svg +++ b/src/main/resources/formations/standard.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/star.svg b/src/main/resources/formations/star.svg index 4f0c08fdd..45e1cb1ac 100644 --- a/src/main/resources/formations/star.svg +++ b/src/main/resources/formations/star.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/turtle.svg b/src/main/resources/formations/turtle.svg index 2ed561f70..b4bb6648e 100644 --- a/src/main/resources/formations/turtle.svg +++ b/src/main/resources/formations/turtle.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/veteran.svg b/src/main/resources/formations/veteran.svg index 42e6c336f..6e6e31af6 100644 --- a/src/main/resources/formations/veteran.svg +++ b/src/main/resources/formations/veteran.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/wavy.svg b/src/main/resources/formations/wavy.svg index 8e08b53d6..117693551 100644 --- a/src/main/resources/formations/wavy.svg +++ b/src/main/resources/formations/wavy.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/wheel.svg b/src/main/resources/formations/wheel.svg index 31f6ddc6d..a78fb400a 100644 --- a/src/main/resources/formations/wheel.svg +++ b/src/main/resources/formations/wheel.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/x.svg b/src/main/resources/formations/x.svg index 726ef199e..387e23b59 100644 --- a/src/main/resources/formations/x.svg +++ b/src/main/resources/formations/x.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/formations/x2.svg b/src/main/resources/formations/x2.svg index 2d938e40a..33606ee0e 100644 --- a/src/main/resources/formations/x2.svg +++ b/src/main/resources/formations/x2.svg @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file From 62346d3533df12bd48d245291a5b76d5d94bc822 Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Sun, 8 Feb 2026 01:48:50 -0800 Subject: [PATCH 13/14] barrage center --- src/main/resources/formations/barrage.svg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/formations/barrage.svg b/src/main/resources/formations/barrage.svg index f3876f0b5..fd75cb527 100644 --- a/src/main/resources/formations/barrage.svg +++ b/src/main/resources/formations/barrage.svg @@ -1,12 +1,12 @@ - - + + - + \ No newline at end of file From d14a7b80a86ebd2d25f464328dd84ff0dfb631c6 Mon Sep 17 00:00:00 2001 From: Anjesh Shrestha Date: Sun, 8 Feb 2026 22:30:33 -0800 Subject: [PATCH 14/14] update formation to fit --- .../manolo8/darkbot/gui/utils/UIUtils.java | 12 ++++++++++-- src/main/resources/.DS_Store | Bin 0 -> 6148 bytes src/main/resources/formations/arrow.svg | 2 +- src/main/resources/formations/barrage.svg | 6 +++--- src/main/resources/formations/bat.svg | 2 +- src/main/resources/formations/chevron.svg | 2 +- src/main/resources/formations/crab.svg | 2 +- src/main/resources/formations/default.svg | 2 +- src/main/resources/formations/diamond.svg | 2 +- src/main/resources/formations/dome.svg | 2 +- src/main/resources/formations/double_arrow.svg | 2 +- src/main/resources/formations/drill.svg | 2 +- src/main/resources/formations/heart.svg | 2 +- src/main/resources/formations/lance.svg | 2 +- src/main/resources/formations/mosquito.svg | 2 +- src/main/resources/formations/moth.svg | 2 +- src/main/resources/formations/pincer.svg | 2 +- src/main/resources/formations/ring.svg | 2 +- src/main/resources/formations/standard.svg | 2 +- src/main/resources/formations/star.svg | 2 +- src/main/resources/formations/turtle.svg | 2 +- src/main/resources/formations/veteran.svg | 2 +- src/main/resources/formations/wavy.svg | 2 +- src/main/resources/formations/wheel.svg | 12 ++++++------ src/main/resources/formations/x.svg | 2 +- src/main/resources/formations/x2.svg | 2 +- 26 files changed, 41 insertions(+), 33 deletions(-) create mode 100644 src/main/resources/.DS_Store diff --git a/src/main/java/com/github/manolo8/darkbot/gui/utils/UIUtils.java b/src/main/java/com/github/manolo8/darkbot/gui/utils/UIUtils.java index 1baf9ca15..538a51305 100644 --- a/src/main/java/com/github/manolo8/darkbot/gui/utils/UIUtils.java +++ b/src/main/java/com/github/manolo8/darkbot/gui/utils/UIUtils.java @@ -44,8 +44,16 @@ public static Icon getIcon(String name) { return getSvgIcon(url, 16, 16); } - public static Icon getFormationIcon(String name){ - return getIcon("formations/" + name); + public static Icon getFormationIcon(String name) { + URL url = UIUtils.class.getResource("/formations/" + name + ".svg"); + if (url != null) return getSvgIcon(url); + + url = Objects.requireNonNull(UIUtils.class.getResource("/missing.svg")); + return getSvgIcon(url); + } + + private static FlatSVGIcon getSvgIcon(URL url) { + return new FlatSVGIcon(url); } private static FlatSVGIcon getSvgIcon(URL url, int width, int height) { diff --git a/src/main/resources/.DS_Store b/src/main/resources/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9f623fb4b7e16da92758d38ce2130b45b9c6481d GIT binary patch literal 6148 zcmeHKyG{c^3>-s>2%40X`wRTRDhgka9{>pvA;CookNT>7S3ZsLLx|{-f`SH(C3|+g zo;}?Z=Q99Xemvd+3jlMvBlaGq=I8DcyQqv2>Ad3s?|8-*1KuXprxVV-!V@_=y#C~W zu6M)BcG%?Ir^(7n0VyB_q<|EV0>4(kdoOK%ov0`Uq<|FoR=~dxjqcbB$He$_FvJKz zoG~57b<7gP<_Tgi921$LSyG8fwHh%j>CCsP>xE-t(qT1xSUuTlLa}%{?{85K>xqg| zKnffyaGBeM_y0Tknfd>iq@5Iy0{=<@o2}NXC10s}>*VFU*Eae+-D?hXH?D)i5bc;4 i?U);H$2U=wb + diff --git a/src/main/resources/formations/barrage.svg b/src/main/resources/formations/barrage.svg index fd75cb527..e21922eb6 100644 --- a/src/main/resources/formations/barrage.svg +++ b/src/main/resources/formations/barrage.svg @@ -1,8 +1,8 @@ - + - - + + diff --git a/src/main/resources/formations/bat.svg b/src/main/resources/formations/bat.svg index 74df209eb..18030726e 100644 --- a/src/main/resources/formations/bat.svg +++ b/src/main/resources/formations/bat.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/chevron.svg b/src/main/resources/formations/chevron.svg index 2f13a8d75..37795b714 100644 --- a/src/main/resources/formations/chevron.svg +++ b/src/main/resources/formations/chevron.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/crab.svg b/src/main/resources/formations/crab.svg index c625b58bb..3ecee65df 100644 --- a/src/main/resources/formations/crab.svg +++ b/src/main/resources/formations/crab.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/default.svg b/src/main/resources/formations/default.svg index 4bc8d84f8..6d9e0b20b 100644 --- a/src/main/resources/formations/default.svg +++ b/src/main/resources/formations/default.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/src/main/resources/formations/diamond.svg b/src/main/resources/formations/diamond.svg index bf0551417..b04af7450 100644 --- a/src/main/resources/formations/diamond.svg +++ b/src/main/resources/formations/diamond.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/dome.svg b/src/main/resources/formations/dome.svg index add703105..a9d8e0a16 100644 --- a/src/main/resources/formations/dome.svg +++ b/src/main/resources/formations/dome.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/double_arrow.svg b/src/main/resources/formations/double_arrow.svg index 6982a391b..e1a7c74c4 100644 --- a/src/main/resources/formations/double_arrow.svg +++ b/src/main/resources/formations/double_arrow.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/drill.svg b/src/main/resources/formations/drill.svg index 9c6743db4..1c027d122 100644 --- a/src/main/resources/formations/drill.svg +++ b/src/main/resources/formations/drill.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/heart.svg b/src/main/resources/formations/heart.svg index bd7ecf5e5..6b5912509 100644 --- a/src/main/resources/formations/heart.svg +++ b/src/main/resources/formations/heart.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/lance.svg b/src/main/resources/formations/lance.svg index 0f116c094..1be7f8e04 100644 --- a/src/main/resources/formations/lance.svg +++ b/src/main/resources/formations/lance.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/mosquito.svg b/src/main/resources/formations/mosquito.svg index 33606ee0e..01668b229 100644 --- a/src/main/resources/formations/mosquito.svg +++ b/src/main/resources/formations/mosquito.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/moth.svg b/src/main/resources/formations/moth.svg index 472a558c1..b61f792ca 100644 --- a/src/main/resources/formations/moth.svg +++ b/src/main/resources/formations/moth.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/pincer.svg b/src/main/resources/formations/pincer.svg index 7b2dd7d01..8c3c58fa0 100644 --- a/src/main/resources/formations/pincer.svg +++ b/src/main/resources/formations/pincer.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/ring.svg b/src/main/resources/formations/ring.svg index a30b38ba8..41d548fbd 100644 --- a/src/main/resources/formations/ring.svg +++ b/src/main/resources/formations/ring.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/standard.svg b/src/main/resources/formations/standard.svg index 53820bf9a..34f9ee2ff 100644 --- a/src/main/resources/formations/standard.svg +++ b/src/main/resources/formations/standard.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/star.svg b/src/main/resources/formations/star.svg index 45e1cb1ac..dea374305 100644 --- a/src/main/resources/formations/star.svg +++ b/src/main/resources/formations/star.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/turtle.svg b/src/main/resources/formations/turtle.svg index b4bb6648e..fa339b5f0 100644 --- a/src/main/resources/formations/turtle.svg +++ b/src/main/resources/formations/turtle.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/veteran.svg b/src/main/resources/formations/veteran.svg index 6e6e31af6..2211f4657 100644 --- a/src/main/resources/formations/veteran.svg +++ b/src/main/resources/formations/veteran.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/wavy.svg b/src/main/resources/formations/wavy.svg index 117693551..0ba399b8e 100644 --- a/src/main/resources/formations/wavy.svg +++ b/src/main/resources/formations/wavy.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/wheel.svg b/src/main/resources/formations/wheel.svg index a78fb400a..1ef46233f 100644 --- a/src/main/resources/formations/wheel.svg +++ b/src/main/resources/formations/wheel.svg @@ -1,10 +1,10 @@ - + - - - - - + + + + + diff --git a/src/main/resources/formations/x.svg b/src/main/resources/formations/x.svg index 387e23b59..b72ec4b5f 100644 --- a/src/main/resources/formations/x.svg +++ b/src/main/resources/formations/x.svg @@ -1,4 +1,4 @@ - + diff --git a/src/main/resources/formations/x2.svg b/src/main/resources/formations/x2.svg index 33606ee0e..01668b229 100644 --- a/src/main/resources/formations/x2.svg +++ b/src/main/resources/formations/x2.svg @@ -1,4 +1,4 @@ - +