diff options
| author | historia <[not public]> | 2026-09-19 03:15:59 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-19 03:15:59 -0400 |
| commit | 0e60567a7a0addb9421769ee7be7853bfa8788cb (patch) | |
| tree | 7645112db0e4eae95b8a83c1e4f9aab38bede655 /internal/game/look_entities.go | |
| parent | cc33072eced3d5460512c09c42ec4531c807d7af (diff) | |
| download | thehouseoficarus-0e60567a7a0addb9421769ee7be7853bfa8788cb.tar.gz | |
refactor: simplifcation, change how rooms are stored in player yaml, remove legacy code
Diffstat (limited to 'internal/game/look_entities.go')
| -rw-r--r-- | internal/game/look_entities.go | 17 |
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 } |
