Fletching now checks for inventory space before fletching darts, headless arrows, and arrows
This commit is contained in:
@@ -7,6 +7,8 @@ import content.global.skill.fletching.Fletching;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
|
||||
import static core.api.ContentAPIKt.*;
|
||||
|
||||
/**
|
||||
* Represents the arrow head pulse to complete the headless arrow.
|
||||
* @author 'Vexia
|
||||
@@ -53,6 +55,10 @@ public class ArrowHeadPulse extends SkillPulse<Item> {
|
||||
player.getDialogueInterpreter().sendDialogue("You need a fletching level of " + arrow.level + " to do this.");
|
||||
return false;
|
||||
}
|
||||
if (!hasSpaceFor(player, arrow.getFinished())) {
|
||||
sendDialogue(player, "You do not have enough inventory space.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
|
||||
import static core.api.ContentAPIKt.*;
|
||||
|
||||
/**
|
||||
* Represents the arrow pulse for creating unfinished arrows.
|
||||
* @author 'Vexia
|
||||
@@ -75,6 +77,10 @@ public final class HeadlessArrowPulse extends SkillPulse<Item> {
|
||||
} else {
|
||||
useSets = false;
|
||||
}
|
||||
if (!hasSpaceFor(player, HEADLESS_ARROW.asItem())) {
|
||||
sendDialogue(player, "You do not have enough inventory space.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ import content.global.skill.fletching.Fletching;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
|
||||
import static core.api.ContentAPIKt.*;
|
||||
|
||||
/**
|
||||
* Represents the dart pulse.
|
||||
* @author ceikry
|
||||
@@ -48,6 +50,10 @@ public final class DartPulse extends SkillPulse<Item> {
|
||||
player.getDialogueInterpreter().sendDialogue("You need to have completed Tourist Trap to fletch darts.");
|
||||
return false;
|
||||
}
|
||||
if (!hasSpaceFor(player, dart.getFinished())) {
|
||||
sendDialogue(player, "You do not have enough inventory space.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user