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

View File

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