mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.22.12
This commit is contained in:
parent
4a0c62edf7
commit
6fa693b562
12 changed files with 111 additions and 60 deletions
|
|
@ -947,7 +947,7 @@ function drawCoordinates() {
|
|||
|
||||
const desired = +coordinates.attr("data-size"); // desired label size
|
||||
coordinates.attr("font-size", Math.max(rn(desired / scale ** .8, 2), .1)); // actual label size
|
||||
const graticule = d3.geoGraticule().extent([[mapCoordinates.lonW, mapCoordinates.latN], [mapCoordinates.lonE, mapCoordinates.latS]])
|
||||
const graticule = d3.geoGraticule().extent([[mapCoordinates.lonW, mapCoordinates.latN], [mapCoordinates.lonE+.1, mapCoordinates.latS+.1]])
|
||||
.stepMajor([400, 400]).stepMinor([step, step]);
|
||||
const projection = d3.geoEquirectangular().fitSize([graphWidth, graphHeight], graticule());
|
||||
|
||||
|
|
|
|||
|
|
@ -318,16 +318,13 @@ function randomizeOptions() {
|
|||
if (!locked("power")) powerInput.value = powerOutput.value = gauss(3, 2, 0, 10);
|
||||
if (!locked("neutral")) neutralInput.value = neutralOutput.value = rn(1 + Math.random(), 1);
|
||||
if (!locked("cultures")) culturesInput.value = culturesOutput.value = gauss(12, 3, 5, 30);
|
||||
if (!locked("culturesSet")) culturesSet.value = ra(Array.from(culturesSet.options)).value;
|
||||
changeCultureSet();
|
||||
if (!locked("culturesSet")) randomizeCultureSet();
|
||||
|
||||
// 'Configure World' settings
|
||||
if (!locked("prec")) precInput.value = precOutput.value = gauss(120, 20, 5, 500);
|
||||
const tMax = +temperatureEquatorOutput.max, tMin = +temperatureEquatorOutput.min; // temperature extremes
|
||||
if (!locked("temperatureEquator")) temperatureEquatorOutput.value = temperatureEquatorInput.value = rand(tMax-6, tMax);
|
||||
if (!locked("temperaturePole")) temperaturePoleOutput.value = temperaturePoleInput.value = rand(tMin, tMin+10);
|
||||
if (!locked("mapSize")) mapSizeOutput.value = mapSizeInput.value = gauss(50, 20, 15, 100);
|
||||
if (!locked("latitude")) latitudeOutput.value = latitudeInput.value = gauss(50, 20, 15, 100);
|
||||
|
||||
// 'Units Editor' settings
|
||||
const US = navigator.language === "en-US";
|
||||
|
|
@ -338,6 +335,21 @@ function randomizeOptions() {
|
|||
if (!stored("temperatureScale")) temperatureScale.value = US ? "°F" : "°C";
|
||||
}
|
||||
|
||||
// select culture set pseudo-randomly
|
||||
function randomizeCultureSet() {
|
||||
const sets = {
|
||||
"world": 25,
|
||||
"european": 20,
|
||||
"oriental": 10,
|
||||
"english": 10,
|
||||
"antique": 5,
|
||||
"highFantasy": 22,
|
||||
"darkFantasy": 6,
|
||||
"random": 2};
|
||||
culturesSet.value = rw(sets);
|
||||
changeCultureSet();
|
||||
}
|
||||
|
||||
// remove all saved data from LocalStorage and reload the page
|
||||
function restoreDefaultOptions() {
|
||||
localStorage.clear();
|
||||
|
|
|
|||
|
|
@ -749,8 +749,7 @@ function editStates() {
|
|||
const center = burgCell ? burgCell : provCells[0];
|
||||
const burg = burgCell ? cells.burg[burgCell] : 0;
|
||||
|
||||
const name = burgCell && Math.random() < .7
|
||||
? getAdjective(pack.burgs[burg].name)
|
||||
const name = burgCell && P(.7) ? getAdjective(pack.burgs[burg].name)
|
||||
: getAdjective(states[state].name) + " " + provinces[initProv].name.split(" ").slice(-1)[0];
|
||||
const formName = name.split(" ").length > 1 ? provinces[initProv].formName : rw(form);
|
||||
const fullName = name + " " + formName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue