Requiem - Locking Script Optimization
What does this mod do?
The problem with requiem scripts is that they are pretty old, they weren't built to be used in large load orders, and they are horribly optimized. With this mod, I aim to optimize the Requiem "REQ_LockpickControl" script by rebuilding loops with proper variable caching and early/late loop exits, so when the loop runs, it doesn't keep on calling the function over and over. This ultimately results in reducing the VM overhead.
Recommendation
Lock Bashing from shazdeh2 because this will further improve the script optimization. Mainly because Shazdeh2 removed the lock bashing from Requiem and remade and moved the function to a more efficient SKSE form, and frankly, it just works.
Static Skill Levelling Rewritten version removes the Add XP for Alteration because there is no use for it, given how SSLR works.

Notes:
This is a bug fix only.
All gameplay behaviour remains unchanged outside of preventing the exhaustion state from becoming stuck.
Requirement:
Requiem - The Roleplaying Overhaul
Lock Bashing from shazdeh2 (Optional but very much recommended)
Massive thank you to Missile for teaching me an endless number of things about scripting.
Credit:
Apodeictic for testing.
Instructions
Optimization for Requiem "REQ_LockpickControl" script by rebuilding loops with proper variable caching and early/late loop exits.
Locking Script Optimization
PICK ONE MAIN FILE
Locking Script Optimization - Lock Bashing - SSLR
PICK ONE MAIN FILE For Static Skill Levelling Rewritten & Lock Bashing by shazdeh2 Combo
Locking Script Optimization - Lock Bashing
PICK ONE MAIN FILE For Lock Bashing by shazdeh2
Locking Script Optimization - SSLR
PICK ONE MAIN FILE For Static Skill Levelling Rewritten