@quenty/playerinputmode 3.13.0 → 3.14.0

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,17 @@
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
+ # [3.14.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerinputmode@3.13.0...@quenty/playerinputmode@3.14.0) (2023-03-31)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add PlayerInputModeUtils.promisePlayerInputMode(player, cancelToken) ([7f8ed94](https://github.com/Quenty/NevermoreEngine/commit/7f8ed942b254e40fa46398ca12db0bd3784d9080))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.13.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerinputmode@3.12.0...@quenty/playerinputmode@3.13.0) (2023-03-31)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/playerinputmode
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/playerinputmode",
3
- "version": "3.13.0",
3
+ "version": "3.14.0",
4
4
  "description": "Service that takes active input modes from the player and exposes it to every other player via the server.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,17 +26,18 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/attributeutils": "^8.8.0",
30
- "@quenty/inputmode": "^7.12.0",
29
+ "@quenty/attributeutils": "^8.9.0",
30
+ "@quenty/inputmode": "^7.13.0",
31
31
  "@quenty/loader": "^6.2.0",
32
32
  "@quenty/maid": "^2.5.0",
33
- "@quenty/remoting": "^6.3.0",
34
- "@quenty/rx": "^7.7.0",
33
+ "@quenty/promise": "^6.4.0",
34
+ "@quenty/remoting": "^6.4.0",
35
+ "@quenty/rx": "^7.8.0",
35
36
  "@quenty/servicebag": "^6.6.0",
36
37
  "@quenty/table": "^3.2.0"
37
38
  },
38
39
  "publishConfig": {
39
40
  "access": "public"
40
41
  },
41
- "gitHead": "cf537ed1fe265276971486129beb372cbaaca4a6"
42
+ "gitHead": "2a1c35a8d2e90b291a83a6e2def0ec69f3f24837"
42
43
  }
@@ -31,6 +31,10 @@ function PlayerInputModeService:GetPlayerInputModeType(player)
31
31
  return PlayerInputModeUtils.getPlayerInputModeType(player)
32
32
  end
33
33
 
34
+ function PlayerInputModeService:PromisePlayerInputMode(player, cancelToken)
35
+ return PlayerInputModeUtils.promisePlayerInputMode(player, cancelToken)
36
+ end
37
+
34
38
  function PlayerInputModeService:ObservePlayerInputType(player)
35
39
  assert(typeof(player) == "Instance" and player:IsA("Player"), "Bad player")
36
40
 
@@ -7,6 +7,7 @@ local require = require(script.Parent.loader).load(script)
7
7
  local PlayerInputModeServiceConstants = require("PlayerInputModeServiceConstants")
8
8
  local RxAttributeUtils = require("RxAttributeUtils")
9
9
  local PlayerInputModeTypes = require("PlayerInputModeTypes")
10
+ local AttributeUtils = require("AttributeUtils")
10
11
 
11
12
  local PlayerInputModeUtils = {}
12
13
 
@@ -22,6 +23,12 @@ function PlayerInputModeUtils.observePlayerInputModeType(player)
22
23
  return RxAttributeUtils.observeAttribute(player, PlayerInputModeServiceConstants.INPUT_MODE_ATTRIBUTE)
23
24
  end
24
25
 
26
+ function PlayerInputModeUtils.promisePlayerInputMode(player, cancelToken)
27
+ assert(typeof(player) == "Instance" and player:IsA("Player"), "Bad player")
28
+
29
+ return AttributeUtils.promiseAttribute(player, PlayerInputModeServiceConstants.INPUT_MODE_ATTRIBUTE, PlayerInputModeUtils.isInputModeType, cancelToken)
30
+ end
31
+
25
32
  function PlayerInputModeUtils.isInputModeType(playerInputModeType)
26
33
  return typeof(playerInputModeType) == "string" and (
27
34
  playerInputModeType == PlayerInputModeTypes.GAMEPAD