CorsixTH Lua Documentation

AnnouncementQueue Class

An announcement queue based on priority

Declared on: line 44 of Lua/announcer.lua.

Method Index

Member Index

function AnnouncementQueue:AnnouncementQueue()

Creates an announcement queue: a collection of announcements with queue semantics.

Declared on: line 50 of Lua/announcer.lua.

function AnnouncementQueue:checkForDuplicates(sound, date)

Checks for duplicates in the announcement queue and refreshes the announcement's created_date

Parameters:

NameTypeDescription
sound ? the announcement to check
date ? the date to use, usually the current date

Declared on: line 90 of Lua/announcer.lua.

function AnnouncementQueue:isEmpty()

Returns true if the queue is empty, false otherwise.

Declared on: line 85 of Lua/announcer.lua.

function AnnouncementQueue:pop()

Dequeues the announcement with the highest priority, nil if the queue is empty.

Declared on: line 72 of Lua/announcer.lua.

function AnnouncementQueue:push(priority, entry)

Adds the announcement entry to the queue.

Parameters:

NameTypeDescription
priority int the priority of the announcement
entry AnnouncementEntry the announcement entry

Declared on: line 63 of Lua/announcer.lua.