Log enrichment: Explosion damage to players (#29762)

* Log enrichment: Explosion damage to players

* Update Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>

* Revert to total damage variant only, currently serialised as string.

* Make this its own log type.

---------

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
This commit is contained in:
TsjipTsjip
2024-08-09 08:24:05 +02:00
committed by GitHub
parent e05df5d3e2
commit 736325a31f
7 changed files with 55 additions and 17 deletions

View File

@@ -253,7 +253,7 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem
var posFound = _transformSystem.TryGetMapOrGridCoordinates(uid, out var gridPos, pos);
QueueExplosion(mapPos, typeId, totalIntensity, slope, maxTileIntensity, tileBreakScale, maxTileBreak, canCreateVacuum, addLog: false);
QueueExplosion(mapPos, typeId, totalIntensity, slope, maxTileIntensity, uid, tileBreakScale, maxTileBreak, canCreateVacuum, addLog: false);
if (!addLog)
return;
@@ -281,6 +281,7 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem
float totalIntensity,
float slope,
float maxTileIntensity,
EntityUid? cause,
float tileBreakScale = 1f,
int maxTileBreak = int.MaxValue,
bool canCreateVacuum = true,
@@ -324,7 +325,8 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem
MaxTileIntensity = maxTileIntensity,
TileBreakScale = tileBreakScale,
MaxTileBreak = maxTileBreak,
CanCreateVacuum = canCreateVacuum
CanCreateVacuum = canCreateVacuum,
Cause = cause
};
_explosionQueue.Enqueue(boom);
_queuedExplosions.Add(boom);
@@ -393,7 +395,8 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem
queued.CanCreateVacuum,
EntityManager,
_mapManager,
visualEnt);
visualEnt,
queued.Cause);
}
private void CameraShake(float range, MapCoordinates epicenter, float totalIntensity)