@quenty/settings-inputkeymap 10.12.0 → 10.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [10.13.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/settings-inputkeymap@10.13.0...@quenty/settings-inputkeymap@10.13.1) (2024-10-04)
7
+
8
+ **Note:** Version bump only for package @quenty/settings-inputkeymap
9
+
10
+
11
+
12
+
13
+
14
+ # [10.13.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/settings-inputkeymap@10.12.0...@quenty/settings-inputkeymap@10.13.0) (2024-10-04)
15
+
16
+
17
+ ### Performance Improvements
18
+
19
+ * Fix settings to use a cache which reduces memory usage by 10 MB approximately ([990d0a6](https://github.com/Quenty/NevermoreEngine/commit/990d0a678ad405740acd045f041c0bbd51eca660))
20
+
21
+
22
+
23
+
24
+
6
25
  # [10.12.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/settings-inputkeymap@10.11.0...@quenty/settings-inputkeymap@10.12.0) (2024-09-25)
7
26
 
8
27
  **Note:** Version bump only for package @quenty/settings-inputkeymap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/settings-inputkeymap",
3
- "version": "10.12.0",
3
+ "version": "10.13.1",
4
4
  "description": "Input key map setting saving for players",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -28,17 +28,17 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@quenty/baseobject": "^10.5.0",
31
+ "@quenty/baseobject": "^10.6.0",
32
32
  "@quenty/enumutils": "^3.3.0",
33
- "@quenty/inputkeymaputils": "^14.10.0",
34
- "@quenty/inputmode": "^13.8.0",
35
- "@quenty/jsonutils": "^10.5.0",
36
- "@quenty/loader": "^10.5.0",
37
- "@quenty/maid": "^3.3.0",
38
- "@quenty/servicebag": "^11.7.0",
39
- "@quenty/settings": "^11.10.0",
33
+ "@quenty/inputkeymaputils": "^14.11.1",
34
+ "@quenty/inputmode": "^13.9.1",
35
+ "@quenty/jsonutils": "^10.6.0",
36
+ "@quenty/loader": "^10.6.0",
37
+ "@quenty/maid": "^3.4.0",
38
+ "@quenty/servicebag": "^11.8.0",
39
+ "@quenty/settings": "^11.11.1",
40
40
  "@quenty/string": "^3.3.0",
41
41
  "@quenty/table": "^3.5.0"
42
42
  },
43
- "gitHead": "9b17fe79cddd071f0f06a9d35184e76b44bd6fe6"
43
+ "gitHead": "539802fea720a92f81ad48d6d5579605d8844d0a"
44
44
  }
@@ -17,25 +17,23 @@ function InputKeyMapSettingClient.new(serviceBag, inputKeyMapList)
17
17
  local self = setmetatable(BaseObject.new(), InputKeyMapSettingClient)
18
18
 
19
19
  self._serviceBag = assert(serviceBag, "No serviceBag")
20
- self._settingService = self._serviceBag:GetService(SettingsServiceClient)
20
+ self._settingServiceClient = self._serviceBag:GetService(SettingsServiceClient)
21
21
 
22
22
  self._inputKeyMapList = assert(inputKeyMapList, "No inputKeyMapList")
23
23
 
24
- self._maid:GiveTask(self._settingService:ObserveLocalPlayerSettingsBrio():Subscribe(function(settingsBrio)
24
+ self._maid:GiveTask(self._settingServiceClient:ObserveLocalPlayerSettingsBrio():Subscribe(function(settingsBrio)
25
25
  if settingsBrio:IsDead() then
26
26
  return
27
27
  end
28
28
 
29
- local settingMaid = settingsBrio:ToMaid()
30
- local settings = settingsBrio:GetValue()
29
+ local settingMaid, settings = settingsBrio:ToMaidAndValue()
31
30
 
32
31
  settingMaid:GiveTask(self._inputKeyMapList:ObservePairsBrio():Subscribe(function(brio)
33
32
  if brio:IsDead() then
34
33
  return
35
34
  end
36
35
 
37
- local maid = brio:ToMaid()
38
- local inputModeType, inputKeyMap = brio:GetValue()
36
+ local maid, inputModeType, inputKeyMap = brio:ToMaidAndValue()
39
37
 
40
38
  local settingName = InputKeyMapSettingUtils.getSettingName(inputKeyMapList, inputModeType)
41
39
  local settingProperty = settings:GetSettingProperty(settingName, InputKeyMapSettingConstants.DEFAULT_VALUE)
@@ -28,8 +28,7 @@ function SettingsInputKeyMapServiceClient:Start()
28
28
  return
29
29
  end
30
30
 
31
- local maid = brio:ToMaid()
32
- local inputKeyMapList = brio:GetValue()
31
+ local maid, inputKeyMapList = brio:ToMaidAndValue()
33
32
 
34
33
  maid:GiveTask(InputKeyMapSettingClient.new(self._serviceBag, inputKeyMapList))
35
34
  end))
@@ -7,10 +7,9 @@ local require = require(script.Parent.loader).load(script)
7
7
 
8
8
  local BaseObject = require("BaseObject")
9
9
  local InputKeyMapSettingUtils = require("InputKeyMapSettingUtils")
10
- local SettingsService = require("SettingsService")
11
10
  local InputKeyMapSettingConstants = require("InputKeyMapSettingConstants")
12
11
  local SettingDefinition = require("SettingDefinition")
13
- local SettingRegistryServiceShared = require("SettingRegistryServiceShared")
12
+ local SettingsDataService = require("SettingsDataService")
14
13
 
15
14
  local InputKeyMapSetting = setmetatable({}, BaseObject)
16
15
  InputKeyMapSetting.ClassName = "InputKeyMapSetting"
@@ -20,8 +19,7 @@ function InputKeyMapSetting.new(serviceBag, inputKeyMapList)
20
19
  local self = setmetatable(BaseObject.new(), InputKeyMapSetting)
21
20
 
22
21
  self._serviceBag = assert(serviceBag, "No serviceBag")
23
- self._settingService = self._serviceBag:GetService(SettingsService)
24
- self._settingRegistryServiceShared = self._serviceBag:GetService(SettingRegistryServiceShared)
22
+ self._settingDataService = self._serviceBag:GetService(SettingsDataService)
25
23
 
26
24
  self._inputKeyMapList = assert(inputKeyMapList, "No inputKeyMapList")
27
25
 
@@ -37,7 +35,7 @@ function InputKeyMapSetting.new(serviceBag, inputKeyMapList)
37
35
  local settingName = InputKeyMapSettingUtils.getSettingName(inputKeyMapList, inputModeType)
38
36
  local definition = SettingDefinition.new(settingName, InputKeyMapSettingConstants.DEFAULT_VALUE)
39
37
 
40
- maid:GiveTask(self._settingRegistryServiceShared:RegisterSettingDefinition(definition))
38
+ maid:GiveTask(self._settingDataService:RegisterSettingDefinition(definition))
41
39
  end))
42
40
 
43
41
  return self