@@ -110,7 +110,14 @@ class BurgModule {
110110
111111 // shift non-port river burgs a bit
112112 for ( const burg of burgs ) {
113- if ( ! burg . i || burg . lock || burg . port || burg . flying || ! cells . r [ burg . cell ] ) continue ;
113+ if (
114+ ! burg . i ||
115+ burg . lock ||
116+ burg . port ||
117+ burg . flying ||
118+ ! cells . r [ burg . cell ]
119+ )
120+ continue ;
114121 const cellId = burg . cell ;
115122 const shift = Math . min ( cells . fl [ cellId ] / 150 , 1 ) ;
116123 burg . x = cellId % 2 ? rn ( burg . x + shift , 2 ) : rn ( burg . x - shift , 2 ) ;
@@ -288,7 +295,8 @@ class BurgModule {
288295
289296 const totalTarget = getTownsNumber ( ) ;
290297 const targetCount = Math . floor ( totalTarget * 0.07 ) ;
291- const baseSpacing = ( graphWidth + graphHeight ) / 150 / ( totalTarget ** 0.5 / 20 ) ;
298+ const baseSpacing =
299+ ( graphWidth + graphHeight ) / 150 / ( totalTarget ** 0.5 / 20 ) ;
292300 let added = 0 ;
293301
294302 for ( let i = 0 ; i < sorted . length && added < targetCount ; i ++ ) {
@@ -332,7 +340,8 @@ class BurgModule {
332340
333341 const totalTarget = getTownsNumber ( ) ;
334342 const targetCount = Math . floor ( totalTarget * 0.12 ) ;
335- const baseSpacing = ( graphWidth + graphHeight ) / 150 / ( totalTarget ** 0.6 / 30 ) ;
343+ const baseSpacing =
344+ ( graphWidth + graphHeight ) / 150 / ( totalTarget ** 0.6 / 30 ) ;
336345 let added = 0 ;
337346
338347 for ( let i = 0 ; i < sorted . length && added < targetCount ; i ++ ) {
@@ -375,8 +384,9 @@ class BurgModule {
375384 const sorted = populatedCells . sort ( ( a , b ) => score [ b ] - score [ a ] ) ;
376385
377386 const totalTarget = getTownsNumber ( ) ;
378- const targetCount = Math . floor ( totalTarget * 0.20 ) ;
379- const baseSpacing = ( graphWidth + graphHeight ) / 150 / ( totalTarget ** 0.65 / 15 ) ;
387+ const targetCount = Math . floor ( totalTarget * 0.2 ) ;
388+ const baseSpacing =
389+ ( graphWidth + graphHeight ) / 150 / ( totalTarget ** 0.65 / 15 ) ;
380390 let added = 0 ;
381391
382392 for ( let pass = 0 ; added < targetCount && pass < 3 ; pass ++ ) {
@@ -388,7 +398,11 @@ class BurgModule {
388398 const culture = cells . culture [ cell ] ;
389399 const cultureType = pack . cultures [ culture ] ?. type || "Generic" ;
390400 const spacingMod = this . getCultureSpacingModifier ( cultureType ) ;
391- const spacing = baseSpacing * spacingMod * gauss ( 1 , 0.3 , 0.2 , 1.5 , 2 ) * ( 1 / ( pass + 1 ) ) ;
401+ const spacing =
402+ baseSpacing *
403+ spacingMod *
404+ gauss ( 1 , 0.3 , 0.2 , 1.5 , 2 ) *
405+ ( 1 / ( pass + 1 ) ) ;
392406
393407 if ( burgsQuadtree . find ( x , y , spacing ) !== undefined ) continue ;
394408
0 commit comments