diff options
| author | historia <[not public]> | 2026-06-22 04:24:11 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-22 04:24:11 -0400 |
| commit | 5b9a75a1520a198c9c6b1f1f55e05c9f4aab5629 (patch) | |
| tree | 18f500ca3492ba206a3f66e2f01146b05a1675b2 /internal/game/action_farm.go | |
| parent | 7f07c7236578e1a7bcef0282ff9d7f5bf8c7c045 (diff) | |
| download | thehouseoficarus-5b9a75a1520a198c9c6b1f1f55e05c9f4aab5629.tar.gz | |
feat: map now only reveals with exploration. players can set custom map symbols.
Diffstat (limited to 'internal/game/action_farm.go')
| -rw-r--r-- | internal/game/action_farm.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/internal/game/action_farm.go b/internal/game/action_farm.go index 87ea6b7..d8c7e00 100644 --- a/internal/game/action_farm.go +++ b/internal/game/action_farm.go @@ -502,7 +502,7 @@ func (g *Game) farmObjSuffix(p *player.Player, defID string, index int) string { return "" } -func (g *Game) showFarmPatches(sess *net.Session, p *player.Player) { +func (g *Game) showFarmPatches(sess *net.Session, p *player.Player) []string { objInstances := g.World.AllObjInstances(p.RoomID) hasFarmPatches := false for _, obj := range objInstances { @@ -512,7 +512,7 @@ func (g *Game) showFarmPatches(sess *net.Session, p *player.Player) { } } if !hasFarmPatches { - return + return nil } type farmDisplay struct { @@ -609,13 +609,15 @@ func (g *Game) showFarmPatches(sess *net.Session, p *player.Player) { } if len(displays) == 0 { - return + return nil } - sess.WriteLine("") + var lines []string + lines = append(lines, "") for _, d := range displays { - sess.WriteLine(fmt.Sprintf("A %s: %s.", d.name, d.line)) + lines = append(lines, fmt.Sprintf("A %s: %s.", d.name, d.line)) } + return lines } func (g *Game) countPatchesByType(instances []world.ObjState, defID string) int { |
