@quenty/equippedtracker 13.33.1 → 13.35.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 +10 -0
- package/package.json +3 -3
- package/src/Shared/EquippedTracker.lua +15 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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
|
+
# [13.35.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/equippedtracker@13.34.0...@quenty/equippedtracker@13.35.0) (2026-07-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/equippedtracker
|
|
9
|
+
|
|
10
|
+
# [13.34.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/equippedtracker@13.33.1...@quenty/equippedtracker@13.34.0) (2026-07-14)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **equippedtracker:** convert package to --!strict ([6a2ba4a](https://github.com/Quenty/NevermoreEngine/commit/6a2ba4a963ac89b58422c4eafde0c285b9a06c63))
|
|
15
|
+
|
|
6
16
|
## [13.33.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/equippedtracker@13.33.0...@quenty/equippedtracker@13.33.1) (2026-05-30)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @quenty/equippedtracker
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/equippedtracker",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.35.0",
|
|
4
4
|
"description": "Tracks the equipped player of a tool",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"Quenty"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@quenty/characterutils": "12.
|
|
32
|
+
"@quenty/characterutils": "12.33.0",
|
|
33
33
|
"@quenty/loader": "10.11.0",
|
|
34
34
|
"@quenty/maid": "3.9.0",
|
|
35
35
|
"@quenty/valueobject": "13.31.1"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "d577f1529aa03f5e77534145501e878bde07ca98"
|
|
41
41
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
--!
|
|
1
|
+
--!strict
|
|
2
2
|
--[=[
|
|
3
3
|
Tracks the equipped player of a tool
|
|
4
4
|
@class EquippedTracker
|
|
@@ -14,15 +14,24 @@ local EquippedTracker = {}
|
|
|
14
14
|
EquippedTracker.ClassName = "EquippedTracker"
|
|
15
15
|
EquippedTracker.__index = EquippedTracker
|
|
16
16
|
|
|
17
|
+
export type EquippedTracker = typeof(setmetatable(
|
|
18
|
+
{} :: {
|
|
19
|
+
_tool: Tool,
|
|
20
|
+
_maid: Maid.Maid,
|
|
21
|
+
Player: ValueObject.ValueObject<Player?>,
|
|
22
|
+
},
|
|
23
|
+
{} :: typeof({ __index = EquippedTracker })
|
|
24
|
+
))
|
|
25
|
+
|
|
17
26
|
--[=[
|
|
18
27
|
Tracks the state of a tool being equipped
|
|
19
28
|
@param tool Tool
|
|
20
29
|
@return EquippedTracker
|
|
21
30
|
]=]
|
|
22
|
-
function EquippedTracker.new(tool: Tool)
|
|
31
|
+
function EquippedTracker.new(tool: Tool): EquippedTracker
|
|
23
32
|
assert(tool and tool:IsA("Tool"), "Bad tool")
|
|
24
33
|
|
|
25
|
-
local self = setmetatable({}, EquippedTracker)
|
|
34
|
+
local self: EquippedTracker = setmetatable({} :: any, EquippedTracker)
|
|
26
35
|
|
|
27
36
|
self._tool = tool
|
|
28
37
|
|
|
@@ -46,7 +55,7 @@ function EquippedTracker.new(tool: Tool)
|
|
|
46
55
|
return self
|
|
47
56
|
end
|
|
48
57
|
|
|
49
|
-
function EquippedTracker
|
|
58
|
+
function EquippedTracker._update(self: EquippedTracker): ()
|
|
50
59
|
local player = CharacterUtils.getPlayerFromCharacter(self._tool)
|
|
51
60
|
if not player then
|
|
52
61
|
self._maid._diedConn = nil
|
|
@@ -70,9 +79,9 @@ end
|
|
|
70
79
|
--[=[
|
|
71
80
|
Cleans up the EquippedTracker
|
|
72
81
|
]=]
|
|
73
|
-
function EquippedTracker
|
|
82
|
+
function EquippedTracker.Destroy(self: EquippedTracker): ()
|
|
74
83
|
self._maid:DoCleaning()
|
|
75
|
-
setmetatable(self, nil)
|
|
84
|
+
setmetatable(self :: any, nil)
|
|
76
85
|
end
|
|
77
86
|
|
|
78
87
|
return EquippedTracker
|