blob: fc4b46186f97fc399508be3e95a0a7ea5c11d6f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
package game
import (
"thehouseoficarus/internal/action"
"thehouseoficarus/internal/combat"
"thehouseoficarus/internal/player"
)
func (g *Game) playerActionDisplay(p *player.Player) string {
if cs := combat.GetCombat(p.Name); cs != nil {
mob := g.MobStore.GetInstance(cs.MobID)
if mob != nil {
if mob.IsTask() {
return "working on a " + mob.Name
}
return "fighting a " + mob.Name
}
}
if p.MoveTicks > 0 {
return "heading " + p.MoveDirection
}
if len(p.WalkSequence) > 0 {
return "walking somewhere with a purpose!"
}
if ss, ok := g.safespot.Get(p.Name); ok && ss.Active {
obj, err := g.ObjectStore.Load(ss.ObjectDefID)
if err == nil {
return "positioning behind a " + obj.Name
}
return "hiding"
}
if a := p.Action; a != nil {
switch a.Type {
case action.TypeGather:
if d, ok := a.Data.(*action.GatherData); ok {
desc := d.Verb + " a " + a.TargetName
if d.ToolName != "" {
desc += " with a " + d.ToolName
}
return desc
}
case action.TypeSteal:
return "stealing from " + a.TargetName
case action.TypeTalk:
return "talking to " + a.TargetName
case action.TypeUse:
return "using a " + a.TargetName
case action.TypeBurn:
return "trying to start a fire"
case action.TypeStoke:
return "tending to a fire"
case action.TypeSearch:
return "digging through a " + a.TargetName
case action.TypeIdentify:
return "identifying scrap at " + a.TargetName
case action.TypePlant:
return "planting " + a.TargetName
case action.TypeHarvest:
return "harvesting " + a.TargetName
case action.TypeRake:
return "raking a " + a.TargetName
case action.TypeWater:
return "watering a " + a.TargetName
case action.TypeCure:
return "curing a " + a.TargetName
case action.TypeObstacle:
return "traversing across " + a.TargetName
case action.TypeCook:
return "cooking some " + a.TargetName
case action.TypeSmelt:
return "smelting some " + a.TargetName
case action.TypeSmith:
return "smithing some " + a.TargetName
case action.TypeCraft:
return "crafting some " + a.TargetName
case action.TypeCombine:
return "combining some " + a.TargetName
case action.TypeMix:
return "mixing some " + a.TargetName
case action.TypeConstruct:
return "constructing some " + a.TargetName
}
}
if a := p.BackgroundAction; a != nil {
switch a.Type {
case action.TypeFletch:
return "fletching " + a.TargetName
case action.TypeClean:
return "cleaning herbs"
}
}
return ""
}
|