Problem:
- function(act){...} expressions not reaching ExpressionParser
- resolveExpressionType only checked containsOperators() or startsWith("(")
- Function expressions went through simple resolver and returned null type
Solution:
- Added looksLikeFunctionOrLambda helper (lines 4766-4773) to detect:
* JS functions: function(...)
* Arrow functions: =>
* Java lambdas: ->
- Updated gate condition at line 4144 to route these into ExpressionParser
- Function expressions now reach ExpressionTypeResolver.resolveJSFunctionType
Impact:
- SAM typing now works in pass-2 when expected type is known
- Fixes schedule("TpGainAction", function(act){...}) argument typing
- Enables proper overload resolution for function/lambda parameters
- Increased lightning density and radius minmax on all energy abilities
- Made AbilityOrbBarrage interruptible during active state
- Renamed AbilityEnergyBeam to AbilityBeam
- Updated imports
GenerateTypeScriptTask can now copy an optional patches directory into the generated output so manual overrides can ship alongside generated defs.
Converter tweaks: anchor method signature regex to line starts, and ensure generated (including nested) types include a @javaFqn tag for reliable mapping back to Java sources.
ScriptDocument now tracks locals inside lambdas/function expressions and resolves identifiers by consulting the innermost callable scope before falling back to method/global scope.
Adds expression resolver nodes/type resolver and wires position-aware resolution for lambda bodies, plus basic lambda operator marking and return type validation against expected functional interface SAM.
All ability GUI tabs (General, Target, Effects, Type, Visual) are now
fully declarative via FieldDef definitions. Deleted 18 SubGuiAbility*
classes (~3100 lines) and rewrote SubGuiAbilityConfig to use
GuiScrollWindow for every tab with a unified field renderer.
- Add FieldDef, FieldType, TabTarget, ColumnHint, TabDef gui framework
- Add getFieldDefinitions() to all 18 ability subclasses
- Add getBaseFieldDefinitions() to Ability.java for shared tabs
- Merge COLOR/EFFECTS into SUB_GUI with convenience factories
- Net reduction: ~3100 lines removed
Co-Authored-By: Claude Opus 4.5 <[email protected]>