mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
remove __vc_app global variable
This commit is contained in:
parent
678e5db03d
commit
ab179881e8
5 changed files with 63 additions and 64 deletions
|
|
@ -64,12 +64,13 @@ static void create_libs(State* L, StateType stateType) {
|
|||
openlib(L, "vec4", vec4lib);
|
||||
openlib(L, "yaml", yamllib);
|
||||
|
||||
openlib(L, "__vc_app", applib);
|
||||
lua::getglobal(L, "__vc_app");
|
||||
lua::setregistry(L, "app");
|
||||
|
||||
if (stateType == StateType::SCRIPT) {
|
||||
openlib(L, "app", applib);
|
||||
lua::getglobal(L, "app");
|
||||
lua::setglobal(L, "__vc_app");
|
||||
} else if (stateType == StateType::BASE) {
|
||||
openlib(L, "__vc_app", applib);
|
||||
lua::getregistry(L, "app");
|
||||
lua::setglobal(L, "app");
|
||||
}
|
||||
if (stateType == StateType::BASE || stateType == StateType::SCRIPT) {
|
||||
openlib(L, "assets", assetslib);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue