EliotVU / UnrealScript-Language-Service

Bringing a work-in-progress intelliSense to ye olde UnrealScript :)
MIT License
48 stars 9 forks source link

Add configurable SDK location #9

Closed Steverman closed 5 years ago

Steverman commented 5 years ago

References from the Killing Floor 2 SDK cannot be found since they reside somewhere else than the mod folder.

Source files for the the mod packages are located in: <drive:>\Users\<user>\Documents\My Games\KillingFloor2\KFGame\Src\MyPackage

However, SDK source files are located in: <drive:>\Steam\SteamApps\common\killingfloor2\development\Src

Hence the missing references.

Source

Xymanek commented 5 years ago

Xcom2 modders here - we would really appreciate the same thing!

EliotVU commented 5 years ago

I recommend that you create a workspace of your mod's folder, and add the SDK source as a workspace folder, you can find this under "File->Add Folder to Workspace...", and restart VS Code to ensure that everything will be loaded in properly. Let me know if this is holds any other issues 👍

Xymanek commented 5 years ago

I've tried it - and it partially worked. The key word is partially, as some classes were parsed perfectly, while others were covered in red... Let me know what kind of logs you will need to debug this. Also, here are the files if you want to try yourself:

Note that the X2WOTCCommunityHighlander submodule in the mod has files inside XComGame package, just as the SDK does. This is expected - the patched files in the project override the ones in the SDK

Xymanek commented 5 years ago

Actually I just found the "UnrealScript LS" output channel. Here is the full log after opening VSCode (warning: it's massive): https://gist.githubusercontent.com/Xymanek/f73d021224a8891313647bf30ef4cfa3/raw/1e1ff08f1add286a27edd070a9a303a02865f082/gistfile1.txt

Steverman commented 5 years ago

Thanks @EliotVU! It seems to partially work as @Xymanek mentioned.

This can seen when class A extends from another class B that extends from class C. Class A will show unresolved references to C.

Xymanek commented 5 years ago

It seems that the published version is outdated: image

Perhaps the problems was fixed in one of the recent commits?

EliotVU commented 5 years ago

@Xymanek The current build is not ready yet for release. This build also does not fix the issues you are having.

It appears that these issues are (at least partially) caused by the preprocessor macros used in SDK, I'll open an issue with for that particular feature.

EliotVU commented 5 years ago

See issue #10. If you encounter any other issues in the SDK files that may have lead to the massive amount of errors thrown, let me know by opening another issue!