summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--storage.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/storage.go b/storage.go
index e57e0f2..67c71f1 100644
--- a/storage.go
+++ b/storage.go
@@ -89,7 +89,6 @@ func (b *Battle) From(stub *BattleStub) error {
}
b.Ships[key] = Ship{Name: t.Name, Group: g.Name}
}
- b.Name = "Untitled Fight"
for key := range b.Locations {
s, err := GetSolarSystem(key)
if err != nil {
@@ -110,6 +109,11 @@ func (b *Battle) From(stub *BattleStub) error {
Constellation: c.Name,
Region: r.Name,
}
+ if b.Name == "" {
+ b.Name = fmt.Sprintf("Fight in %s", s.Name)
+ } else {
+ b.Name = fmt.Sprintf("%s, %s", b.Name, s.Name)
+ }
}
// TODO: Resolve Names
return nil