* - 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

@@ -131,6 +131,15 @@
<Control HorizontalExpand="True"/>
<OptionButton Name="CSpawnPriorityButton" HorizontalAlignment="Right" />
</BoxContainer>
<!-- Height -->
<BoxContainer HorizontalExpand="True" Orientation="Vertical" Name="HeightContainer">
<Label Text="{Loc 'humanoid-profile-editor-height-label'}" />
<Slider HorizontalExpand="True" Name="CHeight" MinValue="0" MaxValue="255" Value="1"/>
<BoxContainer Orientation="Horizontal">
<Label Name="CHeightInformation"/>
<Button Name="ResetHeightButton" Text="{Loc 'height-reset'}"/>
</BoxContainer>
</BoxContainer>
</BoxContainer>
<!-- Skin -->
<BoxContainer Margin="10" HorizontalExpand="True" Orientation="Vertical">
@@ -178,6 +187,12 @@
<humanoid:MarkingPicker Name="CMarkings" IgnoreCategories="Hair,FacialHair" />
</ScrollContainer>
</BoxContainer>
<BoxContainer Name="CRolePlayThinkTab" Orientation="Vertical" Margin="10">
<!-- RolePlay sel -->
<ScrollContainer VerticalExpand="True">
<BoxContainer Name="CRolePlayThing" Orientation="Vertical"></BoxContainer>
</ScrollContainer>
</BoxContainer>
</TabContainer>
</BoxContainer>
<!-- Right side -->

View File

@@ -8,6 +8,7 @@ using Content.Client.Message;
using Content.Client.Players.PlayTimeTracking;
using Content.Client.Stylesheets;
using Content.Client.UserInterface.Controls;
using Content.Shared._Amour.RoleplayInfo;
using Content.Shared.Administration;
using Content.Shared.CCVar;
using Content.Shared.GameTicking;
@@ -85,6 +86,8 @@ namespace Content.Client.Preferences.UI
//WD-EDIT
private OptionButton _voiceButton => CVoiceButton;
private Button _voicePlayButton => CVoicePlayButton;
private BoxContainer _rolePlayThink => CRolePlayThing;
private List<RolePlaySelector> _roleplaySelections = new();
//WD-EDIT
private Slider _skinColor => CSkin;
@@ -220,6 +223,10 @@ namespace Content.Client.Preferences.UI
#region Genitals
InitializeGenitals();
#endregion
#region height
InitializeHeight();
#endregion
//AMOUR END
#region Species
@@ -242,6 +249,7 @@ namespace Content.Client.Preferences.UI
SetSpecies(_speciesList[args.Id].ID);
UpdateHairPickers();
OnSkinColorOnValueChanged();
UpdateHeightControl(); // AMOUR
};
#endregion Species
@@ -545,6 +553,27 @@ namespace Content.Client.Preferences.UI
#endregion FlavorText
//WD EDIT
#region RolePlayThink
_tabContainer.SetTabTitle(5, Loc.GetString("roleplay-tab"));
_rolePlayThink.DisposeAllChildren();
_roleplaySelections.Clear();
foreach (var proto in prototypeManager.EnumeratePrototypes<RoleplayInfoPrototype>())
{
var think = new RolePlaySelector(proto.ID);
think.PreferenceChanged += selection =>
{
Profile = Profile?.WithRoleplaySelection(proto.ID, selection);
IsDirty = true;
};
_roleplaySelections.Add(think);
_rolePlayThink.Children.Add(think);
}
#endregion
//WD END EDIT
#region Dummy
_previewRotateLeftButton.OnPressed += _ =>
@@ -1286,6 +1315,8 @@ namespace Content.Client.Preferences.UI
//Amour edit
UpdateGenitalsControls();
UpdateRoleplayThink();
UpdateHeightControl();
//Amour edit
_preferenceUnavailableButton.SelectId((int) Profile.PreferenceUnavailable);
@@ -1603,5 +1634,74 @@ namespace Content.Client.Preferences.UI
PreferenceChanged?.Invoke(Preference);
}
}
private sealed class RolePlaySelector : Control
{
private readonly RadioOptions<RoleplaySelection> _options;
public RoleplaySelection Preference
{
get => _options.SelectedValue;
set => _options.SelectByValue(value);
}
public string RolePlayId { get; }
public event Action<RoleplaySelection>? PreferenceChanged;
public RolePlaySelector(string rolePlayId)
{
RolePlayId = rolePlayId;
_options = new RadioOptions<RoleplaySelection>(RadioOptionsLayout.Horizontal)
{
FirstButtonStyle = StyleBase.ButtonOpenRight,
ButtonStyle = StyleBase.ButtonOpenBoth,
LastButtonStyle = StyleBase.ButtonOpenLeft
};
_options.GenerateItem = (text, _) => new Button
{
Text = text,
MinWidth = 90
};
_options.OnItemSelected += args => _options.Select(args.Id);
var titleLabel = new Label()
{
Margin = new Thickness(5f, 0, 5f, 0),
Text = Loc.GetString("roleplay-name-" + rolePlayId.ToLower()),
MouseFilter = MouseFilterMode.Stop,
ToolTip = Loc.GetString("roleplay-desc-" + rolePlayId.ToLower())
};
_options.OnItemSelected += _ => PreferenceChanged?.Invoke(Preference);
_options.AddItem(Loc.GetString("roleplay-no"), RoleplaySelection.No);
_options.AddItem(Loc.GetString("roleplay-maybe"), RoleplaySelection.Maybe);
_options.AddItem(Loc.GetString("roleplay-yes"), RoleplaySelection.Yes);
titleLabel.HorizontalAlignment = HAlignment.Left;
_options.HorizontalAlignment = HAlignment.Center;
AddChild(titleLabel);
AddChild(_options);
HorizontalExpand = true;
}
}
private void UpdateRoleplayThink()
{
if(Profile is null)
return;
foreach (var selector in _roleplaySelections)
{
if (Profile.RoleplayInfoData.TryGetValue(selector.RolePlayId, out var value))
{
selector.Preference = value.RoleplaySelection;
}
}
}
}
}