@quenty/coreguienabler 6.4.0 → 6.4.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,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
+ ## [6.4.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/coreguienabler@6.4.0...@quenty/coreguienabler@6.4.1) (2023-03-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Fix Enum.CoreGuiType.All leading to reenabled content ([16ebd45](https://github.com/Quenty/NevermoreEngine/commit/16ebd45ba78566eed679ff57b585b21752014912))
12
+
13
+
14
+
15
+
16
+
6
17
  # [6.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/coreguienabler@6.3.0...@quenty/coreguienabler@6.4.0) (2023-03-05)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/coreguienabler
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/coreguienabler",
3
- "version": "6.4.0",
3
+ "version": "6.4.1",
4
4
  "description": "Key based CoreGuiEnabler, singleton Use this class to load/unload CoreGuis / other GUIs, by disabling based upon keys Keys are additive, so if you have more than 1 disabled, it's ok.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,10 +27,11 @@
27
27
  "@quenty/characterutils": "^6.3.0",
28
28
  "@quenty/loader": "^6.2.0",
29
29
  "@quenty/maid": "^2.5.0",
30
- "@quenty/rx": "^7.7.0"
30
+ "@quenty/rx": "^7.7.0",
31
+ "@quenty/symbol": "^2.2.0"
31
32
  },
32
33
  "publishConfig": {
33
34
  "access": "public"
34
35
  },
35
- "gitHead": "e62b5eac2e5d9084ab9083f128452dd2d98b6f1a"
36
+ "gitHead": "0b66085e66e5bc98bc62f9b10ba73ba80889477f"
36
37
  }
@@ -25,6 +25,9 @@ local CharacterUtils = require("CharacterUtils")
25
25
  local Maid = require("Maid")
26
26
  local ObservableSubscriptionTable = require("ObservableSubscriptionTable")
27
27
  local Rx = require("Rx")
28
+ local Symbol = require("Symbol")
29
+
30
+ local ALL_TOKEN = Symbol.named("allToken")
28
31
 
29
32
  local CoreGuiEnabler = {}
30
33
  CoreGuiEnabler.__index = CoreGuiEnabler
@@ -45,6 +48,23 @@ function CoreGuiEnabler.new()
45
48
  CharacterUtils.unequipTools(Players.LocalPlayer)
46
49
  end)
47
50
 
51
+ -- Specifically handle this so we interface properly
52
+ self:AddState(Enum.CoreGuiType.All, function(isEnabled)
53
+ if isEnabled then
54
+ for _, coreGuiType in pairs(Enum.CoreGuiType:GetEnumItems()) do
55
+ if coreGuiType ~= Enum.CoreGuiType.All then
56
+ self:Enable(ALL_TOKEN, coreGuiType)
57
+ end
58
+ end
59
+ else
60
+ for _, coreGuiType in pairs(Enum.CoreGuiType:GetEnumItems()) do
61
+ if coreGuiType ~= Enum.CoreGuiType.All then
62
+ self:Disable(ALL_TOKEN, coreGuiType)
63
+ end
64
+ end
65
+ end
66
+ end)
67
+
48
68
  for _, coreGuiType in pairs(Enum.CoreGuiType:GetEnumItems()) do
49
69
  if not self._states[coreGuiType] then
50
70
  self:AddState(coreGuiType, function(isEnabled)