econonics - restore from feb

This commit is contained in:
Azgaar 2021-04-18 22:54:35 +03:00 committed by Peter
parent c4710de7db
commit b9db7edf43
2 changed files with 7 additions and 4 deletions

View file

@ -136,12 +136,14 @@ function showMapTooltip(point, e, i, g) {
tip(`${name} ${type} emblem. Click to edit. Hold Shift to show associated area or place`);
return;
}
if (group === 'goods') {
const id = +e.target.dataset.i;
const resource = pack.resources.find((resource) => resource.i === id);
tip('Resource: ' + resource.name);
if (group === "goods") {
const id = +e.target.getAttribute("href").slice(10);
const resource = pack.resources.find(resource => resource.i === id);
tip("Resource: " + resource.name);
return;
}
if (group === "rivers") {
const river = +e.target.id.slice(5);
const r = pack.rivers.find(r => r.i === river);