mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-21 20:18:14 +07:00
Changed item drop sound to play in the panels and not cursor
Changed item drop sound to play in the panels and not cursor This resolved an issue where dropping item on the ground was playing the inventory drop sound
This commit is contained in:
parent
ad931e0e8e
commit
70fc628fba
@ -78,9 +78,7 @@ public class Cursor {
|
||||
}
|
||||
|
||||
public void setItem(Item item) {
|
||||
if (this.item != null) {
|
||||
Riiablo.audio.play(this.item.base.dropsound, true);
|
||||
} else if (item != null) {
|
||||
if (this.item == null && item != null) {
|
||||
Riiablo.audio.play("item_pickup", true);
|
||||
}
|
||||
|
||||
|
@ -319,6 +319,7 @@ public class InventoryPanel extends WidgetGroup implements Disposable {
|
||||
return;
|
||||
}
|
||||
|
||||
Riiablo.audio.play(cursor.base.dropsound, true);
|
||||
Riiablo.cursor.setItem(item);
|
||||
item = cursor;
|
||||
gameScreen.player.setSlot(InventoryPanel.BodyPart.this.bodyLoc, item);
|
||||
|
@ -89,6 +89,7 @@ public class ItemGrid extends Group {
|
||||
|
||||
Item cursor = Riiablo.cursor.getItem();
|
||||
if (cursor != null) {
|
||||
Riiablo.audio.play(cursor.base.dropsound, true);
|
||||
if (swap != null) {
|
||||
Riiablo.cursor.setItem(swap.item);
|
||||
removeActor(swap);
|
||||
|
Loading…
Reference in New Issue
Block a user