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.
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:
Work will be done in the
plugins/pokedex-data-plugin/dex
files on theupdate/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.