Reaction & reagent effect logging (#5463)
* Reaction logging * effect logging * position
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.Chemistry.Reaction;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
@@ -14,6 +15,10 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
{
|
||||
base.OnReaction(solution, reaction, randomReagent, ownerUid, unitReactions);
|
||||
|
||||
var entity = EntityManager.GetEntity(ownerUid);
|
||||
_logSystem.Add(LogType.ChemicalReaction, reaction.Impact,
|
||||
$"Chemical reaction {reaction.ID} occurred with strength {unitReactions:strength} on entity {entity} at {entity.Transform.Coordinates}");
|
||||
|
||||
SoundSystem.Play(Filter.Pvs(ownerUid, entityManager:EntityManager), reaction.Sound.GetSound(), ownerUid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user