diff --git a/Server/src/main/content/global/skill/construction/decoration/workshop/EaselListeners.kt b/Server/src/main/content/global/skill/construction/decoration/workshop/EaselListeners.kt index 881b049f5..c7f99b357 100644 --- a/Server/src/main/content/global/skill/construction/decoration/workshop/EaselListeners.kt +++ b/Server/src/main/content/global/skill/construction/decoration/workshop/EaselListeners.kt @@ -1,6 +1,7 @@ package content.global.skill.construction.decoration.workshop import content.global.skill.crafting.HeraldicProduct +import content.region.asgarnia.falador.dialogue.SirReniteeDialogueFile import core.api.* import core.game.interaction.InteractionListener import core.game.node.entity.player.Player @@ -31,6 +32,10 @@ class EaselListener : InteractionListener { private fun checkRequirements(player: Player, product: HeraldicProduct) : Boolean { when { + (!getAttribute(player, SirReniteeDialogueFile.attributeCrest, false)) -> { + sendDialogue(player, "You need a crest to make heraldic items.") // Placeholder + return false + } (!inInventory(player, product.primaryMaterialId)) -> { sendDialogue(player, "You need a ${product.primaryMaterialId.asItem().name.toLowerCase()} to make this.") return false diff --git a/Server/src/main/content/region/asgarnia/falador/dialogue/SirReniteeDialogue.kt b/Server/src/main/content/region/asgarnia/falador/dialogue/SirReniteeDialogue.kt index 22582d21e..06440bdc7 100644 --- a/Server/src/main/content/region/asgarnia/falador/dialogue/SirReniteeDialogue.kt +++ b/Server/src/main/content/region/asgarnia/falador/dialogue/SirReniteeDialogue.kt @@ -36,7 +36,7 @@ class SirReniteeDialogue : InteractionListener { class SirReniteeDialogueFile : DialogueLabeller() { - private companion object { + companion object { const val attributeCrest = "/save:sir-renitee-assigned-crest" const val attributeTempCrest = "sir-renitee-temp-crest" const val attributeTempPainting = "sir-renitee-temp-painting" @@ -121,7 +121,7 @@ class SirReniteeDialogueFile : DialogueLabeller() { } label("show_existing_crest") - npc(ChatAnim.NEUTRAL, "According to my records, your crest is ${player!!.houseManager.crest.crestName}.") // test line breaks here + npc(ChatAnim.NEUTRAL, "According to my records, your crest is ${player!!.houseManager.crest.crestName}.") goto("crest_options") label("show_new_crest")