Skip to content

Commit

Permalink
Merge pull request #459 from tonihele/bugfix/issue-457
Browse files Browse the repository at this point in the history
Check if the wanted coordinate is actually valid for dropping gold
  • Loading branch information
tonihele authored Jul 6, 2024
2 parents 0436f14 + 3d6f5c3 commit b6eea33
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public RoomGoldControl(KwdFile kwdFile, IRoomController parent, IObjectsControll

@Override
public Integer addItem(Integer sum, Point p) {
if (p != null) {
if (p != null && parent.isTileAccessible(null, p)) {
sum = putGold(sum, p);
}

Expand Down

0 comments on commit b6eea33

Please sign in to comment.