Skip to content

Commit

Permalink
Фикс TranslatorSystem
Browse files Browse the repository at this point in the history
Меняем SetPowerCellDrawEnabled на новый метод SetDrawEnabled
  • Loading branch information
Schrodinger71 committed Jul 21, 2024
1 parent 3fa7369 commit 51059ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Content.Server/ADT/Language/TranslatorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private void OnTranslatorToggle(EntityUid translator, HandheldTranslatorComponen
isEnabled &= hasPower;
UpdateBoundIntrinsicComp(component, intrinsic, isEnabled);
component.Enabled = isEnabled;
_powerCell.SetPowerCellDrawEnabled(translator, isEnabled);
_powerCell.SetDrawEnabled(translator, isEnabled);

_language.EnsureValidLanguage(holder);
UpdatedLanguages(holder);
Expand All @@ -171,7 +171,7 @@ private void OnTranslatorToggle(EntityUid translator, HandheldTranslatorComponen
{
// This is a standalone translator (e.g. lying on the ground). Simply toggle its state.
component.Enabled = !component.Enabled && hasPower;
_powerCell.SetPowerCellDrawEnabled(translator, !component.Enabled && hasPower);
_powerCell.SetDrawEnabled(translator, !component.Enabled && hasPower);
}

OnAppearanceChange(translator, component);
Expand All @@ -188,7 +188,7 @@ private void OnTranslatorToggle(EntityUid translator, HandheldTranslatorComponen
private void OnPowerCellSlotEmpty(EntityUid translator, HandheldTranslatorComponent component, PowerCellSlotEmptyEvent args)
{
component.Enabled = false;
_powerCell.SetPowerCellDrawEnabled(translator, false);
_powerCell.SetDrawEnabled(translator, false);
OnAppearanceChange(translator, component);

if (Transform(translator).ParentUid is { Valid: true } holder && EntityManager.HasComponent<LanguageSpeakerComponent>(holder))
Expand Down

0 comments on commit 51059ac

Please sign in to comment.