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