{
_trigger.HandleTimerTrigger(
uid,
- null,
+ user,
timerTrigger.Delay,
timerTrigger.BeepInterval,
timerTrigger.InitialBeepDelay,
RaiseLocalEvent(uid, new BombArmedEvent(uid));
_appearance.SetData(uid, DefusableVisuals.Active, comp.Activated);
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):entity} begun a countdown on {ToPrettyString(uid):entity}");
if (TryComp<WiresPanelComponent>(uid, out var wiresPanelComponent))
_wiresSystem.TogglePanel(uid, wiresPanelComponent, false);
}
- public void TryDetonateBomb(EntityUid uid, DefusableComponent comp)
+ public void TryDetonateBomb(EntityUid uid, EntityUid detonator, DefusableComponent comp)
{
if (!comp.Activated)
return;
RaiseLocalEvent(uid, new BombDetonatedEvent(uid));
- _explosion.TriggerExplosive(uid);
+ _explosion.TriggerExplosive(uid, user:detonator);
QueueDel(uid);
_appearance.SetData(uid, DefusableVisuals.Active, comp.Activated);
-
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(uid):entity} has been detonated.");
}
public void TryDefuseBomb(EntityUid uid, DefusableComponent comp)
_transform.Unanchor(uid, xform);
_appearance.SetData(uid, DefusableVisuals.Active, comp.Activated);
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(uid):entity} has been defused!");
}
// jesus christ
_trigger.TryDelay(wire.Owner, 30f);
_popup.PopupEntity(Loc.GetString("defusable-popup-wire-chirp", ("name", wire.Owner)), wire.Owner);
comp.DelayWireUsed = true;
-
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} pulsed the DeLAY wire of {ToPrettyString(wire.Owner):entity}.");
}
public bool ProceedWireCut(EntityUid user, Wire wire, DefusableComponent comp)
_popup.PopupEntity(Loc.GetString("defusable-popup-wire-proceed-pulse", ("name", wire.Owner)), wire.Owner);
SetDisplayTime(comp, false);
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} cut the PRoCeeD wire of {ToPrettyString(wire.Owner):entity}.");
-
comp.ProceedWireCut = true;
return true;
}
_trigger.TryDelay(wire.Owner, -15f);
}
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} pulsed the PRoCeeD wire of {ToPrettyString(wire.Owner):entity}.");
-
_popup.PopupEntity(Loc.GetString("defusable-popup-wire-proceed-pulse", ("name", wire.Owner)), wire.Owner);
}
$"{ToPrettyString(user):user} has defused {ToPrettyString(wire.Owner):entity}!");
}
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} cut the LIVE wire of {ToPrettyString(wire.Owner):entity}.");
-
return true;
}
_trigger.TryDelay(wire.Owner, 30f);
_popup.PopupEntity(Loc.GetString("defusable-popup-wire-chirp", ("name", wire.Owner)), wire.Owner);
comp.ActivatedWireUsed = true;
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} pulsed the LIVE wire of {ToPrettyString(wire.Owner):entity}.");
}
}
else
{
TryStartCountdown(wire.Owner, user, comp);
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} pulsed the LIVE wire of {ToPrettyString(wire.Owner):entity} and begun the countdown.");
}
}
{
if (comp.Activated)
{
- EntityManager.System<DefusableSystem>().TryDetonateBomb(wire.Owner, comp);
- _adminLogger.Add(LogType.Explosion, LogImpact.Extreme,
- $"{ToPrettyString(user):user} cut the BOOM wire of {ToPrettyString(wire.Owner):entity} and caused it to detonate!");
+ TryDetonateBomb(wire.Owner, user, comp);
}
else
{
- EntityManager.System<DefusableSystem>().SetUsable(comp, false);
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} cut the BOOM wire of {ToPrettyString(wire.Owner):entity}.");
+ SetUsable(comp, false);
}
return true;
}
if (comp is { Activated: false, Usable: false })
{
SetUsable(comp, true);
-
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} mended the BOOM wire of {ToPrettyString(wire.Owner):entity}.");
}
// you're already dead lol
return true;
{
if (comp.Activated)
{
- TryDetonateBomb(wire.Owner, comp);
+ TryDetonateBomb(wire.Owner, user, comp);
}
- _adminLogger.Add(LogType.Explosion, LogImpact.Extreme,
- $"{ToPrettyString(user):user} pulsed the BOOM wire of {ToPrettyString(wire.Owner):entity} and caused it to detonate!");
}
public bool BoltWireMend(EntityUid user, Wire wire, DefusableComponent comp)
_audio.PlayPvs(comp.BoltSound, wire.Owner);
_popup.PopupEntity(Loc.GetString("defusable-popup-wire-bolt-pulse", ("name", wire.Owner)), wire.Owner);
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} mended the BOLT wire of {ToPrettyString(wire.Owner):entity}!");
-
return true;
}
_audio.PlayPvs(comp.BoltSound, wire.Owner);
_popup.PopupEntity(Loc.GetString("defusable-popup-wire-bolt-pulse", ("name", wire.Owner)), wire.Owner);
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} cut the BOLT wire of {ToPrettyString(wire.Owner):entity}!");
-
return true;
}
public void BoltWirePulse(EntityUid user, Wire wire, DefusableComponent comp)
{
_popup.PopupEntity(Loc.GetString("defusable-popup-wire-bolt-pulse", ("name", wire.Owner)), wire.Owner);
-
- _adminLogger.Add(LogType.Explosion, LogImpact.High,
- $"{ToPrettyString(user):user} pulsed the BOLT wire of {ToPrettyString(wire.Owner):entity}!");
}
#endregion