mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
Merge economics with current
This commit is contained in:
parent
f17bc1e3af
commit
c24a786519
6 changed files with 228 additions and 3 deletions
|
|
@ -96,6 +96,12 @@ function editBurg(id) {
|
|||
document.getElementById('burgExport').innerHTML = getExport(deals.filter((deal) => deal.exporter === b.i));
|
||||
document.getElementById('burgImport').innerHTML = '';
|
||||
|
||||
// economics block
|
||||
document.getElementById('burgProduction').innerHTML = getProduction(b.produced);
|
||||
const deals = pack.trade.deals;
|
||||
document.getElementById('burgExport').innerHTML = getExport(deals.filter((deal) => deal.exporter === b.i));
|
||||
document.getElementById('burgImport').innerHTML = '';
|
||||
|
||||
//toggle lock
|
||||
updateBurgLockIcon();
|
||||
|
||||
|
|
@ -198,7 +204,7 @@ function editBurg(id) {
|
|||
return `${totalIncome}: ${exported.join('')}`;
|
||||
}
|
||||
|
||||
// [-1; 31] °C, source: https://en.wikipedia.org/wiki/List_of_cities_by_average_temperature
|
||||
// in °C, array from -1 °C; source: https://en.wikipedia.org/wiki/List_of_cities_by_average_temperature
|
||||
function getTemperatureLikeness(temperature) {
|
||||
if (temperature < -15) return 'nowhere in the real-world';
|
||||
if (temperature < -5) return 'in Yakutsk';
|
||||
|
|
|
|||
|
|
@ -270,6 +270,13 @@ function selectStyleElement() {
|
|||
styleResourcesCircle.checked = +el.attr('data-circle');
|
||||
}
|
||||
|
||||
if (sel === 'goods') {
|
||||
styleStrokeWidth.style.display = 'block';
|
||||
styleStrokeWidthInput.value = styleStrokeWidthOutput.value = el.attr('stroke-width') || '';
|
||||
styleResources.style.display = 'block';
|
||||
styleResourcesCircle.checked = +el.attr('data-circle');
|
||||
}
|
||||
|
||||
// update group options
|
||||
styleGroupSelect.options.length = 0; // remove all options
|
||||
if (['routes', 'labels', 'coastline', 'lakes', 'anchors', 'burgIcons', 'borders'].includes(sel)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue