Remove some obsolete AppearanceComponent method usages (#13726)

This commit is contained in:
Visne
2023-02-02 17:34:53 +01:00
committed by GitHub
parent 23b90de34d
commit 5a5a3afbb1
111 changed files with 428 additions and 349 deletions

View File

@@ -24,13 +24,10 @@ public sealed class MorgueSystem : EntitySystem
/// </summary>
private void OnExamine(EntityUid uid, MorgueComponent component, ExaminedEvent args)
{
if (!TryComp<AppearanceComponent>(uid, out var appearance))
return;
if (!args.IsInDetailsRange)
return;
appearance.TryGetData(MorgueVisuals.Contents, out MorgueContents contents);
_appearance.TryGetData<MorgueContents>(uid, MorgueVisuals.Contents, out var contents);
var text = contents switch
{
@@ -92,7 +89,7 @@ public sealed class MorgueSystem : EntitySystem
comp.AccumulatedFrameTime -= comp.BeepTime;
if (comp.DoSoulBeep && appearance.TryGetData(MorgueVisuals.Contents, out MorgueContents contents) && contents == MorgueContents.HasSoul)
if (comp.DoSoulBeep && _appearance.TryGetData<MorgueContents>(appearance.Owner, MorgueVisuals.Contents, out var contents, appearance) && contents == MorgueContents.HasSoul)
{
_audio.PlayPvs(comp.OccupantHasSoulAlarmSound, comp.Owner);
}