delaunay/mst working

This commit is contained in:
2019-11-13 02:56:09 +03:00
parent f55549a048
commit d7b24d5abc
17 changed files with 589 additions and 40 deletions

View File

@ -6,7 +6,7 @@ import (
"lab.zaar.be/thefish/alchemyst-go/engine/items"
"lab.zaar.be/thefish/alchemyst-go/engine/mob"
"lab.zaar.be/thefish/alchemyst-go/engine/types"
"lab.zaar.be/thefish/alchemyst-go/util"
"lab.zaar.be/thefish/alchemyst-go/util/appctx"
)
type PrefabFile struct {
@ -42,10 +42,10 @@ func LoadPrefabFile(filename string) (*PrefabFile, error) {
}
type PrefabLoader struct {
ctx util.ClientCtx
ctx appctx.ClientCtx
}
func NewPrefabLoader(ctx util.ClientCtx) PrefabLoader {
func NewPrefabLoader(ctx appctx.ClientCtx) PrefabLoader {
return PrefabLoader{ctx: ctx}
}
@ -103,9 +103,9 @@ func (pfbl PrefabLoader) PrefabRoomsList() []Room {
room.Connectors = append(room.Connectors, types.Coords{i,j})
} else {
f, ok = TileTypeMap[shortName]
}
if (!ok) {
pfbl.ctx.Logger().Warn().Msgf("Unknown tile: %s", shortName)
if (!ok) {
pfbl.ctx.Logger().Warn().Msgf("Unknown tile: %s", shortName)
}
}
room.Geometry[i+ j*room.W] = f
}