forked from woofmeow/straywild
fix: restore ocean surface motion
This commit is contained in:
parent
132f3ef288
commit
805885a9f1
4 changed files with 27 additions and 4 deletions
|
|
@ -232,10 +232,13 @@ func _validate_starter_region_surfaces() -> void:
|
|||
assert(is_equal_approx(ocean.position.y, -0.45))
|
||||
var ocean_visual := region.get_node(
|
||||
"WaterBodies/Ocean/VisualWater"
|
||||
) as MeshInstance3D
|
||||
) as WaterSurfaceMotion
|
||||
assert(ocean_visual != null)
|
||||
assert(is_equal_approx(ocean_visual.global_position.y, ocean.position.y))
|
||||
assert(not ocean_visual.is_processing())
|
||||
assert(ocean_visual.is_processing())
|
||||
assert(
|
||||
absf(ocean_visual.global_position.y - ocean.position.y)
|
||||
<= ocean_visual.amplitude + 0.0001
|
||||
)
|
||||
var ocean_shapes := region.get_node(
|
||||
"WaterBodies/Ocean/FishingRegions/OceanFishingRegion"
|
||||
).get_children()
|
||||
|
|
|
|||
|
|
@ -87,7 +87,9 @@ func _validate_main_profile(main: Node) -> void:
|
|||
assert(ocean.material_override is StandardMaterial3D)
|
||||
assert(not pond.material_override is ShaderMaterial)
|
||||
assert(not ocean.material_override is ShaderMaterial)
|
||||
assert(ocean is WaterSurfaceMotion)
|
||||
assert(not ocean.is_processing())
|
||||
assert(is_zero_approx(ocean.position.y))
|
||||
_validate_ocean_fishing_coverage(main, ocean)
|
||||
var island := main.get_node(
|
||||
"TestWorld/Regions/StarterIslandRegion"
|
||||
|
|
@ -139,6 +141,8 @@ func _validate_normal_profile(main: Node) -> void:
|
|||
var profile: RuntimePerformanceProfile = main.get("_performance_profile")
|
||||
assert(profile != null and not profile.is_light())
|
||||
assert(is_equal_approx(root.scaling_3d_scale, 1.0))
|
||||
var pixelation: Node = main.get_node("%WorldPixelationPostprocess")
|
||||
assert(not bool(pixelation.call("is_light_performance_profile")))
|
||||
var pond := main.get_node(
|
||||
"TestWorld/Regions/StarterIslandRegion/WaterBodies/Pond/VisualWater"
|
||||
) as MeshInstance3D
|
||||
|
|
@ -147,7 +151,8 @@ func _validate_normal_profile(main: Node) -> void:
|
|||
) as MeshInstance3D
|
||||
assert(pond.material_override is ShaderMaterial)
|
||||
assert(ocean.material_override is ShaderMaterial)
|
||||
assert(not ocean.is_processing())
|
||||
assert(ocean is WaterSurfaceMotion)
|
||||
assert(ocean.is_processing())
|
||||
_validate_ocean_fishing_coverage(main, ocean)
|
||||
var island := main.get_node(
|
||||
"TestWorld/Regions/StarterIslandRegion"
|
||||
|
|
@ -157,6 +162,10 @@ func _validate_normal_profile(main: Node) -> void:
|
|||
island.get_node("Terrain/Visual")
|
||||
) > 0)
|
||||
var game_ui := main.get_node("%GameUI") as GameUI
|
||||
var title_screen := game_ui.get_title_screen()
|
||||
assert(title_screen != null)
|
||||
assert(title_screen.is_decorative_presentation_active())
|
||||
assert(title_screen.is_decorative_bubble_scheduler_active())
|
||||
var player_menu := game_ui.get("_player_menu") as PlayerMenu
|
||||
assert(player_menu != null)
|
||||
assert(player_menu.is_cooler_water_effect_enabled())
|
||||
|
|
@ -186,6 +195,12 @@ func _validate_normal_profile(main: Node) -> void:
|
|||
var rain := visuals.get_node("LocalRain") as GPUParticles3D
|
||||
assert(rain.amount == WorldTimeVisualController.RAIN_PARTICLE_AMOUNT)
|
||||
assert(rain.fixed_fps == 30)
|
||||
var clouds := visuals.get_node(
|
||||
"LocalStormClouds"
|
||||
) as LocalStormCloudLayer
|
||||
assert(clouds.get_patch_count() == 81)
|
||||
assert(clouds.get_node_or_null("CloudField") is MultiMeshInstance3D)
|
||||
assert(clouds.get_node_or_null("CloudCeiling") == null)
|
||||
assert((main.get_node("%TitleMusic") as AudioStreamPlayer).stream != null)
|
||||
assert((main.get_node("%DuskMusic") as AudioStreamPlayer).stream != null)
|
||||
assert(
|
||||
|
|
|
|||
|
|
@ -108,6 +108,9 @@ func set_light_performance_profile(enabled: bool) -> void:
|
|||
if enabled
|
||||
else NORMAL_SALT_WATER_MATERIAL
|
||||
)
|
||||
var surface_motion := ocean as WaterSurfaceMotion
|
||||
if surface_motion != null:
|
||||
surface_motion.set_motion_enabled(not enabled)
|
||||
|
||||
|
||||
func is_foliage_wind_enabled() -> bool:
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
[ext_resource type="Material" path="res://world/materials/stylized_water.tres" id="13_water"]
|
||||
[ext_resource type="ArrayMesh" path="res://world/generated/shorelines/starter_ocean_shoreline.tres" id="17_ocean_shoreline"]
|
||||
[ext_resource type="Material" path="res://world/materials/stylized_water_fresh.tres" id="19_fresh_water"]
|
||||
[ext_resource type="Script" uid="uid://drdjm443o35tc" path="res://world/water_surface_motion.gd" id="20_surface_motion"]
|
||||
[ext_resource type="Script" path="res://world/water/shoreline_ribbon_baker.gd" id="21_shoreline_baker"]
|
||||
[ext_resource type="Script" path="res://world/water/shoreline_ribbon_config.gd" id="22_shoreline_config"]
|
||||
[ext_resource type="Script" path="res://world/digging/diggable_area_3d.gd" id="23_diggable_area"]
|
||||
|
|
@ -205,6 +206,7 @@ fishing_region_path = NodePath("FishingRegions/OceanFishingRegion")
|
|||
[node name="VisualWater" type="MeshInstance3D" parent="WaterBodies/Ocean" unique_id=1176408937]
|
||||
material_override = ExtResource("13_water")
|
||||
mesh = SubResource("OceanWaterMesh")
|
||||
script = ExtResource("20_surface_motion")
|
||||
|
||||
[node name="FishingRegions" type="Node3D" parent="WaterBodies/Ocean" unique_id=205598473]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue