Revert "Emp more effects" (#16159)

This commit is contained in:
metalgearsloth
2023-05-06 20:45:49 +10:00
committed by GitHub
parent d0de7a3c83
commit 0da5a78509
18 changed files with 14 additions and 245 deletions

View File

@@ -224,20 +224,19 @@ namespace Content.Server.Light.EntitySystems
/// <summary>
/// Try to break bulb inside light fixture
/// </summary>
public bool TryDestroyBulb(EntityUid uid, PoweredLightComponent? light = null)
public void TryDestroyBulb(EntityUid uid, PoweredLightComponent? light = null)
{
// check bulb state
var bulbUid = GetBulb(uid, light);
if (bulbUid == null || !EntityManager.TryGetComponent(bulbUid.Value, out LightBulbComponent? lightBulb))
return false;
return;
if (lightBulb.State == LightBulbState.Broken)
return false;
return;
// break it
_bulbSystem.SetState(bulbUid.Value, LightBulbState.Broken, lightBulb);
_bulbSystem.PlayBreakSound(bulbUid.Value, lightBulb);
UpdateLight(uid, light);
return true;
}
#endregion
@@ -429,8 +428,8 @@ namespace Content.Server.Light.EntitySystems
private void OnEmpPulse(EntityUid uid, PoweredLightComponent component, ref EmpPulseEvent args)
{
if (TryDestroyBulb(uid, component))
args.Affected = true;
args.Affected = true;
TryDestroyBulb(uid, component);
}
}
}