Merge pull request #10407 from Blackberry0Pie/random-event-options

This commit is contained in:
Jordan
2020-07-01 20:49:59 -07:00
committed by GitHub
2 changed files with 56 additions and 26 deletions

View File

@@ -44,18 +44,29 @@ public interface RandomEventConfig extends Config
keyName = "removeMenuOptions",
name = "Remove others' menu options",
description = "Remove menu options from random events for other players.",
position = 0
position = -3
)
default boolean removeMenuOptions()
{
return true;
}
@ConfigItem(
keyName = "notifyAll",
name = "Notify for all events",
description = "",
position = -2,
section = notificationSection
)
default boolean notifyAllEvents()
{
return false;
}
@ConfigItem(
keyName = "notifyDunce",
name = "Notify on Surprise Exam",
description = "",
position = 1,
section = notificationSection
)
default boolean notifyDunce()
@@ -67,7 +78,6 @@ public interface RandomEventConfig extends Config
keyName = "notifyGenie",
name = "Notify on Genie",
description = "",
position = 2,
section = notificationSection
)
default boolean notifyGenie()
@@ -79,7 +89,6 @@ public interface RandomEventConfig extends Config
keyName = "notifyDemon",
name = "Notify on Drill Demon",
description = "",
position = 3,
section = notificationSection
)
default boolean notifyDemon()
@@ -91,7 +100,6 @@ public interface RandomEventConfig extends Config
keyName = "notifyForester",
name = "Notify on Freaky Forester",
description = "",
position = 4,
section = notificationSection
)
default boolean notifyForester()
@@ -103,7 +111,6 @@ public interface RandomEventConfig extends Config
keyName = "notifyFrog",
name = "Notify on Kiss the Frog",
description = "",
position = 5,
section = notificationSection
)
default boolean notifyFrog()
@@ -115,7 +122,6 @@ public interface RandomEventConfig extends Config
keyName = "notifyGravedigger",
name = "Notify on Gravedigger",
description = "",
position = 6,
section = notificationSection
)
default boolean notifyGravedigger()
@@ -127,7 +133,6 @@ public interface RandomEventConfig extends Config
keyName = "notifyMoM",
name = "Notify on Mysterious Old Man",
description = "",
position = 7,
section = notificationSection
)
default boolean notifyMoM()
@@ -139,7 +144,6 @@ public interface RandomEventConfig extends Config
keyName = "notifyBob",
name = "Notify on Evil Bob",
description = "",
position = 8,
section = notificationSection
)
default boolean notifyBob()
@@ -151,7 +155,6 @@ public interface RandomEventConfig extends Config
keyName = "notifyQuiz",
name = "Notify on Quiz Master",
description = "",
position = 9,
section = notificationSection
)
default boolean notifyQuiz()
@@ -160,15 +163,35 @@ public interface RandomEventConfig extends Config
}
@ConfigItem(
keyName = "notifyAll",
name = "Notify for all events",
keyName = "notifyJekyll",
name = "Notify on Jekyll & Hyde",
description = "",
position = 10,
section = notificationSection
)
default boolean notifyAllEvents()
default boolean notifyJekyll()
{
return false;
}
@ConfigItem(
keyName = "notifyBeekeeper",
name = "Notify on Beekeeper",
description = "",
section = notificationSection
)
default boolean notifyBeekeeper()
{
return false;
}
@ConfigItem(
keyName = "notifySandwich",
name = "Notify on Sandwich Lady",
description = "",
section = notificationSection
)
default boolean notifySandwich()
{
return false;
}
}

View File

@@ -55,28 +55,28 @@ import net.runelite.client.plugins.PluginDescriptor;
public class RandomEventPlugin extends Plugin
{
private static final Set<Integer> EVENT_NPCS = ImmutableSet.of(
NpcID.DR_JEKYLL, NpcID.DR_JEKYLL_314,
NpcID.BEE_KEEPER_6747,
NpcID.CAPT_ARNAV,
NpcID.SERGEANT_DAMIEN_6743,
NpcID.DR_JEKYLL, NpcID.DR_JEKYLL_314,
NpcID.DRUNKEN_DWARF,
NpcID.FREAKY_FORESTER_6748,
NpcID.GENIE, NpcID.GENIE_327,
NpcID.DUNCE_6749,
NpcID.EVIL_BOB, NpcID.EVIL_BOB_6754,
NpcID.POSTIE_PETE_6738,
NpcID.FLIPPA_6744,
NpcID.FREAKY_FORESTER_6748,
NpcID.FROG_5429,
NpcID.GENIE, NpcID.GENIE_327,
NpcID.GILES, NpcID.GILES_5441,
NpcID.LEO_6746,
NpcID.MILES, NpcID.MILES_5440,
NpcID.MYSTERIOUS_OLD_MAN_6750, NpcID.MYSTERIOUS_OLD_MAN_6751,
NpcID.MYSTERIOUS_OLD_MAN_6752, NpcID.MYSTERIOUS_OLD_MAN_6753,
NpcID.NILES, NpcID.NILES_5439,
NpcID.PILLORY_GUARD,
NpcID.FLIPPA_6744,
NpcID.POSTIE_PETE_6738,
NpcID.QUIZ_MASTER_6755,
NpcID.RICK_TURPENTINE, NpcID.RICK_TURPENTINE_376,
NpcID.SANDWICH_LADY,
NpcID.DUNCE_6749,
NpcID.NILES, NpcID.NILES_5439,
NpcID.MILES, NpcID.MILES_5440,
NpcID.GILES, NpcID.GILES_5441,
NpcID.FROG_5429
NpcID.SERGEANT_DAMIEN_6743
);
private static final Set<String> EVENT_OPTIONS = ImmutableSet.of(
"Talk-to",
@@ -177,6 +177,8 @@ public class RandomEventPlugin extends Plugin
switch (id)
{
case NpcID.BEE_KEEPER_6747:
return config.notifyBeekeeper();
case NpcID.SERGEANT_DAMIEN_6743:
return config.notifyDemon();
case NpcID.FREAKY_FORESTER_6748:
@@ -186,6 +188,9 @@ public class RandomEventPlugin extends Plugin
case NpcID.GENIE:
case NpcID.GENIE_327:
return config.notifyGenie();
case NpcID.DR_JEKYLL:
case NpcID.DR_JEKYLL_314:
return config.notifyJekyll();
case NpcID.EVIL_BOB:
case NpcID.EVIL_BOB_6754:
return config.notifyBob();
@@ -200,6 +205,8 @@ public class RandomEventPlugin extends Plugin
return config.notifyQuiz();
case NpcID.DUNCE_6749:
return config.notifyDunce();
case NpcID.SANDWICH_LADY:
return config.notifySandwich();
default:
return false;
}