[gd_scene load_steps=8 format=2] [ext_resource path="res://main/building_layout_editor.gd" type="Script" id=1] [ext_resource path="res://astream/building-layouts/building-elements.glb" type="PackedScene" id=2] [sub_resource type="SpatialMaterial" id=2] flags_transparent = true flags_unshaded = true albedo_color = Color( 0.745098, 0.105882, 0.105882, 0.192157 ) [sub_resource type="CubeMesh" id=3] material = SubResource( 2 ) size = Vector3( 4, 8, 4 ) [sub_resource type="SpatialMaterial" id=4] flags_transparent = true flags_unshaded = true flags_do_not_receive_shadows = true albedo_color = Color( 1, 1, 1, 0.462745 ) [sub_resource type="CubeMesh" id=1] material = SubResource( 4 ) size = Vector3( 40, 1, 40 ) [sub_resource type="BoxShape" id=5] extents = Vector3( 20, 1, 20 ) [node name="building_layout_editor" type="Spatial"] script = ExtResource( 1 ) [node name="menu_panel" type="HBoxContainer" parent="."] unique_name_in_owner = true margin_right = 1024.0 margin_bottom = 20.0 [node name="FileMenu" type="MenuButton" parent="menu_panel"] margin_right = 35.0 margin_bottom = 20.0 text = "File" items = [ "Save", null, 0, false, false, 100, 0, null, "", false, "Build Mesh Library", null, 0, false, false, 101, 0, null, "", false ] switch_on_hover = true [node name="ElementMenu" type="MenuButton" parent="menu_panel"] margin_left = 39.0 margin_right = 104.0 margin_bottom = 20.0 focus_mode = 2 text = "Element" items = [ "Layout...", null, 0, false, false, 200, 0, null, "", false, "Element types...", null, 0, false, false, 201, 0, null, "", false, "Elements...", null, 0, false, false, 202, 0, null, "", false, "", null, 0, false, true, 3, 0, null, "", true ] switch_on_hover = true [node name="ExteriorMenu" type="MenuButton" parent="menu_panel"] margin_left = 108.0 margin_right = 169.0 margin_bottom = 20.0 focus_mode = 2 text = "Exterior" switch_on_hover = true [node name="InteriorMenu" type="MenuButton" parent="menu_panel"] margin_left = 173.0 margin_right = 233.0 margin_bottom = 20.0 focus_mode = 2 text = "Interior" switch_on_hover = true [node name="Automata" type="MenuButton" parent="menu_panel"] margin_left = 237.0 margin_right = 311.0 margin_bottom = 20.0 focus_mode = 2 text = "Automata" switch_on_hover = true [node name="bg_floor" type="Spatial" parent="."] unique_name_in_owner = true [node name="DirectionalLight" type="DirectionalLight" parent="."] transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 100, 0 ) [node name="camera_rot" type="Spatial" parent="."] unique_name_in_owner = true [node name="Camera" type="Camera" parent="camera_rot"] transform = Transform( 0.707107, 0.5, -0.5, 0, 0.707107, 0.707107, 0.707107, -0.5, 0.5, -16, 23, 30 ) [node name="VBoxContainer" type="VBoxContainer" parent="."] anchor_left = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 margin_left = -314.0 [node name="HSeparator2" type="HSeparator" parent="VBoxContainer"] margin_right = 314.0 margin_bottom = 4.0 [node name="Label" type="Label" parent="VBoxContainer"] margin_top = 8.0 margin_right = 314.0 margin_bottom = 22.0 text = "Properties" [node name="HSeparator" type="HSeparator" parent="VBoxContainer"] margin_top = 26.0 margin_right = 314.0 margin_bottom = 30.0 [node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"] margin_top = 34.0 margin_right = 314.0 margin_bottom = 134.0 rect_min_size = Vector2( 0, 100 ) size_flags_vertical = 3 scroll_horizontal_enabled = false [node name="layout_mesh_buttons" type="VBoxContainer" parent="VBoxContainer/ScrollContainer"] unique_name_in_owner = true margin_right = 314.0 margin_bottom = 100.0 rect_min_size = Vector2( 100, 0 ) size_flags_horizontal = 3 size_flags_vertical = 3 [node name="NavPanel" type="NavPanel" parent="VBoxContainer"] margin_top = 138.0 margin_right = 314.0 margin_bottom = 186.0 flags = 12 [node name="socket_editor" type="PanelContainer" parent="VBoxContainer"] unique_name_in_owner = true margin_top = 190.0 margin_right = 314.0 margin_bottom = 496.0 [node name="v" type="VBoxContainer" parent="VBoxContainer/socket_editor"] margin_left = 7.0 margin_top = 7.0 margin_right = 307.0 margin_bottom = 299.0 [node name="socket_new_element" type="Button" parent="VBoxContainer/socket_editor/v"] unique_name_in_owner = true margin_right = 300.0 margin_bottom = 20.0 text = "New Element Type" [node name="socket_new_element_name" type="LineEdit" parent="VBoxContainer/socket_editor/v"] unique_name_in_owner = true margin_top = 24.0 margin_right = 300.0 margin_bottom = 48.0 [node name="element_type_list" type="ItemList" parent="VBoxContainer/socket_editor/v"] unique_name_in_owner = true margin_top = 52.0 margin_right = 300.0 margin_bottom = 112.0 rect_min_size = Vector2( 0, 60 ) items = [ "Item 0", null, false, "Item 1", null, false, "Item 2", null, false, "Item 3", null, false ] [node name="socket_list" type="ItemList" parent="VBoxContainer/socket_editor/v"] unique_name_in_owner = true margin_top = 116.0 margin_right = 300.0 margin_bottom = 176.0 rect_min_size = Vector2( 0, 60 ) items = [ "floor", null, false, "west_wall", null, false, "east_wall", null, false, "north_wall", null, false, "south_wall", null, false, "diagonal_wall", null, false, "diagonal2_wall", null, false ] [node name="socket_transform_editor" type="VBoxContainer" parent="VBoxContainer/socket_editor/v"] unique_name_in_owner = true margin_top = 180.0 margin_right = 300.0 margin_bottom = 268.0 [node name="offset_label" type="Label" parent="VBoxContainer/socket_editor/v/socket_transform_editor"] margin_right = 300.0 margin_bottom = 14.0 text = "Offset" [node name="socket_editor_offset_base" type="HBoxContainer" parent="VBoxContainer/socket_editor/v/socket_transform_editor"] unique_name_in_owner = true margin_top = 18.0 margin_right = 300.0 margin_bottom = 42.0 [node name="x_label" type="Label" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_offset_base"] margin_top = 5.0 margin_right = 8.0 margin_bottom = 19.0 text = "X" [node name="x_edit" type="LineEdit" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_offset_base"] margin_left = 12.0 margin_right = 85.0 margin_bottom = 24.0 size_flags_horizontal = 3 [node name="y_label" type="Label" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_offset_base"] margin_left = 89.0 margin_top = 5.0 margin_right = 96.0 margin_bottom = 19.0 text = "Y" [node name="y_edit" type="LineEdit" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_offset_base"] margin_left = 100.0 margin_right = 174.0 margin_bottom = 24.0 size_flags_horizontal = 3 [node name="z_label" type="Label" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_offset_base"] margin_left = 178.0 margin_top = 5.0 margin_right = 186.0 margin_bottom = 19.0 text = "Z" [node name="z_edit" type="LineEdit" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_offset_base"] margin_left = 190.0 margin_right = 263.0 margin_bottom = 24.0 size_flags_horizontal = 3 [node name="set" type="Button" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_offset_base"] margin_left = 267.0 margin_right = 299.0 margin_bottom = 24.0 text = "Set" [node name="rotation_label" type="Label" parent="VBoxContainer/socket_editor/v/socket_transform_editor"] margin_top = 46.0 margin_right = 300.0 margin_bottom = 60.0 text = "Rotation" [node name="socket_editor_rotation_base" type="HBoxContainer" parent="VBoxContainer/socket_editor/v/socket_transform_editor"] unique_name_in_owner = true margin_top = 64.0 margin_right = 300.0 margin_bottom = 88.0 [node name="x_label" type="Label" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_rotation_base"] margin_top = 5.0 margin_right = 8.0 margin_bottom = 19.0 text = "X" [node name="x_edit" type="LineEdit" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_rotation_base"] margin_left = 12.0 margin_right = 85.0 margin_bottom = 24.0 size_flags_horizontal = 3 [node name="y_label" type="Label" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_rotation_base"] margin_left = 89.0 margin_top = 5.0 margin_right = 96.0 margin_bottom = 19.0 text = "Y" [node name="y_edit" type="LineEdit" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_rotation_base"] margin_left = 100.0 margin_right = 174.0 margin_bottom = 24.0 size_flags_horizontal = 3 [node name="z_label" type="Label" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_rotation_base"] margin_left = 178.0 margin_top = 5.0 margin_right = 186.0 margin_bottom = 19.0 text = "Z" [node name="z_edit" type="LineEdit" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_rotation_base"] margin_left = 190.0 margin_right = 263.0 margin_bottom = 24.0 size_flags_horizontal = 3 [node name="set" type="Button" parent="VBoxContainer/socket_editor/v/socket_transform_editor/socket_editor_rotation_base"] margin_left = 267.0 margin_right = 299.0 margin_bottom = 24.0 text = "Set" [node name="test_element" type="OptionButton" parent="VBoxContainer/socket_editor/v"] unique_name_in_owner = true margin_top = 272.0 margin_right = 300.0 margin_bottom = 292.0 [node name="element_editor" type="PanelContainer" parent="VBoxContainer"] unique_name_in_owner = true margin_top = 500.0 margin_right = 314.0 margin_bottom = 767.0 [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/element_editor"] margin_left = 7.0 margin_top = 7.0 margin_right = 307.0 margin_bottom = 260.0 [node name="element_new_element" type="Button" parent="VBoxContainer/element_editor/VBoxContainer"] unique_name_in_owner = true margin_right = 300.0 margin_bottom = 20.0 text = "New element" [node name="element_new_element_name" type="LineEdit" parent="VBoxContainer/element_editor/VBoxContainer"] unique_name_in_owner = true margin_top = 24.0 margin_right = 300.0 margin_bottom = 48.0 [node name="element_list" type="ItemList" parent="VBoxContainer/element_editor/VBoxContainer"] unique_name_in_owner = true margin_top = 52.0 margin_right = 300.0 margin_bottom = 97.0 rect_min_size = Vector2( 0, 45 ) [node name="element_type_select" type="OptionButton" parent="VBoxContainer/element_editor/VBoxContainer"] unique_name_in_owner = true margin_top = 101.0 margin_right = 300.0 margin_bottom = 121.0 [node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/element_editor/VBoxContainer"] margin_top = 125.0 margin_right = 300.0 margin_bottom = 253.0 rect_min_size = Vector2( 300, 128 ) size_flags_horizontal = 3 [node name="element_mesh_select" type="GridContainer" parent="VBoxContainer/element_editor/VBoxContainer/ScrollContainer"] unique_name_in_owner = true margin_right = 300.0 margin_bottom = 128.0 size_flags_horizontal = 3 size_flags_vertical = 3 columns = 2 [node name="layout_editor" type="PanelContainer" parent="VBoxContainer"] unique_name_in_owner = true margin_top = 771.0 margin_right = 314.0 margin_bottom = 1135.0 [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/layout_editor"] margin_left = 7.0 margin_top = 7.0 margin_right = 307.0 margin_bottom = 357.0 [node name="GridContainer" type="GridContainer" parent="VBoxContainer/layout_editor/VBoxContainer"] margin_right = 300.0 margin_bottom = 44.0 columns = 2 [node name="Label" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer/GridContainer"] margin_top = 3.0 margin_right = 54.0 margin_bottom = 17.0 text = "element" [node name="grid_elements" type="OptionButton" parent="VBoxContainer/layout_editor/VBoxContainer/GridContainer"] unique_name_in_owner = true margin_left = 58.0 margin_right = 95.0 margin_bottom = 20.0 [node name="Label2" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer/GridContainer"] margin_top = 27.0 margin_right = 54.0 margin_bottom = 41.0 text = "rotation" [node name="select_rotation" type="OptionButton" parent="VBoxContainer/layout_editor/VBoxContainer/GridContainer"] unique_name_in_owner = true margin_left = 58.0 margin_top = 24.0 margin_right = 95.0 margin_bottom = 44.0 text = "0" items = [ "0", null, false, 0, null, "90", null, false, 1, null, "180", null, false, 2, null, "270", null, false, 3, null ] selected = 0 [node name="clear_grid_cell" type="Button" parent="VBoxContainer/layout_editor/VBoxContainer"] unique_name_in_owner = true margin_top = 48.0 margin_right = 300.0 margin_bottom = 68.0 text = "Clear cell" [node name="growth" type="HBoxContainer" parent="VBoxContainer/layout_editor/VBoxContainer"] margin_top = 72.0 margin_right = 300.0 margin_bottom = 92.0 [node name="grow_cell_button" type="Button" parent="VBoxContainer/layout_editor/VBoxContainer/growth"] unique_name_in_owner = true margin_right = 45.0 margin_bottom = 20.0 text = "Grow" [node name="grow_cell_style" type="OptionButton" parent="VBoxContainer/layout_editor/VBoxContainer/growth"] unique_name_in_owner = true margin_left = 49.0 margin_right = 123.0 margin_bottom = 20.0 text = "normal" items = [ "normal", null, false, 0, null, "side", null, false, 1, null ] selected = 0 [node name="HSeparator" type="HSeparator" parent="VBoxContainer/layout_editor/VBoxContainer"] margin_top = 96.0 margin_right = 300.0 margin_bottom = 100.0 [node name="make_room" type="GridContainer" parent="VBoxContainer/layout_editor/VBoxContainer"] margin_top = 104.0 margin_right = 300.0 margin_bottom = 252.0 columns = 2 [node name="Label" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] margin_top = 3.0 margin_right = 87.0 margin_bottom = 17.0 text = "corner" [node name="grid_elements_corner" type="OptionButton" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] unique_name_in_owner = true margin_left = 91.0 margin_right = 165.0 margin_bottom = 20.0 [node name="Label2" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] margin_top = 27.0 margin_right = 87.0 margin_bottom = 41.0 text = "side" [node name="grid_elements_side" type="OptionButton" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] unique_name_in_owner = true margin_left = 91.0 margin_top = 24.0 margin_right = 165.0 margin_bottom = 44.0 [node name="Label3" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] margin_top = 51.0 margin_right = 87.0 margin_bottom = 65.0 text = "floor" [node name="grid_elements_floor" type="OptionButton" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] unique_name_in_owner = true margin_left = 91.0 margin_top = 48.0 margin_right = 165.0 margin_bottom = 68.0 [node name="Label4" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] margin_top = 77.0 margin_right = 87.0 margin_bottom = 91.0 text = "width" [node name="make_room_width" type="SpinBox" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] unique_name_in_owner = true margin_left = 91.0 margin_top = 72.0 margin_right = 165.0 margin_bottom = 96.0 min_value = 1.0 value = 1.0 [node name="Label5" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] margin_top = 105.0 margin_right = 87.0 margin_bottom = 119.0 text = "depth" [node name="make_room_depth" type="SpinBox" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] unique_name_in_owner = true margin_left = 91.0 margin_top = 100.0 margin_right = 165.0 margin_bottom = 124.0 min_value = 1.0 value = 1.0 [node name="make_room_button" type="Button" parent="VBoxContainer/layout_editor/VBoxContainer/make_room"] unique_name_in_owner = true margin_top = 128.0 margin_right = 87.0 margin_bottom = 148.0 text = "Make Room" [node name="Label" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer"] margin_top = 256.0 margin_right = 300.0 margin_bottom = 270.0 text = "Level" [node name="level_value" type="SpinBox" parent="VBoxContainer/layout_editor/VBoxContainer"] unique_name_in_owner = true margin_top = 274.0 margin_right = 300.0 margin_bottom = 298.0 [node name="g" type="GridContainer" parent="VBoxContainer/layout_editor/VBoxContainer"] margin_top = 302.0 margin_right = 300.0 margin_bottom = 350.0 columns = 2 [node name="Label2" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer/g"] margin_top = 3.0 margin_right = 82.0 margin_bottom = 17.0 text = "Select layout" [node name="layout_selector" type="OptionButton" parent="VBoxContainer/layout_editor/VBoxContainer/g"] unique_name_in_owner = true margin_left = 86.0 margin_right = 300.0 margin_bottom = 20.0 size_flags_horizontal = 3 [node name="Label" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer/g"] margin_top = 29.0 margin_right = 82.0 margin_bottom = 43.0 text = "New layout" [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/layout_editor/VBoxContainer/g"] margin_left = 86.0 margin_top = 24.0 margin_right = 300.0 margin_bottom = 48.0 [node name="layout_create_new" type="LineEdit" parent="VBoxContainer/layout_editor/VBoxContainer/g/HBoxContainer"] unique_name_in_owner = true margin_right = 157.0 margin_bottom = 24.0 size_flags_horizontal = 3 [node name="layout_create_new_button" type="Button" parent="VBoxContainer/layout_editor/VBoxContainer/g/HBoxContainer"] unique_name_in_owner = true margin_left = 161.0 margin_right = 214.0 margin_bottom = 24.0 text = "Create" [node name="BuildingLayoutEditor" type="BuildingLayoutEditor" parent="."] source = ExtResource( 2 ) [node name="refcube" type="Spatial" parent="."] unique_name_in_owner = true [node name="refcube" type="MeshInstance" parent="refcube"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0 ) mesh = SubResource( 3 ) skeleton = NodePath("../..") [node name="bg_floor_base" type="Spatial" parent="."] unique_name_in_owner = true [node name="bg_floor_mi" type="MeshInstance" parent="bg_floor_base"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, -0.5, -2 ) mesh = SubResource( 1 ) skeleton = NodePath("../..") [node name="Area" type="Area" parent="bg_floor_base/bg_floor_mi"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0 ) collision_layer = 49152 collision_mask = 49152 monitoring = false [node name="CollisionShape" type="CollisionShape" parent="bg_floor_base/bg_floor_mi/Area"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 ) shape = SubResource( 5 )