mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
New MFCG sea option enabled again
This commit is contained in:
parent
16ee659f2f
commit
beaeabacb4
1 changed files with 1 additions and 11 deletions
|
|
@ -316,18 +316,8 @@ function editBurg(id) {
|
||||||
const p2 = cells.p[cells.haven[i]];
|
const p2 = cells.p[cells.haven[i]];
|
||||||
let deg = Math.atan2(p2[1] - p1[1], p2[0] - p1[0]) * 180 / Math.PI - 90;
|
let deg = Math.atan2(p2[1] - p1[1], p2[0] - p1[0]) * 180 / Math.PI - 90;
|
||||||
if (deg < 0) deg += 360;
|
if (deg < 0) deg += 360;
|
||||||
let norm = rn(normalize(deg, 0, 360) * 8) / 4;
|
let norm = rn(normalize(deg, 0, 360) * 2, 3);
|
||||||
if (norm === 2) norm = 0;
|
if (norm === 2) norm = 0;
|
||||||
switch(norm) {
|
|
||||||
case 0 : return "&southSea=1";
|
|
||||||
case 0.25 : return "&southSea=1&westSea=1";
|
|
||||||
case 0.50 : return "&westSea=1";
|
|
||||||
case 0.75 : return "&westSea=1&northSea=1";
|
|
||||||
case 1 : return "&northSea=1";
|
|
||||||
case 1.25 : return "&northSea=1&eastSea=1";
|
|
||||||
case 1.5 : return "&eastSea=1";
|
|
||||||
case 1.75 : return "&eastSea=1&southSea=1";
|
|
||||||
}
|
|
||||||
return "&sea="+norm;
|
return "&sea="+norm;
|
||||||
// debug.selectAll("*").remove();
|
// debug.selectAll("*").remove();
|
||||||
// pack.burgs.filter(b => b.port).forEach(b => {
|
// pack.burgs.filter(b => b.port).forEach(b => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue