CorsixTH Lua Documentation

UIEditRoom Class

Declared on: line 23 of Lua/dialogs/edit_room.lua.
Inheritance: UIEditRoom » UIPlaceObjects » Window

Method Index

Member Index

(*) only used in superclass methods
function UIEditRoom:UIEditRoom(ui, room_type)

Parameters:

NameTypeDescription
ui ? ?
room_type ? ?

Declared on: line 28 of Lua/dialogs/edit_room.lua.

function UIEditRoom:_checkCanBuildRoomHere()

Checks that the room will not block part of the hospital.

Declared on: line 953 of Lua/dialogs/edit_room.lua.

function UIEditRoom:_clearAreaOfHumanoids()

A function requests that the humanoids leave the room’s perimeter and saves a list of these humanoids in the `humanoids_to_watch` variable for subsequent monitoring.

Declared on: line 251 of Lua/dialogs/edit_room.lua.

function UIEditRoom:_humanoidsInArea()

A function to retrieve humanoids located within the room’s perimeter.

Declared on: line 268 of Lua/dialogs/edit_room.lua.

function UIEditRoom:_remove_wall_line(x, y, step_x, step_y, n_steps, layer, neigh_x, neigh_y, world)

Remove walls

Parameters:

NameTypeDescription
x ? ?
y ? ?
step_x ? ?
step_y ? ?
n_steps ? ?
layer ? ?
neigh_x ? ?
neigh_y ? ?
world ? ?

Declared on: line 610 of Lua/dialogs/edit_room.lua.

function UIEditRoom:afterLoad(old, new)

Parameters:

NameTypeDescription
old ? ?
new ? ?

Overrides: UIPlaceObjects:afterLoad.
Declared on: line 1674 of Lua/dialogs/edit_room.lua.

function UIEditRoom:checkEnableConfirm()

checks if all required objects are placed, and enables/disables the confirm button accordingly. also returns the new state of the confirm button

Declared on: line 1625 of Lua/dialogs/edit_room.lua.

function UIEditRoom:checkReachability()

Function to check if the tiles adjacent to the room are still reachable from each other. NB: the passable flags of the room have to be set to false already before calling this function

Declared on: line 840 of Lua/dialogs/edit_room.lua.

function UIEditRoom:close(...)

Parameters:

NameTypeDescription
... ? ?

Overrides: UIPlaceObjects:close.
Declared on: line 98 of Lua/dialogs/edit_room.lua.

function UIEditRoom:computeAverageContents()

Decide contents of the new room based on average content of previous built rooms of the same type.

Declared on: line 1020 of Lua/dialogs/edit_room.lua.

function UIEditRoom:confirm(force)

Parameters:

NameTypeDescription
force ? ?

Overrides: UIPlaceObjects:confirm.
Declared on: line 206 of Lua/dialogs/edit_room.lua.

function UIEditRoom:draw(canvas, ...)

Parameters:

NameTypeDescription
canvas ? ?
... ? ?

Overrides: UIPlaceObjects:draw.
Declared on: line 1055 of Lua/dialogs/edit_room.lua.

function UIEditRoom:onLeftButtonDown(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

Declared on: line 1094 of Lua/dialogs/edit_room.lua.

function UIEditRoom:onMouseDown(button, x, y)

Parameters:

NameTypeDescription
button ? ?
x ? ?
y ? ?

Overrides: Window:onMouseDown.
Declared on: line 1147 of Lua/dialogs/edit_room.lua.

function UIEditRoom:onMouseMove(x, y, dx, dy)

Parameters:

NameTypeDescription
x ? ?
y ? ?
dx ? ?
dy ? ?

Overrides: UIPlaceObjects:onMouseMove.
Declared on: line 1174 of Lua/dialogs/edit_room.lua.

function UIEditRoom:onMouseUp(button, x, y)

Parameters:

NameTypeDescription
button ? ?
x ? ?
y ? ?

Overrides: UIPlaceObjects:onMouseUp.
Declared on: line 1160 of Lua/dialogs/edit_room.lua.

function UIEditRoom:removeRoom(save_objects, room, world)

Parameters:

NameTypeDescription
save_objects ? ?
room ? ?
world ? ?

Declared on: line 640 of Lua/dialogs/edit_room.lua.

function UIEditRoom:returnToWallPhase(early)

Parameters:

NameTypeDescription
early ? ?

Declared on: line 585 of Lua/dialogs/edit_room.lua.

function UIEditRoom:screenToWall(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

Declared on: line 722 of Lua/dialogs/edit_room.lua.

function UIEditRoom:setBlueprintRect(x, y, w, h)

Parameters:

NameTypeDescription
x ? ?
y ? ?
w ? ?
h ? ?

Declared on: line 1180 of Lua/dialogs/edit_room.lua.

function UIEditRoom:setDoorBlueprint(orig_x, orig_y, orig_wall)

Parameters:

NameTypeDescription
orig_x ? ?
orig_y ? ?
orig_wall ? ?

Declared on: line 1309 of Lua/dialogs/edit_room.lua.

function UIEditRoom:setWindowBlueprint(orig_x, orig_y, orig_wall)

Parameters:

NameTypeDescription
orig_x ? ?
orig_y ? ?
orig_wall ? ?

Declared on: line 1456 of Lua/dialogs/edit_room.lua.

function UIEditRoom:tryRemoveWindowFromWall(x, y)

Attempt to remove a window placed on the room blueprints

Parameters:

NameTypeDescription
x ? coordinate
y ? coordinate

Declared on: line 1116 of Lua/dialogs/edit_room.lua.

function UIEditRoom:verifyOrAbortRoom()

Called when building/editing of the room is about to stop because another dialog is being opened. If the room is in the objects phase and all required objects have been placed it will be completed. Otherwise it is cancelled instead. --

Declared on: line 126 of Lua/dialogs/edit_room.lua.