mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
resource units
This commit is contained in:
parent
5b8c5a7a78
commit
16c316a74f
3 changed files with 45 additions and 4 deletions
|
|
@ -100,9 +100,10 @@ function editBurg(id) {
|
|||
// economics block
|
||||
let productionHTML = '';
|
||||
for (const resourceId in b.production) {
|
||||
const {name, icon} = Resources.get(+resourceId);
|
||||
const {name, unit, icon} = Resources.get(+resourceId);
|
||||
const production = b.production[resourceId];
|
||||
productionHTML += `<span data-tip="${name}: ${production}">
|
||||
const unitName = production > 1 ? unit + 's' : unit;
|
||||
productionHTML += `<span data-tip="${name}: ${production} ${unitName}">
|
||||
<svg class="resIcon"><use href="#${icon}"></svg>
|
||||
<span style="margin: 0 0.2em 0 -0.2em">${production}</span>
|
||||
</span>`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue