Module CorsixTH.CorsixTH.Lua.dialogs.adviser
The (ideally) helpful advisor who pops up from the bottom dialog during a game.
Functions
| UIAdviser:checkForDuplicates (speech) | Function checks if the adviser has been asked to say something already queued. |
| UIAdviser:hide () | Hides the adviser by running the appropriate animation. |
| UIAdviser:idle () | Makes the adviser idle for a while before disappearing. |
| UIAdviser:say (speech, talk_until_next_announce, override_current) | Makes the adviser say something. |
| UIAdviser:show () | Shows the adviser by running the "popup" animation. |
| UIAdviser:talk () | Displays the text bubble along with the next message from the queue. |
Functions
- UIAdviser:checkForDuplicates (speech)
-
Function checks if the adviser has been asked to say something already queued.
Parameters:
- speech (string) Text to check
Returns:
-
(boolean) true if duplicate found
- UIAdviser:hide ()
- Hides the adviser by running the appropriate animation.
- UIAdviser:idle ()
- Makes the adviser idle for a while before disappearing. This means that the text bubble is removed.
- UIAdviser:say (speech, talk_until_next_announce, override_current)
-
Makes the adviser say something.
Parameters:
- speech The table containing the text he should say and the priority.
- talk_until_next_announce Whether he should stay up until the next say() call is made. Useful for the tutorial.
- override_current Cancels previous messages (if any) immediately and shows this new one instead.
- UIAdviser:show ()
- Shows the adviser by running the "popup" animation. Then moves on to the next phase automatically.
- UIAdviser:talk ()
- Displays the text bubble along with the next message from the queue.