diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java index 18dd050f81..2323a15a49 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java @@ -151,4 +151,15 @@ public interface RaidsConfig extends Config { return ""; } + + @ConfigItem( + position = 11, + keyName = "layoutMessage", + name = "Send raid layout message when entering raid", + description = "Sends game message with raid layout on entering new raid" + ) + default boolean layoutMessage() + { + return true; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java index f1c9ec5021..0d4633fe94 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java @@ -242,21 +242,21 @@ public class RaidsPlugin extends Plugin double percentage = personalPoints / (totalPoints / 100.0); String chatMessage = new ChatMessageBuilder() - .append(ChatColorType.NORMAL) - .append("Total points: ") - .append(ChatColorType.HIGHLIGHT) - .append(POINTS_FORMAT.format(totalPoints)) - .append(ChatColorType.NORMAL) - .append(", Personal points: ") - .append(ChatColorType.HIGHLIGHT) - .append(POINTS_FORMAT.format(personalPoints)) - .append(ChatColorType.NORMAL) - .append(" (") - .append(ChatColorType.HIGHLIGHT) - .append(DECIMAL_FORMAT.format(percentage)) - .append(ChatColorType.NORMAL) - .append("%)") - .build(); + .append(ChatColorType.NORMAL) + .append("Total points: ") + .append(ChatColorType.HIGHLIGHT) + .append(POINTS_FORMAT.format(totalPoints)) + .append(ChatColorType.NORMAL) + .append(", Personal points: ") + .append(ChatColorType.HIGHLIGHT) + .append(POINTS_FORMAT.format(personalPoints)) + .append(ChatColorType.NORMAL) + .append(" (") + .append(ChatColorType.HIGHLIGHT) + .append(DECIMAL_FORMAT.format(percentage)) + .append(ChatColorType.NORMAL) + .append("%)") + .build(); chatMessageManager.queue(QueuedMessage.builder() .type(ChatMessageType.CLANCHAT_INFO) @@ -302,6 +302,7 @@ public class RaidsPlugin extends Plugin raid.updateLayout(layout); RotationSolver.solve(raid.getCombatRooms()); overlay.setScoutOverlayShown(true); + sendRaidLayoutMessage(); } else if (!config.scoutOverlayAtBank()) { @@ -316,6 +317,28 @@ public class RaidsPlugin extends Plugin } } + private void sendRaidLayoutMessage() + { + if (!config.layoutMessage()) + { + return; + } + + final String layout = getRaid().getLayout().toCodeString(); + final String rooms = getRaid().toRoomString(); + final String raidData = "[" + layout + "]: " + rooms; + + chatMessageManager.queue(QueuedMessage.builder() + .type(ChatMessageType.CLANCHAT_INFO) + .runeLiteFormattedMessage(new ChatMessageBuilder() + .append(ChatColorType.HIGHLIGHT) + .append("Layout: ") + .append(ChatColorType.NORMAL) + .append(raidData) + .build()) + .build()); + } + private void updateInfoBoxState() { if (timer == null)