added Character Setup (#511)
* added Character Setup * whoops * reverted unrelated changes * Made everything work post-rebase * Removed unused PreferencesChanged event * nope, don't need this * HumanoidProfileEditorPanel -> HumanoidProfileEditor * Set initial data for hair pickers * Fixed nullable warning * Renamed LooksComponent -> HumanoidAppearanceComponent * Renamed LooksComponentState -> HumanoidAppearanceComponentState * Final renaming maybe * Use a human-like dummy instead of a real human * Change preferences structs back to classes
This commit is contained in:
committed by
Pieter-Jan Briers
parent
d03da83fda
commit
a4e369e629
@@ -27,7 +27,7 @@ namespace Content.Server.GameObjects.Components
|
||||
|
||||
private static void OnUiReceiveMessage(ServerBoundUserInterfaceMessage obj)
|
||||
{
|
||||
if (!obj.Session.AttachedEntity.TryGetComponent(out HairComponent hair))
|
||||
if (!obj.Session.AttachedEntity.TryGetComponent(out HumanoidAppearanceComponent looks))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -42,11 +42,11 @@ namespace Content.Server.GameObjects.Components
|
||||
|
||||
if (msg.IsFacialHair)
|
||||
{
|
||||
hair.FacialHairStyleName = msg.HairName;
|
||||
looks.Appearance = looks.Appearance.WithFacialHairStyleName(msg.HairName);
|
||||
}
|
||||
else
|
||||
{
|
||||
hair.HairStyleName = msg.HairName;
|
||||
looks.Appearance = looks.Appearance.WithHairStyleName(msg.HairName);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -57,11 +57,11 @@ namespace Content.Server.GameObjects.Components
|
||||
|
||||
if (msg.IsFacialHair)
|
||||
{
|
||||
hair.FacialHairColor = color;
|
||||
looks.Appearance = looks.Appearance.WithFacialHairColor(color);
|
||||
}
|
||||
else
|
||||
{
|
||||
hair.HairColor = color;
|
||||
looks.Appearance = looks.Appearance.WithHairColor(color);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -75,7 +75,7 @@ namespace Content.Server.GameObjects.Components
|
||||
return;
|
||||
}
|
||||
|
||||
if (!eventArgs.User.TryGetComponent(out HairComponent hair))
|
||||
if (!eventArgs.User.TryGetComponent(out HumanoidAppearanceComponent looks))
|
||||
{
|
||||
Owner.PopupMessage(eventArgs.User, Loc.GetString("You can't have any hair!"));
|
||||
return;
|
||||
@@ -83,8 +83,8 @@ namespace Content.Server.GameObjects.Components
|
||||
|
||||
_userInterface.Open(actor.playerSession);
|
||||
|
||||
var msg = new MagicMirrorInitialDataMessage(hair.HairColor, hair.FacialHairColor, hair.HairStyleName,
|
||||
hair.FacialHairStyleName);
|
||||
var msg = new MagicMirrorInitialDataMessage(looks.Appearance.HairColor, looks.Appearance.FacialHairColor, looks.Appearance.HairStyleName,
|
||||
looks.Appearance.FacialHairStyleName);
|
||||
|
||||
_userInterface.SendMessage(msg, actor.playerSession);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user