Improve explosion logs (#13351)
* add types to explosion logs * make explosions logged by default * add cause parameter to IThresholdBehavior * add cause to ExplodeBehaviors * add cause to power cell explosions * remove useless log * add triggerer to triggers * add logs for damage from explosions * sneaky power cell update
This commit is contained in:
@@ -16,7 +16,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
[DataField("solution", required: true)]
|
||||
public string Solution = default!;
|
||||
|
||||
public void Execute(EntityUid owner, DestructibleSystem system)
|
||||
public void Execute(EntityUid owner, DestructibleSystem system, EntityUid? cause = null)
|
||||
{
|
||||
if (system.SolutionContainerSystem.TryGetSolution(owner, Solution, out var explodingSolution)
|
||||
&& system.EntityManager.TryGetComponent(owner, out ExplosiveComponent? explosiveComponent))
|
||||
@@ -39,7 +39,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
// Don't delete the object here - let other processes like physical damage from the
|
||||
// explosion clean up the exploding object(s)
|
||||
var explosiveTotalIntensity = explosiveComponent.TotalIntensity * explosionScaleFactor;
|
||||
system.ExplosionSystem.TriggerExplosive(owner, explosiveComponent, false, explosiveTotalIntensity);
|
||||
system.ExplosionSystem.TriggerExplosive(owner, explosiveComponent, false, explosiveTotalIntensity, user:cause);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user