9
0
mirror of https://github.com/Auxilor/EcoQuests.git synced 2025-12-22 08:29:18 +00:00

Compare commits

..

15 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
Auxilor
ed6bcaab04 libreforge-updater 2024-08-15 15:07:42 +01:00
Auxilor
40a0f99716 libreforge-updater 2024-08-03 13:41:32 +01:00
Auxilor
a59bce65ab libreforge-updater 2024-07-25 10:04:39 +01:00
Auxilor
0212076fad libreforge-updater 2024-07-21 12:19:23 +01:00
Auxilor
c4b0429ad5 libreforge-updater 2024-07-19 20:28:44 +01:00
Auxilor
c5e0611a20 libreforge-updater 2024-07-18 13:24:18 +01:00
Auxilor
cb2e8a181f libreforge-updater 2024-07-16 17:13:48 +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 // The tasks that are actually in use
var tasks = run { var tasks = run {
if (isResettable) { if (taskAmount == availableTasks.size) {
loadTasks() ?: availableTasks.randomlyPick(taskAmount) // If taskAmount is equal to availableTasks.size then tasks are ordered as configured
if (isResettable) {
availableTasks.take(taskAmount)
} else {
availableTasks.shuffled().take(taskAmount)
}
} else { } 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 private set
@@ -268,7 +278,8 @@ class Quest(
} }
fun getDescription(player: Player): List<String> { 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 { fun hasActive(player: OfflinePlayer): Boolean {

View File

@@ -1,5 +1,5 @@
#libreforge-updater #libreforge-updater
#Sat Jul 13 20:45:24 BST 2024 #Sun Sep 22 17:00:59 BST 2024
kotlin.code.style=official kotlin.code.style=official
libreforge-version=4.65.1 libreforge-version=4.72.0
version=1.36.1 version=1.43.0