Add option to heat up bowl of water and implement milky tea

This commit is contained in:
gregf36665 2024-12-18 12:34:07 +00:00 committed by Syndromeramo
parent b6c4438233
commit 1b45a9ffb5
2 changed files with 32 additions and 3 deletions

View file

@ -28,6 +28,7 @@ class CookingRewrite : InteractionListener {
list.add(RAW_BEEF_2132)
list.add(RAW_BEAR_MEAT_2136)
list.add(SEAWEED_401)
list.add(Items.BOWL_OF_WATER_1921)
RAW_FOODS = list.toIntArray()
}
@ -46,6 +47,10 @@ class CookingRewrite : InteractionListener {
player.packetDispatch.sendMessage("You need to cook this on a range.")
return@onUseWith false
}
Items.BOWL_OF_WATER_1921 ->{
cook(player, obj, Items.BOWL_OF_WATER_1921, Items.BOWL_OF_HOT_WATER_4456, 1)
return@onUseWith true
}
}
//cook a standard item

View file

@ -1,6 +1,9 @@
package content.global.skill.cooking
import core.api.addItem
import core.api.removeItem
import core.game.interaction.InteractionListener
import org.rs09.consts.Items
/**
* This deals with all tea mixtures
@ -14,8 +17,29 @@ import core.game.interaction.InteractionListener
* gold trim
*/
class TeaInteraction : InteractionListener {
private val teaMilkMap = mapOf(
Items.CUP_OF_TEA_4242 to Items.CUP_OF_TEA_4243,
Items.CUP_OF_TEA_4245 to Items.CUP_OF_TEA_4246,
Items.CUP_OF_TEA_7730 to Items.CUP_OF_TEA_7731,
Items.CUP_OF_TEA_7733 to Items.CUP_OF_TEA_7734,
Items.CUP_OF_TEA_7736 to Items.CUP_OF_TEA_7737,
)
override fun defineListeners() {
onUseWith(ITEM, )
TODO("Not yet implemented")
onUseWith(ITEM, teaMilkMap.keys.toIntArray(), Items.BUCKET_OF_MILK_1927){ player, used, with ->
if (removeItem(player, used) && removeItem(player, with)){
addItem(player, teaMilkMap[used.id]!!)
addItem(player, Items.BUCKET_1925)
}
return@onUseWith true
}
onUseWith(ITEM, Items.BOWL_OF_HOT_WATER_4456, Items.EMPTY_CUP_1980){ player, used, with ->
if (removeItem(player, used) && removeItem(player, with)) {
addItem(player, Items.CUP_OF_HOT_WATER_4460)
}
return@onUseWith true
}
}
}