Added a way to specify how often a quest type gets picked
This commit is contained in:
parent
50fe3d8066
commit
53e3ef8b1d
|
|
@ -44,4 +44,15 @@ public final class Config extends AbstractConfig {
|
||||||
NPC_NAME = config.getString("settings.npc-name", NPC_NAME);
|
NPC_NAME = config.getString("settings.npc-name", NPC_NAME);
|
||||||
DEBUG = config.getBoolean("settings.debug", DEBUG);
|
DEBUG = config.getBoolean("settings.debug", DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int MINE_QUEST_FREQ = 1;
|
||||||
|
public static int KILL_QUEST_FREQ = 1;
|
||||||
|
public static int COLLECT_QUEST_FREQ = 1;
|
||||||
|
public static int BREED_QUEST_FREQ = 1;
|
||||||
|
private static void loadQuestTypeFrequency() {
|
||||||
|
MINE_QUEST_FREQ = config.getInt("quest-type-frequency.mine", MINE_QUEST_FREQ);
|
||||||
|
KILL_QUEST_FREQ = config.getInt("quest-type-frequency.kill", KILL_QUEST_FREQ);
|
||||||
|
COLLECT_QUEST_FREQ = config.getInt("quest-type-frequency.collect", COLLECT_QUEST_FREQ);
|
||||||
|
BREED_QUEST_FREQ = config.getInt("quest-type-frequency.breed", BREED_QUEST_FREQ);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,15 @@ public abstract class Quest {
|
||||||
// private static Quest weeklyQuest = null;
|
// private static Quest weeklyQuest = null;
|
||||||
private static final List<Class<? extends Quest>> possibleQuests = new ArrayList<>();
|
private static final List<Class<? extends Quest>> possibleQuests = new ArrayList<>();
|
||||||
|
|
||||||
static {
|
static { // maybe make this make more sense idk
|
||||||
possibleQuests.add(MineQuest.class);
|
for (int i = 0; i < Config.MINE_QUEST_FREQ; i++)
|
||||||
possibleQuests.add(KillMobsQuest.class);
|
possibleQuests.add(MineQuest.class);
|
||||||
possibleQuests.add(CollectDropsQuest.class);
|
for (int i = 0; i < Config.KILL_QUEST_FREQ; i++)
|
||||||
possibleQuests.add(BreedMobsQuest.class);
|
possibleQuests.add(KillMobsQuest.class);
|
||||||
|
for (int i = 0; i < Config.COLLECT_QUEST_FREQ; i++)
|
||||||
|
possibleQuests.add(CollectDropsQuest.class);
|
||||||
|
for (int i = 0; i < Config.BREED_QUEST_FREQ; i++)
|
||||||
|
possibleQuests.add(BreedMobsQuest.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final UUID uuid;
|
private final UUID uuid;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user