some inventory improvements
This commit is contained in:
@ -133,7 +133,7 @@ func main() {
|
||||
}).MakeList(),
|
||||
)
|
||||
|
||||
screenMgr.AddScreen("inventory", screens.InventoryScreen{
|
||||
inv := screens.InventoryScreen{
|
||||
MenuScreen: screens.NewMenuScreen(
|
||||
mw,
|
||||
screenMgr,
|
||||
@ -144,10 +144,8 @@ func main() {
|
||||
types.NewCenteredRect(mw.Rect, 70, 25),
|
||||
true, ).
|
||||
SetBgColor("#ef305c70").
|
||||
SetFgColor("white").
|
||||
SetItems([]interface{}{}).MakeList()
|
||||
},
|
||||
)
|
||||
SetFgColor("white"),
|
||||
}
|
||||
|
||||
screenMgr.AddScreen("devmenu", screens.NewDevmenuScreen(
|
||||
mw,
|
||||
@ -188,6 +186,7 @@ func main() {
|
||||
controller.AddComponent(potion, items.Carried{Mass:5, Bulk:3})
|
||||
controller.AddComponent(potion, items.Usable{})
|
||||
controller.AddComponent(potion, items.Consumable{})
|
||||
controller.AddComponent(potion, ecs.Named{Name:"first potion"})
|
||||
|
||||
potion2 := controller.CreateEntity([]ecs.Component{})
|
||||
controller.AddComponent(potion2, types.Appearance{
|
||||
@ -200,11 +199,15 @@ func main() {
|
||||
controller.AddComponent(potion2, items.Carried{Mass:5, Bulk:3})
|
||||
controller.AddComponent(potion2, items.Usable{})
|
||||
controller.AddComponent(potion2, items.Consumable{})
|
||||
controller.AddComponent(potion2, ecs.Named{Name:"second potion"})
|
||||
//fixme end setting up items
|
||||
|
||||
State.Player = player
|
||||
State.Controller = controller
|
||||
|
||||
screenMgr.AddScreen("inventory", inv.MakeInverntory(player))
|
||||
|
||||
|
||||
//but every call to bearlibterminal must be wrapped to closure and passed to mainfunc
|
||||
var exit = false
|
||||
for !exit {
|
||||
|
Reference in New Issue
Block a user