Skip to content
This repository was archived by the owner on Nov 7, 2023. It is now read-only.

Commit 0454bb8

Browse files
committed
fix(bank chests): fix ArgumentException when a bank chest is broken
1 parent ad9fa41 commit 0454bb8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Implementation/UserInteractionHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,8 @@ public bool HandleTileEdit(TSPlayer player, TileEditType editType, int blockType
23322332
}
23332333
}
23342334

2335-
if (isChest) {
2335+
// note: if the chest was a bank chest, then it was already removed
2336+
if (isChest && TerrariaUtils.Tiles[location].active()) {
23362337
ObjectMeasureData measureData = TerrariaUtils.Tiles.MeasureObject(location);
23372338
DPoint chestLocation = measureData.OriginTileLocation;
23382339
IChest chest = this.ChestManager.ChestFromLocation(chestLocation);

0 commit comments

Comments
 (0)