A few init.lua (mostly) changes that fix some spooky lua errors in the game log:
dofile_once "include" utils.lua right away in init.lua ; a later ui.lua dofile was trying to use functions that are defined in utils.lua but didnt exist yet, causing some errors
add a check for the NT object to be non-nil before using it in ui.lua. Again causing a spooky lua error
instead of repeatedly calling dofile(ui.lua), call it once then just call the ui draw call separately (instead of at the end of ui.lua... ui.lua had guards to prevent redefining the functions every frame but the dofile every frame is just unnecessary to begin with, and maybe problematic for performance
The whole lua context (if that's the proper term for it) is kinda a mess with dofile's all over the place. Probably a lot of redundant function re-definitions that dont need to happen. The whole thing could use some cleanup but these particular ones were some low-hanging squeaky-wheel fruit 😄
A few init.lua (mostly) changes that fix some spooky lua errors in the game log:
The whole lua context (if that's the proper term for it) is kinda a mess with dofile's all over the place. Probably a lot of redundant function re-definitions that dont need to happen. The whole thing could use some cleanup but these particular ones were some low-hanging squeaky-wheel fruit 😄