mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
add vc.is_headless, vc.is_client
This commit is contained in:
parent
ded3dd2046
commit
678e5db03d
6 changed files with 19 additions and 6 deletions
|
|
@ -95,7 +95,7 @@ static void create_libs(State* L, StateType stateType) {
|
|||
}
|
||||
|
||||
addfunc(L, "print", lua::wrap<l_print>);
|
||||
addfunc(L, "_crc32", lua::wrap<l_crc32>);
|
||||
addfunc(L, "crc32", lua::wrap<l_crc32>);
|
||||
}
|
||||
|
||||
void lua::init_state(State* L, StateType stateType) {
|
||||
|
|
@ -146,7 +146,7 @@ void lua::initialize(const EnginePaths& paths, const CoreParameters& params) {
|
|||
lua::setglobal(main_thread, "__VC_SCRIPT_NAME");
|
||||
|
||||
lua::pushboolean(main_thread, params.headless);
|
||||
lua::setglobal(main_thread, "VC_HEADLESS");
|
||||
lua::setglobal(main_thread, "__VC_HEADLESS");
|
||||
}
|
||||
|
||||
void lua::finalize() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue