Skip to content

Commit

Permalink
replaced head with body
Browse files Browse the repository at this point in the history
  • Loading branch information
XLegland authored and gdevillele committed Jan 12, 2024
1 parent 371aa5e commit 45155d3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
2 changes: 1 addition & 1 deletion lua/modules/avatar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ index.setSkinColor = function(self, avatar, skin1, skin2, nose, mouth)
if part == nil and name == "Body" then
part = avatar
end
self:setBodyPartColor(name, part, skin1, skin2)
self:setBodyPartColor(nil, part, skin1, skin2)
end
end

Expand Down
36 changes: 14 additions & 22 deletions lua/modules/menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1604,34 +1604,26 @@ LocalEvent:Listen(LocalEvent.Name.ServerConnectionStart, function()
end)

LocalEvent:Listen(LocalEvent.Name.LocalAvatarUpdate, function(updates)
if updates.skinColors then
if avatar.head.shape then
avatarModule:setHeadColors(
avatar.head.shape,
updates.skinColors.skin1,
updates.skinColors.skin2,
updates.skinColors.nose,
updates.skinColors.mouth
)
end
if updates.skinColors and avatar.body.shape then
avatarModule:setSkinColor(
avatar.body.shape,
updates.skinColors.skin1,
updates.skinColors.skin2,
updates.skinColors.nose,
updates.skinColors.mouth
)
end

if updates.eyesColor then
if avatar.head.shape then
avatarModule:setEyesColor(avatar.head.shape, updates.eyesColor)
end
if updates.eyesColor and avatar.body.shape then
avatarModule:setEyesColor(avatar.body.shape, updates.eyesColor)
end

if updates.noseColor then
if avatar.head.shape then
avatarModule:setNoseColor(avatar.head.shape, updates.noseColor)
end
if updates.noseColor and avatar.body.shape then
avatarModule:setNoseColor(avatar.body.shape, updates.noseColor)
end

if updates.mouthColor then
if avatar.head.shape then
avatarModule:setMouthColor(avatar.head.shape, updates.mouthColor)
end
if updates.mouthColor and avatar.body.shape then
avatarModule:setMouthColor(avatar.head.shape.shape, updates.mouthColor)
end

if updates.outfit == true then
Expand Down

0 comments on commit 45155d3

Please sign in to comment.