This commit is contained in:
Overside srl
2026-02-16 07:19:27 +01:00
parent 5843e8a07a
commit 65bb24ff6a
121 changed files with 184941 additions and 185064 deletions

View File

@@ -147,6 +147,9 @@ func _create_cloud_material(config: CloudLayerConfig) -> ShaderMaterial:
if config.texture:
material.set_shader_parameter("cloud_texture", config.texture)
else:
var procedural_tex := ProceduralCloudTexture.create_default_cloud_texture(config.layer_type)
material.set_shader_parameter("cloud_texture", procedural_tex)
return material
@@ -214,12 +217,13 @@ func _update_flow(delta: float) -> void:
var wind_dir := global_wind_direction if use_global_wind else config.flow_direction
var wind_spd := global_wind_speed if use_global_wind else 1.0
#var flow_offset: float = material.get_shader_parameter("flow_offset")
#flow_offset += config.flow_speed * wind_spd * delta
#
#material.set_shader_parameter("flow_offset", flow_offset)
#material.set_shader_parameter("flow_direction", wind_dir)
#smaterial.set_shader_parameter("evolution_offset", _evolution_offset)
var current_offset: Variant = material.get_shader_parameter("flow_offset")
var flow_offset: float = current_offset if current_offset != null else 0.0
flow_offset += config.flow_speed * wind_spd * delta
material.set_shader_parameter("flow_offset", flow_offset)
material.set_shader_parameter("flow_direction", wind_dir)
material.set_shader_parameter("evolution_offset", _evolution_offset)
func _update_lighting() -> void:

View File

@@ -41,7 +41,7 @@ func _ready() -> void:
_ensure_controllers_exist()
_connect_signals()
property_list_changed_notify()
#property_list_changed_notify()
_sync_preset_name()
_apply_seed()
_sync_all_systems()

View File

@@ -12,6 +12,9 @@ signal weather_state_exited(state: WeatherProfile.WeatherState)
@export var weather_profiles: Array[WeatherProfile] = []
@export var current_weather: WeatherProfile.WeatherState = WeatherProfile.WeatherState.CLEAR:
set(value):
if _changing_weather:
current_weather = value
return
if value != current_weather:
_request_weather_change(value)
@@ -39,6 +42,7 @@ var _random_weather_timer: float = 0.0
var _next_weather_change: float = 0.0
var _timeline_index: int = 0
var _timeline_timer: float = 0.0
var _changing_weather: bool = false
func _ready() -> void:
@@ -175,7 +179,9 @@ func set_weather(state: WeatherProfile.WeatherState, transition_duration: float
weather_state_exited.emit(_current_profile.weather_state)
var old_state := current_weather
_changing_weather = true
current_weather = state
_changing_weather = false
_target_profile = profile
if transition_duration < 0:
@@ -199,7 +205,9 @@ func set_weather_immediate(state: WeatherProfile.WeatherState) -> void:
weather_state_exited.emit(_current_profile.weather_state)
var old_state := current_weather
_changing_weather = true
current_weather = state
_changing_weather = false
_current_profile = profile
_target_profile = profile
_is_transitioning = false

View File

@@ -26,7 +26,7 @@ enum VolumeShape {
@export_group("Kill Behavior")
@export var enabled: bool = true
@export var priority: int = 0
@export var kill_priority: int = 0
@export var instant_kill: bool = true
@export var fade_out_margin: float = 1.0
@export var fade_out_duration: float = 0.3
@@ -222,11 +222,11 @@ func is_point_in_fade_margin(point: Vector3) -> bool:
var half_size := volume_size * 0.5
var inner_half := half_size - Vector3(fade_out_margin, fade_out_margin, fade_out_margin)
var in_outer := abs(local_point.x) <= half_size.x and \
var in_outer: bool = abs(local_point.x) <= half_size.x and \
abs(local_point.y) <= half_size.y and \
abs(local_point.z) <= half_size.z
var in_inner := abs(local_point.x) <= inner_half.x and \
var in_inner: bool = abs(local_point.x) <= inner_half.x and \
abs(local_point.y) <= inner_half.y and \
abs(local_point.z) <= inner_half.z
@@ -240,8 +240,8 @@ func is_point_in_fade_margin(point: Vector3) -> bool:
var horizontal_dist := Vector2(local_point.x, local_point.z).length()
var half_height := volume_size.y * 0.5
var in_outer := horizontal_dist <= volume_radius and abs(local_point.y) <= half_height
var in_inner := horizontal_dist <= volume_radius - fade_out_margin and \
var in_outer: bool = horizontal_dist <= volume_radius and abs(local_point.y) <= half_height
var in_inner: bool = horizontal_dist <= volume_radius - fade_out_margin and \
abs(local_point.y) <= half_height - fade_out_margin
return in_outer and not in_inner