From 4f4b8bc912171e569e71724566661c99ca4380ff Mon Sep 17 00:00:00 2001 From: Penecruz <73371761+Penecruz@users.noreply.github.com> Date: Sun, 19 Nov 2023 10:19:43 +1100 Subject: [PATCH] Fix for getCategory - Fix for DCS API change to getCategory() --- CHANGELOG.md | 2 +- lua/DCS-gRPC/methods/mission.lua | 4 ++-- lua/DCS-gRPC/methods/unit.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8419bddd..63d86ce3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed crash of concurrent Windows TTS synthesis ([#223](https://github.com/DCS-gRPC/rust-server/issues/223)) - Fixed file handler left open: Closing config file again after reading it in LUA - Fixed the config value for `tts.defaultProvider` for Google Cloud to be lowercase `gcloud` (instead of `gCloud`) - +- Fixed error with getCategory due to API changes in DCS ([#246](https://github.com/DCS-gRPC/rust-server/issues/246)) ## [0.7.1] - 2023-01-08 ### Fixed diff --git a/lua/DCS-gRPC/methods/mission.lua b/lua/DCS-gRPC/methods/mission.lua index bef294cf..db3fce29 100644 --- a/lua/DCS-gRPC/methods/mission.lua +++ b/lua/DCS-gRPC/methods/mission.lua @@ -5,7 +5,7 @@ local function exporter(object) return nil end - local category = object:getCategory() + local category = Object.getCategory(object) -- change for DCS API fixes in getcategory() if category == Object.Category.BASE or object.className_ == 'Airbase' then -- carriers are of category unit, but are a Airbase class @@ -35,7 +35,7 @@ local function typed_exporter(object) end local grpcTable = {} - local category = object:getCategory() + local category = Object.getCategory(object) if category == Object.Category.BASE or object.className_ == 'Airbase' then grpcTable.airbase = exporter(object) diff --git a/lua/DCS-gRPC/methods/unit.lua b/lua/DCS-gRPC/methods/unit.lua index c2ad7d5c..1f3385eb 100644 --- a/lua/DCS-gRPC/methods/unit.lua +++ b/lua/DCS-gRPC/methods/unit.lua @@ -17,7 +17,7 @@ GRPC.methods.getRadar = function(params) }) end - local category = object:getCategory() + local category = Object.getCategory(object)-- change for DCS API fixes in getcategory() local grpcTable = {} if(category == Object.Category.UNIT) then