Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Cryo button invoke save button #1849

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content.Client/Lobby/UI/HumanoidProfileEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
</BoxContainer>
<BoxContainer Name="CAfkPreferences" Orientation="Vertical" Margin="10">
<!-- Afk preferences -->
<CheckBox Name="CTeleportAfkToCryoStorage" Text="{Loc 'humanoid-profile-edtior-afkPreferences-teleport-to-cryo-storage'}"/>
<CheckBox Name="CTeleportAfkToCryoStorage" Text="{Loc 'humanoid-profile-editor-afkPreferences-teleport-to-cryo-storage'}"/> <!-- SS220 loc fix -->
</BoxContainer>
</TabContainer>
</BoxContainer>
Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ public HumanoidProfileEditor(

#region TeleportAfkToCryoStorage

TabContainer.SetTabTitle(5, Loc.GetString("humanoid-profile-edtior-afkPreferences-tab"));
TabContainer.SetTabTitle(5, Loc.GetString("humanoid-profile-editor-afkPreferences-tab")); //ss220 loc fix
CTeleportAfkToCryoStorage.Pressed = Profile?.TeleportAfkToCryoStorage ?? true;
CTeleportAfkToCryoStorage.OnToggled += args => SetTeleportAfkToCryoStorage(args.Pressed);

Expand Down Expand Up @@ -1249,6 +1249,7 @@ private void SetName(string newName)
private void SetTeleportAfkToCryoStorage(bool newTeleportAfkToCryoStorage)
{
Profile = Profile?.WithTeleportAfkToCryoStorage(newTeleportAfkToCryoStorage);
SetDirty(); // ss220 cryo button fix
}

private void SetSpawnPriority(SpawnPriorityPreference newSpawnPriority)
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Preferences/HumanoidCharacterProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ public bool MemberwiseEquals(ICharacterProfile maybeOther)
if (Gender != other.Gender) return false;
if (Species != other.Species) return false;
if (PreferenceUnavailable != other.PreferenceUnavailable) return false;
if (TeleportAfkToCryoStorage != other.TeleportAfkToCryoStorage) return false; //ss220 cryo button save fix
if (SpawnPriority != other.SpawnPriority) return false;
if (!_jobPriorities.SequenceEqual(other._jobPriorities)) return false;
if (!_antagPreferences.SequenceEqual(other._antagPreferences)) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ humanoid-profile-editor-job-priority-never-button = Никогда
humanoid-profile-editor-naming-rules-warning = Внимание: Оскорбительные или странные имена и описания могут повлечь за собой беседу с администрацией. Прочитайте \[Правила\].
humanoid-profile-editor-markings-tab = Черты внешности
humanoid-profile-editor-flavortext-tab = Описание
humanoid-profile-edtior-afkPreferences-tab = ССД
humanoid-profile-edtior-afkPreferences-teleport-to-cryo-storage = Телепортация в крио хранилище при длительном ССД
humanoid-profile-editor-afkPreferences-tab = ССД
humanoid-profile-editor-afkPreferences-teleport-to-cryo-storage = Телепортация в крио хранилище при длительном ССД
humanoid-profile-editor-traits-tab = Черты персонажа
humanoid-profile-editor-no-traits = Нет доступных черт
humanoid-profile-editor-trait-count-hint = Доступно очков: [{ $current }/{ $max }]
Expand Down
Loading