isaac-lua-api-vscode icon indicating copy to clipboard operation
isaac-lua-api-vscode copied to clipboard

Missing Type Definitions, Overloads, and Improper Type Handling

Open GoldenShit233 opened this issue 5 months ago • 0 comments

1. Missing Optional Argument Overloads

Some method overloads appear to be missing from the plugin's type definitions, leading to false errors or lack of autocomplete:

Entity:AddBurn

void AddBurn ( EntityRef Source, int Duration, float Damage )
void AddBurn ( EntityRef Source, int Duration, float Damage, boolean IgnoreBosses ) -- ❌ Missing

Entity:AddSlowing

void AddSlowing ( EntityRef Source, int Duration, float SlowValue, Color SlowColor )
void AddSlowing ( EntityRef Source, int Duration, float SlowValue, Color SlowColor, boolean IgnoreBosses ) -- ❌ Missing

2. Missing Return Type in Signature

ItemPool:GetRandomPool

This method should return an ItemPoolType, but the return type is missing or undefined in the extension:

ItemPoolType GetRandomPool ( RNG rng, boolean advancedSearch = false, ItemPoolType[] filter = {}, boolean isWhitelist = false )

3. Incorrect Integer Handling / Type Validation

Some values that are valid in Lua and Isaac modding are flagged or cause problems in the extension:

  • Entity.Price = 10 → Should be valid, but shows an error.

  • player:UsePill(PillColor.PILL_PINK_RED + PillColor.PILL_GIANT_FLAG) → Bitwise combination of enum values causes type error or is not recognized.

  • player:AddCacheFlags(CacheFlag.CACHE_DAMAGE | CacheFlag.CACHE_FIREDELAY) → Bitwise OR is a common pattern but not accepted.


4. Possible Workspace Bug

There's also a strange issue where files or folders added later to the workspace don't seem to benefit from proper intellisense / plugin features. My main mod (added first) works fine, but newer mini-mods don't get the same support unless reopened manually. Could this be related to how the plugin initializes?

GoldenShit233 avatar May 30 '25 04:05 GoldenShit233