Rename `member` to `deck_task` for clarity
This commit is contained in:
parent
25262e64cf
commit
a32bfd5d03
|
@ -295,8 +295,8 @@ function run() {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
perform: function perform(project, task, member) {
|
perform: function perform(project, task, member) {
|
||||||
member = ProjectUtilities.simplify(project, task, member);
|
const deck_task = ProjectUtilities.simplify(project, task, member);
|
||||||
const task_settings = member.getSettings();
|
const task_settings = deck_task.getSettings();
|
||||||
const [close_button, pack_code, cycle_prefix] = settingsDialog(task_settings);
|
const [close_button, pack_code, cycle_prefix] = settingsDialog(task_settings);
|
||||||
|
|
||||||
// User canceled the dialog or closed it without pressing ok
|
// User canceled the dialog or closed it without pressing ok
|
||||||
|
@ -305,28 +305,28 @@ function run() {
|
||||||
}
|
}
|
||||||
task_settings.set("arkhamdb_pack_code", pack_code);
|
task_settings.set("arkhamdb_pack_code", pack_code);
|
||||||
task_settings.set("arkhamdb_cycle_prefix", cycle_prefix);
|
task_settings.set("arkhamdb_cycle_prefix", cycle_prefix);
|
||||||
member.writeTaskSettings();
|
deck_task.writeTaskSettings();
|
||||||
|
|
||||||
Eons.setWaitCursor(true);
|
Eons.setWaitCursor(true);
|
||||||
try {
|
try {
|
||||||
this.performImpl(member, pack_code, cycle_prefix);
|
this.performImpl(deck_task, pack_code, cycle_prefix);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
Error.handleUncaught(ex);
|
Error.handleUncaught(ex);
|
||||||
} finally {
|
} finally {
|
||||||
Eons.setWaitCursor(false);
|
Eons.setWaitCursor(false);
|
||||||
member.synchronize();
|
deck_task.synchronize();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
performImpl: function performImpl(member, pack_code, cycle_prefix) {
|
performImpl: function performImpl(deck_task, pack_code, cycle_prefix) {
|
||||||
let copies_list;
|
let copies_list;
|
||||||
try {
|
try {
|
||||||
copies_list = new CopiesList(member);
|
copies_list = new CopiesList(deck_task);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
copies_list = new CopiesList();
|
copies_list = new CopiesList();
|
||||||
warn("unable to read copies list, using card count of 2 for all files", ex);
|
warn("unable to read copies list, using card count of 2 for all files", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
const children = member.children.filter(function (child) {
|
const children = deck_task.children.filter(function (child) {
|
||||||
return ProjectUtilities.matchExtension(child, 'eon');
|
return ProjectUtilities.matchExtension(child, 'eon');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ function run() {
|
||||||
let card_data = build_card(component, pack_code, cycle_prefix, copies);
|
let card_data = build_card(component, pack_code, cycle_prefix, copies);
|
||||||
cards.push(card_data);
|
cards.push(card_data);
|
||||||
|
|
||||||
let export_dir = new File(member.file, 'export');
|
let export_dir = new File(deck_task.file, 'export');
|
||||||
let target_file = new File(export_dir, card_data.code + '.' + FORMAT);
|
let target_file = new File(export_dir, card_data.code + '.' + FORMAT);
|
||||||
if (!target_file.exists() || child.file.lastModified() > target_file.lastModified()) {
|
if (!target_file.exists() || child.file.lastModified() > target_file.lastModified()) {
|
||||||
printf("Image for '%s' is out of date, rebuilding...\n", child);
|
printf("Image for '%s' is out of date, rebuilding...\n", child);
|
||||||
|
@ -359,7 +359,7 @@ function run() {
|
||||||
cards.sort(function (a, b) {
|
cards.sort(function (a, b) {
|
||||||
return parseInt(a.code) - parseInt(b.code);
|
return parseInt(a.code) - parseInt(b.code);
|
||||||
});
|
});
|
||||||
const file = new File(member.file, pack_code + '.json');
|
const file = new File(deck_task.file, pack_code + '.json');
|
||||||
printf("Writing '%s'\n", file);
|
printf("Writing '%s'\n", file);
|
||||||
ProjectUtilities.writeTextFile(file, JSON.stringify(cards, null, 4));
|
ProjectUtilities.writeTextFile(file, JSON.stringify(cards, null, 4));
|
||||||
println("Done!");
|
println("Done!");
|
||||||
|
|
Loading…
Reference in New Issue