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.
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
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.