Fix zombie eye appearance (#19427)
This commit is contained in:
@@ -133,12 +133,15 @@ namespace Content.Server.Zombies
|
||||
{
|
||||
//store some values before changing them in case the humanoid get cloned later
|
||||
zombiecomp.BeforeZombifiedSkinColor = huApComp.SkinColor;
|
||||
zombiecomp.BeforeZombifiedEyeColor = huApComp.EyeColor;
|
||||
zombiecomp.BeforeZombifiedCustomBaseLayers = new(huApComp.CustomBaseLayers);
|
||||
if (TryComp<BloodstreamComponent>(target, out var stream))
|
||||
zombiecomp.BeforeZombifiedBloodReagent = stream.BloodReagent;
|
||||
|
||||
_humanoidAppearance.SetSkinColor(target, zombiecomp.SkinColor, verify: false, humanoid: huApComp);
|
||||
_humanoidAppearance.SetBaseLayerColor(target, HumanoidVisualLayers.Eyes, zombiecomp.EyeColor, humanoid: huApComp);
|
||||
|
||||
// Messing with the eye layer made it vanish upon cloning, and also it didn't even appear right
|
||||
huApComp.EyeColor = zombiecomp.EyeColor;
|
||||
|
||||
// this might not resync on clone?
|
||||
_humanoidAppearance.SetBaseLayerId(target, HumanoidVisualLayers.Tail, zombiecomp.BaseLayerExternal, humanoid: huApComp);
|
||||
|
||||
@@ -20,6 +20,7 @@ using Content.Shared.Zombies;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
using Content.Shared.Humanoid;
|
||||
|
||||
namespace Content.Server.Zombies
|
||||
{
|
||||
@@ -256,7 +257,11 @@ namespace Content.Server.Zombies
|
||||
_humanoidAppearance.SetBaseLayerColor(target, layer, info.Color);
|
||||
_humanoidAppearance.SetBaseLayerId(target, layer, info.ID);
|
||||
}
|
||||
_humanoidAppearance.SetSkinColor(target, zombiecomp.BeforeZombifiedSkinColor);
|
||||
if(TryComp<HumanoidAppearanceComponent>(target, out var appcomp))
|
||||
{
|
||||
appcomp.EyeColor = zombiecomp.BeforeZombifiedEyeColor;
|
||||
}
|
||||
_humanoidAppearance.SetSkinColor(target, zombiecomp.BeforeZombifiedSkinColor, false);
|
||||
_bloodstream.ChangeBloodReagent(target, zombiecomp.BeforeZombifiedBloodReagent);
|
||||
|
||||
_metaData.SetEntityName(target, zombiecomp.BeforeZombifiedEntityName);
|
||||
|
||||
Reference in New Issue
Block a user