From 1b28a0c576cc3309ad3ea1f1e2bd18936f79f131 Mon Sep 17 00:00:00 2001 From: Syndromeramo Date: Wed, 11 Jun 2025 10:36:54 -0500 Subject: [PATCH] Bowl of Hot Water, Cup of Water, and Cup of Hot Water can be emptied. Further checks for items that cannot be taken out of POH. Wooden Shelves 3 now properly give porcelain cups, not regular cups. Teapot type has no bearing on if it can be poured into a teacup. --- .../handlers/item/EmptyOptionListener.kt | 3 +++ .../global/skill/construction/HouseZone.java | 5 ++++ .../decoration/kitchen/ShelfListener.kt | 26 ++++++++++++------- .../global/skill/cooking/TeaInteraction.kt | 22 +++++----------- 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/Server/src/main/content/global/handlers/item/EmptyOptionListener.kt b/Server/src/main/content/global/handlers/item/EmptyOptionListener.kt index d2b64a403..6f512a31b 100644 --- a/Server/src/main/content/global/handlers/item/EmptyOptionListener.kt +++ b/Server/src/main/content/global/handlers/item/EmptyOptionListener.kt @@ -43,6 +43,7 @@ class EmptyOptionListener : InteractionListener { BUCKET_OF_SLIME(Items.BUCKET_OF_SLIME_4286, Items.BUCKET_1925, "You empty the contents of the bucket on the floor.", Sounds.LIQUID_2401), VIAL_OF_WATER(Items.VIAL_OF_WATER_227, Items.VIAL_229, "You empty the vial.", Sounds.LIQUID_2401), BOWL_OF_WATER(Items.BOWL_OF_WATER_1921, Items.BOWL_1923, "You empty the contents of the bowl onto the floor.", Sounds.LIQUID_2401), + BOWL_OF_HOT_WATER(Items.BOWL_OF_HOT_WATER_4456, Items.BOWL_1923, "You empty the contents of the bowl onto the floor.", Sounds.LIQUID_2401), JUG_OF_WATER(Items.JUG_OF_WATER_1937, Items.JUG_1935, "You empty the contents of the jug onto the floor.", Sounds.LIQUID_2401), BURNT_PIE(Items.BURNT_PIE_2329, Items.PIE_DISH_2313, "You empty the pie dish."), POTION(Items.POTION_195, Items.VIAL_229, "You empty the vial.", Sounds.LIQUID_2401), @@ -52,6 +53,8 @@ class EmptyOptionListener : InteractionListener { NETTLE_TEA_MILKY(Items.NETTLE_TEA_4240, Items.BOWL_1923, "You empty the contents of the bowl onto the floor.", Sounds.LIQUID_2401), NETTLE_TEA_CUP(Items.CUP_OF_TEA_4242, Items.EMPTY_CUP_1980, "You empty the contents of the cup onto the floor.", Sounds.LIQUID_2401), NETTLE_TEA_CUP_MILKY(Items.CUP_OF_TEA_4243, Items.EMPTY_CUP_1980, "You empty the contents of the cup onto the floor.", Sounds.LIQUID_2401), + TEA_CUP_WATER(Items.CUP_OF_WATER_4458, Items.EMPTY_CUP_1980, "You empty the contents of the cup onto the floor.", Sounds.LIQUID_2401), + TEA_CUP_HOT_WATER(Items.CUP_OF_HOT_WATER_4460, Items.EMPTY_CUP_1980, "You empty the contents of the cup onto the floor.", Sounds.LIQUID_2401), NETTLE_TEA_PORCELAIN(Items.CUP_OF_TEA_4245, Items.PORCELAIN_CUP_4244, "You empty the contents of the cup onto the floor.", Sounds.LIQUID_2401), NETTLE_TEA_PORCELAIN_MILKY(Items.CUP_OF_TEA_4246, Items.PORCELAIN_CUP_4244, "You empty the contents of the cup onto the floor.", Sounds.LIQUID_2401), BUILDERS_TEA1(Items.CUP_OF_TEA_7730, Items.EMPTY_CUP_7728, "You empty the contents of the cup onto the floor.", Sounds.LIQUID_2401), diff --git a/Server/src/main/content/global/skill/construction/HouseZone.java b/Server/src/main/content/global/skill/construction/HouseZone.java index afa32bd02..ef8b588ca 100644 --- a/Server/src/main/content/global/skill/construction/HouseZone.java +++ b/Server/src/main/content/global/skill/construction/HouseZone.java @@ -147,12 +147,17 @@ public final class HouseZone extends MapZone { Items.TEAPOT_7726, Items.EMPTY_CUP_7728, Items.CUP_OF_TEA_7730, + Items.CUP_OF_TEA_7731, Items.PORCELAIN_CUP_7732, Items.CUP_OF_TEA_7733, Items.CUP_OF_TEA_7734, Items.PORCELAIN_CUP_7735, Items.CUP_OF_TEA_7736, Items.CUP_OF_TEA_7737, + Items.KETTLE_7688, + Items.FULL_KETTLE_7690, + Items.HOT_KETTLE_7691, + Items.TEA_LEAVES_7738, }; private void remove_items(Player p) { diff --git a/Server/src/main/content/global/skill/construction/decoration/kitchen/ShelfListener.kt b/Server/src/main/content/global/skill/construction/decoration/kitchen/ShelfListener.kt index ac407f8ad..17c407b1f 100644 --- a/Server/src/main/content/global/skill/construction/decoration/kitchen/ShelfListener.kt +++ b/Server/src/main/content/global/skill/construction/decoration/kitchen/ShelfListener.kt @@ -1,14 +1,10 @@ package content.global.skill.construction.decoration.kitchen import core.api.* -import core.game.dialogue.* import core.game.interaction.IntType import core.game.interaction.InteractionListener -import core.game.node.entity.player.Player -import core.tools.END_DIALOGUE import org.rs09.consts.Items import org.rs09.consts.Scenery -import kotlin.math.min class ShelfListener : InteractionListener { @@ -25,13 +21,23 @@ class ShelfListener : InteractionListener { "Beer glass" to Items.BEER_GLASS_1919 ) - private val woodshelf_3_items = woodshelf_2_items + listOf( - "Cake tin" to Items.CAKE_TIN_1887 - ) + private val woodshelf_3_items = woodshelf_2_items.map { (name, itemId) -> + when (name) { + "Cup" -> { + "Porcelain cup" to Items.PORCELAIN_CUP_7732 + } - private val oakshelf_1_items = woodshelf_3_items + listOf( - "Bowl" to Items.BOWL_1923, - ) + "Teapot" -> { + "Teapot" to Items.TEAPOT_7714 + } + + else -> { + name to itemId + } + } + } + listOf("Cake tin" to Items.CAKE_TIN_1887) + + private val oakshelf_1_items = woodshelf_2_items + listOf("Cake tin" to Items.CAKE_TIN_1887) + listOf("Bowl" to Items.BOWL_1923) private val oakshelf_2_items = oakshelf_1_items.map { (name, itemId) -> when (name) { diff --git a/Server/src/main/content/global/skill/cooking/TeaInteraction.kt b/Server/src/main/content/global/skill/cooking/TeaInteraction.kt index 6a5c6d75f..98ca80c60 100644 --- a/Server/src/main/content/global/skill/cooking/TeaInteraction.kt +++ b/Server/src/main/content/global/skill/cooking/TeaInteraction.kt @@ -53,27 +53,26 @@ class TeaInteraction : InteractionListener { Items.TEAPOT_WITH_LEAVES_7724 ) - private val t1teapot = intArrayOf( + private val filledTeaPot = intArrayOf( Items.POT_OF_TEA_4_7692, Items.POT_OF_TEA_3_7694, Items.POT_OF_TEA_2_7696, Items.POT_OF_TEA_1_7698, - ) - - private val t2teapot = intArrayOf( Items.POT_OF_TEA_4_7704, Items.POT_OF_TEA_3_7706, Items.POT_OF_TEA_2_7708, Items.POT_OF_TEA_1_7710, - ) - - private val t3teapot = intArrayOf( Items.POT_OF_TEA_4_7716, Items.POT_OF_TEA_3_7718, Items.POT_OF_TEA_2_7720, Items.POT_OF_TEA_1_7722, ) + private val emptyBuilderCup = intArrayOf( + Items.EMPTY_CUP_7728, + Items.PORCELAIN_CUP_7732, + Items.PORCELAIN_CUP_7735 + ) override fun defineListeners() { onUseWith(ITEM, teaMilkMap.keys.toIntArray(), Items.BUCKET_OF_MILK_1927){ player, used, with -> @@ -134,14 +133,7 @@ class TeaInteraction : InteractionListener { return@onUseWith true } - onUseWith(ITEM, t1teapot, Items.EMPTY_CUP_7728) { player, used, with -> - return@onUseWith fillBuildersTea(player, used, with) - } - - onUseWith(ITEM, t2teapot, Items.PORCELAIN_CUP_7732) { player, used, with -> - return@onUseWith fillBuildersTea(player, used, with) - } - onUseWith(ITEM, t3teapot, Items.PORCELAIN_CUP_7735) { player, used, with -> + onUseWith(ITEM, filledTeaPot, *emptyBuilderCup) { player, used, with -> return@onUseWith fillBuildersTea(player, used, with) } }