Skip to content

Commit

Permalink
Merge pull request #129 from tannerlie/branch-change-package
Browse files Browse the repository at this point in the history
Fix player inventory bug and change package name
  • Loading branch information
tannerlie committed Apr 15, 2024
2 parents 8d78daa + 1284464 commit b7de171
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/java/command/fight/FightingCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void execute() {

@Override
public void execute(Scanner in) throws FileNotFoundException {
if (currentMapForCommand instanceof map.BattleInterface.BattleInterface) {
if (currentMapForCommand instanceof map.battleinterface.BattleInterface) {
currentMapForCommand.enableFight(in);
BaseMap.currentMap = mapIndex.get(FIRST_MAP_IDENTITY);
if (currentMapForCommand.getEntityDeath()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/command/fight/RunningCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import command.Command;
import map.BaseMap;
import map.BattleInterface.BattleInterface;
import map.battleinterface.BattleInterface;
import map.ShopMap;

import static map.BaseMap.storedMaps;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/command/inventory/OpenInventoryCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public OpenInventoryCommand() {
@Override
public void execute() {
BaseMap.currentMap = mapIndex.get(INVENTORY_IDENTITY);
textBox.setNextNarration("Here's your inventory! You can use an item by keying in [use] followed by it's " +
"index with a space between them.");
textBox.setNextNarration("Here's your inventory! You can use an item by keying in [use] followed by it's \n" +
"index with a space between them. Alternatively, enter [close] to close your inventory.");
}
}
2 changes: 1 addition & 1 deletion src/main/java/command/mapmove/InteractingCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import interactable.enemies.Goblin;
import map.BaseMap;
import map.ShopMap;
import map.BattleInterface.BattleInterface;
import map.battleinterface.BattleInterface;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import map.BaseMap;
import map.ShopMap;
import map.PlayerInventory;
import map.BattleInterface.BattleInterface;
import map.battleinterface.BattleInterface;
import parser.Parser;
import textbox.PlayerStatus;
import textbox.TextBox;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/map/PlayerInventory.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public void addItems(Consumable item) {
List<Item> filteredList = generalItems.stream().filter(x -> x.getName().equalsIgnoreCase(
item.getName())).collect(Collectors.toList());
if (filteredList.isEmpty()) {
item.setQuantity(1);
generalItems.add(item);
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package map.BattleInterface;
package map.battleinterface;

import interactable.Enemy;
import interactable.InteractableEntity;
Expand Down

0 comments on commit b7de171

Please sign in to comment.