UIEditRoom Class
Inheritance: UIEditRoom » UIPlaceObjects » Window
Method Index
- _checkCanBuildRoomHere()
- _checkIsWaitingHumanoidsToLeaveArea()
- _clearAreaOfHumanoids()
- _enterDoorPhase()
- _enterObjectsPhase()
- _enterWaitingClearAreaPhase()
- _enterWindowsPhase()
- _finishRoomFoundation()
- _humanoidsInArea()
- _isNonSideObjectPlacementValid(x, y, object, object_orientation, room_id) (inherited from UIPlaceObjects)
- _isSideObjectPlacementValid(x, y, room_id, passable_flag, map) (inherited from UIPlaceObjects)
- _placementAvailableHereAndOtherObjectsDoNotInterfere(x, y, object, real_obj, object_footprint, room, map) (inherited from UIPlaceObjects)
- _remove_wall_line(x, y, step_x, step_y, n_steps, layer, neigh_x, neigh_y, world)
- _setBlueprintPartialFlags(x, y, map, valid_placement) (inherited from UIPlaceObjects)
- _setCellFlagsOnBlueprint(flags)
- abortRoom()
- addBevelPanel(x, y, w, h, colour, highlight_colour, shadow_colour, disabled_colour, lowered_colour, apply_ui_scale) (inherited from Window)
- addColourPanel(x, y, w, h, r, g, b, apply_ui_scale) (inherited from Window)
- addKeyHandler(key, handler, ...) (inherited from Window)
- addObjects(object_list, pay_for) (inherited from UIPlaceObjects)
- addPanel(sprite_index, x, y, w, h, apply_ui_scale, draw_flags) (inherited from Window)
- addWindow(window) (inherited from Window)
- afterLoad(old, new) (overrides UIPlaceObjects:afterLoad)
- beginDrag(x, y) (inherited from Window)
- bringToTop() (inherited from Window)
- calculateBestPlacementPosition(x, y) (inherited from UIPlaceObjects)
- cancel() (overrides UIPlaceObjects:cancel)
- checkEnableConfirm()
- checkReachability()
- clearBlueprint() (inherited from UIPlaceObjects)
- close(...) (overrides UIPlaceObjects:close)
- computeAverageContents()
- confirm(force) (overrides UIPlaceObjects:confirm)
- draw(canvas, ...) (overrides UIPlaceObjects:draw)
- getRealXY() (inherited from Window)
- getSavedWindowPositionName() (inherited from Window)
- getTooltipAt(x, y) (inherited from Window)
- getTooltipForElement(elem, x, y) (inherited from Window)
- getWindow(window_class) (inherited from Window)
- getWindows(window_class) (inherited from Window)
- hitTest(x, y) (inherited from Window)
- hitTestPanel(x, y, panel) (inherited from Window)
- hoverTest(active_hover, mouse_x, mouse_y, min_x, max_x, min_y, max_y) (inherited from Window)
- makeButtonOnPanel(panel, x, y, w, h, sprite, on_click, on_click_self, on_rightclick) (inherited from Window)
- makeDynamicTooltip(callback, x, y, r, b, tooltip_x, tooltip_y) (inherited from Window)
- makeHotkeyBoxOnPanel(panel, confirm_callback, abort_callback) (inherited from Window)
- makeScrollbarOnPanel(panel, slider_colour, callback, min_value, max_value, page_size, value) (inherited from Window)
- makeTextboxOnPanel(panel, confirm_callback, abort_callback) (inherited from Window)
- makeTooltip(text, x, y, r, b, tooltip_x, tooltip_y, apply_ui_scale) (inherited from Window)
- mustPause() (inherited from Window)
- nextOrientation() (inherited from UIPlaceObjects)
- onChangeLanguage() (inherited from Window)
- onChangeResolution() (inherited from Window)
- onCursorWorldPositionChange(x, y) (overrides UIPlaceObjects:onCursorWorldPositionChange)
- onLeftButtonDown(x, y)
- onMouseDown(button, x, y) (overrides Window:onMouseDown)
- onMouseMove(x, y, dx, dy) (overrides UIPlaceObjects:onMouseMove)
- onMouseUp(button, x, y) (overrides UIPlaceObjects:onMouseUp)
- onMouseWheel(x, y) (inherited from Window)
- onTick() (overrides Window:onTick)
- onWorldTick() (inherited from Window)
- pickupItems() (overrides UIPlaceObjects:pickupItems)
- placeDoorBlueprint()
- placeObject() (overrides UIPlaceObjects:placeObject)
- placeWindowBlueprint()
- purchaseItems() (overrides UIPlaceObjects:purchaseItems)
- registerKeyHandlers() (overrides UIPlaceObjects:registerKeyHandlers)
- removeAllObjects(move_canceled) (inherited from UIPlaceObjects)
- removeAllPanels() (inherited from Window)
- removeKeyHandler(keys) (inherited from Window)
- removeObject(object, dont_close_if_empty, placed, move_canceled) (inherited from UIPlaceObjects)
- removeObjects(object_list) (inherited from UIPlaceObjects)
- removeRoom(save_objects, room, world)
- removeWindow(window) (inherited from Window)
- resize(num_slots) (inherited from UIPlaceObjects)
- returnToDoorPhase()
- returnToWallPhase(early)
- screenToWall(x, y)
- selectObjectType(object_type) (inherited from UIPlaceObjects)
- sell() (inherited from UIPlaceObjects)
- sendToBottom(window) (inherited from Window)
- sendToTop(window) (inherited from Window)
- setActiveIndex(index) (inherited from UIPlaceObjects)
- setBlueprintCell(x, y) (inherited from UIPlaceObjects)
- setBlueprintRect(x, y, w, h)
- setDefaultPosition(x, y) (inherited from Window)
- setDoorBlueprint(orig_x, orig_y, orig_wall)
- setOrientation(orient) (inherited from UIPlaceObjects)
- setPosition(x, y) (inherited from Window)
- setSize(width, height, apply_ui_scale) (inherited from Window)
- setWindowBlueprint(orig_x, orig_y, orig_wall)
- startButtonBlinking(button_index) (inherited from Window)
- stopButtonBlinking() (inherited from Window)
- stopPickupItems()
- tryNextOrientation() (inherited from UIPlaceObjects)
- tryRemoveWindowFromWall(x, y)
- undo() (inherited from UIPlaceObjects)
- verifyOrAbortRoom()
Member Index
- active_button (*)
- active_hover_index (*)
- active_index
- active_scrollbar (*)
- anims
- apply_ui_scale (*)
- blink_counter (*)
- blinking_button (*)
- blue_font (*)
- blueprint_door
- blueprint_rect
- blueprint_wall_anims
- blueprint_window
- btn_repeat_delay (*)
- buttons (*)
- buttons_down (*)
- cell_outline
- check_for_clear_area_timer
- closed (*)
- closed_cleanly
- confirm_button
- confirm_dialog_open
- cursor_x (*)
- cursor_y (*)
- default_button_sound (*)
- desc_text
- draggable (*)
- dragging (*)
- height
- hotkeyboxes (*)
- hover_sound (*)
- humanoids_to_watch
- in_pickup_mode
- key_handlers (*)
- list_header (*)
- map (*)
- modal_class (*)
- mouse_cell_x
- mouse_cell_y
- mouse_down_x
- mouse_down_y
- move_rect
- move_rect_x
- move_rect_y
- num_slots (*)
- object_anim (*)
- object_blueprint_good (*)
- object_cell_x
- object_cell_y
- object_footprint (*)
- object_orientation (*)
- object_slave_anim (*)
- objects
- objects_backup
- paid
- panel_sprites (*)
- panels (*)
- parent (*)
- phase
- pickup_button
- place_objects
- purchase_button
- resize_rect
- room
- room_type
- scrollbars (*)
- textboxes (*)
- title_text
- tooltip_regions (*)
- ui
- visible
- wall_dir_by_block_id
- wall_id_by_block_id
- wall_set_by_block_id
- wall_types
- white_font (*)
- width
- windows (*)
- world
- x
- x_original (*)
- y
- y_original (*)
function UIEditRoom:UIEditRoom(ui, room_type)
Parameters:
| Name | Type | Description |
|---|---|---|
| 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:_checkIsWaitingHumanoidsToLeaveArea()
Declared on: line 292 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:_enterWaitingClearAreaPhase()
Declared on: line 884 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:
| Name | Type | Description |
|---|---|---|
| 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:_setCellFlagsOnBlueprint(flags)
Parameters:
| Name | Type | Description |
|---|---|---|
| flags | ? | ? |
Declared on: line 1664 of Lua/dialogs/edit_room.lua.
function UIEditRoom:afterLoad(old, new)
Parameters:
| Name | Type | Description |
|---|---|---|
| old | ? | ? |
| new | ? | ? |
Overrides: UIPlaceObjects:afterLoad.
Declared on: line 1674 of Lua/dialogs/edit_room.lua.
function UIEditRoom:cancel()
Overrides: UIPlaceObjects:cancel.
Declared on: line 166 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:
| Name | Type | Description |
|---|---|---|
| ... | ? | ? |
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:
| Name | Type | Description |
|---|---|---|
| force | ? | ? |
Overrides: UIPlaceObjects:confirm.
Declared on: line 206 of Lua/dialogs/edit_room.lua.
function UIEditRoom:draw(canvas, ...)
Parameters:
| Name | Type | Description |
|---|---|---|
| canvas | ? | ? |
| ... | ? | ? |
Overrides: UIPlaceObjects:draw.
Declared on: line 1055 of Lua/dialogs/edit_room.lua.
function UIEditRoom:onCursorWorldPositionChange(x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
Overrides: UIPlaceObjects:onCursorWorldPositionChange.
Declared on: line 1524 of Lua/dialogs/edit_room.lua.
function UIEditRoom:onLeftButtonDown(x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
Declared on: line 1094 of Lua/dialogs/edit_room.lua.
function UIEditRoom:onMouseDown(button, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| button | ? | ? |
| x | ? | ? |
| y | ? | ? |
Overrides: Window:onMouseDown.
Declared on: line 1147 of Lua/dialogs/edit_room.lua.
function UIEditRoom:onMouseMove(x, y, dx, dy)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
| dx | ? | ? |
| dy | ? | ? |
Overrides: UIPlaceObjects:onMouseMove.
Declared on: line 1174 of Lua/dialogs/edit_room.lua.
function UIEditRoom:onMouseUp(button, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| button | ? | ? |
| x | ? | ? |
| y | ? | ? |
Overrides: UIPlaceObjects:onMouseUp.
Declared on: line 1160 of Lua/dialogs/edit_room.lua.
function UIEditRoom:onTick()
Overrides: Window:onTick.
Declared on: line 287 of Lua/dialogs/edit_room.lua.
function UIEditRoom:pickupItems()
callback for item pick up button
Overrides: UIPlaceObjects:pickupItems.
Declared on: line 562 of Lua/dialogs/edit_room.lua.
function UIEditRoom:placeObject()
Overrides: UIPlaceObjects:placeObject.
Declared on: line 1657 of Lua/dialogs/edit_room.lua.
function UIEditRoom:purchaseItems()
Overrides: UIPlaceObjects:purchaseItems.
Declared on: line 522 of Lua/dialogs/edit_room.lua.
function UIEditRoom:registerKeyHandlers()
Overrides: UIPlaceObjects:registerKeyHandlers.
Declared on: line 93 of Lua/dialogs/edit_room.lua.
function UIEditRoom:removeRoom(save_objects, room, world)
Parameters:
| Name | Type | Description |
|---|---|---|
| save_objects | ? | ? |
| room | ? | ? |
| world | ? | ? |
Declared on: line 640 of Lua/dialogs/edit_room.lua.
function UIEditRoom:returnToWallPhase(early)
Parameters:
| Name | Type | Description |
|---|---|---|
| early | ? | ? |
Declared on: line 585 of Lua/dialogs/edit_room.lua.
function UIEditRoom:screenToWall(x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
Declared on: line 722 of Lua/dialogs/edit_room.lua.
function UIEditRoom:setBlueprintRect(x, y, w, h)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
| w | ? | ? |
| h | ? | ? |
Declared on: line 1180 of Lua/dialogs/edit_room.lua.
function UIEditRoom:setDoorBlueprint(orig_x, orig_y, orig_wall)
Parameters:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| 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.