summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/ChestEntity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/BlockEntities/ChestEntity.cpp')
-rw-r--r--src/BlockEntities/ChestEntity.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/BlockEntities/ChestEntity.cpp b/src/BlockEntities/ChestEntity.cpp
index 0f005fb53..8c8e75b25 100644
--- a/src/BlockEntities/ChestEntity.cpp
+++ b/src/BlockEntities/ChestEntity.cpp
@@ -105,6 +105,15 @@ bool cChestEntity::UsedBy(cPlayer * a_Player)
}
}
+ if (m_BlockType == E_BLOCK_CHEST)
+ {
+ a_Player->GetStatManager().AddValue(Statistic::OpenChest);
+ }
+ else // E_BLOCK_TRAPPED_CHEST
+ {
+ a_Player->GetStatManager().AddValue(Statistic::TriggerTrappedChest);
+ }
+
// If the window is not created, open it anew:
cWindow * Window = PrimaryChest->GetWindow();
if (Window == nullptr)