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.
This commit is contained in:
Syndromeramo 2025-06-11 10:36:54 -05:00
parent 58bc4833cb
commit 1b28a0c576
4 changed files with 31 additions and 25 deletions

View file

@ -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),

View file

@ -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) {

View file

@ -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) {

View file

@ -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)
}
}