1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 09:09:43 +00:00

Add a clarifying comment

This commit is contained in:
Evil Eye 2023-06-08 21:56:54 +02:00
parent da4e04522b
commit a5b147d44d

View file

@ -28,8 +28,9 @@ namespace MWMechanics
void Security::pickLock(const MWWorld::Ptr& lock, const MWWorld::Ptr& lockpick, std::string_view& resultMessage,
std::string_view& resultSound)
{
if (lock.getCellRef().getLockLevel() <= 0
|| !lock.getClass().hasToolTip(lock)) // If it's unlocked or can not be unlocked back out immediately
// If it's unlocked or can not be unlocked back out immediately. Note that we're not strictly speaking checking
// if the ref is locked, lock levels <= 0 can exist but they cannot be picked
if (lock.getCellRef().getLockLevel() <= 0 || !lock.getClass().hasToolTip(lock))
return;
int uses = lockpick.getClass().getItemHealth(lockpick);