Melvor Action Queue

Adds an interface to queue up actions based on triggers you set

< Σχολιασμός για τον κώδικα Melvor Action Queue

Ερώτηση/σχόλιο

§
Δημοσιεύτηκε: 26/05/2022

Would be awesome to have a better way of exporting the action list. Importing you have a text box but exporting you have to download it in a TXT file. Would love to be able to just copy it out of a an export box (like how alot of other mods and game them self do) so i can just paste it into an excel sheet i always open have for other stuff of melvor.

§
Δημοσιεύτηκε: 22/07/2022

Changing line 1765 to the following would allow you to instantly copy your action queue to your clipboard to paste elsewhere.

function downloadActions() {
  const saveData = [];
  for (const action of actionQueueArray) {
    let actionList = [];
    action.action.forEach((a) => actionList.push(a.data));
    saveData.push([...action.data, actionList]);
  }
  var dummy = document.createElement("textarea");
  document.body.appendChild(dummy);
  dummy.value = JSON.stringify(saveData);
  dummy.select();
  document.execCommand("copy");
  document.body.removeChild(dummy);
}

You could easily make your own button so you have the option between the original download option and a copy to clipboard option. That would require you to add a new button around line 1058 and a new event listener around line 1458 which shouldn't be hard to do if you use the code already presented to copy, paste and rename.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.