create_test_player{name=…} | → LuaPlayer | |
get_slot_position{inventory_index=…, slot_index=…, inventory?=…} | → MapPosition? | |
get_widget_position{type=…, data?=…, data2?=…} | → MapPosition? | |
activate_rail_planner{position?=…, ghost_mode?=…, build_mode?=…} | Activate the rail planner at the given position. | |
Activate the rail planner at the given position. | ||
deactivate_rail_planner() | Deactivate the rail planner. | |
Deactivate the rail planner. | ||
move_cursor{position=…, speed?=…} | → boolean | Move the cursor towards the given position at the given speed. |
Move the cursor towards the given position at the given speed. | ||
mouse_down() | Send a left mouse button-down event at its current position. | |
Send a left mouse button-down event at its current position. | ||
mouse_up() | Send a left mouse button-up event at its current position. | |
Send a left mouse button-up event at its current position. | ||
mouse_click() | Send a left mouse button click event at its current position. [...] | |
Send a left mouse button click event at its current position. [...] | ||
control_down{control=…, notify=…} | Send a control press event at the current cursor position. | |
Send a control press event at the current cursor position. | ||
control_up{control=…} | Send a control release event at the current cursor position. | |
Send a control release event at the current cursor position. | ||
control_press{control=…, notify=…} | Send a control down and up event at the current cursor position. [...] | |
Send a control down and up event at the current cursor position. [...] | ||
write{text?=…} | Write text as if it was typed by a player. [...] | |
Write text as if it was typed by a player. [...] | ||
scroll_clipboard_forwards() | Scroll the clipboard forwards by one entry. | |
Scroll the clipboard forwards by one entry. | ||
scroll_clipboard_backwards() | Scroll the clipboard backwards by one entry. | |
Scroll the clipboard backwards by one entry. | ||
camera_player_cursor_position | :: RW MapPosition? | |
camera_position | :: RW MapPosition? | |
camera_surface_index | :: RW uint? | |
hide_cursor | :: W boolean | |
camera_zoom | :: W double | |
camera_player | :: W PlayerIdentification | |
camera_player_cursor_direction | :: W defines.direction | |
camera_alt_info | :: W boolean | |
smart_belt_building | :: W boolean? | |
gui_tooltip_interval | :: W double | |
active_quickbars | :: W uint8 | |
valid | :: R boolean | Is this object valid? [...] |
Is this object valid? [...] | ||
object_name | :: R string | The class name of this object. [...] |
The class name of this object. [...] |
inventory_index | :: InventoryIndex | |
slot_index | :: ItemStackIndex | |
inventory | :: "character" or "entity" ? | Defaults to |
Defaults to |
→ MapPosition? | Position of the GUI slot on the screen, if successfully found. |
type | :: SimulationWidgetType | |
data | :: string? | |
data2 | :: string? |
→ MapPosition? | Center of the GUI widget on the screen, if successfully found. |
position | :: MapPosition? | |
ghost_mode | :: boolean? | Defaults to |
Defaults to | ||
build_mode | :: defines.build_mode? | Defaults to normal. |
Defaults to normal. |
position | :: MapPosition | |
speed | :: double? | Defaults to |
Defaults to |
→ boolean | Whether the cursor will reach the target position with this move. |
control | :: string | The name of the control input to release. |
The name of the control input to release. |
text | :: string? | The text to write. Does nothing if no text is provided. |
The text to write. Does nothing if no text is provided. |