Skip to content

Commit

Permalink
fixed small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
TiagoFar78 committed Jul 18, 2024
1 parent a747045 commit aa116b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/main/java/net/tiagofar78/prisonescape/game/Guard.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ private boolean canBuyItem(Buyable item) {
return true;
}

return _itemsBought.get(item.getClass().getSimpleName()) < item.getLimit();
Integer bought = _itemsBought.get(item.getClass().getSimpleName());
if (bought == null) {
bought = 0;
}

return bought < item.getLimit();
}

private void updateItemCount(String itemName, int amount) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

public class Camera {

private static final int WATCH_CAMERA_DELAY = 3;
private static final int WATCH_CAMERA_DELAY = 10;

private NPC _camera;

Expand Down

0 comments on commit aa116b7

Please sign in to comment.