diff --git a/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_CoastalOak_Proxy.uasset b/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_CoastalOak_Proxy.uasset index 1c92341..9fdef29 100644 --- a/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_CoastalOak_Proxy.uasset +++ b/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_CoastalOak_Proxy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e877e10c36033c95a37690c722428f3bbcbbe9fe4f3fcd2b41a821776de1b4c6 -size 71776 +oid sha256:8073779556f523abc987f11844b95e2a9e0e2b1cc08161b8c081caa5ceeea40f +size 75672 diff --git a/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_CoyoteBrush_Proxy.uasset b/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_CoyoteBrush_Proxy.uasset index 16e3826..5cc4aa0 100644 --- a/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_CoyoteBrush_Proxy.uasset +++ b/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_CoyoteBrush_Proxy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b6eb23c08fb6b5f8fb378669378e8e2d3c143031e719063e8e31a3a07e8c50b -size 71226 +oid sha256:1ed1cb3c616b710bc92ee8b50a0f7dcb39a323a9f80e4b0c585dec48286e6ec7 +size 72391 diff --git a/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_DryGrassClump_Proxy.uasset b/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_DryGrassClump_Proxy.uasset index 697d74a..2a688e1 100644 --- a/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_DryGrassClump_Proxy.uasset +++ b/Content/Agrarian/Environment/Vegetation/SM_AGR_GZ_DryGrassClump_Proxy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a20fbd4474b59bbccc04178c77843a5f8eae67b1b9aaaa1c51a3d1fa81b9553 -size 69466 +oid sha256:a7aff53c847a2880ea532741d1e1b792c8bf8f90e3d304cb78793833d0d0e8c2 +size 69828 diff --git a/Content/Agrarian/Maps/L_GroundZeroTerrain_Test.umap b/Content/Agrarian/Maps/L_GroundZeroTerrain_Test.umap index e466598..b40f0bc 100644 --- a/Content/Agrarian/Maps/L_GroundZeroTerrain_Test.umap +++ b/Content/Agrarian/Maps/L_GroundZeroTerrain_Test.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:67515c3433eec0ed8ca6687f1e47d7f4ccda7cdfe796691a24bce47794bb7e19 -size 7603792 +oid sha256:0db13e59cfa6c3eb7b954e3c52636270e2f4adc2723640193f71fa202edec7f2 +size 7603802 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_EdiblePlant_Resource.uasset b/Content/Agrarian/Materials/M_AGR_GZ_EdiblePlant_Resource.uasset index 263a682..2e861bb 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_EdiblePlant_Resource.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_EdiblePlant_Resource.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f2773ae85b6cca1725ef7849e1e9a1257fe3917032e2ae00ad676761c40ed68 +oid sha256:5e65d9d0015697f2e8b66fa7a909ed82eca29bc81c6b9e96ca775078471208e2 size 5453 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Fiber_Resource.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Fiber_Resource.uasset index 918aaec..69851f5 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Fiber_Resource.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Fiber_Resource.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a613178a328291958b06ed286951048a006e6e4e285f5989e59cd6be8ce7283 +oid sha256:16cd25b870f184afead7b777cbd06369ccbe1c54db8bf1799da532bef4df688d size 5417 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_FreshWater.uasset b/Content/Agrarian/Materials/M_AGR_GZ_FreshWater.uasset index 510c574..58873a1 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_FreshWater.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_FreshWater.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e95eb71e9563507319db68256d9e5910ea05824f35d124a6033ca8eafa0c5b7c +oid sha256:43b7f60d16d476ab3399c913b04dbddea810bded2a3c594d78ceaa66b2dfb19a size 5393 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Grass_DryCoastal.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Grass_DryCoastal.uasset index fa6970f..3227c5a 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Grass_DryCoastal.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Grass_DryCoastal.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:047f67d751c004620548dae3b555d98b932b61998b761ddd84f59fd1d213d2ec -size 7622 +oid sha256:0002421b4dfccd91843529a3088ce0d1b09c629adf123bdd191c20aff3d815f2 +size 7915 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Shrub_CoyoteBrush.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Shrub_CoyoteBrush.uasset index 1c0b197..532fa90 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Shrub_CoyoteBrush.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Shrub_CoyoteBrush.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d93bba5d931414df60e5a2074110262052de838675b96430e32e9c12a56d445 -size 7628 +oid sha256:abc8e551c235a0fbc9c269d6a9f5228b3a17d1f731ee31cc4870715784f688b5 +size 7921 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Stone_Sandstone.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Stone_Sandstone.uasset index e528c5d..f2e8e2d 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Stone_Sandstone.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Stone_Sandstone.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2809e88b1eb9e1ae38e9b1bb7e267f87c60e848a833f0c29d2706a676ee931ff +oid sha256:d66b128ae6b755acdc65cc0068c02d996bf77cfdb56a088c5b0f484e0d7e909a size 5423 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Terrain_CoastalScrub.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Terrain_CoastalScrub.uasset index c664127..36b920f 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Terrain_CoastalScrub.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Terrain_CoastalScrub.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2853e81d3ace2c5d5f57ea749c288fd8aa3183af21ea5601b0f08ef42c0f5ecd -size 11058 +oid sha256:5b8fc574d82c409e75f71f8e4ca3da8e6d742e32af0a2b739ec791624025e2e5 +size 11380 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Tree_CoastalOak.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Tree_CoastalOak.uasset index 06e5a62..3f9e200 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Tree_CoastalOak.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Tree_CoastalOak.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da2e021f26aa800d6160ba77af0c8a7df37a503c6c39a52fa804f16e66d436c5 -size 7574 +oid sha256:97e5e8631b23006d90febcdee2967998a0f5290750c9eee3bbeb0181a5614f21 +size 7867 diff --git a/Content/Agrarian/Materials/M_AGR_GZ_Wood_Resource.uasset b/Content/Agrarian/Materials/M_AGR_GZ_Wood_Resource.uasset index 373eb2f..2b6d712 100644 --- a/Content/Agrarian/Materials/M_AGR_GZ_Wood_Resource.uasset +++ b/Content/Agrarian/Materials/M_AGR_GZ_Wood_Resource.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:741c82c4562ba17b612f2149fb530612830c439d298d81e2bedcc84e7390a396 +oid sha256:c1bca562b74c545c7331e6f0fcea62da894a97959041cb616cbea723587d3421 size 5411 diff --git a/Scripts/setup_ground_zero_demo_map.py b/Scripts/setup_ground_zero_demo_map.py index 3ed0575..325719d 100644 --- a/Scripts/setup_ground_zero_demo_map.py +++ b/Scripts/setup_ground_zero_demo_map.py @@ -847,6 +847,50 @@ def add_leaf_card(vertices, faces, center, width, height, yaw_degrees, lean_degr faces.append((base + 0, base + 1, base + 2, base + 3)) +def add_irregular_leaf_card(vertices, faces, center, width, height, yaw_degrees, lean_degrees=0.0, pinch=0.18): + yaw = math.radians(yaw_degrees) + lean = math.radians(lean_degrees) + right = (math.cos(yaw) * width * 0.5, math.sin(yaw) * width * 0.5, 0.0) + up_offset = (math.sin(lean) * height * 0.35, 0.0, math.cos(lean) * height) + cx, cy, cz = center + base = len(vertices) + vertices.extend( + [ + (cx - right[0] * 0.86, cy - right[1] * 0.86, cz), + (cx + right[0] * 0.92, cy + right[1] * 0.92, cz + height * 0.08), + (cx + right[0] * pinch + up_offset[0], cy + right[1] * pinch + up_offset[1], cz + up_offset[2]), + (cx - right[0] * 0.68 + up_offset[0] * 0.55, cy - right[1] * 0.68 + up_offset[1] * 0.55, cz + up_offset[2] * 0.58), + ] + ) + faces.append((base + 0, base + 1, base + 2, base + 3)) + + +def add_tapered_cylinder(vertices, faces, base_center, height, base_radius, top_radius, segments=9, yaw_offset_degrees=0.0, top_offset=(0.0, 0.0)): + bx, by, bz = base_center + yaw_offset = math.radians(yaw_offset_degrees) + base_indices = [] + top_indices = [] + for index in range(segments): + angle = yaw_offset + (math.tau * index) / segments + cos_a = math.cos(angle) + sin_a = math.sin(angle) + base_indices.append(len(vertices)) + vertices.append((bx + cos_a * base_radius, by + sin_a * base_radius, bz)) + top_indices.append(len(vertices)) + vertices.append((bx + top_offset[0] + cos_a * top_radius, by + top_offset[1] + sin_a * top_radius, bz + height)) + + base_center_index = len(vertices) + vertices.append((bx, by, bz)) + top_center_index = len(vertices) + vertices.append((bx + top_offset[0], by + top_offset[1], bz + height)) + + for index in range(segments): + next_index = (index + 1) % segments + faces.append((base_indices[index], base_indices[next_index], top_indices[next_index], top_indices[index])) + faces.append((base_center_index, base_indices[index], base_indices[next_index])) + faces.append((top_center_index, top_indices[next_index], top_indices[index])) + + def add_low_poly_ellipsoid(vertices, faces, center, radius_x, radius_y, radius_z, segments=10): cx, cy, cz = center top_index = len(vertices) @@ -876,33 +920,44 @@ def add_low_poly_ellipsoid(vertices, faces, center, radius_x, radius_y, radius_z def coastal_oak_mesh(): vertices = [] faces = [] - add_box(vertices, faces, (0.0, 0.0, 140.0), (36.0, 30.0, 280.0)) - add_box(vertices, faces, (-34.0, 14.0, 250.0), (18.0, 16.0, 125.0)) - add_box(vertices, faces, (42.0, -12.0, 275.0), (18.0, 16.0, 115.0)) - add_low_poly_ellipsoid(vertices, faces, (0.0, 0.0, 350.0), 150.0, 125.0, 105.0) - add_low_poly_ellipsoid(vertices, faces, (-95.0, 30.0, 320.0), 105.0, 82.0, 78.0) - add_low_poly_ellipsoid(vertices, faces, (95.0, -20.0, 330.0), 112.0, 88.0, 82.0) + add_tapered_cylinder(vertices, faces, (0.0, 0.0, 0.0), 275.0, 23.0, 12.0, 11, 8.0, (18.0, -10.0)) + add_tapered_cylinder(vertices, faces, (-8.0, 2.0, 180.0), 145.0, 12.0, 6.0, 8, 21.0, (-86.0, 36.0)) + add_tapered_cylinder(vertices, faces, (12.0, -4.0, 205.0), 150.0, 11.0, 5.5, 8, 12.0, (92.0, -42.0)) + add_tapered_cylinder(vertices, faces, (5.0, 0.0, 235.0), 120.0, 9.0, 5.0, 8, 44.0, (22.0, 90.0)) + for center, rx, ry, rz, segments in ( + ((0.0, 4.0, 362.0), 165.0, 126.0, 86.0, 13), + ((-108.0, 38.0, 330.0), 116.0, 82.0, 66.0, 11), + ((105.0, -34.0, 342.0), 122.0, 88.0, 70.0, 11), + ((24.0, 106.0, 330.0), 88.0, 70.0, 58.0, 9), + ): + add_low_poly_ellipsoid(vertices, faces, center, rx, ry, rz, segments) + for yaw in (8.0, 52.0, 96.0, 141.0): + add_irregular_leaf_card(vertices, faces, (0.0, 0.0, 285.0), 235.0, 150.0, yaw, 6.0, 0.3) return vertices, faces def coyote_brush_mesh(): vertices = [] faces = [] - for yaw in (0.0, 35.0, 82.0, 128.0, 171.0): - add_leaf_card(vertices, faces, (0.0, 0.0, 0.0), 190.0, 145.0, yaw, 8.0) - add_low_poly_ellipsoid(vertices, faces, (-32.0, 18.0, 78.0), 92.0, 68.0, 56.0, 8) - add_low_poly_ellipsoid(vertices, faces, (48.0, -16.0, 70.0), 86.0, 70.0, 50.0, 8) - add_low_poly_ellipsoid(vertices, faces, (0.0, 42.0, 62.0), 78.0, 52.0, 45.0, 8) + for yaw in (0.0, 27.0, 55.0, 88.0, 122.0, 156.0): + add_irregular_leaf_card(vertices, faces, (0.0, 0.0, 0.0), 170.0, 132.0, yaw, 10.0, 0.24) + for center, rx, ry, rz in ( + ((-38.0, 18.0, 72.0), 88.0, 62.0, 45.0), + ((45.0, -22.0, 68.0), 82.0, 66.0, 42.0), + ((0.0, 45.0, 62.0), 72.0, 48.0, 37.0), + ((18.0, -56.0, 58.0), 62.0, 44.0, 32.0), + ): + add_low_poly_ellipsoid(vertices, faces, center, rx, ry, rz, 9) return vertices, faces def dry_grass_clump_mesh(): vertices = [] faces = [] - for index, yaw in enumerate((0.0, 22.0, 47.0, 76.0, 111.0, 146.0, 178.0)): + for index, yaw in enumerate((0.0, 16.0, 31.0, 49.0, 73.0, 97.0, 121.0, 148.0, 172.0)): width = 18.0 + (index % 3) * 4.0 height = 95.0 + (index % 4) * 14.0 - add_leaf_card(vertices, faces, (0.0, 0.0, 0.0), width, height, yaw, -5.0 + (index % 3) * 5.0) + add_irregular_leaf_card(vertices, faces, (0.0, 0.0, 0.0), width, height, yaw, -8.0 + (index % 3) * 6.0, 0.08) return vertices, faces diff --git a/Scripts/verify_mvp_menu_input_and_quit_flow.py b/Scripts/verify_mvp_menu_input_and_quit_flow.py index 047e473..782258b 100644 --- a/Scripts/verify_mvp_menu_input_and_quit_flow.py +++ b/Scripts/verify_mvp_menu_input_and_quit_flow.py @@ -24,8 +24,11 @@ EXPECTED = { "Saving World", "ConsoleCommand(TEXT(\"AgrarianSaveWorld\"))", "ConsoleCommand(TEXT(\"quit\"))", - "PlayerController->SetIgnoreMoveInput(false)", - "PlayerController->SetIgnoreLookInput(false)", + "AAgrarianGamePlayerController* AgrarianPlayerController", + "AgrarianPlayerController->AgrarianSelectCharacter", + "AgrarianPlayerController->AgrarianCompleteFrontend", + "PlayerController->ResetIgnoreMoveInput()", + "PlayerController->ResetIgnoreLookInput()", ], "AgrarianGamePlayerController.h": [ "ShowMvpPauseMenu", @@ -40,10 +43,19 @@ EXPECTED = { "InputComponent->BindKey(EKeys::Escape", "MvpFrontendWidget->IsInViewport()", "ShowMvpPauseMenu();", + "ResetIgnoreMoveInput();", + "ResetIgnoreLookInput();", + "ApplyDefaultInputMappingContexts();", ], } FORBIDDEN = { + "AgrarianMvpFrontendWidget.cpp": [ + "ConsoleCommand(TEXT(\"AgrarianSelectCharacter", + "ConsoleCommand(TEXT(\"AgrarianCompleteFrontend\"))", + "PlayerController->SetIgnoreMoveInput(false)", + "PlayerController->SetIgnoreLookInput(false)", + ], "AgrarianGamePlayerController.cpp": [ "BindKey(EKeys::LeftMouseButton", ], diff --git a/Source/AgrarianGame/AgrarianMvpFrontendWidget.cpp b/Source/AgrarianGame/AgrarianMvpFrontendWidget.cpp index f12c353..2db51a9 100644 --- a/Source/AgrarianGame/AgrarianMvpFrontendWidget.cpp +++ b/Source/AgrarianGame/AgrarianMvpFrontendWidget.cpp @@ -2,6 +2,7 @@ #include "AgrarianMvpFrontendWidget.h" +#include "AgrarianGamePlayerController.h" #include "Blueprint/WidgetTree.h" #include "Components/Border.h" #include "Components/Button.h" @@ -205,18 +206,24 @@ void UAgrarianMvpFrontendWidget::CompleteFrontendFlow() { if (APlayerController* PlayerController = GetOwningPlayer()) { - if (ActiveScreen == EAgrarianMvpFrontendScreen::CharacterSelection || ActiveScreen == EAgrarianMvpFrontendScreen::Loading) + if (AAgrarianGamePlayerController* AgrarianPlayerController = Cast(PlayerController)) { - PlayerController->ConsoleCommand(SelectedCharacterArchetype == EAgrarianMvpCharacterArchetype::YoungAdultFemale - ? TEXT("AgrarianSelectCharacter female") - : TEXT("AgrarianSelectCharacter male")); - } + if (ActiveScreen == EAgrarianMvpFrontendScreen::CharacterSelection || ActiveScreen == EAgrarianMvpFrontendScreen::Loading) + { + AgrarianPlayerController->AgrarianSelectCharacter(SelectedCharacterArchetype == EAgrarianMvpCharacterArchetype::YoungAdultFemale + ? TEXT("female") + : TEXT("male")); + } - PlayerController->ConsoleCommand(TEXT("AgrarianCompleteFrontend")); - PlayerController->SetInputMode(FInputModeGameOnly()); - PlayerController->bShowMouseCursor = false; - PlayerController->SetIgnoreMoveInput(false); - PlayerController->SetIgnoreLookInput(false); + AgrarianPlayerController->AgrarianCompleteFrontend(); + } + else + { + PlayerController->SetInputMode(FInputModeGameOnly()); + PlayerController->bShowMouseCursor = false; + PlayerController->ResetIgnoreMoveInput(); + PlayerController->ResetIgnoreLookInput(); + } } RemoveFromParent();