Skip to content

Commit

Permalink
shared: add getVoiceConnectionState
Browse files Browse the repository at this point in the history
  • Loading branch information
zziger committed Jul 22, 2023
1 parent 4ae02b1 commit c68a0d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions shared/bindings/BindingsMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,11 @@ static void StringToSHA256(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_RETURN_STRING(alt::ICore::Instance().StringToSHA256(str));
}

static void GetVoiceConnectionState(const v8::FunctionCallbackInfo<v8::Value>& info)
{
V8_RETURN_NUMBER(alt::ICore::Instance().GetVoiceConnectionState());
}

extern V8Class v8BaseObject, v8WorldObject, v8Entity, v8File, v8RGBA, v8Vector2, v8Vector3, v8Quaternion, v8Blip, v8AreaBlip, v8RadiusBlip, v8PointBlip, v8Resource, v8Utils;

extern V8Module
Expand Down Expand Up @@ -504,6 +509,8 @@ extern V8Module

V8Helpers::RegisterFunc(exports, "stringToSHA256", &StringToSHA256);

V8Helpers::RegisterFunc(exports, "getVoiceConnectionState", &GetVoiceConnectionState);

V8_OBJECT_SET_STRING(exports, "version", alt::ICore::Instance().GetVersion());
V8_OBJECT_SET_STRING(exports, "branch", alt::ICore::Instance().GetBranch());
// V8_OBJECT_SET_RAW_STRING(exports, "sdkVersion", ALT_SDK_VERSION);
Expand Down
2 changes: 1 addition & 1 deletion shared/deps/cpp-sdk
Submodule cpp-sdk updated 1 files
+3 −0 ICore.h

0 comments on commit c68a0d5

Please sign in to comment.