aboutsummaryrefslogtreecommitdiff
path: root/internal/game/look_entities.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/look_entities.go')
-rw-r--r--internal/game/look_entities.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/internal/game/look_entities.go b/internal/game/look_entities.go
index e06d49f..1239f31 100644
--- a/internal/game/look_entities.go
+++ b/internal/game/look_entities.go
@@ -230,18 +230,17 @@ func (g *Game) showRoomCasinos(sess *net.Session, room *world.Room) []string {
}
var lines []string
for _, table := range room.CasinoTables {
- // Legacy slots declared under casino_tables are instantiated as the
- // room's slots machine, so label them as a machine, not a table.
- kind := "table"
- if table.Game == casino.GameSlots {
- kind = "machine"
- }
- name := casinoGameLabel(table.Game) + " " + kind
+ name := casinoGameLabel(table.Game) + " table"
lines = append(lines, fmt.Sprintf("A %s is here.", g.colorize(sess, "casino_action", name)))
}
for _, machine := range room.CasinoMachines {
- name := casinoGameLabel(machine.Game) + " machine"
- lines = append(lines, fmt.Sprintf("A %s is here.", g.colorize(sess, "casino_action", name)))
+ label := casinoGameLabel(machine.Game) + " machine"
+ if machine.Variant != "" {
+ // The variant (or the machine id) is the addressable name; show it
+ // so two variants in one room do not render identical lines.
+ label = casinoGameLabel(casino.GameName(machine.Variant)) + " " + casinoGameLabel(machine.Game) + " machine"
+ }
+ lines = append(lines, fmt.Sprintf("A %s is here.", g.colorize(sess, "casino_action", label)))
}
return lines
}