Commit Graph
3388 Commits
Author SHA1 Message Date
bigguy345 6fc0bf4d6b Fix expression typing gate to route JS function/lambda expressions into ExpressionParser
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
2026-02-03 22:12:43 +02:00
bigguy345 ba7e4cc3b2 Merge remote-tracking branch 'origin/dev' into syntax-highlighter-unified
# Conflicts:
#	src/api
#	src/main/java/kamkeel/npcs/util/BukkitUtil.java
#	src/main/java/kamkeel/npcs/util/VaultUtil.java
#	src/main/java/noppes/npcs/CustomNpcsPermissions.java
2026-02-03 18:26:30 +02:00
Vidal 2d47aa00d8 - Added standalone min max methods to FieldDef
- Increased lightning density and radius minmax on all energy abilities
- Made AbilityOrbBarrage interruptible during active state
- Renamed AbilityEnergyBeam to AbilityBeam
- Updated imports
2026-02-03 12:32:30 -03:00
Vidal 1a8b8fb5f3 Made staves shoot EntityAbilityOrb 2026-02-03 11:58:39 -03:00
Vidal c5822023a0 Added modifyVisibility to FieldDef
AbilityGuard tweaks
2026-02-03 07:45:02 -03:00
Kam fd85215592 Fix Ability Def Handler 2026-02-03 05:07:54 -05:00
Kam 8aa6e926f6 Some Ability Helpers 2026-02-03 04:27:54 -05:00
Vidal 60b846b35e - Added onDamageTaken to Ability
- Reworked AbilityGuard
- Added AbilityOrbBarrage
- Updated translation
- Updated onDamageTaken method calls
2026-02-03 05:43:50 -03:00
bigguy345 9db8a0b2e7 Forgotten Merge resolution for 'Add Tooltips.' commit 2026-02-03 07:20:24 +02:00
bigguy345 074c780d50 Add inner callable scope locals and expression type resolution
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.
2026-02-03 07:03:33 +02:00
bigguy345 4e78ffb024 Fix autocomplete trigger after dot 2026-02-03 06:54:09 +02:00
bigguy345 d63a1b8d4c hussar bukkit fixes 2026-02-03 05:50:57 +02:00
Kam 0004029de9 Remove Bukkit from this 2026-02-02 21:54:51 -05:00
Kam 8985ab0f12 Merge branch 'dev' of https://github.com/KAMKEEL/CustomNPC-Plus into dev 2026-02-02 21:51:22 -05:00
Kam 2c6ec0ce34 Better GUI handling for Ability Making System 2026-02-02 21:51:21 -05:00
bigguy345 98351bbc3c dev merge 2026-02-03 04:25:16 +02:00
somehussar fcaf1b0017 Merge remote-tracking branch 'origin/dev' into dev 2026-02-03 03:19:17 +01:00
somehussar 35e76ea9eb gay janino 2026-02-03 03:19:03 +01:00
Kam 38d305ab99 Merge branch 'dev' of https://github.com/KAMKEEL/CustomNPC-Plus into dev 2026-02-02 20:40:19 -05:00
Kam d3167df1b9 Fix to Type Tab 2026-02-02 20:40:17 -05:00
somehussar 650a13edb1 Merge branch 'dev' into kam-cant-make-plugin-integrations-part-2
# Conflicts:
#	dependencies.gradle
2026-02-03 01:10:40 +01:00
somehussar f6342b2335 Fix integration with bukkit and plugins codewise 2026-02-03 01:04:34 +01:00
Kam 0cbc30f8cb Better GUI Handling for Abilities 2026-02-02 18:53:36 -05:00
Kam 911f185400 Fields Builder for Ability GUIs 2026-02-02 18:26:52 -05:00
KamandClaude Opus 4.5 0ff501bb16 Declarative ability GUI: replace 18 SubGui classes with FieldDef system
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]>
2026-02-02 16:17:37 -05:00
Kam 3651643f26 Fix GL Issues? 2026-02-02 14:59:55 -05:00
Vidal c168702970 WIP Animations Register 2026-02-01 20:09:12 -03:00
Vidal c39ce6b6d1 Fixed sync windup animation not being an ability property and getting overridden on gui init 2026-02-01 17:08:24 -03:00
Vidal f4db57875a Changed dual ability names 2026-02-01 06:45:29 -03:00
Vidal 44f7161c9f Added charge to animation and fixed some access modifiers 2026-02-01 01:50:28 -03:00
somehussar 77be537de4 Merge remote-tracking branch 'upstream/dev' into dev 2026-02-01 03:39:11 +01:00
somehussar d6b7b969b3 Fix crash on server 2026-02-01 03:39:03 +01:00
Vidal 71065fc520 Added Dual Disc Ability 2026-01-31 22:36:12 -03:00
Vidal e9f22dab2a Added Dual Orb Ability 2026-01-31 21:56:14 -03:00
Vidal 245e8f8162 Added Dual Beam Ability 2026-01-31 21:55:39 -03:00
Vidal b9e82e4c5b Fixed mysterious override stopping the game from running
Kam let's please stop using claude for everything this BuiltInAbility is not even used
2026-01-31 16:37:28 -03:00
Vidal 4a5b0f4995 Updated overrides and imports 2026-01-30 20:21:45 -03:00
Vidal 2cac2e4add Changed Special Key from C to B 2026-01-30 12:37:57 -03:00
Kam 1b8ad4dd90 Player Abilities 2026-01-30 05:01:54 -05:00
Kam 38c0519c0a Refactor to Cleaner Class Setup 2026-01-29 14:19:57 -05:00
Kam 55658a7956 Ability Preview GUI 2026-01-28 20:43:32 -05:00
Vidal 216a3dbbf8 Added alpha to all abilities except beam 2026-01-28 20:49:16 -03:00
Kam 67237e794f Fix Defaults / Syncing 2026-01-28 17:16:59 -05:00
Kam c339e5edbc Fix Built In Animation 2026-01-28 16:57:49 -05:00
Kam e73054a529 Built In Animation System + Fixes to Defaults for Energy Projectile Abilities 2026-01-28 16:31:26 -05:00
Kam 7d2bba7b95 Better Lock Movement handling 2026-01-28 15:16:28 -05:00
Kam 83ccd25b33 Merge Conflicts + Scripting for Abilities 2026-01-28 14:44:19 -05:00
bigguy345 62d87c0c66 Added comment/multi-line handling for Autocomplete findReceiverExpression 2026-01-28 20:30:41 +02:00
bigguy345 9e04a1184c Lambda impl Phase 1: Track inner callables as nested scopes so parameters and locals resolve correctly inside the callable body, 2026-01-28 06:59:58 +02:00
bigguy345 6c5a269966 Fixed Autocomplete suggestions not working when whitespaces exist between it and receiver like "player. get <- doesnt work due to WS" 2026-01-28 06:06:01 +02:00