aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_tech.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/cmd_tech.go')
-rw-r--r--internal/game/cmd_tech.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/internal/game/cmd_tech.go b/internal/game/cmd_tech.go
index cb4c309..d4a6adc 100644
--- a/internal/game/cmd_tech.go
+++ b/internal/game/cmd_tech.go
@@ -14,7 +14,7 @@ func (g *Game) doTech(sess *net.Session, input string) {
techLevel := p.Level(player.Technology)
if techLevel < 1 {
- sess.WriteLine("\nYou need at least level 1 Technology to use tech.")
+ sess.WriteLine("You need at least level 1 Technology to use tech.")
return
}
@@ -44,7 +44,7 @@ func (g *Game) doTech(sess *net.Session, input string) {
matches := TechByPrefixMatch(lower)
if len(matches) == 0 {
- sess.WriteLine(fmt.Sprintf("\nUnknown tech: %s", input))
+ sess.WriteLine(fmt.Sprintf("Unknown tech: %s", input))
return
}
if len(matches) > 1 {
@@ -52,7 +52,7 @@ func (g *Game) doTech(sess *net.Session, input string) {
for _, m := range matches {
names = append(names, m.Name)
}
- sess.WriteLine(fmt.Sprintf("\nAmbiguous tech: %s. Matches: %s", input, strings.Join(names, ", ")))
+ sess.WriteLine(fmt.Sprintf("Ambiguous tech: %s. Matches: %s", input, strings.Join(names, ", ")))
return
}
@@ -62,7 +62,7 @@ func (g *Game) doTech(sess *net.Session, input string) {
func (g *Game) toggleTech(sess *net.Session, p *player.Player, techID string) {
def := GetTechDef(techID)
if def == nil {
- sess.WriteLine("\nUnknown tech.")
+ sess.WriteLine("Unknown tech.")
return
}
@@ -70,27 +70,27 @@ func (g *Game) toggleTech(sess *net.Session, p *player.Player, techID string) {
if p.HasActiveTech(techID) {
p.DeactivateTech(techID)
- sess.WriteLine(fmt.Sprintf("\n%s deactivated.", def.Name))
+ sess.WriteLine(fmt.Sprintf("%s deactivated.", def.Name))
return
}
if techLevel < def.Level {
- sess.WriteLine(fmt.Sprintf("\nYou need level %d Technology to use %s.", def.Level, def.Name))
+ sess.WriteLine(fmt.Sprintf("You need level %d Technology to use %s.", def.Level, def.Name))
return
}
if p.Battery <= 0 {
- sess.WriteLine("\nYour battery is depleted!")
+ sess.WriteLine("Your battery is depleted!")
return
}
deactivated := g.deactivateGroup(p, def.Group)
for _, name := range deactivated {
- sess.WriteLine(fmt.Sprintf("\n%s deactivated.", name))
+ sess.WriteLine(fmt.Sprintf("%s deactivated.", name))
}
p.ActivateTech(techID)
- sess.WriteLine(fmt.Sprintf("\n%s activated.", def.Name))
+ sess.WriteLine(fmt.Sprintf("%s activated.", def.Name))
}
func (g *Game) deactivateGroup(p *player.Player, group string) []string {
@@ -164,21 +164,21 @@ func (g *Game) doTechList(sess *net.Session) {
func (g *Game) doTechQuick(sess *net.Session, p *player.Player, input string) {
if input == "" {
if p.QuickTech == "" {
- sess.WriteLine("\nNo quick tech set. Usage: tech quick <name>")
+ sess.WriteLine("No quick tech set. Usage: tech quick <name>")
} else {
def := GetTechDef(p.QuickTech)
name := p.QuickTech
if def != nil {
name = def.Name
}
- sess.WriteLine(fmt.Sprintf("\nQuick tech: %s", name))
+ sess.WriteLine(fmt.Sprintf("Quick tech: %s", name))
}
return
}
matches := TechByPrefixMatch(strings.ToLower(input))
if len(matches) == 0 {
- sess.WriteLine(fmt.Sprintf("\nUnknown tech: %s", input))
+ sess.WriteLine(fmt.Sprintf("Unknown tech: %s", input))
return
}
if len(matches) > 1 {
@@ -186,13 +186,13 @@ func (g *Game) doTechQuick(sess *net.Session, p *player.Player, input string) {
for _, m := range matches {
names = append(names, m.Name)
}
- sess.WriteLine(fmt.Sprintf("\nAmbiguous tech: %s. Matches: %s", input, strings.Join(names, ", ")))
+ sess.WriteLine(fmt.Sprintf("Ambiguous tech: %s. Matches: %s", input, strings.Join(names, ", ")))
return
}
p.QuickTech = matches[0].ID
g.AccountStore.SaveCharacter(p)
- sess.WriteLine(fmt.Sprintf("\nQuick tech set to %s.", matches[0].Name))
+ sess.WriteLine(fmt.Sprintf("Quick tech set to %s.", matches[0].Name))
}
func (g *Game) executeTech(sess *net.Session, args []string, rawInput string) {