I have some lua files that I need to read in JS. I would like to be able to import the variables (mostly tables) and go through them easily in JS, to add things in the DOM.
Exemple of LUA file:
print("lua display text")
Civs = {
CIVILIZATION_EGYPT = { -- lua comment 1
Playable = true,
SpawnYear = -3000,
StartX = 75,
StartY = 32,
Table = { },
Text = "abc",
TableTable = { {"a"}, {"b"}, {"c"}, {"d"}, {}, {}, {}},
};
CIVILIZATION_INDIA = {
Playable = true,
SpawnYear = -3000,
StartX = 98,
StartY = 42,
Table = { },
Text = "abc",
TableTable = { {"a"}, {"b"}, {"c"}, {"d"}, {}, {}, {}},
};
CIVILIZATION_BABYLON = {
Playable = true,
SpawnYear = -3000,
StartX = 84,
StartY = 41,
Table = { },
Text = "abc",
TableTable = { {"a"}, {"b"}, {"c"}, {"d"}, {}, {}, {}},
}
}
-- lua comment 2