mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
Resources editor - assign cells
This commit is contained in:
parent
2e84654477
commit
5477e5ca1e
2 changed files with 172 additions and 159 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue