Hooks hooksclient
Part of Hints
Hooks called by Hints
Summary
Hooks
Hints:add.Hooks
Lets plugins and the schema register their hints with Hints:add.
Called on the client once all plugins and the schema have been loaded, and again on
every code refresh. Only the Hints plugin runs it, so a handler does not have to check
whether Hints exists. The handler of the schema runs after those of the plugins and
can take their hints out with Hints:remove. Do not return anything from the handler,
or the plugins after it are not asked.
Called from
Call sites
Asks whether a hint may be picked as the random hint. Called on the client for every registered hint whose callback allows it, each time a random hint is about to be picked. Return false for every hint to keep the player from seeing random hints for the time being, in a menu or during a cutscene for example.
Parameters
- hint Map The hint: id, text, color, play_sound and callback fields
Returns
- Boolean Return false to keep the hint from being picked