MV An Add-on to Yanfly's Change Battle Equip Plug-in

There is a plugin I'm using to change my equipment during battle that has a feature I love.

CommandEquip by Jeneeus Guruman.

It has the ability to lock all but the slots you want to change. Meaning, the player can only change what you decide they can. This makes it so only something like "Ammunition" is changeable and nothing else.

Now we come to Yanfly's plugin. It has two features I love about it. One is the ability to change the commands name, so "Reload" is available, and two: the ability to prevent characters from changing equip. So the Magician can't "reload", but the Gunslinger can.

I'm wondering if someone can make an add-on to either Yanfly's plugin or Jeneeus's, with either of the other's respective features?
yanfly passive state condition.
state notetag:
<Custom Passive Condition>
if ($gameParty.inBattle()) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>

state traits:
equip: lock equip: weapon
equip: lock equip: armor
...

make it so only the 1 slot type is changeable during battle
@Tiamat-86 Thanks for the code... This is something I can work with... though I was hoping for something a little less messy and easier to implement [ie: automatic], this should work just fine. Thanks!

EDIT: Tried it... and it works great! Thank you!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/an-add-on-to-yanflys-change-battle-equip-plug-in.128673/