Skip to content

Commit

Permalink
💬 Improve merch ordering menu names
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepyfran committed Oct 8, 2024
1 parent 69c9c03 commit bb1d936
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ module OrderMerchandiseCommand =
|> Styles.error
|> showMessage

let private itemName item =
let mainProperty = Item.Property.tryMain item

match mainProperty with
| Some(Listenable(CD, _)) -> $"{item.Name} (CD)"
| Some(Listenable(Vinyl, _)) -> $"{item.Name} (Vinyl)"
| _ -> item.Name

/// Command to order merchandise from a merch workshop.
let create (availableItems: MerchandiseItem list) =
{ Name = "order"
Expand All @@ -60,7 +68,7 @@ module OrderMerchandiseCommand =
$"""What kind of {"merchandise" |> Styles.prompt} would you like to order?"""
Generic.cancel
(fun merchItem ->
$"""{merchItem.Item.Name |> Styles.item}, {merchItem.PricePerPiece |> Styles.money} / item.{Styles.Spacing.choicePromptNewLine}At least {merchItem.MinPieces}, at most {merchItem.MaxPieces}.""")
$"""{itemName merchItem.Item |> Styles.item}, {merchItem.PricePerPiece |> Styles.money} / item.{Styles.Spacing.choicePromptNewLine}At least {merchItem.MinPieces}, at most {merchItem.MaxPieces}.""")
availableItems

match merchItem with
Expand Down

0 comments on commit bb1d936

Please sign in to comment.