mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
Place spawn buildings closer to the top in fill
terrain types
This commit is contained in:
parent
ac1069c3a9
commit
c6779f0f61
1 changed files with 2 additions and 1 deletions
|
@ -152,7 +152,8 @@ public class StructureGeneratorTask implements GeneratorTask {
|
||||||
Prefab spawnBuilding = spawnBuildings.next(ctx.getRandom());
|
Prefab spawnBuilding = spawnBuildings.next(ctx.getRandom());
|
||||||
|
|
||||||
if(filled) {
|
if(filled) {
|
||||||
int y = ctx.getHeight() / 8 + ctx.nextInt(Math.max(1, ctx.nextInt(ctx.getHeight() / 8)));
|
int min = ctx.getHeight() / 32;
|
||||||
|
int y = min + ctx.nextInt(Math.max(1, ctx.nextInt(min)));
|
||||||
ctx.placePrefab(spawnBuilding, x, y);
|
ctx.placePrefab(spawnBuilding, x, y);
|
||||||
} else {
|
} else {
|
||||||
ctx.placePrefabSurface(spawnBuilding, x);
|
ctx.placePrefabSurface(spawnBuilding, x);
|
||||||
|
|
Loading…
Add table
Reference in a new issue