Skip to content

Commit

Permalink
Merge branch 'master' into wizmerge
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepyyapril authored Jan 1, 2025
2 parents 103e552 + 6e6caf8 commit ecd416a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Content.Client/Humanoid/HumanoidAppearanceSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Markings;
using Content.Shared.Humanoid.Prototypes;
Expand Down Expand Up @@ -30,6 +31,15 @@ private void UpdateSprite(HumanoidAppearanceComponent component, SpriteComponent
UpdateLayers(component, sprite);
ApplyMarkingSet(component, sprite);

var speciesPrototype = _prototypeManager.Index(component.Species);

var height = Math.Clamp(component.Height, speciesPrototype.MinHeight, speciesPrototype.MaxHeight);
var width = Math.Clamp(component.Width, speciesPrototype.MinWidth, speciesPrototype.MaxWidth);
component.Height = height;
component.Width = width;

sprite.Scale = new Vector2(width, height);

sprite[sprite.LayerMapReserveBlank(HumanoidVisualLayers.Eyes)].Color = component.EyeColor;
}

Expand Down Expand Up @@ -199,6 +209,8 @@ public override void LoadProfile(EntityUid uid, HumanoidCharacterProfile? profil
humanoid.Species = profile.Species;
humanoid.SkinColor = profile.Appearance.SkinColor;
humanoid.EyeColor = profile.Appearance.EyeColor;
humanoid.Height = profile.Height;
humanoid.Width = profile.Width;

UpdateSprite(humanoid, Comp<SpriteComponent>(uid));
}
Expand Down
7 changes: 7 additions & 0 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8894,3 +8894,10 @@ Entries:
id: 6602
time: '2024-12-31T20:42:24.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1387
- author: Mocho
changes:
- type: Fix
message: Fixed heights/widths being broken due to the shitmed patch.
id: 6603
time: '2025-01-01T03:33:47.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1390

0 comments on commit ecd416a

Please sign in to comment.