**TL;DR** Both Finish loading and unloading are useful concepts and need to be separated. **What ?** I suggest separate switches. **Why ?** By being able to finish unloading without having finish loading set, you can ensure that there is no residual cargo when you return to depot. **code** I've coded this and will push my suggested revision. Note.. this is my first foray with .lua so best look at it carefully.