@quenty/counter 7.6.0 → 7.8.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 +19 -0
- package/package.json +7 -7
- package/src/Shared/Counter.lua +6 -0
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
|
+
# [7.8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/counter@7.7.0...@quenty/counter@7.8.0) (2024-10-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Ensure counter can't double-clean-up ([566a9cb](https://github.com/Quenty/NevermoreEngine/commit/566a9cb8b384b136457d82bea1af8c26cd01932a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [7.7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/counter@7.6.0...@quenty/counter@7.7.0) (2024-09-25)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @quenty/counter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [7.6.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/counter@7.5.0...@quenty/counter@7.6.0) (2024-09-25)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @quenty/counter
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/counter",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0",
|
|
4
4
|
"description": "Helps count a total value",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "^10.
|
|
29
|
-
"@quenty/loader": "^10.
|
|
30
|
-
"@quenty/maid": "^3.
|
|
31
|
-
"@quenty/rx": "^13.
|
|
32
|
-
"@quenty/valueobject": "^13.
|
|
28
|
+
"@quenty/baseobject": "^10.6.0",
|
|
29
|
+
"@quenty/loader": "^10.6.0",
|
|
30
|
+
"@quenty/maid": "^3.4.0",
|
|
31
|
+
"@quenty/rx": "^13.8.0",
|
|
32
|
+
"@quenty/valueobject": "^13.8.0"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "035abfa088c854a73e1c65b350267eaa17669646"
|
|
38
38
|
}
|
package/src/Shared/Counter.lua
CHANGED
|
@@ -58,7 +58,13 @@ function Counter:Add(amount)
|
|
|
58
58
|
if type(amount) == "number" then
|
|
59
59
|
self._count.Value = self._count.Value + amount
|
|
60
60
|
|
|
61
|
+
local cleanedUp = false
|
|
61
62
|
return function()
|
|
63
|
+
if cleanedUp then
|
|
64
|
+
return
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
cleanedUp = true
|
|
62
68
|
if self._count.Destroy then
|
|
63
69
|
self._count.Value = self._count.Value - amount
|
|
64
70
|
end
|