old connections working
This commit is contained in:
@ -44,7 +44,7 @@ func (room *Room) BlitToLevel(l *Level, where types.Coords) error {
|
||||
continue
|
||||
}
|
||||
//check underlying tile
|
||||
if underlyingTile != nil ||
|
||||
if underlyingTile == nil ||
|
||||
underlyingTile.Name != "Wall" {
|
||||
return invalidBlit
|
||||
}
|
||||
@ -54,6 +54,9 @@ func (room *Room) BlitToLevel(l *Level, where types.Coords) error {
|
||||
//update room coords?
|
||||
room.X = where.X
|
||||
room.Y = where.Y
|
||||
//update centers!
|
||||
room.Center.X += where.X
|
||||
room.Center.Y += where.Y
|
||||
//update connector?
|
||||
for i, _ := range room.Connectors {
|
||||
room.Connectors[i].X += where.X
|
||||
@ -71,6 +74,7 @@ func NewRandomRectRoom(rng *util.RNG, w, h int, fillage types.RectFill) *Room {
|
||||
h,
|
||||
),
|
||||
Center: types.Coords{w / 2, h /2 },
|
||||
Geometry: make([]func()*Tile, w*h),
|
||||
}
|
||||
newRoom.Blit(fillage, newRoom)
|
||||
//add connectors
|
||||
|
Reference in New Issue
Block a user