mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
add resource
This commit is contained in:
parent
3359df0e02
commit
4c1609459c
2 changed files with 15 additions and 1 deletions
|
|
@ -442,7 +442,16 @@ function editResources() {
|
|||
if (selected) selected.classList.remove('selected');
|
||||
}
|
||||
|
||||
function resourceAdd() {}
|
||||
function resourceAdd() {
|
||||
let i = last(pack.resources).i;
|
||||
while (Resources.get(i)) {
|
||||
i++;
|
||||
}
|
||||
const resource = {i, name: 'Resource' + i, category: 'Unknown', icon: 'resource-unknown', color: '#ff5959', value: 1, chance: 10, model: 'habitability', bonus: {population: 1}, cells: 0};
|
||||
pack.resources.push(resource);
|
||||
tip('Resource is added', false, 'success', 3000);
|
||||
resourcesEditorAddLines();
|
||||
}
|
||||
|
||||
function downloadResourcesData() {
|
||||
let data = 'Id,Resource,Color,Category,Value,Bonus,Chance,Model,Cells\n'; // headers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue