Skip to content

Commit

Permalink
castle structure data
Browse files Browse the repository at this point in the history
  • Loading branch information
HoubkneghteS committed Nov 23, 2020
1 parent 94d5705 commit ab3650b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ function generate({ resolution, hilliness, baseHumidity, humidityRange, biomeSca
if(localElevation < 900 && localElevation > (seaLevel + 15) && localHumidity > -100){
if(structureRoll > structureWeights.castle) return
world.structures.push(createStructure("castle", x, y, {
customColor: chooseRandom(['#333', "#666", "#005", "#500", "#050"])
customColor: chooseRandom(['#333', "#666", "#005", "#500", "#050"]),
type: chooseRandom(["square", "triangle"]),
height: Math.round(roundFactor * (Math.random() * 2 + 2)) / roundFactor,
},
{
offset: structureOffset,
Expand Down Expand Up @@ -256,6 +258,9 @@ function drawStructures(mode = params.drawMode) {
ctx.fillStyle = customColor || "#371";
drawPixel(ctx, boxWidth * 0.9, boxHeight * structure.height, x / 0.9, (y / structure.height) - structure.height);
}
if(type =="castle"){

}
});
}

Expand Down

0 comments on commit ab3650b

Please sign in to comment.