Resources editor - assign cells

This commit is contained in:
Azgaar 2021-05-16 12:49:29 +03:00 committed by Peter
parent 2e84654477
commit 5477e5ca1e
2 changed files with 172 additions and 159 deletions

View file

@ -72,6 +72,8 @@ function editResources() {
if (cl.contains('resourceCategory')) return changeCategory(resource, line, el);
if (cl.contains('resourceModel')) return changeModel(resource, line, el);
if (cl.contains('resourceBonus')) return changeBonus(resource, line, el);
if (cl.contains('icon-pin')) return pinResource(resource, el);
if (cl.contains('icon-trash-empty')) return removeResourcePrompt(resource, line);
});
body.addEventListener('change', function (ev) {
@ -692,6 +694,11 @@ function editResources() {
openPicker(resource.color, callback, {allowHatching: false});
}
function resourcesRestoreDefaults() {
delete pack.resources;
regenerateResources();
}
function toggleLegend() {
if (legend.selectAll('*').size()) {
clearLegend();