mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-23 19:35:10 -06:00
Blocked crestless players from making heraldic items
This commit is contained in:
parent
4fc33cf3fd
commit
9bf2321974
2 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue