mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
add resource
This commit is contained in:
parent
3359df0e02
commit
4c1609459c
2 changed files with 15 additions and 1 deletions
|
|
@ -4125,6 +4125,11 @@
|
||||||
</g>
|
</g>
|
||||||
|
|
||||||
<g id="resource-icons">
|
<g id="resource-icons">
|
||||||
|
<symbol id="resource-unknown" viewBox="-3 0 40 40">
|
||||||
|
<metadata description="Question mark by Azgaar" author="Azgaar" license="https://creativecommons.org/publicdomain/zero/1.0"/>
|
||||||
|
<path d="m 26.7,12.8 q 0,1.9 -0.7,3.4 -0.7,1.5 -1.8,2.6 -1.1,1.1 -2.5,2.1 -1.4,1 -3,1.9 v 4.4 h -3.5 v -6 q 1.2,-0.7 2.7,-1.6 1.5,-0.8 2.4,-1.7 1.1,-1 1.8,-2.1 0.6,-1.1 0.6,-2.8 0,-2.2 -1.5,-3.23 -1.5,-1.1 -3.9,-1.1 -2.1,0 -4,0.67 -1.8,0.66 -2.9,1.36 h -0.2 v -4 q 1.3,-0.53 3.4,-0.94 2.1,-0.43 4,-0.43 4.2,0 6.6,2.05 2.5,2.03 2.5,5.42 z M 19,35 h -4 v -4.1 h 4 z" fill="#fff" stroke="#000" stroke-width="1"/>
|
||||||
|
</symbol>
|
||||||
|
|
||||||
<symbol id="resource-wood" viewBox="0 -8 90 110">
|
<symbol id="resource-wood" viewBox="0 -8 90 110">
|
||||||
<metadata description="Wood by Callum Taylor from the Noun Project, redrawn by Azgaar" source="https://thenounproject.com/search/?q=Wood&i=53364" license="https://creativecommons.org/licenses/by/3.0"/>
|
<metadata description="Wood by Callum Taylor from the Noun Project, redrawn by Azgaar" source="https://thenounproject.com/search/?q=Wood&i=53364" license="https://creativecommons.org/licenses/by/3.0"/>
|
||||||
<g fill="#fff" stroke="#000" stroke-width="3"><path d="M23 33L49.5 5.6S58-3 68.2 4.705c5.8 5.3 6.8 11.3-3.18 21.3-.714.929-17 19-18 20m-4 5l22-25s9.01-9.02 19-1.02c10 8 1.02 19 1.02 19l-29 35m-51-17l14-16 41 20m-6-38l17-19m-12 54l15-17"/><circle cx="33" cy="43" r="14"/><path d="M33 50c-3 0-7-2-7-7"/><circle cx="17" cy="69" r="14"/><circle cx="46" cy="69" r="14"/><path d="M17 76c-3 0-7-2-7-7m36 7c-3 0-7-2-7-7"/></g>
|
<g fill="#fff" stroke="#000" stroke-width="3"><path d="M23 33L49.5 5.6S58-3 68.2 4.705c5.8 5.3 6.8 11.3-3.18 21.3-.714.929-17 19-18 20m-4 5l22-25s9.01-9.02 19-1.02c10 8 1.02 19 1.02 19l-29 35m-51-17l14-16 41 20m-6-38l17-19m-12 54l15-17"/><circle cx="33" cy="43" r="14"/><path d="M33 50c-3 0-7-2-7-7"/><circle cx="17" cy="69" r="14"/><circle cx="46" cy="69" r="14"/><path d="M17 76c-3 0-7-2-7-7m36 7c-3 0-7-2-7-7"/></g>
|
||||||
|
|
|
||||||
|
|
@ -442,7 +442,16 @@ function editResources() {
|
||||||
if (selected) selected.classList.remove('selected');
|
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() {
|
function downloadResourcesData() {
|
||||||
let data = 'Id,Resource,Color,Category,Value,Bonus,Chance,Model,Cells\n'; // headers
|
let data = 'Id,Resource,Color,Category,Value,Bonus,Chance,Model,Cells\n'; // headers
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue