TeamLumi / luminescent-team

GNU Affero General Public License v3.0
13 stars 6 forks source link

Add vanilla BDSP toggle (PL #24) #95

Open AarCon opened 6 months ago

AarCon commented 6 months ago

https://docs.google.com/spreadsheets/d/12Xguf7vRrA37K--pAW4qseCmwT-m56rXgCxE8TRkQ2U/edit?usp=sharing

This update will add a function that will return a certain dataset based on the current mode (globalState.mode). We will likely use @mKroogz's solution of passing in an array of the datasets in the order of 1 - "Vanilla", 2 - "2.0", 3 - "3.0". Example code below:

function getChosenDataSet(mode = "2.0", itemDataSets) {
    const modeOptions = ["vanilla","2.0", "3.0"]
    const dataSetIndex = modeOptions.findIndex(mode)
    //error handling to default for sending back 2.0 data
    if (dataSetIndex !== -1) {
        return itemDataSets[dataSetIndex]
    }
    return itemDataSets[1]
}

Work will be done in the plugins/pokedex-data-plugin/dex files on the update/3.0Dex branch and will include any function that already has the mode parameter. Let me know if any other function requires a mode and we can acquire any data that is needed.