mirror of
https://github.com/Auxilor/EcoQuests.git
synced 2025-12-21 16:09:16 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c86651df9b | ||
|
|
26ccae38b1 | ||
|
|
c1c985d638 | ||
|
|
5e51c369bb | ||
|
|
67a2e2fb4f | ||
|
|
f94e79bc92 | ||
|
|
9cf8d465b9 | ||
|
|
237ebda870 | ||
|
|
ed6bcaab04 | ||
|
|
40a0f99716 | ||
|
|
a59bce65ab | ||
|
|
0212076fad | ||
|
|
c4b0429ad5 | ||
|
|
c5e0611a20 | ||
|
|
cb2e8a181f | ||
|
|
c40a304c8a | ||
|
|
9e7a8a7581 |
@@ -44,7 +44,7 @@ allprojects {
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
|
||||
tasks {
|
||||
@@ -55,7 +55,7 @@ allprojects {
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = "21"
|
||||
jvmTarget = "17"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,10 +101,20 @@ class Quest(
|
||||
|
||||
// The tasks that are actually in use
|
||||
var tasks = run {
|
||||
if (isResettable) {
|
||||
loadTasks() ?: availableTasks.randomlyPick(taskAmount)
|
||||
if (taskAmount == availableTasks.size) {
|
||||
// If taskAmount is equal to availableTasks.size then tasks are ordered as configured
|
||||
if (isResettable) {
|
||||
availableTasks.take(taskAmount)
|
||||
} else {
|
||||
availableTasks.shuffled().take(taskAmount)
|
||||
}
|
||||
} else {
|
||||
availableTasks.randomlyPick(taskAmount)
|
||||
// If taskAmount is less than availableTasks.size then tasks are selected and ordered randomly.
|
||||
if (isResettable) {
|
||||
loadTasks() ?: availableTasks.randomlyPick(taskAmount)
|
||||
} else {
|
||||
availableTasks.randomlyPick(taskAmount)
|
||||
}
|
||||
}
|
||||
}
|
||||
private set
|
||||
@@ -268,7 +278,8 @@ class Quest(
|
||||
}
|
||||
|
||||
fun getDescription(player: Player): List<String> {
|
||||
return addPlaceholdersInto(listOf(config.getString("description")), player)
|
||||
val descriptions = config.getStrings("description")
|
||||
return addPlaceholdersInto(descriptions, player)
|
||||
}
|
||||
|
||||
fun hasActive(player: OfflinePlayer): Boolean {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#libreforge-updater
|
||||
#Fri Jul 05 13:02:51 BST 2024
|
||||
#Sun Sep 22 17:00:59 BST 2024
|
||||
kotlin.code.style=official
|
||||
libreforge-version=4.64.1
|
||||
version=1.35.1
|
||||
libreforge-version=4.72.0
|
||||
version=1.43.0
|
||||
|
||||
Reference in New Issue
Block a user