changed gate appearence
This commit is contained in:
+3
-4
@@ -320,8 +320,7 @@ func buildGatesForWall(
|
||||
}
|
||||
_, maxRoadPx := getRoadWidthRangePixels(settings, width, height)
|
||||
roadWidth := max(1, int(math.Round(maxRoadPx)))
|
||||
turretGap := turretSizePx * 0.75
|
||||
centerSeparation := turretSizePx + turretGap
|
||||
centerSeparation := turretSizePx * 1.25
|
||||
requiredMargin := max(3, int(math.Ceil(centerSeparation)))
|
||||
|
||||
runLengths := make(map[int]int)
|
||||
@@ -424,10 +423,10 @@ func cutGateOpening(layout *FortificationLayout, gate GateInfo, wallWidth, roadW
|
||||
if layout == nil || layout.Mask == nil {
|
||||
return
|
||||
}
|
||||
clearWidth := max(wallWidth+2, roadWidth+2)
|
||||
clearWidth := max(1, roadWidth)
|
||||
scratch := image.NewRGBA(image.Rect(0, 0, layout.Mask.Width, layout.Mask.Height))
|
||||
clearMask := NewPixelMask(layout.Mask.Width, layout.Mask.Height)
|
||||
drawLineMasked(scratch, gate.InnerEnd.X, gate.InnerEnd.Y, gate.OuterEnd.X, gate.OuterEnd.Y, color.RGBA{}, clearWidth, clearMask)
|
||||
drawLineMasked(scratch, gate.LeftTurret.X, gate.LeftTurret.Y, gate.RightTurret.X, gate.RightTurret.Y, color.RGBA{}, clearWidth, clearMask)
|
||||
for y := 0; y < layout.Mask.Height; y++ {
|
||||
row := y * layout.Mask.Width
|
||||
for x := 0; x < layout.Mask.Width; x++ {
|
||||
|
||||
Reference in New Issue
Block a user