Jump to content

Require in sandbox mode


Rick
 Share

Recommended Posts

Using require in sandbox mode has failed. Im wondering why because many useful Lua libraries, if not all, use require. But in leadwerks that doesn't work. Is there any way we can get require working in leadwerks so we can use these pure Lua libraries that exist that can help make things easier for us? I can help change the way ppl make ai in leadwerks easier if this works.

  • Upvote 2
Link to comment
Share on other sites

Okay, so it works in non-sandbox mode as expected, and does not work in sandbox mode, right? Just to be clear.

 

I think it might be because the i/o module is disabled in sandbox mode.

 

Also, this won't work with zip-encrypted games.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

the problem with import is that we would have to go thru each library and change it from using require, because they all use require internally, and I've tried that and it's a pain in the *** and it's error prone. Is there any way you can make le's own version of require so these will work?

 

When require is used the module can return the object from the source. Import doesn't seem to allow that and so we have to go in and heavily modify these libraries to work differently for le which sucks.

 

So for example try to use import in that library and try to create an object like in the example page on git and you'll see you quickly go down a rabbi hole of modifying every file and how it works to get the thing to work in le and hope what you just did didn't screw something up.

  • Upvote 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...