Skip to content

Commit 487cac6

Browse files
authored
Lua func to check if in game options are enabled (#6862)
1 parent f76bf1b commit 487cac6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

code/scripting/api/libs/options.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "network/multiui.h"
88
#include "scripting/api/objs/option.h"
99
#include "scripting/lua/LuaTable.h"
10+
#include "mod_table/mod_table.h"
1011

1112
namespace scripting {
1213
namespace api {
@@ -163,5 +164,10 @@ ADE_FUNC(verifyIPAddress, l_Options, "string", "Verifies if a string is a valid
163164
return ade_set_args(L, "b", psnet_is_valid_ip_string(ip));
164165
}
165166

167+
ADE_FUNC(isInGameOptionsEnabled, l_Options, nullptr, "Returns whether or not in-game options flag is enabled.", "boolean", "True if enabled, false otherwise")
168+
{
169+
return ade_set_args(L, "b", Using_in_game_options);
170+
}
171+
166172
} // namespace api
167173
} // namespace scripting

0 commit comments

Comments
 (0)