mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Fixed bug where swamp tar interactions could steal an entire stack
This commit is contained in:
parent
cf08e700fb
commit
74ed5e1bee
1 changed files with 5 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ import core.game.interaction.QueueStrength
|
||||||
import core.game.node.entity.combat.ImpactHandler
|
import core.game.node.entity.combat.ImpactHandler
|
||||||
import core.game.node.entity.combat.ImpactHandler.HitsplatType
|
import core.game.node.entity.combat.ImpactHandler.HitsplatType
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.node.item.Item
|
||||||
import core.game.world.map.Location
|
import core.game.world.map.Location
|
||||||
import org.rs09.consts.Components
|
import org.rs09.consts.Components
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
|
|
@ -76,7 +77,8 @@ class SeaSlugListeners : InteractionListener {
|
||||||
// Your torch goes out on the crossing.
|
// Your torch goes out on the crossing.
|
||||||
|
|
||||||
onUseWith(IntType.ITEM, Items.SWAMP_TAR_1939, Items.POT_OF_FLOUR_1933){ player, used, with ->
|
onUseWith(IntType.ITEM, Items.SWAMP_TAR_1939, Items.POT_OF_FLOUR_1933){ player, used, with ->
|
||||||
if(removeItem(player, used) && removeItem(player, with)) {
|
val toRemove = Item(used.id, 1, used.asItem().slot)
|
||||||
|
if(removeItem(player, toRemove) && removeItem(player, with)) {
|
||||||
sendMessage(player, "You mix the flour with the swamp tar.")
|
sendMessage(player, "You mix the flour with the swamp tar.")
|
||||||
sendMessage(player, "It mixes into a paste.")
|
sendMessage(player, "It mixes into a paste.")
|
||||||
addItemOrDrop(player, Items.EMPTY_POT_1931)
|
addItemOrDrop(player, Items.EMPTY_POT_1931)
|
||||||
|
|
@ -88,7 +90,8 @@ class SeaSlugListeners : InteractionListener {
|
||||||
// You can only cook it using firewood.
|
// You can only cook it using firewood.
|
||||||
// sendMessage(player, "You can't cook that in a range.")
|
// sendMessage(player, "You can't cook that in a range.")
|
||||||
onUseWith(SCENERY, Items.RAW_SWAMP_PASTE_1940, Scenery.FIRE_2732) { player, used, with ->
|
onUseWith(SCENERY, Items.RAW_SWAMP_PASTE_1940, Scenery.FIRE_2732) { player, used, with ->
|
||||||
if(removeItem(player, used)) {
|
val toRemove = Item(used.id, 1, used.asItem().slot)
|
||||||
|
if(removeItem(player, toRemove)) {
|
||||||
sendMessage(player, "You warm the paste over the fire. It thickens into a sticky goo.")
|
sendMessage(player, "You warm the paste over the fire. It thickens into a sticky goo.")
|
||||||
addItemOrDrop(player, Items.SWAMP_PASTE_1941)
|
addItemOrDrop(player, Items.SWAMP_PASTE_1941)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue