@quenty/modelappearance 10.7.1 → 10.7.2
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 +11 -0
- package/package.json +2 -2
- package/src/Shared/ModelAppearance.lua +12 -0
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
|
+
## [10.7.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/modelappearance@10.7.1...@quenty/modelappearance@10.7.2) (2025-01-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Support part operations in ModelAppearance API ([#528](https://github.com/Quenty/NevermoreEngine/issues/528)) ([125d008](https://github.com/Quenty/NevermoreEngine/commit/125d008d4d3c4ec4933d5963f23211ecf975b5a7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [10.7.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/modelappearance@10.7.0...@quenty/modelappearance@10.7.1) (2024-11-04)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/modelappearance
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/modelappearance",
|
|
3
|
-
"version": "10.7.
|
|
3
|
+
"version": "10.7.2",
|
|
4
4
|
"description": "Allows the appearance of a model to be overridden. Most commonly used when placing down an object in a building game.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "c96293daa91c7f613d4ee3b1781f0bc08a391e82"
|
|
35
35
|
}
|
|
@@ -32,6 +32,10 @@ function ModelAppearance.new(model)
|
|
|
32
32
|
if part:IsA("Seat") or part:IsA("VehicleSeat") then
|
|
33
33
|
self._seats[part] = part
|
|
34
34
|
end
|
|
35
|
+
|
|
36
|
+
if part:IsA("PartOperation") then
|
|
37
|
+
self._parts[part].UsePartColor = part.UsePartColor
|
|
38
|
+
end
|
|
35
39
|
elseif part:IsA("ClickDetector") or part:IsA("BodyMover") then
|
|
36
40
|
table.insert(self._interactions, part)
|
|
37
41
|
end
|
|
@@ -102,6 +106,10 @@ function ModelAppearance:SetColor(color)
|
|
|
102
106
|
self._color = color
|
|
103
107
|
for part, _ in pairs(self._parts) do
|
|
104
108
|
part.Color = color
|
|
109
|
+
|
|
110
|
+
if part:IsA("PartOperation") then
|
|
111
|
+
part.UsePartColor = true
|
|
112
|
+
end
|
|
105
113
|
end
|
|
106
114
|
end
|
|
107
115
|
|
|
@@ -113,6 +121,10 @@ function ModelAppearance:ResetColor()
|
|
|
113
121
|
self._color = nil
|
|
114
122
|
for part, properties in pairs(self._parts) do
|
|
115
123
|
part.Color = properties.Color
|
|
124
|
+
|
|
125
|
+
if part:IsA("PartOperation") then
|
|
126
|
+
part.UsePartColor = properties.UsePartColor
|
|
127
|
+
end
|
|
116
128
|
end
|
|
117
129
|
end
|
|
118
130
|
|