poh plugin: Remove unnecessary toggles
This commit is contained in:
@@ -36,141 +36,11 @@ import net.runelite.client.config.ConfigItem;
|
||||
public interface PohConfig extends Config
|
||||
{
|
||||
@ConfigItem(
|
||||
keyName = "showVarrock",
|
||||
name = "Show Varrock portal",
|
||||
description = "Configures whether or not the Varrock portal is displayed"
|
||||
keyName = "showPortals",
|
||||
name = "Show Portals",
|
||||
description = "Configures whether to display teleport portals"
|
||||
)
|
||||
default boolean showVarrock()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showFalador",
|
||||
name = "Show Falador portal",
|
||||
description = "Configures whether or not the Camelot portal is displayed"
|
||||
)
|
||||
default boolean showFalador()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showLumbridge",
|
||||
name = "Show Lumbridge portal",
|
||||
description = "Configures whether or not the Lumbridge portal is displayed"
|
||||
)
|
||||
default boolean showLumbridge()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showCamelot",
|
||||
name = "Show Camelot portal",
|
||||
description = "Configures whether or not the Camelot portal is displayed"
|
||||
)
|
||||
default boolean showCamelot()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showArdougne",
|
||||
name = "Show Ardougne portal",
|
||||
description = "Configures whether or not the Ardougne portal is displayed"
|
||||
)
|
||||
default boolean showArdougne()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showYanille",
|
||||
name = "Show Yanille portal",
|
||||
description = "Configures whether or not the Yanille portal is displayed"
|
||||
)
|
||||
default boolean showYanille()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showLunarIsle",
|
||||
name = "Show Lunar isle portal",
|
||||
description = "Configures whether or not the Lunar isle portal is displayed"
|
||||
)
|
||||
default boolean showLunarIsle()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showWaterBirth",
|
||||
name = "Show Waterbirth portal",
|
||||
description = "Configures whether or not the Waterbirth portal is displayed"
|
||||
)
|
||||
default boolean showWaterBirth()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showFishingGuild",
|
||||
name = "Show Fishing guild portal",
|
||||
description = "Configures whether or not the Fishing guild portal is displayed"
|
||||
)
|
||||
default boolean showFishingGuild()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showSenntisten",
|
||||
name = "Show Senntisten portal",
|
||||
description = "Configures whether or not the Senntisten portal is displayed"
|
||||
)
|
||||
default boolean showSenntisten()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showKharyll",
|
||||
name = "Show Kharyll portal",
|
||||
description = "Configures whether or not the Kharyll portal is displayed"
|
||||
)
|
||||
default boolean showKharyll()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showAnnakarl",
|
||||
name = "Show Annakarl portal",
|
||||
description = "Configures whether or not the Annakarl portal is displayed"
|
||||
)
|
||||
default boolean showAnnakarl()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showKourend",
|
||||
name = "Show Kourend portal",
|
||||
description = "Configures whether or not the Kourend portal is displayed"
|
||||
)
|
||||
default boolean showKourend()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showMarim",
|
||||
name = "Show Marim portal",
|
||||
description = "Configures whether or not the Marim portal is displayed"
|
||||
)
|
||||
default boolean showMarim()
|
||||
default boolean showPortals()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -27,37 +27,26 @@ package net.runelite.client.plugins.poh;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javax.inject.Inject;
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Perspective;
|
||||
import net.runelite.api.Point;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.ALTAR;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.ANNAKARL;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.ARDOUGNE;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.CAMELOT;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.EXITPORTAL;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.FALADOR;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.FISHINGGUILD;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.GLORY;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.KHARYLL;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.KOUREND;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.LUMBRIDGE;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.LUNARISLE;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.MARIM;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.POOLS;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.REPAIR;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.SENNTISTEN;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.VARROCK;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.WATERBIRTH;
|
||||
import static net.runelite.client.plugins.poh.PohIcons.YANILLE;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
|
||||
public class PohOverlay extends Overlay
|
||||
{
|
||||
private static final PohIcons[] PORTALS = new PohIcons[]
|
||||
{
|
||||
PohIcons.LUMBRIDGE, PohIcons.FALADOR, PohIcons.VARROCK, PohIcons.CAMELOT, PohIcons.ARDOUGNE,
|
||||
PohIcons.YANILLE, PohIcons.LUNARISLE, PohIcons.WATERBIRTH, PohIcons.FISHINGGUILD,
|
||||
PohIcons.SENNTISTEN, PohIcons.KHARYLL, PohIcons.ANNAKARL, PohIcons.KOUREND, PohIcons.MARIM
|
||||
};
|
||||
|
||||
private static final int MAX_DISTANCE = 2350;
|
||||
|
||||
@Getter
|
||||
@@ -106,81 +95,29 @@ public class PohOverlay extends Overlay
|
||||
public void updateConfig()
|
||||
{
|
||||
iconList.clear();
|
||||
if (config.showLumbridge())
|
||||
if (config.showPortals())
|
||||
{
|
||||
iconList.add(LUMBRIDGE);
|
||||
}
|
||||
if (config.showFalador())
|
||||
{
|
||||
iconList.add(FALADOR);
|
||||
}
|
||||
if (config.showVarrock())
|
||||
{
|
||||
iconList.add(VARROCK);
|
||||
}
|
||||
if (config.showCamelot())
|
||||
{
|
||||
iconList.add(CAMELOT);
|
||||
}
|
||||
if (config.showArdougne())
|
||||
{
|
||||
iconList.add(ARDOUGNE);
|
||||
}
|
||||
if (config.showYanille())
|
||||
{
|
||||
iconList.add(YANILLE);
|
||||
}
|
||||
if (config.showLunarIsle())
|
||||
{
|
||||
iconList.add(LUNARISLE);
|
||||
}
|
||||
if (config.showWaterBirth())
|
||||
{
|
||||
iconList.add(WATERBIRTH);
|
||||
}
|
||||
if (config.showFishingGuild())
|
||||
{
|
||||
iconList.add(FISHINGGUILD);
|
||||
}
|
||||
if (config.showSenntisten())
|
||||
{
|
||||
iconList.add(SENNTISTEN);
|
||||
}
|
||||
if (config.showKharyll())
|
||||
{
|
||||
iconList.add(KHARYLL);
|
||||
}
|
||||
if (config.showAnnakarl())
|
||||
{
|
||||
iconList.add(ANNAKARL);
|
||||
}
|
||||
if (config.showKourend())
|
||||
{
|
||||
iconList.add(KOUREND);
|
||||
}
|
||||
if (config.showMarim())
|
||||
{
|
||||
iconList.add(MARIM);
|
||||
Collections.addAll(iconList, PORTALS);
|
||||
}
|
||||
if (config.showAltar())
|
||||
{
|
||||
iconList.add(ALTAR);
|
||||
iconList.add(PohIcons.ALTAR);
|
||||
}
|
||||
if (config.showGlory())
|
||||
{
|
||||
iconList.add(GLORY);
|
||||
iconList.add(PohIcons.GLORY);
|
||||
}
|
||||
if (config.showRepairStand())
|
||||
{
|
||||
iconList.add(REPAIR);
|
||||
iconList.add(PohIcons.REPAIR);
|
||||
}
|
||||
if (config.showPools())
|
||||
{
|
||||
iconList.add(POOLS);
|
||||
iconList.add(PohIcons.POOLS);
|
||||
}
|
||||
if (config.showExitPortal())
|
||||
{
|
||||
iconList.add(EXITPORTAL);
|
||||
iconList.add(PohIcons.EXITPORTAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user