mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Add more cups of tea
This commit is contained in:
parent
4f8892c94e
commit
484f6e1614
2 changed files with 17 additions and 1 deletions
|
|
@ -288,6 +288,8 @@ public enum Consumables {
|
||||||
NETTLE_WATER(new Drink(new int[] {Items.NETTLE_WATER_4237, Items.BOWL_1923}, new HealingEffect((1)))),
|
NETTLE_WATER(new Drink(new int[] {Items.NETTLE_WATER_4237, Items.BOWL_1923}, new HealingEffect((1)))),
|
||||||
CUP_OF_TEA_NETTLE(new Drink(new int[] {4242, 1980}, new HealingEffect(3))),
|
CUP_OF_TEA_NETTLE(new Drink(new int[] {4242, 1980}, new HealingEffect(3))),
|
||||||
CUP_OF_TEA_MILKY_NETTLE(new Drink(new int[] {4243, 1980}, new HealingEffect(3))),
|
CUP_OF_TEA_MILKY_NETTLE(new Drink(new int[] {4243, 1980}, new HealingEffect(3))),
|
||||||
|
CUP_OF_TEA_NETTLE_PORCELAIN(new Drink(new int[] {4245, 4244}, new HealingEffect(3))),
|
||||||
|
CUP_OF_TEA_MILKY_NETTLE_PORCELAIN(new Drink(new int[] {4246, 4244}, new HealingEffect(3))),
|
||||||
NETTLE_TEA(new Drink(new int[] {4239, 1923}, new HealingEffect(3))),
|
NETTLE_TEA(new Drink(new int[] {4239, 1923}, new HealingEffect(3))),
|
||||||
NETTLE_TEA_MILKY(new Drink(new int[] {4240, 1923}, new HealingEffect(3))),
|
NETTLE_TEA_MILKY(new Drink(new int[] {4240, 1923}, new HealingEffect(3))),
|
||||||
CUP_OF_TEA_CLAY(new Drink(new int[] {7730, 7728}, new SkillEffect(Skills.CONSTRUCTION, 1, 0), "You feel refreshed and ready for more building.")),
|
CUP_OF_TEA_CLAY(new Drink(new int[] {7730, 7728}, new SkillEffect(Skills.CONSTRUCTION, 1, 0), "You feel refreshed and ready for more building.")),
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import org.rs09.consts.Items
|
||||||
* clay
|
* clay
|
||||||
* porcelain
|
* porcelain
|
||||||
* gold trim
|
* gold trim
|
||||||
|
* Flask
|
||||||
*/
|
*/
|
||||||
class TeaInteraction : InteractionListener {
|
class TeaInteraction : InteractionListener {
|
||||||
private val teaMilkMap = mapOf(
|
private val teaMilkMap = mapOf(
|
||||||
|
|
@ -31,10 +32,16 @@ class TeaInteraction : InteractionListener {
|
||||||
|
|
||||||
private val teaCupMap = mapOf(
|
private val teaCupMap = mapOf(
|
||||||
Items.NETTLE_TEA_4239 to Items.CUP_OF_TEA_4242,
|
Items.NETTLE_TEA_4239 to Items.CUP_OF_TEA_4242,
|
||||||
Items.NETTLE_TEA_4240 to Items.CUP_OF_TEA_4246,
|
Items.NETTLE_TEA_4240 to Items.CUP_OF_TEA_4243,
|
||||||
Items.BOWL_OF_HOT_WATER_4456 to Items.CUP_OF_HOT_WATER_4460
|
Items.BOWL_OF_HOT_WATER_4456 to Items.CUP_OF_HOT_WATER_4460
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// This is specifically for the porcelain cup without a handle for Ghost Ahoy
|
||||||
|
private val teaCupPorcelainMap = mapOf(
|
||||||
|
Items.NETTLE_TEA_4239 to Items.CUP_OF_TEA_4245,
|
||||||
|
Items.NETTLE_TEA_4240 to Items.CUP_OF_TEA_4246
|
||||||
|
)
|
||||||
|
|
||||||
override fun defineListeners() {
|
override fun defineListeners() {
|
||||||
onUseWith(ITEM, teaMilkMap.keys.toIntArray(), Items.BUCKET_OF_MILK_1927){ player, used, with ->
|
onUseWith(ITEM, teaMilkMap.keys.toIntArray(), Items.BUCKET_OF_MILK_1927){ player, used, with ->
|
||||||
if (removeItem(player, used) && removeItem(player, with)){
|
if (removeItem(player, used) && removeItem(player, with)){
|
||||||
|
|
@ -64,6 +71,13 @@ class TeaInteraction : InteractionListener {
|
||||||
}
|
}
|
||||||
return@onUseWith true
|
return@onUseWith true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onUseWith(ITEM, teaCupPorcelainMap.keys.toIntArray(), Items.PORCELAIN_CUP_4244){player, used, with ->
|
||||||
|
if(removeItem(player, used) && removeItem(player, with)){
|
||||||
|
addItem(player, teaCupPorcelainMap[used.id]!!)
|
||||||
|
}
|
||||||
|
return@onUseWith true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue