Skip to content

Commit a455e14

Browse files
committed
Non-dumb way to make clue lowercase
clue can be null sometimes, but only if "error" is true
1 parent 2a8b54d commit a455e14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Global.-1.ttslua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ function clueEntered(player, value)
632632

633633
-- Parse the entered clue into its respective parts
634634
local clue, number, error = getClueDetails(value)
635-
clue = clue:lower()
636635

637636
-- Handle clue parsing errors
638637
if error then
@@ -649,6 +648,9 @@ function clueEntered(player, value)
649648
return
650649
end
651650

651+
-- Standardize clue to lowercase
652+
clue = clue:lower()
653+
652654
-- Don't allow a clue that isn't covered
653655
for cardIndex, cardData in ipairs(cards) do
654656
if not cardData.covered and cardData.value:lower() == clue:lower() then

0 commit comments

Comments
 (0)