aboutsummaryrefslogtreecommitdiff
path: root/internal/game/act_farm.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-26 02:52:31 -0400
committerhistoria <[not public]>2026-06-26 02:52:31 -0400
commit3102525d97aa6f1ad152c74b2ccfbd4b3a9b83f5 (patch)
tree65610fa4fb8abe1dc7a46d00658e85e0525d397c /internal/game/act_farm.go
parente2d5b081f27141bb3dd89dbe595860b8a1345d55 (diff)
downloadthehouseoficarus-3102525d97aa6f1ad152c74b2ccfbd4b3a9b83f5.tar.gz
feat: simplified conversation trees and output won't overwrite prompts now
Diffstat (limited to 'internal/game/act_farm.go')
-rw-r--r--internal/game/act_farm.go38
1 files changed, 19 insertions, 19 deletions
diff --git a/internal/game/act_farm.go b/internal/game/act_farm.go
index a4d96b4..6060dca 100644
--- a/internal/game/act_farm.go
+++ b/internal/game/act_farm.go
@@ -113,8 +113,8 @@ func (g *Game) advanceFarmGrowth(sess *net.Session, p *player.Player) {
if diseased {
g.setPlayerFlag(p, prefix+"_dead", true)
g.setPlayerFlag(p, prefix+"_diseased", false)
- sess.WriteLine(g.colorize(sess, "farm_disease",
- fmt.Sprintf("\nYour %s has died from disease!", g.seedDisplayName(sess, seedID))))
+ sess.WriteLine(g.colorize(sess, "farm_disease",
+ fmt.Sprintf("Your %s has died from disease!", g.seedDisplayName(sess, seedID))))
g.AccountStore.SaveCharacter(p)
continue
}
@@ -138,23 +138,23 @@ func (g *Game) advanceFarmGrowth(sess *net.Session, p *player.Player) {
g.setPlayerFlag(p, prefix+"_stage", stage)
g.setPlayerFlag(p, prefix+"_ready", true)
g.setPlayerFlag(p, prefix+"_watered", false)
- sess.WriteLine(g.colorize(sess, "farm_grow",
- fmt.Sprintf("\nYour %s is fully grown and ready to harvest!",
- g.seedDisplayName(sess, seedID))))
+ sess.WriteLine(g.colorize(sess, "farm_grow",
+ fmt.Sprintf("Your %s is fully grown and ready to harvest!",
+ g.seedDisplayName(sess, seedID))))
} else {
if !watered && rand.Float64() < 0.10 {
g.setPlayerFlag(p, prefix+"_stage", stage)
g.setPlayerFlag(p, prefix+"_diseased", true)
g.setPlayerFlag(p, prefix+"_watered", false)
- sess.WriteLine(g.colorize(sess, "farm_disease",
- fmt.Sprintf("\nYour %s has become diseased!",
- g.seedDisplayName(sess, seedID))))
+ sess.WriteLine(g.colorize(sess, "farm_disease",
+ fmt.Sprintf("Your %s has become diseased!",
+ g.seedDisplayName(sess, seedID))))
} else {
g.setPlayerFlag(p, prefix+"_stage", stage)
g.setPlayerFlag(p, prefix+"_watered", false)
- sess.WriteLine(g.colorize(sess, "farm_grow",
- fmt.Sprintf("\nYour %s has grown to stage %d/%d.",
- g.seedDisplayName(sess, seedID), stage, maxStages)))
+ sess.WriteLine(g.colorize(sess, "farm_grow",
+ fmt.Sprintf("Your %s has grown to stage %d/%d.",
+ g.seedDisplayName(sess, seedID), stage, maxStages)))
}
}
g.AccountStore.SaveCharacter(p)
@@ -395,22 +395,22 @@ func (g *Game) farmPatchLookSuffix(p *player.Player, defID string, index int) st
weeds, _ := p.Flags[prefix+"_weeds"].(bool)
if weeds {
- return "\nIt is overgrown with weeds."
+ return "It is overgrown with weeds."
}
seedID, _ := p.Flags[prefix+"_seed"].(string)
if seedID == "" {
- return "\nThe patch is empty and ready for planting."
+ return "The patch is empty and ready for planting."
}
dead, _ := p.Flags[prefix+"_dead"].(bool)
if dead {
- return "\nThe plant has died. You need to rake it clean."
+ return "The plant has died. You need to rake it clean."
}
diseased, _ := p.Flags[prefix+"_diseased"].(bool)
if diseased {
- return "\nThe plant looks diseased! Use plant cure to save it."
+ return "The plant looks diseased! Use plant cure to save it."
}
ready, _ := p.Flags[prefix+"_ready"].(bool)
@@ -419,7 +419,7 @@ func (g *Game) farmPatchLookSuffix(p *player.Player, defID string, index int) st
if def, err := g.ItemStore.Load(seedID); err == nil {
name = def.Name
}
- return fmt.Sprintf("\nA fully grown %s is ready to harvest!", name)
+ return fmt.Sprintf("A fully grown %s is ready to harvest!", name)
}
stage := intFromFlag(p.Flags, prefix+"_stage")
@@ -432,7 +432,7 @@ func (g *Game) farmPatchLookSuffix(p *player.Player, defID string, index int) st
name = def.Name
}
watered, _ := p.Flags[prefix+"_watered"].(bool)
- suffix := fmt.Sprintf("\nA %s is growing (stage %d/%d).", name, stage, maxStages)
+ suffix := fmt.Sprintf("A %s is growing (stage %d/%d).", name, stage, maxStages)
if watered {
suffix += " It has been watered."
}
@@ -451,9 +451,9 @@ func (g *Game) toolShedLookSuffix(p *player.Player) string {
stored = append(stored, "a watering can")
}
if len(stored) == 0 {
- return "\nThe shed is empty."
+ return "The shed is empty."
}
- return fmt.Sprintf("\nInside: %s.", strings.Join(stored, ", "))
+ return fmt.Sprintf("Inside: %s.", strings.Join(stored, ", "))
}
func (g *Game) farmMatchPrefix(p *player.Player, input string) (prefix string, defID string, index int) {