ryobg / JContainers

JSON-based data structures for Papyrus - the TESV Skyrim SE scripting language
MIT License
107 stars 23 forks source link

Lua bitwise operators backport to LE version? #41

Closed pijaczkar8 closed 6 years ago

pijaczkar8 commented 6 years ago

Hi ryobg, is there any chance of a quick backport of the Lua bitwise operators to the LE version? I am needing bitwise for functions in a mod I am hoping to release on both platforms and despite the info on the LE Git stating they're included since JC 3.0 they do not appear to be.

If not, can you tell me how I might be able to work in something like https://gist.github.com/kaeza/8ee7e921c98951b4686d to at least get the functions in pure lua?

ryobg commented 6 years ago

Hello Duncan,

I'm not maintainer of the old mod, but even if I had a green light, it will require some good deal of time. So I think this is not an option. I can tell you what I did to support the Lua bit operations here:

https://github.com/ryobg/JContainers/commit/9af488cf827fc3b599bdc4da2c854bb0f2da6f86#diff-902c75329b2859b7324da6e1421876f8

But this will require that you have a custom version of the old JC. I'm not sure whether you can workaround that. Maybe it is worth to ask the original dev there for an advice.

I haven't dig, but looks like the Gist you sent may be almost copy-paste solution?

pijaczkar8 commented 6 years ago

I was wondering if I could just add the full library of functions to my init.lua?

ryobg commented 6 years ago

Point is I do not know whether you can really introduce library in your environment. JC pre-sets the environment for your scripts, possibly as a security measure. I will repeat some of the possible direcitons too look into:

Hope this helps.

pijaczkar8 commented 6 years ago

Many thanks

ryobg commented 6 years ago

Have a success. Feel free to reopen if there is something more to be done.