From fca851822e2f3138d0e15c93768ebc4937a0b23a Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Fri, 13 Mar 2026 15:36:41 -0400 Subject: Moving entities; deleting entities --- src/room_editor.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/room_editor.lua b/src/room_editor.lua index 01d5c90..1aee150 100644 --- a/src/room_editor.lua +++ b/src/room_editor.lua @@ -185,6 +185,23 @@ local brushes = { table.insert(room_editor.placed_entities, ent) room_editor.selected_ent = #room_editor.placed_entities end + elseif is_input_pressed("Left_Click") then + local selected_ent = get_selected_entity(room_editor) + if selected_ent then + mx, my = get_snapped_to_grid(room_editor, mx, my) + selected_ent.x = mx + selected_ent.y = my + end + end + + if is_input_just_pressed("Delete") then + local selected_ent = get_selected_entity(room_editor) + if selected_ent then + queue_entity_kill(selected_ent) + room_editor.placed_entities[room_editor.selected_ent] = + table.remove(room_editor.placed_entities) + room_editor.selected_ent = -1 + end end end } -- cgit v1.3-2-g0d8e