Skip to content

Commit

Permalink
Revert "Custom Specie Name (#994)"
Browse files Browse the repository at this point in the history
This reverts commit 39ddc33
  • Loading branch information
Evgencheg committed Oct 9, 2024
1 parent 889b4a1 commit cf7f3a1
Show file tree
Hide file tree
Showing 17 changed files with 6 additions and 3,892 deletions.
6 changes: 0 additions & 6 deletions Content.Client/Preferences/UI/HumanoidProfileEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@
ToolTip="{Loc 'humanoid-profile-editor-guidebook-button-tooltip'}"/>
<OptionButton Name="CSpeciesButton" HorizontalAlignment="Right" />
</BoxContainer>
<!-- Species -->
<BoxContainer Name="CCustomSpecieName" HorizontalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-customspeciename-label'}" />
<Control HorizontalExpand="True"/>
<LineEdit Name="CCustomSpecieNameEdit" MinSize="270 0" HorizontalAlignment="Right" />
</BoxContainer>
<!-- Age -->
<BoxContainer HorizontalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-age-label'}" />
Expand Down
30 changes: 0 additions & 30 deletions Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ public sealed partial class HumanoidProfileEditor : BoxContainer

private LineEdit _ageEdit => CAgeEdit;
private LineEdit _nameEdit => CNameEdit;

private BoxContainer _ccustomspecienamecontainerEdit => CCustomSpecieName;
private LineEdit _customspecienameEdit => CCustomSpecieNameEdit;
private TextEdit? _flavorTextEdit;
private Button _nameRandomButton => CNameRandomize;
private Button _randomizeEverythingButton => CRandomizeEverything;
Expand Down Expand Up @@ -144,12 +141,6 @@ public HumanoidProfileEditor(IClientPreferencesManager preferencesManager, IProt

#endregion Name

#region Custom Specie Name

_customspecienameEdit.OnTextChanged += args => { SetCustomSpecieName(args.Text); };

#endregion CustomSpecieName

#region Appearance

CAppearance.Orphan();
Expand Down Expand Up @@ -217,7 +208,6 @@ public HumanoidProfileEditor(IClientPreferencesManager preferencesManager, IProt
SetSpecies(_speciesList[args.Id].ID);
UpdateHairPickers();
OnSkinColorOnValueChanged();
UpdateCustomSpecieNameEdit();
};

#endregion Species
Expand Down Expand Up @@ -1051,12 +1041,6 @@ private void SetName(string newName)
IsDirty = true;
}

private void SetCustomSpecieName(string customname)
{
Profile = Profile?.WithCustomSpeciesName(customname);
IsDirty = true;
}

private void SetSpawnPriority(SpawnPriorityPreference newSpawnPriority)
{
Profile = Profile?.WithSpawnPriorityPreference(newSpawnPriority);
Expand Down Expand Up @@ -1103,19 +1087,6 @@ private void UpdateNameEdit()
_nameEdit.Text = Profile?.Name ?? "";
}

private void UpdateCustomSpecieNameEdit()
{
if (Profile == null)
return;

_customspecienameEdit.Text = Profile.Customspeciename ?? "";

if (!_prototypeManager.TryIndex<SpeciesPrototype>(Profile.Species, out var speciesProto))
return;

_ccustomspecienamecontainerEdit.Visible = speciesProto.CustomName;
}

private void UpdateFlavorTextEdit()
{
if(_flavorTextEdit != null)
Expand Down Expand Up @@ -1400,7 +1371,6 @@ public void UpdateControls()
return;

UpdateNameEdit();
UpdateCustomSpecieNameEdit();
UpdateFlavorTextEdit();
UpdateSexControls();
UpdateGenderControls();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ private static HumanoidCharacterProfile CharlieCharlieson()
"The biggest boy around.",
"Human",
"Eugene", // LPP-TTS
"",
1,
1,
21,
Expand Down
Loading

0 comments on commit cf7f3a1

Please sign in to comment.