@quenty/deathreport 10.20.0 → 10.20.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 +8 -0
- package/package.json +11 -11
- package/src/Shared/DeathReportUtils.lua +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [10.20.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/deathreport@10.20.0...@quenty/deathreport@10.20.1) (2025-03-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/deathreport
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [10.20.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/deathreport@10.19.0...@quenty/deathreport@10.20.0) (2025-02-18)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @quenty/deathreport
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/deathreport",
|
|
3
|
-
"version": "10.20.
|
|
3
|
+
"version": "10.20.1",
|
|
4
4
|
"description": "Death report service which will track the deaths of players",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@quenty/baseobject": "^10.8.0",
|
|
33
|
-
"@quenty/binder": "^14.18.
|
|
34
|
-
"@quenty/characterutils": "^12.17.
|
|
35
|
-
"@quenty/humanoidkillerutils": "^2.3.
|
|
33
|
+
"@quenty/binder": "^14.18.1",
|
|
34
|
+
"@quenty/characterutils": "^12.17.1",
|
|
35
|
+
"@quenty/humanoidkillerutils": "^2.3.1",
|
|
36
36
|
"@quenty/loader": "^10.8.0",
|
|
37
37
|
"@quenty/maid": "^3.4.0",
|
|
38
|
-
"@quenty/playerhumanoidbinder": "^14.18.
|
|
39
|
-
"@quenty/remoting": "^12.17.
|
|
40
|
-
"@quenty/rx": "^13.16.
|
|
41
|
-
"@quenty/rxbinderutils": "^14.18.
|
|
42
|
-
"@quenty/servicebag": "^11.11.
|
|
38
|
+
"@quenty/playerhumanoidbinder": "^14.18.1",
|
|
39
|
+
"@quenty/remoting": "^12.17.1",
|
|
40
|
+
"@quenty/rx": "^13.16.1",
|
|
41
|
+
"@quenty/rxbinderutils": "^14.18.1",
|
|
42
|
+
"@quenty/servicebag": "^11.11.1",
|
|
43
43
|
"@quenty/signal": "^7.10.0",
|
|
44
|
-
"@quenty/table": "^3.7.
|
|
44
|
+
"@quenty/table": "^3.7.1"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "6b7c3e15e60cdb185986207b574e2b5591261e7a"
|
|
47
47
|
}
|
|
@@ -18,14 +18,14 @@ local DeathReportUtils = {}
|
|
|
18
18
|
@param weaponData WeaponData
|
|
19
19
|
@return DeathReport
|
|
20
20
|
]=]
|
|
21
|
-
function DeathReportUtils.fromDeceasedHumanoid(humanoid, weaponData)
|
|
21
|
+
function DeathReportUtils.fromDeceasedHumanoid(humanoid: Humanoid, weaponData)
|
|
22
22
|
assert(DeathReportUtils.isWeaponData(weaponData) or weaponData == nil, "Bad weaponData")
|
|
23
23
|
|
|
24
24
|
local killerHumanoid = HumanoidKillerUtils.getKillerHumanoidOfHumanoid(humanoid)
|
|
25
25
|
return DeathReportUtils.create(humanoid.Parent, killerHumanoid, weaponData)
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
function DeathReportUtils.create(adornee, killerAdornee, weaponData)
|
|
28
|
+
function DeathReportUtils.create(adornee: Instance, killerAdornee, weaponData)
|
|
29
29
|
assert(typeof(adornee) == "Instance", "Bad adornee")
|
|
30
30
|
|
|
31
31
|
local humanoid
|
|
@@ -36,14 +36,14 @@ function DeathReportUtils.create(adornee, killerAdornee, weaponData)
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
return {
|
|
39
|
-
type = "deathReport"
|
|
40
|
-
adornee = adornee
|
|
41
|
-
humanoid = humanoid
|
|
42
|
-
player = CharacterUtils.getPlayerFromCharacter(adornee)
|
|
43
|
-
killerAdornee = killerAdornee
|
|
44
|
-
killerHumanoid = killerAdornee and killerAdornee:IsA("Humanoid") and killerAdornee or nil
|
|
45
|
-
killerPlayer = killerAdornee and CharacterUtils.getPlayerFromCharacter(killerAdornee) or nil
|
|
46
|
-
weaponData = weaponData or DeathReportUtils.createWeaponData(nil)
|
|
39
|
+
type = "deathReport",
|
|
40
|
+
adornee = adornee,
|
|
41
|
+
humanoid = humanoid,
|
|
42
|
+
player = CharacterUtils.getPlayerFromCharacter(adornee),
|
|
43
|
+
killerAdornee = killerAdornee,
|
|
44
|
+
killerHumanoid = killerAdornee and killerAdornee:IsA("Humanoid") and killerAdornee or nil,
|
|
45
|
+
killerPlayer = killerAdornee and CharacterUtils.getPlayerFromCharacter(killerAdornee) or nil,
|
|
46
|
+
weaponData = weaponData or DeathReportUtils.createWeaponData(nil),
|
|
47
47
|
}
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -54,8 +54,7 @@ end
|
|
|
54
54
|
@return boolean
|
|
55
55
|
]=]
|
|
56
56
|
function DeathReportUtils.isDeathReport(deathReport)
|
|
57
|
-
return type(deathReport) == "table"
|
|
58
|
-
and deathReport.type == "deathReport"
|
|
57
|
+
return type(deathReport) == "table" and deathReport.type == "deathReport"
|
|
59
58
|
end
|
|
60
59
|
|
|
61
60
|
--[=[
|
|
@@ -64,8 +63,9 @@ end
|
|
|
64
63
|
@param weaponData any
|
|
65
64
|
@return boolean
|
|
66
65
|
]=]
|
|
67
|
-
function DeathReportUtils.isWeaponData(weaponData)
|
|
68
|
-
return type(weaponData) == "table"
|
|
66
|
+
function DeathReportUtils.isWeaponData(weaponData): boolean
|
|
67
|
+
return type(weaponData) == "table"
|
|
68
|
+
and (typeof(weaponData.weaponInstance) == "Instance" or weaponData.weaponInstance == nil)
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
--[=[
|
|
@@ -78,7 +78,7 @@ function DeathReportUtils.createWeaponData(weaponInstance)
|
|
|
78
78
|
assert(typeof(weaponInstance) == "Instance" or weaponInstance == nil, "Bad weaponInstance")
|
|
79
79
|
|
|
80
80
|
return {
|
|
81
|
-
weaponInstance = weaponInstance
|
|
81
|
+
weaponInstance = weaponInstance,
|
|
82
82
|
}
|
|
83
83
|
end
|
|
84
84
|
|
|
@@ -184,4 +184,4 @@ function DeathReportUtils.getDefaultColor()
|
|
|
184
184
|
return DEFAULT_COLOR
|
|
185
185
|
end
|
|
186
186
|
|
|
187
|
-
return DeathReportUtils
|
|
187
|
+
return DeathReportUtils
|