mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
generate state salesTax
This commit is contained in:
parent
0fb6363f2a
commit
c92862b316
4 changed files with 15 additions and 10 deletions
|
|
@ -141,13 +141,13 @@ function editBurg(id) {
|
|||
function getExport(dealsArray) {
|
||||
if (!dealsArray.length) return 'no';
|
||||
|
||||
const totalIncome = d3.sum(dealsArray.map((deal) => deal.burgIncome));
|
||||
const totalIncome = rn(d3.sum(dealsArray.map((deal) => deal.burgIncome)));
|
||||
const exported = dealsArray.map((deal) => {
|
||||
const {resourceId, quantity, burgIncome} = deal;
|
||||
const {name, unit, icon} = Resources.get(resourceId);
|
||||
const unitName = quantity > 1 ? unit + 's' : unit;
|
||||
|
||||
return `<span data-tip="${name}: ${quantity} ${unitName}. Income: ${burgIncome}">
|
||||
return `<span data-tip="${name}: ${quantity} ${unitName}. Income: ${rn(burgIncome)}">
|
||||
<svg class="resIcon"><use href="#${icon}"></svg>
|
||||
<span style="margin: 0 0.2em 0 -0.2em">${quantity}</span>
|
||||
</span>`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue