/*:
 * @plugindesc Use more than 10 animated state overlays in sideview battle
 * @author Coelocanth
 * @help
 * 
 * This plugin lets you have more than 10 state overlays.
 * Extend the states.png vertically to the number of states you need.
 * 
 * Use this notetag in states to set the overlay:
 * <overlay:NNN>
 * 
 * for example, <overlay:11> would select the first additional row.
 */

(function() {
    cc_esd_DataManager_onLoad = DataManager.onLoad;
    DataManager.onLoad = function(object) {
        cc_esd_DataManager_onLoad.call(this, object);
        if(object === $dataStates) {
            $dataStates.forEach(state => {
                if(state && state.meta.overlay) {
                    state.overlay = parseInt(state.meta.overlay);
                }
            });
        }
    }
})();