@quenty/cooldown 1.4.0 → 1.5.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
+ # [1.5.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/cooldown@1.4.0...@quenty/cooldown@1.5.0) (2021-12-18)
7
+
8
+
9
+ ### Features
10
+
11
+ * Allow CooldownTracker to be initialized without the cooldown binders being initialized. ([77b2eaf](https://github.com/Quenty/NevermoreEngine/commit/77b2eaf1649e1b2786304ea0f23e21fd01e0e9da))
12
+
13
+
14
+
15
+
16
+
6
17
  # [1.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/cooldown@1.3.1...@quenty/cooldown@1.4.0) (2021-12-14)
7
18
 
8
19
 
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2014 Quenty
3
+ Copyright (c) 2014-2021 Quenty
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/cooldown",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Generalized networked cooldown system for Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,20 +26,20 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@quenty/baseobject": "^3.2.0",
29
- "@quenty/binder": "^4.4.0",
29
+ "@quenty/binder": "^4.5.0",
30
30
  "@quenty/loader": "^3.1.1",
31
31
  "@quenty/maid": "^2.0.1",
32
- "@quenty/promise": "^3.2.0",
33
- "@quenty/remoting": "^3.2.0",
34
- "@quenty/rxbinderutils": "^4.5.0",
32
+ "@quenty/promise": "^3.3.0",
33
+ "@quenty/remoting": "^3.3.0",
34
+ "@quenty/rxbinderutils": "^4.6.0",
35
35
  "@quenty/servicebag": "^3.2.1",
36
36
  "@quenty/signal": "^2.0.0",
37
37
  "@quenty/table": "^2.1.0",
38
- "@quenty/timesyncservice": "^3.2.0",
39
- "@quenty/valueobject": "^3.4.0"
38
+ "@quenty/timesyncservice": "^3.3.0",
39
+ "@quenty/valueobject": "^3.5.0"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "8a33939501e25cf227e96f7eb0d1a23b86f10f3c"
44
+ "gitHead": "6eb398e9fb81191f0815885f807ab0cb3bb9bad1"
45
45
  }
@@ -28,23 +28,27 @@ function CooldownTracker.new(serviceBag, parent)
28
28
  self:_handleNewCooldown(...)
29
29
  end))
30
30
 
31
- self._maid:GiveTask(RxBinderUtils.observeBoundChildClassBrio(self._cooldownBinders.Cooldown, self._obj)
32
- :Subscribe(function(brio)
33
- if brio:IsDead() then
34
- return
35
- end
31
+ -- Handle not running
32
+ self._maid:GivePromise(self._cooldownBinders:PromiseBinder("Cooldown"))
33
+ :Then(function(cooldownBinder)
34
+ self._maid:GiveTask(RxBinderUtils.observeBoundChildClassBrio(cooldownBinder, self._obj)
35
+ :Subscribe(function(brio)
36
+ if brio:IsDead() then
37
+ return
38
+ end
36
39
 
37
- -- TODO: Use stack (with multiple cooldowns)
38
- local cooldown = brio:GetValue()
39
- local maid = brio:ToMaid()
40
- self.CurrentCooldown.Value = cooldown
40
+ -- TODO: Use stack (with multiple cooldowns)
41
+ local cooldown = brio:GetValue()
42
+ local maid = brio:ToMaid()
43
+ self.CurrentCooldown.Value = cooldown
41
44
 
42
- maid:GiveTask(function()
43
- if self.CurrentCooldown.Value == cooldown then
44
- self.CurrentCooldown.Value = nil
45
- end
46
- end)
47
- end))
45
+ maid:GiveTask(function()
46
+ if self.CurrentCooldown.Value == cooldown then
47
+ self.CurrentCooldown.Value = nil
48
+ end
49
+ end)
50
+ end))
51
+ end)
48
52
 
49
53
  return self
50
54
  end