DialogueLabeller and ContentAPI

This commit is contained in:
Bishop 2026-06-18 23:07:50 -05:00
parent 5f24050d4b
commit 51a3ad061f
2 changed files with 547 additions and 771 deletions

View file

@ -1,6 +1,7 @@
package content.global.skill.construction
import content.data.Quests
import core.api.*
import core.game.node.entity.player.Player
import core.game.node.entity.skill.Skills
import org.rs09.consts.Items
@ -10,26 +11,22 @@ import org.rs09.consts.Items
*/
enum class CrestType(val crestName: String, val cost: Int = 5000, private val requirement: (Player) -> Boolean = { true }) {
ARRAV("the Shield of Arrav symbol", requirement = { it.questRepository.isComplete(Quests.SHIELD_OF_ARRAV) }),
ARRAV("the Shield of Arrav symbol", requirement = { isQuestComplete(it, Quests.SHIELD_OF_ARRAV) }),
ASGARNIA("the symbol of Asgarnia"),
DORGESHUUN("the Dorgeshuun brooch", requirement = { it.questRepository.isComplete(Quests.THE_LOST_TRIBE) }),
DRAGON("a dragon", requirement = { it.questRepository.isComplete(Quests.DRAGON_SLAYER) }),
FAIRY("a fairy", requirement = { it.questRepository.isComplete(Quests.LOST_CITY) }),
GUTHIX("the symbol of Guthix", requirement = { it.skills.hasLevel(Skills.PRAYER, 70) }),
DORGESHUUN("the Dorgeshuun brooch", requirement = { isQuestComplete(it, Quests.THE_LOST_TRIBE) }),
DRAGON("a dragon", requirement = { isQuestComplete(it, Quests.DRAGON_SLAYER) }),
FAIRY("a fairy", requirement = { isQuestComplete(it, Quests.LOST_CITY) }),
GUTHIX("the symbol of Guthix", requirement = { hasLevelStat(it, Skills.PRAYER, 70) }),
HAM("the symbol of the HAM cult."),
HORSE("a horse", requirement = { player ->
player.inventory.containsAtLeastOneItem(
intArrayOf(Items.TOY_HORSEY_2524, Items.TOY_HORSEY_2520, Items.TOY_HORSEY_2526, Items.TOY_HORSEY_2522)
)
}),
HORSE("a horse", requirement = { anyInInventory(it, Items.TOY_HORSEY_2524, Items.TOY_HORSEY_2520, Items.TOY_HORSEY_2526, Items.TOY_HORSEY_2522) }),
JOGRE("Jiggig"),
KANDARIN("the symbol of Kandarin"),
MISTHALIN("the symbol of Misthalin"),
MONEY("a bag of money", cost = 500000),
SARADOMIN("the symbol of Saradomin", requirement = { it.skills.hasLevel(Skills.PRAYER, 70) }),
SARADOMIN("the symbol of Saradomin", requirement = { hasLevelStat(it, Skills.PRAYER, 70) }),
SKULL("a skull", requirement = { it.skullManager.isSkulled }),
VARROCK("the symbol of Varrock"),
ZAMORAK("the symbol of Zamorak", requirement = { it.skills.hasLevel(Skills.PRAYER, 70) });
ZAMORAK("the symbol of Zamorak", requirement = { hasLevelStat(it, Skills.PRAYER, 70) });
fun eligible(player: Player): Boolean = requirement(player)
}