Actor Command - Display all Skill Types

So by default, the Window_ActorCommand addSkillCommands function adds skill types to the command window based on what the current character's class has added. What I want the window to do is display ALL skill types that are in the list inside the database and seal the ones he's unable to use.

04.jpg


Eventually I'm trying to make a command window that uses images like this, but so far I've been unable to wrap my head around how I can display every skill type, not just the ones the character can use.

For example, if one character is a warrior, he cant use magic. But I don't want the "magic" skill type to not show up in the list. I just want it sealed.

A simple script to add that functionality to the ActorCommand window would be enough for me to figure the rest out. Unless someone is bored enough to recreate the image above. Thanks 🙂
Something likes this should do it:

Code:
Window_ActorCommand.prototype.addSkillCommands = function() {
    var skillTypes = $dataSystem.skillTypes; // All skill types
    for( var stypeId = 1; stypeId < skillTypes.length; stypeId++ )
    {
        // Check if current actor has skills of this type that can be used in battle
        var useableBattleSkills;
        var useableBattleSkills = this._actor.skills().filter(function (item) {
           return [0, 1].contains(Number(item.occasion)) && item.stypeId === stypeId;
        }, this);
        if( useableBattleSkills.length > 0 )
        {
            this.addCommand($dataSystem.skillTypes[stypeId], 'skill', true, stypeId);
        }
        else
        {
            this.addCommand($dataSystem.skillTypes[stypeId], 'skill', false, stypeId);
        }
    }
}

Figured out, smaller and probably faster version, which works also:

Code:
Window_ActorCommand.prototype.addSkillCommands = function() {
    var skillTypes = $dataSystem.skillTypes; // All skill types
    for( var stypeId = 1; stypeId < skillTypes.length; stypeId++ )
    {
        // Check if current actor has this skill type assigned
        if( this._actor.addedSkillTypes().contains(stypeId) )
        {
            this.addCommand($dataSystem.skillTypes[stypeId], 'skill', true, stypeId);
       }
        else
        {
            this.addCommand($dataSystem.skillTypes[stypeId], 'skill', false, stypeId);
        }
    }
}

Original thread: https://forums.rpgmakerweb.com/threads/actor-command-display-all-skill-types.94108/