SethBling / cbscript

CBScript for Minecraft
1.14k stars 27 forks source link

Add 'include paths' #19

Open FanisDeligiannis opened 6 months ago

FanisDeligiannis commented 6 months ago

Not sure if this is the best place for suggestions.

From my experience in programming, I like to organize my projects in different folders, but I don't like to copy all my common includes in each project. I feel like there should be an option to add include paths, much like other languages/IDEs

For example, a default include path would be inside the base cbscript code, which would have in it "math.cblib", and more core cbscript features. That should also allow for cblib files in subfolders.

Then, I should be able to add other paths to that. That way, I can always do on all cbscripts:

import core/math
import core/random
import SethBling/colliders
import mycode/lib

That would make a huge difference in organizing projects, and it would also auto-update core libraries when updating cbscript, instead of needing to copy-paste the files to each project again.

tddebart commented 6 months ago

I fixed this in #18 , it just needs to be merged