* - fix: Genitals sprite shit and meow for tajaran

* - add: fart sound if kicked from server

* - tweak: vulpies and tajaran now for donaters!!!

* - fix: Fart on exit

* - add: roleplay think

* - fix: database shit and loc

* - add: ears for slime

* - fix: LOC interaction fix

* - add: height setting

* - fix: height for felinids

* - fix: nigga fix

* - fix: no bitches on captain

* - fix: interaction panel animation shit
This commit is contained in:
Cinkafox
2024-03-11 11:13:33 +03:00
committed by GitHub
parent db920c3942
commit 95054e072a
65 changed files with 12561 additions and 91 deletions

View File

@@ -0,0 +1,25 @@
using System.Numerics;
using Content.Shared._Amour.CustomHeight;
using Robust.Client.GameObjects;
namespace Content.Client._Amour.CustomHeight;
public sealed class CustomHeightSystem : SharedCustomHeightSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<CustomHeightComponent,AppearanceChangeEvent>(OnHeightChange);
}
private void OnHeightChange(EntityUid uid, CustomHeightComponent component, AppearanceChangeEvent args)
{
if(args.Sprite is null || !AppearanceSystem.TryGetData<float>(uid, HeightVisuals.State, out var height))
return;
height = Math.Clamp(height, component.Min, component.Max);
args.Sprite.Scale = new Vector2(height);
}
}

View File

@@ -0,0 +1,78 @@
using Content.Client._Amour.CustomHeight;
using Content.Shared._Amour.CustomHeight;
using Content.Shared._Amour.LoggerExtension;
using Robust.Client.UserInterface.Controls;
using Range = Robust.Client.UserInterface.Controls.Range;
namespace Content.Client.Preferences.UI;
public sealed partial class HumanoidProfileEditor
{
private Slider _height => CHeight;
private Label _heightInformation => CHeightInformation;
private CustomHeightSystem _customHeightSystem = default!;
public void InitializeHeight()
{
_customHeightSystem = _entMan.System<CustomHeightSystem>();
_height.OnValueChanged += HeightValueChanged;
ResetHeightButton.OnPressed += ResetHeightButtonOnOnPressed;
}
private void ResetHeightButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
{
if (_entMan.TryGetComponent<CustomHeightComponent>(_previewDummy, out var heightComponent))
{
SetDummyHeight(_customHeightSystem.GetByteFromHeight(_previewDummy.Value, heightComponent.Starting));
}
}
private void HeightValueChanged(Range obj)
{
SetDummyHeight((byte) _height.Value,false);
}
public void UpdateHeightControl()
{
if (Profile is null)
return;
if (!_entMan.TryGetComponent<CustomHeightComponent>(_previewDummy, out _))
{
HeightContainer.Visible = false;
return;
}
HeightContainer.Visible = true;
_height.Value = Profile.Appearance.Height;
UpdateHeightText();
}
public void SetDummyHeight(byte height, bool changeHeightValue = true)
{
if (Profile is null || !_entMan.TryGetComponent<CustomHeightComponent>(_previewDummy, out var a))
return;
if(changeHeightValue)
_height.Value = height;
Profile = Profile.WithCharacterAppearance(Profile.Appearance.WithHeight(height));
UpdateHeightText();
IsDirty = true;
}
public void UpdateHeightText()
{
if (_entMan.TryGetComponent<CustomHeightComponent>(_previewDummy, out _))
{
var height = (int)(_customHeightSystem
.GetHeightFromByte(_previewDummy.Value, (byte) _height.Value) * 180);
_heightInformation.Text = Loc.GetString("humanoid-profile-height-current") + height;
}
}
}