Merge branch 'tui'

This commit is contained in:
Zhongheng Liu 2024-10-23 09:32:11 +03:00
commit d1c96c5afc
Signed by: steven
GPG key ID: DC8F48E7B4C40905
2 changed files with 25 additions and 14 deletions

View file

@ -53,7 +53,7 @@ func NewGame(scr *Window) {
my_npcs := MakeNpcs()
game.DataStored.Npcs = my_npcs
scr.MovePrintf(1, 2, "Created new game \"%v\"!", game.SaveGame)
for i:=0; i<len(game.DataStored.Npcs); i++ {
for i := 0; i < len(game.DataStored.Npcs); i++ {
scr.MovePrintf(2+i, 2, "Initialising \"%v\"...", game.DataStored.Npcs[i].Name)
scr.MovePrintf(3+i, 2, "Found NPC query string!")
scr.Refresh()

View file

@ -5,7 +5,7 @@ import (
)
func MakeNpcs() []Npc {
npcs := []Npc {}
npcs := []Npc{}
helper01 := Npc{
Name: "Helper01_NPC",
Ai: NpcAi{
@ -14,5 +14,16 @@ func MakeNpcs() []Npc {
},
}
npcs = append(npcs, helper01)
rulmarc := Npc{
Name: "Rulmarc",
Ai: NpcAi{
PromptCharacterString: "You are a medieval villager called Rulmarc.",
QueryFromTableName: "helper",
},
}
npcs = append(npcs, rulmarc)
return npcs
}