This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| smutbook:classes:util:messagequeue [2023/08/06 20:32] – lee | smutbook:classes:util:messagequeue [2026/08/25 13:58] (current) – lee | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| A global message queue system to allow the story author to more easily hook into the Inventory and Apparel UIs and display various flavor texts and do other processing while a player is fooling around with Inventory and Apparel. | A global message queue system to allow the story author to more easily hook into the Inventory and Apparel UIs and display various flavor texts and do other processing while a player is fooling around with Inventory and Apparel. | ||
| - | FIXME Not fully implemented. | + | FIXME May change as we rejigger the UIs. Maybe ought to move from here to the Inventory |
| ===== MessageQueue.push( message ) ===== | ===== MessageQueue.push( message ) ===== | ||
| If the queue is enabled, push a message into the top of the queue. | If the queue is enabled, push a message into the top of the queue. | ||
| - | \\**Returns: | + | |
| + | **Returns: | ||
| + | |||
| + | ===== MessageQueue.unshift( message ) ===== | ||
| + | |||
| + | If the queue is enabled, push a message onto the bottom of the queue. | ||
| + | |||
| + | **Returns: | ||
| ===== MessageQueue.shift() ===== | ===== MessageQueue.shift() ===== | ||
| - | If the queue is enabled, shift a message off the bottom of the queue.\\ | + | If the queue is enabled, shift a message off the bottom of the queue. |
| - | \\**Returns: | + | |
| + | **Returns: | ||
| ===== MessageQueue.dump( separator=" | ===== MessageQueue.dump( separator=" | ||
| - | Dump the whole queue as a string, using the given separator. | + | Dump the whole queue as a string, using the given separator. |
| - | \\**Returns: | + | |
| + | **Returns: | ||
| ===== MessageQueue.on( queue=[] ) ===== | ===== MessageQueue.on( queue=[] ) ===== | ||
| If the queue is already enabled, to nothing. | If the queue is already enabled, to nothing. | ||
| - | \\**Returns: | + | |
| + | **Returns: | ||
| ===== MessageQueue.off() ===== | ===== MessageQueue.off() ===== | ||
| Disable and clear the queue. | Disable and clear the queue. | ||
| - | \\**Returns: | + | |
| + | **Returns: | ||