Fix various errors/exceptions (#22841)
* Fix entity storage localization * Fix HumanoidAppearanceComponent resolve * Fix null reference exceptions * Fix duplicate key error * Fix artifact error spam * actually maybe this is what its meant to do * Fix entities playing sounds on deletion
This commit is contained in:
@@ -77,7 +77,8 @@ public sealed class DefibrillatorSystem : EntitySystem
|
||||
|
||||
private void OnPowerCellSlotEmpty(EntityUid uid, DefibrillatorComponent component, ref PowerCellSlotEmptyEvent args)
|
||||
{
|
||||
TryDisable(uid, component);
|
||||
if (!TerminatingOrDeleted(uid))
|
||||
TryDisable(uid, component);
|
||||
}
|
||||
|
||||
private void OnAfterInteract(EntityUid uid, DefibrillatorComponent component, AfterInteractEvent args)
|
||||
@@ -139,6 +140,7 @@ public sealed class DefibrillatorSystem : EntitySystem
|
||||
|
||||
component.Enabled = false;
|
||||
_appearance.SetData(uid, ToggleVisuals.Toggled, false);
|
||||
|
||||
_audio.PlayPvs(component.PowerOffSound, uid);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user