Building creation done

This commit is contained in:
2024-09-16 01:37:41 +03:00
parent d5ad5bac8c
commit e971020cb3
4 changed files with 104 additions and 24 deletions

View File

@@ -31,6 +31,15 @@ func _ready():
$"%line_cursor".hide()
# $"%building_type".connect("item_selected", self, "change_building_type")
var ignore_events = [
"result:get_closest_building",
"mouse_drag",
"mouse_press",
"mouse_drag_on",
"mouse_drag_off",
"line_cursor_motion",
"button:create_building"
]
func editor_event(evname: String, args: Array):
print(evname, args)
if evname == "mode_change_pre":
@@ -48,10 +57,6 @@ func editor_event(evname: String, args: Array):
$WorldEditor.editor_command("get_building_types", [])
elif mode_next == 6:
$WorldEditor.editor_command("get_lines_list", [])
elif evname == "result:get_closest_building":
pass
# print(evname, args)
# select_building(args[0], args[3], args[4])
elif evname == "result:get_building_types":
print(evname, args)
var btypes = args[0]
@@ -63,17 +68,7 @@ func editor_event(evname: String, args: Array):
$Area.global_transform.origin.z = $Camera.global_transform.origin.z
# elif evname == "edit_update_building":
# check_edit_building()
elif evname == "mouse_press":
pass
# mouse_press(args[0])
elif evname == "mouse_drag":
pass
# mouse_drag(args[0])
elif evname == "mouse_drag_on":
pass
elif evname == "mouse_drag_off":
pass
elif evname == "line_cursor_motion":
elif evname in ignore_events:
pass
else:
breakpoint