fix logger
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package gamemap
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/items"
|
||||
@ -33,7 +32,7 @@ func (r *Room) Put (x, y int, tileFunc interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
func (room *Room) BlitToLevel(ctx context.Context, l *Level) error {
|
||||
func (room *Room) BlitToLevel(l *Level) error {
|
||||
//copy tiles like this:
|
||||
//https://stackoverflow.com/questions/21011023/copy-pointer-values-a-b-in-golang
|
||||
|
||||
@ -51,7 +50,7 @@ func (room *Room) BlitToLevel(ctx context.Context, l *Level) error {
|
||||
//check underlying tile
|
||||
if underlyingTile == nil ||
|
||||
underlyingTile.Name != "Wall" {
|
||||
appctx.Logger(ctx).Warn().Msg("Invalid blit!")
|
||||
appctx.Logger().Warn().Msg("Invalid blit!")
|
||||
return invalidBlit
|
||||
}
|
||||
l.Put(mapCoords.X, mapCoords.Y, tileFunc)
|
||||
|
Reference in New Issue
Block a user