first item, render order? redraw? broken

This commit is contained in:
2019-11-16 05:15:02 +03:00
parent 768426a316
commit 685dfeeeb1
4 changed files with 49 additions and 24 deletions

View File

@ -8,6 +8,7 @@ import (
"lab.zaar.be/thefish/alchemyst-go/engine/gamemap"
"lab.zaar.be/thefish/alchemyst-go/engine/gamemap/mapgens"
"lab.zaar.be/thefish/alchemyst-go/engine/gamestate"
"lab.zaar.be/thefish/alchemyst-go/engine/items"
"lab.zaar.be/thefish/alchemyst-go/engine/mob"
"lab.zaar.be/thefish/alchemyst-go/engine/mob/movement"
"lab.zaar.be/thefish/alchemyst-go/engine/screens"
@ -174,6 +175,18 @@ func main() {
controller.AddComponent(player, rooms[0].Center) //implicit Coords
controller.AddComponent(player, moveable)
potion := controller.CreateEntity([]ecs.Component{})
controller.AddComponent(potion, types.Appearance{
Glyph: types.PlainGlyphHolder{"!"},
ColorSet: types.TileColorSet{
Fg: types.PlainColorHolder{255, 55, 255, 222},
},
})
controller.AddComponent(potion, rooms[1].Center) //implicit Coords
controller.AddComponent(potion, items.Carried{})
controller.AddComponent(potion, items.Usable{})
controller.AddComponent(potion, items.Consumable{})
State.Player = player
State.Controller = controller