fix logger
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package screens
|
||||
|
||||
import (
|
||||
"context"
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/ecs/systems"
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/fov"
|
||||
@ -15,7 +14,6 @@ import (
|
||||
)
|
||||
|
||||
type GameScreen struct {
|
||||
ctx context.Context
|
||||
mw *mainwindow.MainWindow
|
||||
state *gamestate.GameState
|
||||
vp *mainwindow.ViewPort
|
||||
@ -24,9 +22,8 @@ type GameScreen struct {
|
||||
fov fov.Fov
|
||||
}
|
||||
|
||||
func NewGameScreen(ctx context.Context, mw *mainwindow.MainWindow, state *gamestate.GameState, viewPort *mainwindow.ViewPort, controller *ecs.Controller, scm *types.ScreenManager) *GameScreen {
|
||||
func NewGameScreen(mw *mainwindow.MainWindow, state *gamestate.GameState, viewPort *mainwindow.ViewPort, controller *ecs.Controller, scm *types.ScreenManager) *GameScreen {
|
||||
ts := &GameScreen{
|
||||
ctx: ctx,
|
||||
mw: mw,
|
||||
state: state,
|
||||
vp: viewPort,
|
||||
@ -101,7 +98,7 @@ func (ts *GameScreen) HandleInput(input string) {
|
||||
} //do nothing
|
||||
//select if there is more than 1
|
||||
if len(carrieds) > 1 {
|
||||
appctx.Logger(ts.ctx).Warn().Msg("Passing item list to inventory not implemented yet")
|
||||
appctx.Logger().Warn().Msg("Passing item list to inventory not implemented yet")
|
||||
} else {
|
||||
//call pickup in selected
|
||||
cc := items.Controller.GetComponent(carrieds[0], ecs.CarriedComponent).(items.Carried)
|
||||
@ -110,7 +107,7 @@ func (ts *GameScreen) HandleInput(input string) {
|
||||
// Message with error
|
||||
//gameLog.Log.Error(err)
|
||||
//@fixme!
|
||||
appctx.Logger(ts.ctx).Warn().Err(err)
|
||||
appctx.Logger().Warn().Err(err)
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user