mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-16 17:31:24 +01:00
v1.0.27
This commit is contained in:
parent
a3256e6726
commit
6aec843b47
2 changed files with 4 additions and 3 deletions
|
|
@ -1520,7 +1520,7 @@
|
|||
<input id="mapName" data-stored="mapName" class="long" autocorrect="off" spellcheck="false" type="text">
|
||||
</td>
|
||||
<td>
|
||||
<i data-tip="Regenerate map name" onclick="Names.getMapName()" class="icon-arrows-cw"></i>
|
||||
<i data-tip="Regenerate map name" onclick="Names.getMapName(true)" class="icon-arrows-cw"></i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
|||
|
|
@ -169,8 +169,9 @@
|
|||
}
|
||||
|
||||
// generato name for the map
|
||||
const getMapName = function() {
|
||||
if (locked("mapName")) return;
|
||||
const getMapName = function(force) {
|
||||
if (!force && locked("mapName")) return;
|
||||
if (force && locked("mapName")) unlock("mapName");
|
||||
const base = Math.random() < .7 ? 2 : Math.random() < .5 ? rand(0, 6) : rand(0, 31);
|
||||
if (!nameBases[base]) {tip("Namebase is not found", false, "error"); return ""};
|
||||
const min = nameBases[base].min-1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue