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
|
|
@ -2358,6 +2358,9 @@ svg.button {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#goods > g > use {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.dontAsk {
|
.dontAsk {
|
||||||
margin: 0.9em 0 0 0.6em;
|
margin: 0.9em 0 0 0.6em;
|
||||||
|
|
|
||||||
208
index.html
208
index.html
File diff suppressed because one or more lines are too long
4
main.js
4
main.js
|
|
@ -739,8 +739,8 @@ async function generate(options) {
|
||||||
Trade.importGoods();
|
Trade.importGoods();
|
||||||
|
|
||||||
// temp, replace with route generator
|
// temp, replace with route generator
|
||||||
pack.cells.road = new Uint16Array(pack.cells.i.length);
|
// pack.cells.road = new Uint16Array(pack.cells.i.length);
|
||||||
pack.cells.crossroad = new Uint16Array(pack.cells.i.length);
|
// pack.cells.crossroad = new Uint16Array(pack.cells.i.length);
|
||||||
|
|
||||||
Religions.generate();
|
Religions.generate();
|
||||||
BurgsAndStates.defineStateForms();
|
BurgsAndStates.defineStateForms();
|
||||||
|
|
|
||||||
|
|
@ -1393,6 +1393,7 @@ window.BurgsAndStates = (function () {
|
||||||
generateDiplomacy,
|
generateDiplomacy,
|
||||||
defineStateForms,
|
defineStateForms,
|
||||||
getFullName,
|
getFullName,
|
||||||
|
defineTaxes,
|
||||||
generateProvinces,
|
generateProvinces,
|
||||||
updateCultures
|
updateCultures
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,12 @@ function editBurg(id) {
|
||||||
document.getElementById('burgExport').innerHTML = getExport(deals.filter((deal) => deal.exporter === b.i));
|
document.getElementById('burgExport').innerHTML = getExport(deals.filter((deal) => deal.exporter === b.i));
|
||||||
document.getElementById('burgImport').innerHTML = '';
|
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
|
//toggle lock
|
||||||
updateBurgLockIcon();
|
updateBurgLockIcon();
|
||||||
|
|
||||||
|
|
@ -198,7 +204,7 @@ function editBurg(id) {
|
||||||
return `${totalIncome}: ${exported.join('')}`;
|
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) {
|
function getTemperatureLikeness(temperature) {
|
||||||
if (temperature < -15) return 'nowhere in the real-world';
|
if (temperature < -15) return 'nowhere in the real-world';
|
||||||
if (temperature < -5) return 'in Yakutsk';
|
if (temperature < -5) return 'in Yakutsk';
|
||||||
|
|
|
||||||
|
|
@ -270,6 +270,13 @@ function selectStyleElement() {
|
||||||
styleResourcesCircle.checked = +el.attr('data-circle');
|
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
|
// update group options
|
||||||
styleGroupSelect.options.length = 0; // remove all options
|
styleGroupSelect.options.length = 0; // remove all options
|
||||||
if (['routes', 'labels', 'coastline', 'lakes', 'anchors', 'burgIcons', 'borders'].includes(sel)) {
|
if (['routes', 'labels', 'coastline', 'lakes', 'anchors', 'burgIcons', 'borders'].includes(sel)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue