CorsixTH Lua Documentation

The following table gives all classes present in the source code, in alphabetical order, along with short descriptions.
AIHospital
AnimationManager Utility class for setting animation markers and querying animation length.
AnnouncementEntry An announcement.
AnnouncementQueue An announcement queue based on priority
Announcer Announces audible messages to the player.
AnswerCallAction
App 'coverup_in_progress' renamed to 'coverup_selected'
AtomAnalyser
Audio Layer which handles the Lua-facing side of loading and playing audio.
Bench
BloodMachineRoom
Button A region of a `Panel` which causes some action when clicked.
CallCheckPointAction
CallsDispatcher
CardiogramRoom
Chair
Cheats A holder for all cheats in the game
CheckWatchAction
DNAFixerRoom
Date Date class is meant to encapsulate logic around months, years, days, hours. It should be able to do adjustments with regards to days in given month and so on. Date objects should be immutable and that is why date adjustments return new objects instead of modifying the current one.
DecontaminationRoom
DieAction
DirTreeNode A tree node representing a directory in the physical file-system.
Doctor A Doctor (Researcher,Surgan,Psychologist)
Door
DummyRootNode A tree node which can be used as a root node to give the effect of having multiple root nodes.
Earthquake Manages all earthquakes in the world
ElectrolysisRoom
EndConditions
Entity Abstraction for visible gameplay things which sit somewhere on the map.
EntityMap
EntranceDoor
Epidemic
FallingAction
FileSystem Layer for abstracting away differences in file systems. In the traditional case, the FileSystem is associated with a path on the actual filesystem, from which all other operations are considered relative. The FileSystem is also able to delegate operations to the ISO_FS library in the engine for reading / listing files off an ISO image instead of a file system.
FileTreeNode A tree node representing a file (or directory) in the physical file-system.
FilteredFileTreeNode A tree node representing a file (or directory) in the physical file-system that meets a given file extension criterion.
FilteredTreeControl A sortable tree control that accommodates a certain file type and also possibly shows their last modification dates.
FractureRoom
GPRoom
GameUI Variant of UI for running games
GeneralDiagRoom
GetUpAction
Graphics Layer for loading (and subsequently caching) graphical resources.
GrimReaper
HairRestorationRoom
Handyman A Doctor, Nurse, Receptionist, Handyman, or Surgeon
Helicopter An `Object` which drops off emergency patients.
Hospital
HotkeyBox A window element used to accept hotkey configurations.
Humanoid An `Entity` which occupies a single tile and is capable of moving around the map.
HumanoidAction Humanoid action base class.
IdleAction
IdleSpawnAction
InflationRoom
Inspector An `Inspector` is called to the hospital after an epidemic to issue a report
InstallDirTreeNode This tree only shows directories and highlights valid TH directories.
JellyVatRoom
KnockDoorAction
Litter
Machine An `Object` which needs occasional repair (to prevent explosion).
Map Lua extensions to the C++ THMap class
MeanderAction
MoviePlayer
MultiUseObjectAction
Nurse A Doctor, Nurse, Receptionist, Handyman, or Surgeon
Object An `Entity` which occupies at least a single map tile and does not move.
OnGroundAction
OperatingSink
OperatingTable
OperatingTheatreRoom TODO: There is also an unused sound "Another surgeon needed [...]", reqd011.wav room.handyman_call_sound = "maint007.wav" TODO: No sound for this room?
Panel The basic component which makes up most `Window`s.
Patient A `Humanoid` who is in the hospital for diagnosis and/or treatment.
PeeAction
PharmacyRoom
PickupAction
Plant An `Object` which needs watering now and then.
PlayerHospital
PsychRoom
Queue Manages a list of `Humanoid`s which are waiting to use an `Object`.
QueueAction
RadiationShield
Rathole For ratholes: 1904: hole in north wall 1908: rat moving north 1910: rat moving north-east 1912: rat moving east 1914: rat moving south-east 1916: rat moving south 1918: rat moving south-west 1920: rat moving west 1922: rat moving north-west 1924: rat entering hole north wall 1926: rat entering hole west wall 1928: rat leaving hole north wall
ReceptionDesk
Receptionist A Doctor, Nurse, Receptionist, Handyman, or Surgeon
ResearchDepartment Notes about research speed. Original game times at 20 % in all categories with a medium doctor at level 3: Slicer discovered in about 120 days. (10000 points) Pump improved in about 60 days. (30000 points * 20 % as first improvement) Invisibility improved in about 90 days. (10000 points) Note that the original requires a nurse and a pharmacy before drugs get improved. On the other hand it appears that the research is stored for future use anyway. --
ResearchRoom
Room
ScannerRoom Handyman is called to "diagnosis machine", all other diagnosis rooms have their own, more specific handyman call though room.handyman_call_sound = "maint011.wav"
Scrollbar A window element used to scroll in lists
SeekReceptionAction
SeekRoomAction
SeekStaffRoomAction
SeekToiletsAction
ShakeFistAction
SideObject
SlackTongueRoom
SpawnAction
Staff A Doctor, Nurse, Receptionist, Handyman, or Surgeon
StaffProfile
StaffReceptionAction
StaffRoom
Strings Layer which handles the loading of localised text.
SurgeonScreen
SweepFloorAction
SwingDoor
TapFootAction
Textbox A window element used to enter text
ToiletRoom
TrainingRoom
TreeControl A control (to be placed on a window) which allows the user to navigate a tree of items and select one item from it.
TreeNode Interface for items within a UI tree control
UI Top-level container for all other user-interface components.
UIAdviser The (ideally) helpful advisor who pops up from the bottom dialog during a game.
UIAnnualReport Annual Report fullscreen window shown at the start of each year.
UIBankManager Bank manager (for loans / insurance companies) and bank statement fullscreen windows.
UIBottomPanel The multi-purpose panel for launching dialogs / screens and dynamic information.
UIBuildRoom
UICallsDispatcher Calls Dispatcher Window
UICasebook Drug Casebook fullscreen window (view disease statistics and set prices).
UICheats A dialog for activating cheats
UIChooseFont Window where the user can choose a font file.
UIConfirmDialog Dialog for "Are you sure you want to quit?" and similar yes/no questions.
UICustomCampaign Custom Campaign Window
UICustomGame Custom Game Window
UICustomise Customise window used in the main menu and ingame.
UIDirectoryBrowser Prompter for Theme Hospital install directory
UIDropdown Dropdown "window" used for selection of one item from a list.
UIEditRoom
UIFax
UIFileBrowser A file browser with a scrollbar. Used by load_game and save_game.
UIFolder Customise window used in the main menu and ingame.
UIFullscreen Base class for 640x480px dialogs (fullscreen in original game resolution).
UIFurnishCorridor Dialog for purchasing `Object`s (for the corridor or for rooms).
UIGraphs Charts fullscreen window
UIHireStaff
UIHotkeyAssign Custom key bindings
UIHotkeyAssignKeyPane Child window for setting key bindings
UIInformation Dialog that informs the player of for example what the goals for the level are.
UIJukebox
UILoadGame Load Game Window
UILoadMap Load Map Window
UILuaConsole Interactive Lua Console for ingame debugging.
UIMachine
UIMachineMenu Interactive Machine List
UIMainMenu Class for main menu window.
UIMakeDebugPatient
UIMapEditor
UIMenu
UIMenuBar The ingame menu bar which sits (nominally hidden) at the top of the screen.
UIMenuList A menu list with a scrollbar. Used by load_game, save_game and custom_game.
UIMessage Small fax notification window which sits on the bottom bar.
UINewGame Class for the difficulty choice window.
UIOptions Options window used in the main menu and ingame.
UIPatient Individual patient information dialog
UIPlaceObjects The dialog shown when placing objects.
UIPlaceStaff Invisible window which handles placing a `Staff` member in the world.
UIPolicy Hospital policy fullscreen window (set staff tiredness and patient cure thresholds, etc.).
UIProgressReport Progress Report fullscreen window (check level goals, competitors and alerts).
UIQueue Room / door / reception desk queue visualisation dialog.
UIQueuePopup
UIResearch
UIResizable Class for resizable windows.
UIResolution A custom resolution selection window
UISaveGame Save Game Window
UISaveMap Save Map Window
UIScrollSpeed A window for setting the scroll speed of the camera.
UIShiftScrollSpeed A window for setting the scroll speed of the camera while pressing the SHIFT key..
UIStaff Individual staff information dialog
UIStaffManagement Staff management screen
UIStaffRise Dialog for staff member requesting a salaray raise.
UITipOfTheDay Tip of the Day Window
UITownMap Town map fullscreen window (purchase land, set radiator levels, map overview).
UIUpdate Options window used in the main menu and ingame.
UIWatch Timer / clock / watch / countdown dialog for emergencies / level start
UIZoomSpeed Window to set the zoom speed of the scroll wheel while in-game.
UltrascanRoom
UseObjectAction
UseScreenAction
UseStaffRoomAction
VaccinateAction
Vip A `Vip` who is in the hospital to evaluate the hospital and produce a report
VipGoToNextRoomAction
VomitAction
WalkAction
WardRoom
Window Base class for user-interface dialogs.
World Manages entities, rooms, and the date.
XRayRoom
YawnAction