Skip to content

Commit e23c1f7

Browse files
dsarnoclaude
andcommitted
fix(animation): type key explicitly so Godot 4.6 parser accepts it
`var key := v.to_lower()` failed static type inference because `v` is typed `Variant` and GDScript 4.6 can't resolve the call's return type. Cast to String explicitly. Fixes the compile failure that blocked plugin load on Linux/macOS/Windows Godot test jobs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1b87446 commit e23c1f7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugin/addons/godot_ai/handlers/animation_handler.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ static func _parse_transition(v: Variant) -> float:
757757
if v is float or v is int:
758758
return float(v)
759759
if v is String:
760-
var key := v.to_lower()
760+
var key: String = (v as String).to_lower()
761761
if _NAMED_TRANSITIONS.has(key):
762762
return float(_NAMED_TRANSITIONS[key])
763763
return 1.0

0 commit comments

Comments
 (0)