Using metatables and metamethods on system tables
Re: Using metatables and metamethods on system tables
Thanks. I'll double-check the scene and include the prefab in an updated version later today.
- liisi.laasik
- Posts: 13
- Joined: Tue Oct 03, 2017 9:15 am
- Location: Tallinn, Estonia
Re: Using metatables and metamethods on system tables
I've been playing around with the code, fixed a lot of bugs I've made and I think the meta tables and listening to Variable table changes is mostly working now. An extended testing period will follow - fingers crossed...
I've had to replace DialogueLua.DoesVariableExist(varName) calls with gueLua.DoesTableElementExist(metatableName, varName) calls. I suspect that making Exists functions take metatables into account would be too much of an overhead.
I'll post here if and when I discover anything new, but I think all the abnormalities were due to my own mistakes.
I've had to replace DialogueLua.DoesVariableExist(varName) calls with gueLua.DoesTableElementExist(metatableName, varName) calls. I suspect that making Exists functions take metatables into account would be too much of an overhead.
I'll post here if and when I discover anything new, but I think all the abnormalities were due to my own mistakes.
Re: Using metatables and metamethods on system tables
Sounds good. I still plan to publish a patch at the end of this week (Sunday). In the current version, when using NLua the Dialogue System doesn't save SimStatus in a compressed form. The patch adds that. This can reduce saved game sizes by up to 90%.
- liisi.laasik
- Posts: 13
- Joined: Tue Oct 03, 2017 9:15 am
- Location: Tallinn, Estonia
Re: Using metatables and metamethods on system tables
Thanks. That patch will make a huge difference for us.
Re: Using metatables and metamethods on system tables
I'll be publishing the patch later today. One last-minute, unrelated UI fix needed to be added.