Fixed bug preventing tipping/finishing of crossbow bolts with full inventory

This commit is contained in:
Sam
2023-02-03 15:30:29 +00:00
committed by Ryan
parent 406552fae4
commit df345d782f
3 changed files with 11 additions and 1 deletions
@@ -76,6 +76,11 @@ public final class BoltPulse extends SkillPulse<Item> {
if (!player.getInventory().containsItem(bolt.getUnfinished())) {
return false;
}
if (!player.getInventory().hasSpaceFor(bolt.getFinished())) {
player.getDialogueInterpreter().sendDialogue("You do not have enough inventory space.");
return false;
}
return true;
}
@@ -48,6 +48,10 @@ public final class GemBoltPulse extends SkillPulse<Item> {
if (!player.getInventory().containsItem(new Item(bolt.base)) || !player.getInventory().containsItem(new Item(bolt.tip))) {
return false;
}
if (!player.getInventory().hasSpaceFor(new Item(bolt.product))){
player.getDialogueInterpreter().sendDialogue("You do not have enough inventory space.");
return false;
}
return true;
}