Character tooltip building function at its upvalue limit
Solanya opened this issue ยท 3 comments
While working on the linebreak limit for currently & OOC, I found out the writeTooltipForCharacter
function in register_tooltip.lua was reaching the upvalue limit.
I've removed the April Fools code as a temporary measure so the new function could be added, but it might be worth taking a look at that function and find a way to reduce that upvalue amount, however possible.
Closing this as we've ducked the upvalue limit, which is really the core issue here.
Existing work for #218 will introduce tooltip modules that can be registered to display informations to the tooltip. They can be declared anywhere in the code, which should help make the writeTooltipForCharacter()
function ligther (and allow for third party to add info to the tooltip without hacking their way in)
This should be done during the modernization of the code base. The player tooltip should allow modules to register tooltip decorators to be called upon the tooltip when displayed. Each module would define their own behaviour in their own code and modify the tooltip. This would allow other modules to show inside the tooltips if needed (Extended inventory info, relationship status etc.).
This is just my first thoughts on it and nothing is set in stone.