9
0
mirror of https://github.com/Auxilor/EcoQuests.git synced 2025-12-21 16:09:16 +00:00

Compare commits

..

8 Commits

Author SHA1 Message Date
Will FP
c86651df9b libreforge-updater 2024-09-22 17:00:59 +01:00
Will FP
26ccae38b1 Merge pull request #4 from Exanthiax/improved_sorting
improved sorting and multi-line descriptions
2024-09-22 15:47:35 +01:00
Exanthiax
c1c985d638 improved sorting and multi-line descriptions 2024-09-22 15:12:11 +01:00
Auxilor
5e51c369bb libreforge-updater 2024-09-02 11:30:14 +01:00
Auxilor
67a2e2fb4f libreforge-updater 2024-08-30 17:25:13 +01:00
Auxilor
f94e79bc92 libreforge-updater 2024-08-29 12:09:23 +01:00
Auxilor
9cf8d465b9 libreforge-updater 2024-08-23 15:35:29 +01:00
Auxilor
237ebda870 libreforge-updater 2024-08-21 18:58:25 +01:00
2 changed files with 18 additions and 7 deletions

View File

@@ -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 {

View File

@@ -1,5 +1,5 @@
#libreforge-updater
#Thu Aug 15 15:07:42 BST 2024
#Sun Sep 22 17:00:59 BST 2024
kotlin.code.style=official
libreforge-version=4.71.1
version=1.42.1
libreforge-version=4.72.0
version=1.43.0