MrAntares / roBrowserLegacy

This is a continuation of the original robrowser. All credits to the original creators and the new ones :)
GNU General Public License v3.0
193 stars 117 forks source link

Missing custom lub execution support #464

Open redpolline opened 3 weeks ago

redpolline commented 3 weeks ago

After commit e3322339f42adac162cce6279f3a8818c50c0782, we now have a lua interpreter in the tree.

However, we don't actually execute any lua code from the client data. Which has severe drawbacks:

1) We need to manually load and parse various lua tables and convert them to JS in DBManager.js. 2) Adding support for features that depend on lua code requires a lot of reinventing the wheel. 3) We miss out on changes that occur in the lua code until someone updates our custom JS code manually. 4) We lose compatibility with custom clients / translations that have made their own lua modifications.

What we need to do is replicate the lua environment expected by the lua scripts and to call the expected functions.

Danil0v3s commented 2 weeks ago

This would also be a good point to refactor and remove some, if not all, of the translated tables existing in JS. Since they're just representations of the lua tables anyways