Adds type comments for most of functions in functions.js. These comments are basically copied from my functions.js
Rewrite about half of all functions in functions.js, to make them clearer and possibly more performant. E.g. getPreferredItemInTag is rewritten to use maxOf instead of sort, this can reduce time complexity from O(n*lg(n)) to O(n), so should be faster
fixed a horribly wrong format in unify_sawables::create_cutting(), which will prevent recipes from actually getting added
move functions for recipe-gen from global scope to inside event callback, to prevent access
ing by accident. Also removing an unused param event. These functions are located mostly at server_script/xxx/unification/
These changes have been applied to my fork of E6/E6E for a long time, and they seems working pretty well
This PR:
functions.js
. These comments are basically copied from myfunctions.js
functions.js
, to make them clearer and possibly more performant. E.g.getPreferredItemInTag
is rewritten to usemaxOf
instead ofsort
, this can reduce time complexity from O(n*lg(n)) to O(n), so should be fasterevent
. These functions are located mostly atserver_script/xxx/unification/
These changes have been applied to my fork of E6/E6E for a long time, and they seems working pretty well