fix logger

This commit is contained in:
2020-09-25 00:45:45 +03:00
parent d2b22f4760
commit 9f3eaafa3f
21 changed files with 115 additions and 79 deletions

View File

@ -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)