project: Cleanup
This commit is contained in:
@@ -107,33 +107,47 @@ public class PartyPlugin extends Plugin implements KeyListener
|
|||||||
private final Map<UUID, PartyData> partyDataMap = Collections.synchronizedMap(new HashMap<>());
|
private final Map<UUID, PartyData> partyDataMap = Collections.synchronizedMap(new HashMap<>());
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final List<PartyTilePingData> pendingTilePings = Collections.synchronizedList(new ArrayList<>());
|
private final List<PartyTilePingData> pendingTilePings = Collections.synchronizedList(new ArrayList<>());
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Named("developerMode")
|
@Named("developerMode")
|
||||||
boolean developerMode;
|
boolean developerMode;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private PartyService party;
|
private PartyService party;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private WSClient ws;
|
private WSClient ws;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private OverlayManager overlayManager;
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private PartyStatsOverlay partyStatsOverlay;
|
private PartyStatsOverlay partyStatsOverlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private PartyPingOverlay partyPingOverlay;
|
private PartyPingOverlay partyPingOverlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private KeyManager keyManager;
|
private KeyManager keyManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private WSClient wsClient;
|
private WSClient wsClient;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private WorldMapPointManager worldMapManager;
|
private WorldMapPointManager worldMapManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private PartyConfig config;
|
private PartyConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ChatMessageManager chatMessageManager;
|
private ChatMessageManager chatMessageManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
|
|
||||||
private int lastHp, lastPray;
|
private int lastHp, lastPray;
|
||||||
private boolean hotkeyDown, doSync;
|
private boolean hotkeyDown, doSync;
|
||||||
private boolean sendAlert;
|
private boolean sendAlert;
|
||||||
@@ -511,7 +525,6 @@ public class PartyPlugin extends Plugin implements KeyListener
|
|||||||
DiscordUserInfo info = new DiscordUserInfo(jobj.get("userId").getAsString(), jobj.get("avatarId").getAsString());
|
DiscordUserInfo info = new DiscordUserInfo(jobj.get("userId").getAsString(), jobj.get("avatarId").getAsString());
|
||||||
info.setMemberId(event.getMemberId());
|
info.setMemberId(event.getMemberId());
|
||||||
eventBus.post(DiscordUserInfo.class, info);
|
eventBus.post(DiscordUserInfo.class, info);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class PartyStatsOverlay extends Overlay
|
|||||||
private final PanelComponent body = new PanelComponent();
|
private final PanelComponent body = new PanelComponent();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private PartyStatsOverlay(final PartyPlugin plugin, final PartyService party, final PartyConfig config)
|
private PartyStatsOverlay(final PartyPlugin plugin, final PartyService party)
|
||||||
{
|
{
|
||||||
super(plugin);
|
super(plugin);
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ import net.runelite.client.ui.overlay.worldmap.WorldMapPointManager;
|
|||||||
name = "Stealing Artefacts",
|
name = "Stealing Artefacts",
|
||||||
description = "A plugin for the Stealing Artefacts minigame.",
|
description = "A plugin for the Stealing Artefacts minigame.",
|
||||||
tags = {"stealing", "artefacts", "artifacts", "thieving", "minigame", "zeah"},
|
tags = {"stealing", "artefacts", "artifacts", "thieving", "minigame", "zeah"},
|
||||||
type = PluginType.SKILLING,
|
type = PluginType.MINIGAME,
|
||||||
enabledByDefault = false
|
enabledByDefault = false
|
||||||
)
|
)
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.strongholdofsecurity;
|
package net.runelite.client.plugins.strongholdofsecurity;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.events.ClientTick;
|
import net.runelite.api.events.ClientTick;
|
||||||
import net.runelite.api.events.WidgetLoaded;
|
import net.runelite.api.events.WidgetLoaded;
|
||||||
@@ -45,7 +44,6 @@ import java.awt.Color;
|
|||||||
tags = {"stronghold", "security", "overlay", "answer", "highlight"},
|
tags = {"stronghold", "security", "overlay", "answer", "highlight"},
|
||||||
type = PluginType.UTILITY
|
type = PluginType.UTILITY
|
||||||
)
|
)
|
||||||
@Slf4j
|
|
||||||
public class StrongholdPlugin extends Plugin
|
public class StrongholdPlugin extends Plugin
|
||||||
{
|
{
|
||||||
private static final Color ANSWER_COLOR = new Color(230, 0, 230);
|
private static final Color ANSWER_COLOR = new Color(230, 0, 230);
|
||||||
|
|||||||
@@ -59,17 +59,17 @@ public class TempleTrekkingOverlay extends Overlay
|
|||||||
int points = plugin.getRewardPoints();
|
int points = plugin.getRewardPoints();
|
||||||
double percentage = plugin.getRewardPercentage() * 100;
|
double percentage = plugin.getRewardPercentage() * 100;
|
||||||
panelComponent.getChildren().clear();
|
panelComponent.getChildren().clear();
|
||||||
|
Color rightColor = percentage < 25 ? Color.RED : percentage >= 25 && percentage < 50 ? Color.YELLOW :
|
||||||
|
percentage >= 50 && percentage < 75 ? Color.BLUE : Color.GREEN;
|
||||||
panelComponent.getChildren().add(LineComponent.builder()
|
panelComponent.getChildren().add(LineComponent.builder()
|
||||||
.left("Trek Points: ")
|
.left("Trek Points: ")
|
||||||
.right(Integer.toString(points))
|
.right(Integer.toString(points))
|
||||||
.rightColor(percentage < 25 ? Color.RED : percentage >= 25 && percentage < 50 ? Color.YELLOW :
|
.rightColor(rightColor)
|
||||||
percentage >= 50 && percentage < 75 ? Color.BLUE : Color.GREEN)
|
|
||||||
.build());
|
.build());
|
||||||
panelComponent.getChildren().add(LineComponent.builder()
|
panelComponent.getChildren().add(LineComponent.builder()
|
||||||
.left("Reward %: ")
|
.left("Reward %: ")
|
||||||
.right(String.format("%.2f", percentage) + "%")
|
.right(String.format("%.2f", percentage) + "%")
|
||||||
.rightColor(percentage < 25 ? Color.RED : percentage >= 25 && percentage < 50 ? Color.YELLOW :
|
.rightColor(rightColor)
|
||||||
percentage >= 50 && percentage < 75 ? Color.BLUE : Color.GREEN)
|
|
||||||
.build());
|
.build());
|
||||||
return panelComponent.render(graphics);
|
return panelComponent.render(graphics);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,19 +50,21 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
)
|
)
|
||||||
public class TempleTrekkingPlugin extends Plugin
|
public class TempleTrekkingPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private final Set<GroundObject> bogList = new HashSet<GroundObject>();
|
private final Set<GroundObject> bogList = new HashSet<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private OverlayManager overlayManager;
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private TempleTrekkingOverlay overlay;
|
private TempleTrekkingOverlay overlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private TempleTrekkingBogOverlay bogOverlay;
|
private TempleTrekkingBogOverlay bogOverlay;
|
||||||
@Inject
|
|
||||||
private TempleTrekkingConfig config;
|
|
||||||
@Getter
|
@Getter
|
||||||
private boolean inTrek = false;
|
private boolean inTrek = false;
|
||||||
|
|
||||||
@@ -109,12 +111,9 @@ public class TempleTrekkingPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
inTrek = true;
|
inTrek = true;
|
||||||
}
|
}
|
||||||
else if (inTrek)
|
else if (inTrek && client.getVar(Varbits.TREK_STATUS) == 0 && client.getVar(Varbits.TREK_POINTS) == 0)
|
||||||
{
|
{
|
||||||
if (client.getVar(Varbits.TREK_STATUS) == 0 && client.getVar(Varbits.TREK_POINTS) == 0)
|
inTrek = false;
|
||||||
{
|
|
||||||
inTrek = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user