еще приколы
This commit is contained in:
@@ -218,6 +218,32 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
||||
Dirty(uid, humanoid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set a humanoid mob's body yupe. This will change their base sprites.
|
||||
/// </summary>
|
||||
/// <param name="uid">The humanoid mob's UID.</param>
|
||||
/// <param name="bodyType">The body type to set the mob to. Will return if the body type prototype was invalid.</param>
|
||||
/// <param name="sync">Whether to immediately synchronize this to the humanoid mob, or not.</param>
|
||||
/// <param name="humanoid">Humanoid component of the entity</param>
|
||||
public void SetBodyType(
|
||||
EntityUid uid,
|
||||
ProtoId<BodyTypePrototype> bodyType,
|
||||
bool sync = true,
|
||||
HumanoidAppearanceComponent? humanoid = null)
|
||||
{
|
||||
if (!Resolve(uid, ref humanoid) || !_proto.TryIndex(bodyType, out _))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
humanoid.BodyType = bodyType;
|
||||
|
||||
if (sync)
|
||||
{
|
||||
Dirty(uid, humanoid);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base layer ID of this humanoid mob. A humanoid mob's 'base layer' is
|
||||
/// the skin sprite that is applied to the mob's sprite upon appearance refresh.
|
||||
@@ -327,6 +353,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
||||
humanoid.EyeColor = profile.Appearance.EyeColor;
|
||||
|
||||
SetSkinColor(uid, profile.Appearance.SkinColor, false);
|
||||
SetBodyType(uid, profile.BodyType, false);
|
||||
|
||||
humanoid.MarkingSet.Clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user