Open damien opened 11 years ago
Awesome stuff! I'll test these changes myself soon and merge them in once I've verified there aren't any bugs or regressions.
You're about to see a huge changeset, after I finished testing - might want to wait for the pull request
Better API is nice, but most if not all the APIs we'll be loading with cc-scripts will be bundled with cc-scripts. We should consolidate these two APIs such that:
cc_scripts.loadAPI("installer")
instead ofos.loadAPI("/cc-scripts/apis/installer")
betterapi
's patchedos.loadAPI
method is scoped within the cc-script framework and doesn't clobber the expected behavior ofos.loadAPI
.cc_scripts.loadAPI
can then support closures and metatables.@eric-wieser: What are your thoughts on this? Any objections? I personally like the idea of not changing a global function to work differently than people are used to and this particular approach would let us use your
betterapi
awesomeness to write more complex APIs geared for inclusion viacc_scripts.loadAPI
.