Merge branch 'tui'
This commit is contained in:
commit
d1c96c5afc
2 changed files with 25 additions and 14 deletions
2
main.go
2
main.go
|
@ -53,7 +53,7 @@ func NewGame(scr *Window) {
|
||||||
my_npcs := MakeNpcs()
|
my_npcs := MakeNpcs()
|
||||||
game.DataStored.Npcs = my_npcs
|
game.DataStored.Npcs = my_npcs
|
||||||
scr.MovePrintf(1, 2, "Created new game \"%v\"!", game.SaveGame)
|
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(2+i, 2, "Initialising \"%v\"...", game.DataStored.Npcs[i].Name)
|
||||||
scr.MovePrintf(3+i, 2, "Found NPC query string!")
|
scr.MovePrintf(3+i, 2, "Found NPC query string!")
|
||||||
scr.Refresh()
|
scr.Refresh()
|
||||||
|
|
13
mknpcs.go
13
mknpcs.go
|
@ -5,7 +5,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func MakeNpcs() []Npc {
|
func MakeNpcs() []Npc {
|
||||||
npcs := []Npc {}
|
npcs := []Npc{}
|
||||||
helper01 := Npc{
|
helper01 := Npc{
|
||||||
Name: "Helper01_NPC",
|
Name: "Helper01_NPC",
|
||||||
Ai: NpcAi{
|
Ai: NpcAi{
|
||||||
|
@ -14,5 +14,16 @@ func MakeNpcs() []Npc {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
npcs = append(npcs, helper01)
|
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
|
return npcs
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue