style: apply gdformat formatting across the entire project
Auto-format all GDScript files using gdformat from gdtoolkit. This is a baseline formatting pass to ensure consistent style: - Normalizes indentation and spacing - Wraps long lines to 100 characters - Removes trailing whitespace - Standardizes blank lines between functions 68 files reformatted, 8 files left unchanged (3rd-party addon files with parse errors excluded).
This commit is contained in:
@@ -8,6 +8,7 @@ extends Resource
|
||||
@export var target_type: StringName = SimulationIds.TARGET_ACTIVITY
|
||||
@export var resource_action_id: StringName
|
||||
|
||||
|
||||
func validate() -> Array[String]:
|
||||
var errors: Array[String] = []
|
||||
if action_id.is_empty():
|
||||
@@ -16,15 +17,13 @@ func validate() -> Array[String]:
|
||||
errors.append("display_name is empty for '%s'" % action_id)
|
||||
if default_duration <= 0.0:
|
||||
errors.append("default_duration must be positive for '%s'" % action_id)
|
||||
if target_type not in [
|
||||
SimulationIds.TARGET_RESOURCE,
|
||||
SimulationIds.TARGET_ACTIVITY,
|
||||
SimulationIds.TARGET_FREE
|
||||
]:
|
||||
errors.append("target_type '%s' is invalid for '%s'" % [target_type, action_id])
|
||||
if (
|
||||
target_type == SimulationIds.TARGET_RESOURCE
|
||||
and resource_action_id.is_empty()
|
||||
target_type
|
||||
not in [
|
||||
SimulationIds.TARGET_RESOURCE, SimulationIds.TARGET_ACTIVITY, SimulationIds.TARGET_FREE
|
||||
]
|
||||
):
|
||||
errors.append("target_type '%s' is invalid for '%s'" % [target_type, action_id])
|
||||
if target_type == SimulationIds.TARGET_RESOURCE and resource_action_id.is_empty():
|
||||
errors.append("resource_action_id is required for '%s'" % action_id)
|
||||
return errors
|
||||
|
||||
Reference in New Issue
Block a user