fix wu line iface, pending opacity
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/ecs"
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/gamelog"
|
||||
"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"
|
||||
@@ -74,9 +75,9 @@ func main() {
|
||||
|
||||
//fixme set up (load / generate) level - move to game / enter or title / exit
|
||||
level, rooms := mapgens.DefaultGen(gamemap.NewLevel("test", 1))
|
||||
//level, rooms := mapgens.DelaunayMstGen(mainCtx, gamemap.NewLevel(mainCtx, "test", 1))
|
||||
//level, rooms := mapgens.DelaunayMstExtGen(mainCtx, gamemap.NewLevel(mainCtx, "test", 1))
|
||||
//level, rooms := mapgens.DelaunayPureGen(mainCtx, gamemap.NewLevel(mainCtx, "test", 1))
|
||||
//level, rooms := mapgens.DelaunayMstGen(mainCtx, gamemap.NewLevel("test", 1))
|
||||
//level, rooms := mapgens.DelaunayMstExtGen(gamemap.NewLevel("test", 1))
|
||||
//level, rooms := mapgens.DelaunayPureGen(gamemap.NewLevel("test", 1))
|
||||
State.Level = level
|
||||
|
||||
sidebarWidth := 0
|
||||
@@ -103,7 +104,7 @@ func main() {
|
||||
|
||||
items.Init(controller)
|
||||
|
||||
bp := items.Backpack{MaxMass:100, MaxBulk:100}
|
||||
bp := items.Backpack{MaxMass: 100, MaxBulk: 100}
|
||||
|
||||
//Set up Screen Manager
|
||||
screenMgr := types.NewScreenManager()
|
||||
@@ -117,7 +118,7 @@ func main() {
|
||||
//"[color=yellow]Note[/color]: Many of these are not implemented yet",
|
||||
"[color=yellow]Note[/color]: Many of these are not implemented yet",
|
||||
types.NewCenteredRect(mw.Rect, 50, 15),
|
||||
true, ).
|
||||
true).
|
||||
SetBgColor("#ef1d494f").
|
||||
SetFgColor("white").
|
||||
SetItems([]interface{}{
|
||||
@@ -125,12 +126,12 @@ func main() {
|
||||
"s or . - pass turn",
|
||||
"g or , - pick up item",
|
||||
"i - inventory",
|
||||
"? - this screen",
|
||||
"Ctrl+q - exit",
|
||||
"f or F - fire weapon or throw item",
|
||||
"z or Z - cast a spell",
|
||||
"p - pray",
|
||||
"Ctrl+p - message log",
|
||||
"? - this screen",
|
||||
"Ctrl+q - exit",
|
||||
"f or F - fire weapon or throw item",
|
||||
"z or Z - cast a spell",
|
||||
"p - pray",
|
||||
"Ctrl+p - message log",
|
||||
}).MakeList(),
|
||||
)
|
||||
|
||||
@@ -143,7 +144,7 @@ func main() {
|
||||
//"[color=yellow]Note[/color]: Many of these are not implemented yet",
|
||||
"",
|
||||
types.NewCenteredRect(mw.Rect, 70, 25),
|
||||
true, ).
|
||||
true).
|
||||
SetBgColor("#ef305c70").
|
||||
SetFgColor("white"),
|
||||
}
|
||||
@@ -160,7 +161,7 @@ func main() {
|
||||
SetFgColor("white"),
|
||||
)
|
||||
|
||||
screenMgr.SetScreenByName("title")
|
||||
screenMgr.SetScreenByName("title")
|
||||
|
||||
//fixme set up (load / generate) player - move to game / enter or title / exit
|
||||
player := controller.CreateEntity([]ecs.Component{})
|
||||
@@ -184,11 +185,11 @@ func main() {
|
||||
Fg: types.PlainColorHolder{255, 55, 255, 222},
|
||||
},
|
||||
})
|
||||
controller.AddComponent(potion, rooms[0].Center) //implicit Coords
|
||||
controller.AddComponent(potion, items.Carried{Mass:5, Bulk:3}) //fixme generate from blueprint!
|
||||
controller.AddComponent(potion, rooms[0].Center) //implicit Coords
|
||||
controller.AddComponent(potion, items.Carried{Mass: 5, Bulk: 3}) //fixme generate from blueprint!
|
||||
controller.AddComponent(potion, items.Usable{})
|
||||
controller.AddComponent(potion, items.Consumable{})
|
||||
controller.AddComponent(potion, ecs.Named{Name:"first potion"})
|
||||
controller.AddComponent(potion, ecs.Named{Name: "first potion"})
|
||||
|
||||
potion2 := controller.CreateEntity([]ecs.Component{})
|
||||
controller.AddComponent(potion2, types.Appearance{
|
||||
@@ -198,10 +199,10 @@ func main() {
|
||||
},
|
||||
})
|
||||
controller.AddComponent(potion2, rooms[1].Center) //implicit Coords
|
||||
controller.AddComponent(potion2, items.Carried{Mass:5, Bulk:3})
|
||||
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"})
|
||||
controller.AddComponent(potion2, ecs.Named{Name: "second potion"})
|
||||
//fixme end setting up items
|
||||
|
||||
State.Player = player
|
||||
@@ -209,6 +210,13 @@ func main() {
|
||||
|
||||
screenMgr.AddScreen("inventory", inv.MakeInverntory(player))
|
||||
|
||||
gamelog.Log.SetMaxHeight(5)
|
||||
gamelog.Log.Msg("2025-08-03T03:37:44+03:00 DBG Generating level of branch test depth 1")
|
||||
gamelog.Log.Msg("2025-08-03T03:37:44+03:00 DBG adding")
|
||||
gamelog.Log.Msg("2025-08-03T03:37:44+03:00 DBG adding")
|
||||
gamelog.Log.Msg("2025-08-03T03:37:44+03:00 DBG adding")
|
||||
gamelog.Log.Msg("TrOlolo")
|
||||
gamelog.Log.Msg("[color=red]Game[/color] starting...")
|
||||
|
||||
//but every call to bearlibterminal must be wrapped to closure and passed to mainfunc
|
||||
var exit = false
|
||||
@@ -224,7 +232,7 @@ func main() {
|
||||
// f()
|
||||
// break
|
||||
case <-State.Exit:
|
||||
appctx.Logger().Warn().Msg("quitting NOW")
|
||||
log.Warn().Msg("quitting NOW")
|
||||
exit = true
|
||||
break
|
||||
// не оставляйте default в бесконечном select {} - сожрет всё CPU
|
||||
@@ -235,7 +243,7 @@ func main() {
|
||||
}
|
||||
|
||||
}
|
||||
appctx.Logger().Info().Msg("pre-shutdown sequence")
|
||||
log.Info().Msg("pre-shutdown sequence")
|
||||
}
|
||||
|
||||
func setupLayers(mainwindow *mainwindow.MainWindow) {
|
||||
@@ -280,7 +288,7 @@ func decodeInput(ctx context.Context, baseLayer *mainwindow.Layer) {
|
||||
switch pressed {
|
||||
case "Ctrl+q":
|
||||
//fallthrough
|
||||
//case "Escape":
|
||||
//case "Escape":
|
||||
appctx.Logger().Info().Msg("exiting on quit command...")
|
||||
State.Exit <- struct{}{}
|
||||
appctx.Logger().Info().Msg("...done")
|
||||
@@ -288,7 +296,7 @@ func decodeInput(ctx context.Context, baseLayer *mainwindow.Layer) {
|
||||
return
|
||||
default:
|
||||
if pressed != "" {
|
||||
waitForWCspam = false;
|
||||
waitForWCspam = false
|
||||
State.Input <- pressed
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user