Add more pretty strings to logs (#5768)
This commit is contained in:
@@ -97,7 +97,7 @@ namespace Content.Server.Actions.Actions
|
|||||||
|
|
||||||
entMan.EventBus.RaiseLocalEvent(args.Target, eventArgs);
|
entMan.EventBus.RaiseLocalEvent(args.Target, eventArgs);
|
||||||
|
|
||||||
EntitySystem.Get<AdminLogSystem>().Add(LogType.DisarmedAction, LogImpact.Low, $"{entMan.ToPrettyString(args.Performer):performer} used disarm on {entMan.ToPrettyString(args.Target):target}");
|
EntitySystem.Get<AdminLogSystem>().Add(LogType.DisarmedAction, LogImpact.Low, $"{entMan.ToPrettyString(args.Performer):user} used disarm on {entMan.ToPrettyString(args.Target):target}");
|
||||||
|
|
||||||
// Check if the event has been handled, and if so, do nothing else!
|
// Check if the event has been handled, and if so, do nothing else!
|
||||||
if (eventArgs.Handled)
|
if (eventArgs.Handled)
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
if (!barotrauma.TakingDamage)
|
if (!barotrauma.TakingDamage)
|
||||||
{
|
{
|
||||||
barotrauma.TakingDamage = true;
|
barotrauma.TakingDamage = true;
|
||||||
_logSystem.Add(LogType.Barotrauma, $"{barotrauma.Owner} started taking low pressure damage");
|
_logSystem.Add(LogType.Barotrauma, $"{ToPrettyString(barotrauma.Owner):entity} started taking low pressure damage");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status == null) break;
|
if (status == null) break;
|
||||||
@@ -139,7 +139,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
if (!barotrauma.TakingDamage)
|
if (!barotrauma.TakingDamage)
|
||||||
{
|
{
|
||||||
barotrauma.TakingDamage = true;
|
barotrauma.TakingDamage = true;
|
||||||
_logSystem.Add(LogType.Barotrauma, $"{barotrauma.Owner} started taking high pressure damage");
|
_logSystem.Add(LogType.Barotrauma, $"{ToPrettyString(barotrauma.Owner):entity} started taking high pressure damage");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status == null) break;
|
if (status == null) break;
|
||||||
@@ -158,7 +158,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
if (barotrauma.TakingDamage)
|
if (barotrauma.TakingDamage)
|
||||||
{
|
{
|
||||||
barotrauma.TakingDamage = false;
|
barotrauma.TakingDamage = false;
|
||||||
_logSystem.Add(LogType.Barotrauma, $"{barotrauma.Owner} stopped taking pressure damage");
|
_logSystem.Add(LogType.Barotrauma, $"{ToPrettyString(barotrauma.Owner):entity} stopped taking pressure damage");
|
||||||
}
|
}
|
||||||
status?.ClearAlertCategory(AlertCategory.Pressure);
|
status?.ClearAlertCategory(AlertCategory.Pressure);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
if (!flammable.OnFire)
|
if (!flammable.OnFire)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_logSystem.Add(LogType.Flammable, $"{flammable.Owner} stopped being on fire damage");
|
_logSystem.Add(LogType.Flammable, $"{ToPrettyString(flammable.Owner):entity} stopped being on fire damage");
|
||||||
flammable.OnFire = false;
|
flammable.OnFire = false;
|
||||||
flammable.FireStacks = 0;
|
flammable.FireStacks = 0;
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
|
|
||||||
if (flammable.FireStacks > 0 && !flammable.OnFire)
|
if (flammable.FireStacks > 0 && !flammable.OnFire)
|
||||||
{
|
{
|
||||||
_logSystem.Add(LogType.Flammable, $"{flammable.Owner} is on fire");
|
_logSystem.Add(LogType.Flammable, $"{ToPrettyString(flammable.Owner):entity} is on fire");
|
||||||
flammable.OnFire = true;
|
flammable.OnFire = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
|||||||
if (environment is not null)
|
if (environment is not null)
|
||||||
_atmosphereSystem.Merge(environment, canister.Air);
|
_atmosphereSystem.Merge(environment, canister.Air);
|
||||||
|
|
||||||
_adminLogSystem.Add(LogType.CanisterPurged, LogImpact.Medium, $"Canister {ToPrettyString(uid)} purged its contents of {canister.Air} into the environment.");
|
_adminLogSystem.Add(LogType.CanisterPurged, LogImpact.Medium, $"Canister {ToPrettyString(uid):canister} purged its contents of {canister.Air:gas} into the environment.");
|
||||||
canister.Air.Clear();
|
canister.Air.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
|||||||
if (container.ContainedEntities.Count == 0)
|
if (container.ContainedEntities.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_adminLogSystem.Add(LogType.CanisterTankEjected, LogImpact.Medium, $"Player {ToPrettyString(args.Session.AttachedEntity.GetValueOrDefault()):player} ejected tank {container.ContainedEntities[0]:tank} from {uid}");
|
_adminLogSystem.Add(LogType.CanisterTankEjected, LogImpact.Medium, $"Player {ToPrettyString(args.Session.AttachedEntity.GetValueOrDefault()):player} ejected tank {ToPrettyString(container.ContainedEntities[0]):tank} from {ToPrettyString(uid):canister}");
|
||||||
container.Remove(container.ContainedEntities[0]);
|
container.Remove(container.ContainedEntities[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
|||||||
|
|
||||||
var pressure = Math.Clamp(args.Pressure, canister.MinReleasePressure, canister.MaxReleasePressure);
|
var pressure = Math.Clamp(args.Pressure, canister.MinReleasePressure, canister.MaxReleasePressure);
|
||||||
|
|
||||||
_adminLogSystem.Add(LogType.CanisterPressure, LogImpact.Medium, $"{ToPrettyString(args.Session.AttachedEntity.GetValueOrDefault()):player} set the release pressure on {uid} to {args.Pressure}");
|
_adminLogSystem.Add(LogType.CanisterPressure, LogImpact.Medium, $"{ToPrettyString(args.Session.AttachedEntity.GetValueOrDefault()):player} set the release pressure on {ToPrettyString(uid):canister} to {args.Pressure}");
|
||||||
|
|
||||||
canister.ReleasePressure = pressure;
|
canister.ReleasePressure = pressure;
|
||||||
DirtyUI(uid, canister);
|
DirtyUI(uid, canister);
|
||||||
@@ -157,7 +157,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
|||||||
&& containerManager.TryGetContainer(canister.ContainerName, out var container))
|
&& containerManager.TryGetContainer(canister.ContainerName, out var container))
|
||||||
impact = container.ContainedEntities.Count != 0 ? LogImpact.Medium : LogImpact.High;
|
impact = container.ContainedEntities.Count != 0 ? LogImpact.Medium : LogImpact.High;
|
||||||
|
|
||||||
_adminLogSystem.Add(LogType.CanisterValve, impact, $"{ToPrettyString(args.Session.AttachedEntity.GetValueOrDefault()):player} set the valve on {uid} to {args.Valve:valveState}");
|
_adminLogSystem.Add(LogType.CanisterValve, impact, $"{ToPrettyString(args.Session.AttachedEntity.GetValueOrDefault()):player} set the valve on {ToPrettyString(uid):canister} to {args.Valve:valveState}");
|
||||||
|
|
||||||
canister.ReleaseValve = args.Valve;
|
canister.ReleaseValve = args.Valve;
|
||||||
DirtyUI(uid, canister);
|
DirtyUI(uid, canister);
|
||||||
@@ -278,7 +278,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
|||||||
if (!hands.Drop(args.Used, container))
|
if (!hands.Drop(args.Used, container))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_adminLogSystem.Add(LogType.CanisterTankInserted, LogImpact.Medium, $"Player {ToPrettyString(args.User):player} inserted tank {container.ContainedEntities[0]} into {canister}");
|
_adminLogSystem.Add(LogType.CanisterTankInserted, LogImpact.Medium, $"Player {ToPrettyString(args.User):player} inserted tank {ToPrettyString(container.ContainedEntities[0]):tank} into {ToPrettyString(canister):canister}");
|
||||||
|
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ namespace Content.Server.Body.Systems
|
|||||||
{
|
{
|
||||||
var entity = args.SolutionEntity;
|
var entity = args.SolutionEntity;
|
||||||
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
|
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
|
||||||
$"Metabolism effect {effect.GetType().Name} of reagent {args.Reagent.Name:reagent} applied on entity {entity} at {Transform(entity).Coordinates}");
|
$"Metabolism effect {effect.GetType().Name:effect} of reagent {args.Reagent.Name:reagent} applied on entity {entity} at {Transform(entity).Coordinates:coordinates}");
|
||||||
}
|
}
|
||||||
|
|
||||||
effect.Effect(args);
|
effect.Effect(args);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Server.Administration.Logs;
|
using Content.Server.Administration.Logs;
|
||||||
@@ -198,7 +198,7 @@ namespace Content.Server.Body.Systems
|
|||||||
private void TakeSuffocationDamage(EntityUid uid, RespiratorComponent respirator)
|
private void TakeSuffocationDamage(EntityUid uid, RespiratorComponent respirator)
|
||||||
{
|
{
|
||||||
if (!respirator.Suffocating)
|
if (!respirator.Suffocating)
|
||||||
_logSys.Add(LogType.Asphyxiation, $"{uid:Entity} started suffocating");
|
_logSys.Add(LogType.Asphyxiation, $"{ToPrettyString(uid):entity} started suffocating");
|
||||||
|
|
||||||
respirator.Suffocating = true;
|
respirator.Suffocating = true;
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ namespace Content.Server.Body.Systems
|
|||||||
private void StopSuffocation(EntityUid uid, RespiratorComponent respirator)
|
private void StopSuffocation(EntityUid uid, RespiratorComponent respirator)
|
||||||
{
|
{
|
||||||
if (respirator.Suffocating)
|
if (respirator.Suffocating)
|
||||||
_logSys.Add(LogType.Asphyxiation, $"{uid:Entity} stopped suffocating");
|
_logSys.Add(LogType.Asphyxiation, $"{ToPrettyString(uid):entity} stopped suffocating");
|
||||||
|
|
||||||
respirator.Suffocating = false;
|
respirator.Suffocating = false;
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace Content.Server.Chat.Commands
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.Status != SessionStatus.InGame)
|
if (player.Status != SessionStatus.InGame || player.AttachedEntity == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var chat = IoCManager.Resolve<IChatManager>();
|
var chat = IoCManager.Resolve<IChatManager>();
|
||||||
@@ -85,7 +85,8 @@ namespace Content.Server.Chat.Commands
|
|||||||
//TODO: needs to check if the mob is actually alive
|
//TODO: needs to check if the mob is actually alive
|
||||||
//TODO: maybe set a suicided flag to prevent resurrection?
|
//TODO: maybe set a suicided flag to prevent resurrection?
|
||||||
|
|
||||||
EntitySystem.Get<AdminLogSystem>().Add(LogType.Suicide, $"{player.AttachedEntity} is committing suicide");
|
EntitySystem.Get<AdminLogSystem>().Add(LogType.Suicide,
|
||||||
|
$"{_entities.ToPrettyString(player.AttachedEntity.Value):player} is committing suicide");
|
||||||
|
|
||||||
// Held item suicide
|
// Held item suicide
|
||||||
var handsComponent = _entities.GetComponent<HandsComponent>(owner);
|
var handsComponent = _entities.GetComponent<HandsComponent>(owner);
|
||||||
|
|||||||
@@ -209,6 +209,9 @@ namespace Content.Server.Chemistry.Components
|
|||||||
// Create a pop-up for the user
|
// Create a pop-up for the user
|
||||||
popupSys.PopupEntity(Loc.GetString("injector-component-injecting-user"), target, Filter.Entities(user));
|
popupSys.PopupEntity(Loc.GetString("injector-component-injecting-user"), target, Filter.Entities(user));
|
||||||
|
|
||||||
|
if (!EntitySystem.Get<SolutionContainerSystem>().TryGetSolution(Owner, SolutionName, out var solution))
|
||||||
|
return false;
|
||||||
|
|
||||||
// Get entity for logging. Log with EntityUids when?
|
// Get entity for logging. Log with EntityUids when?
|
||||||
var logSys = EntitySystem.Get<AdminLogSystem>();
|
var logSys = EntitySystem.Get<AdminLogSystem>();
|
||||||
|
|
||||||
@@ -238,7 +241,7 @@ namespace Content.Server.Chemistry.Components
|
|||||||
if (ToggleState == InjectorToggleMode.Inject)
|
if (ToggleState == InjectorToggleMode.Inject)
|
||||||
{
|
{
|
||||||
logSys.Add(LogType.ForceFeed,
|
logSys.Add(LogType.ForceFeed,
|
||||||
$"{_entities.ToPrettyString(user)} is attempting to inject a solution into {_entities.ToPrettyString(target)}");
|
$"{_entities.ToPrettyString(user):user} is attempting to inject {_entities.ToPrettyString(target):target} with a solution {SolutionContainerSystem.ToPrettyString(solution):solution}");
|
||||||
// TODO solution pretty string.
|
// TODO solution pretty string.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -249,7 +252,7 @@ namespace Content.Server.Chemistry.Components
|
|||||||
|
|
||||||
if (ToggleState == InjectorToggleMode.Inject)
|
if (ToggleState == InjectorToggleMode.Inject)
|
||||||
logSys.Add(LogType.Ingestion,
|
logSys.Add(LogType.Ingestion,
|
||||||
$"{_entities.ToPrettyString(user)} is attempting to inject themselves with a solution.");
|
$"{_entities.ToPrettyString(user):user} is attempting to inject themselves with a solution {SolutionContainerSystem.ToPrettyString(solution):solution}.");
|
||||||
//TODO solution pretty string.
|
//TODO solution pretty string.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
|||||||
var coordinates = Transform(Owner).Coordinates;
|
var coordinates = Transform(Owner).Coordinates;
|
||||||
|
|
||||||
_logSystem.Add(LogType.ChemicalReaction, reaction.Impact,
|
_logSystem.Add(LogType.ChemicalReaction, reaction.Impact,
|
||||||
$"Chemical reaction {reaction.ID} occurred with strength {unitReactions:strength} on entity {ToPrettyString(Owner)} at {coordinates}");
|
$"Chemical reaction {reaction.ID:reaction} occurred with strength {unitReactions:strength} on entity {ToPrettyString(Owner):metabolizer} at {coordinates}");
|
||||||
|
|
||||||
SoundSystem.Play(Filter.Pvs(Owner, entityManager:EntityManager), reaction.Sound.GetSound(), Owner);
|
SoundSystem.Play(Filter.Pvs(Owner, entityManager:EntityManager), reaction.Sound.GetSound(), Owner);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Content.Server.Chemistry.Components.SolutionManager;
|
using Content.Server.Chemistry.Components.SolutionManager;
|
||||||
using Content.Server.Database;
|
using Content.Server.Database;
|
||||||
@@ -134,7 +134,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
|||||||
public static string ToPrettyString(Solution solution)
|
public static string ToPrettyString(Solution solution)
|
||||||
{
|
{
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("Solution content: [");
|
sb.Append("[");
|
||||||
var first = true;
|
var first = true;
|
||||||
foreach (var (id, quantity) in solution.Contents)
|
foreach (var (id, quantity) in solution.Contents)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ namespace Content.Server.Crayon
|
|||||||
// Decrease "Ammo"
|
// Decrease "Ammo"
|
||||||
Charges--;
|
Charges--;
|
||||||
Dirty();
|
Dirty();
|
||||||
EntitySystem.Get<AdminLogSystem>().Add(LogType.CrayonDraw, $"{eventArgs.User:player} drew a {_color:color} {SelectedState}");
|
EntitySystem.Get<AdminLogSystem>().Add(LogType.CrayonDraw, LogImpact.Low, $"{_entMan.ToPrettyString(eventArgs.User):user} drew a {_color:color} {SelectedState}");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace Content.Server.Damage.Systems
|
|||||||
var dmg = _damageableSystem.TryChangeDamage(uid, component.Damage * damageScale);
|
var dmg = _damageableSystem.TryChangeDamage(uid, component.Damage * damageScale);
|
||||||
|
|
||||||
if (dmg != null)
|
if (dmg != null)
|
||||||
_logSystem.Add(LogType.Damaged, $"{component.Owner} took {dmg.Total} damage from a high speed collision");
|
_logSystem.Add(LogType.Damaged, $"{ToPrettyString(component.Owner):entity} took {dmg.Total:damage} damage from a high speed collision");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace Content.Server.Damage.Systems
|
|||||||
if (dmg == null)
|
if (dmg == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_logSystem.Add(LogType.Landed, $"{component.Owner} received {dmg.Total} damage from landing");
|
_logSystem.Add(LogType.Landed, $"{ToPrettyString(component.Owner):entity} received {dmg.Total:damage} damage from landing");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace Content.Server.Damage.Systems
|
|||||||
|
|
||||||
if (dmg != null)
|
if (dmg != null)
|
||||||
_logSystem.Add(LogType.Damaged,
|
_logSystem.Add(LogType.Damaged,
|
||||||
$"{args.User} used {args.Used} as a welder to deal {dmg.Total} damage to {args.Target}");
|
$"{ToPrettyString(args.User):user} used {ToPrettyString(args.Used):used} as a welder to deal {dmg.Total:damage} damage to {ToPrettyString(args.Target):target}");
|
||||||
|
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ namespace Content.Server.Damage.Systems
|
|||||||
|
|
||||||
if (dmg != null)
|
if (dmg != null)
|
||||||
_logSystem.Add(LogType.Damaged,
|
_logSystem.Add(LogType.Damaged,
|
||||||
$"{args.User} used {args.Used} as a tool to deal {dmg.Total} damage to {args.Target}");
|
$"{ToPrettyString(args.User):user} used {ToPrettyString(args.Used):used} as a tool to deal {dmg.Total:damage} damage to {ToPrettyString(args.Target):target}");
|
||||||
|
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace Content.Server.Damage.Systems
|
|||||||
{
|
{
|
||||||
var dmg = _damageableSystem.TryChangeDamage(args.Target, component.Damage, component.IgnoreResistances);
|
var dmg = _damageableSystem.TryChangeDamage(args.Target, component.Damage, component.IgnoreResistances);
|
||||||
if (dmg != null)
|
if (dmg != null)
|
||||||
_logSystem.Add(LogType.ThrowHit, $"{args.Target} received {dmg.Total} damage from collision");
|
_logSystem.Add(LogType.ThrowHit, $"{ToPrettyString(args.Target):target} received {dmg.Total:damage} damage from collision");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace Content.Server.Electrocution
|
|||||||
var actual = _damageableSystem.TryChangeDamage(finished.Electrocuting, damage);
|
var actual = _damageableSystem.TryChangeDamage(finished.Electrocuting, damage);
|
||||||
if (actual != null)
|
if (actual != null)
|
||||||
_logSystem.Add(LogType.Electrocution,
|
_logSystem.Add(LogType.Electrocution,
|
||||||
$"{finished.Owner} took {actual.Total} powered electrocution damage");
|
$"{ToPrettyString(finished.Owner):entity} received {actual.Total:damage} powered electrocution damage");
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityManager.DeleteEntity(uid);
|
EntityManager.DeleteEntity(uid);
|
||||||
@@ -357,7 +357,7 @@ namespace Content.Server.Electrocution
|
|||||||
|
|
||||||
if (actual != null)
|
if (actual != null)
|
||||||
_logSystem.Add(LogType.Electrocution,
|
_logSystem.Add(LogType.Electrocution,
|
||||||
$"{statusEffects.Owner} took {actual.Total} powered electrocution damage");
|
$"{ToPrettyString(statusEffects.Owner):entity} received {actual.Total:damage} powered electrocution damage");
|
||||||
}
|
}
|
||||||
|
|
||||||
_stutteringSystem.DoStutter(uid, time * StutteringTimeMultiplier, refresh, statusEffects, alerts);
|
_stutteringSystem.DoStutter(uid, time * StutteringTimeMultiplier, refresh, statusEffects, alerts);
|
||||||
|
|||||||
@@ -343,20 +343,20 @@ namespace Content.Server.Explosion.EntitySystems
|
|||||||
}
|
}
|
||||||
|
|
||||||
// logging
|
// logging
|
||||||
var text = $"{epicenter} with range {devastationRange}/{heavyImpactRange}/{lightImpactRange}/{flashRange}";
|
var range = $"{devastationRange}/{heavyImpactRange}/{lightImpactRange}/{flashRange}";
|
||||||
if (entity == null || !entity.Value.IsValid())
|
if (entity == null || !entity.Value.IsValid())
|
||||||
{
|
{
|
||||||
_logSystem.Add(LogType.Explosion, LogImpact.High, $"Explosion spawned at {text}");
|
_logSystem.Add(LogType.Explosion, LogImpact.High, $"Explosion spawned at {epicenter:coordinates} with range {range}");
|
||||||
}
|
}
|
||||||
else if (user == null || !user.Value.IsValid())
|
else if (user == null || !user.Value.IsValid())
|
||||||
{
|
{
|
||||||
_logSystem.Add(LogType.Explosion, LogImpact.High,
|
_logSystem.Add(LogType.Explosion, LogImpact.High,
|
||||||
$"{ToPrettyString(entity.Value)} exploded at {text}");
|
$"{ToPrettyString(entity.Value):entity} exploded at {epicenter:coordinates} with range {range}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logSystem.Add(LogType.Explosion, LogImpact.High,
|
_logSystem.Add(LogType.Explosion, LogImpact.High,
|
||||||
$"{ToPrettyString(user.Value)} caused {ToPrettyString(entity.Value)} to explode at {text}");
|
$"{ToPrettyString(user.Value):user} caused {ToPrettyString(entity.Value):entity} to explode at {epicenter:coordinates} with range {range}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var maxRange = MathHelper.Max(devastationRange, heavyImpactRange, lightImpactRange, 0);
|
var maxRange = MathHelper.Max(devastationRange, heavyImpactRange, lightImpactRange, 0);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class SpillableSystem : EntitySystem
|
|||||||
if (args.User != null)
|
if (args.User != null)
|
||||||
{
|
{
|
||||||
_logSystem.Add(LogType.Landed,
|
_logSystem.Add(LogType.Landed,
|
||||||
$"{EntityManager.ToPrettyString(uid)} spilled {SolutionContainerSystem.ToPrettyString(solution)} on landing");
|
$"{ToPrettyString(uid):entity} spilled a solution {SolutionContainerSystem.ToPrettyString(solution):solution} on landing");
|
||||||
}
|
}
|
||||||
|
|
||||||
var drainedSolution = _solutionContainerSystem.Drain(uid, solution, solution.DrainAvailable);
|
var drainedSolution = _solutionContainerSystem.Drain(uid, solution, solution.DrainAvailable);
|
||||||
|
|||||||
@@ -138,9 +138,9 @@ namespace Content.Server.GameTicking
|
|||||||
_stationSystem.TryAssignJobToStation(station, jobPrototype);
|
_stationSystem.TryAssignJobToStation(station, jobPrototype);
|
||||||
|
|
||||||
if (lateJoin)
|
if (lateJoin)
|
||||||
_adminLogSystem.Add(LogType.LateJoin, LogImpact.Medium, $"Player {player.Name} late joined as {character.Name:characterName} on station {_stationSystem.StationInfo[station].Name:stationName} with {ToPrettyString(mob)} as a {job.Name:jobName}.");
|
_adminLogSystem.Add(LogType.LateJoin, LogImpact.Medium, $"Player {player.Name} late joined as {character.Name:characterName} on station {_stationSystem.StationInfo[station].Name:stationName} with {ToPrettyString(mob):entity} as a {job.Name:jobName}.");
|
||||||
else
|
else
|
||||||
_adminLogSystem.Add(LogType.RoundStartJoin, LogImpact.Medium, $"Player {player.Name} joined as {character.Name:characterName} on station {_stationSystem.StationInfo[station].Name:stationName} with {ToPrettyString(mob)} as a {job.Name:jobName}.");
|
_adminLogSystem.Add(LogType.RoundStartJoin, LogImpact.Medium, $"Player {player.Name} joined as {character.Name:characterName} on station {_stationSystem.StationInfo[station].Name:stationName} with {ToPrettyString(mob):entity} as a {job.Name:jobName}.");
|
||||||
|
|
||||||
Preset?.OnSpawnPlayerCompleted(player, mob, lateJoin);
|
Preset?.OnSpawnPlayerCompleted(player, mob, lateJoin);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -394,7 +394,7 @@ namespace Content.Server.Interaction
|
|||||||
// all interactions should only happen when in range / unobstructed, so no range check is needed
|
// all interactions should only happen when in range / unobstructed, so no range check is needed
|
||||||
var message = new InteractHandEvent(user, target);
|
var message = new InteractHandEvent(user, target);
|
||||||
RaiseLocalEvent(target, message);
|
RaiseLocalEvent(target, message);
|
||||||
_adminLogSystem.Add(LogType.InteractHand, LogImpact.Low, $"{ToPrettyString(user)} interacted with {ToPrettyString(target)}");
|
_adminLogSystem.Add(LogType.InteractHand, LogImpact.Low, $"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target}");
|
||||||
if (message.Handled)
|
if (message.Handled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -482,7 +482,7 @@ namespace Content.Server.Interaction
|
|||||||
|
|
||||||
if (ev.Handled)
|
if (ev.Handled)
|
||||||
{
|
{
|
||||||
_adminLogSystem.Add(LogType.AttackArmedWide, LogImpact.Medium, $"{ToPrettyString(user)} wide attacked with {ToPrettyString(item)} at {coordinates}");
|
_adminLogSystem.Add(LogType.AttackArmedWide, LogImpact.Medium, $"{ToPrettyString(user):user} wide attacked with {ToPrettyString(item):used} at {coordinates}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -496,12 +496,12 @@ namespace Content.Server.Interaction
|
|||||||
if (targetUid != default)
|
if (targetUid != default)
|
||||||
{
|
{
|
||||||
_adminLogSystem.Add(LogType.AttackArmedClick, LogImpact.Medium,
|
_adminLogSystem.Add(LogType.AttackArmedClick, LogImpact.Medium,
|
||||||
$"{ToPrettyString(user)} attacked {ToPrettyString(targetUid)} with {ToPrettyString(item)} at {coordinates}");
|
$"{ToPrettyString(user):user} attacked {ToPrettyString(targetUid):target} with {ToPrettyString(item):used} at {coordinates}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_adminLogSystem.Add(LogType.AttackArmedClick, LogImpact.Medium,
|
_adminLogSystem.Add(LogType.AttackArmedClick, LogImpact.Medium,
|
||||||
$"{ToPrettyString(user)} attacked with {ToPrettyString(item)} at {coordinates}");
|
$"{ToPrettyString(user):user} attacked with {ToPrettyString(item):used} at {coordinates}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -523,7 +523,7 @@ namespace Content.Server.Interaction
|
|||||||
var ev = new WideAttackEvent(user, user, coordinates);
|
var ev = new WideAttackEvent(user, user, coordinates);
|
||||||
RaiseLocalEvent(user, ev, false);
|
RaiseLocalEvent(user, ev, false);
|
||||||
if (ev.Handled)
|
if (ev.Handled)
|
||||||
_adminLogSystem.Add(LogType.AttackUnarmedWide, $"{user} wide attacked at {coordinates}");
|
_adminLogSystem.Add(LogType.AttackUnarmedWide, $"{ToPrettyString(user):user} wide attacked at {coordinates}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -534,12 +534,12 @@ namespace Content.Server.Interaction
|
|||||||
if (targetUid != default)
|
if (targetUid != default)
|
||||||
{
|
{
|
||||||
_adminLogSystem.Add(LogType.AttackUnarmedClick, LogImpact.Medium,
|
_adminLogSystem.Add(LogType.AttackUnarmedClick, LogImpact.Medium,
|
||||||
$"{ToPrettyString(user)} attacked {ToPrettyString(targetUid)} at {coordinates}");
|
$"{ToPrettyString(user):user} attacked {ToPrettyString(targetUid):target} at {coordinates}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_adminLogSystem.Add(LogType.AttackUnarmedClick, LogImpact.Medium,
|
_adminLogSystem.Add(LogType.AttackUnarmedClick, LogImpact.Medium,
|
||||||
$"{ToPrettyString(user)} attacked at {coordinates}");
|
$"{ToPrettyString(user):user} attacked at {coordinates}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ namespace Content.Server.Light.EntitySystems
|
|||||||
|
|
||||||
if (damage != null)
|
if (damage != null)
|
||||||
_logSystem.Add(LogType.Damaged,
|
_logSystem.Add(LogType.Damaged,
|
||||||
$"{args.User} burned their hand on {args.Target} and received {damage.Total} damage");
|
$"{ToPrettyString(args.User):user} burned their hand on {ToPrettyString(args.Target):target} and received {damage.Total:damage} damage");
|
||||||
|
|
||||||
SoundSystem.Play(Filter.Pvs(uid), light.BurnHandSound.GetSound(), uid);
|
SoundSystem.Play(Filter.Pvs(uid), light.BurnHandSound.GetSound(), uid);
|
||||||
|
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ namespace Content.Server.Medical.Components
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (eventArgs.Target != eventArgs.User)
|
if (eventArgs.Target != eventArgs.User)
|
||||||
EntitySystem.Get<AdminLogSystem>().Add(LogType.Healed, $"{eventArgs.User} healed {eventArgs.Target} for {healed.Total} damage");
|
EntitySystem.Get<AdminLogSystem>().Add(LogType.Healed, $"{_entMan.ToPrettyString(eventArgs.User):user} healed {_entMan.ToPrettyString(eventArgs.Target.Value):target} for {healed.Total:damage} damage");
|
||||||
else
|
else
|
||||||
EntitySystem.Get<AdminLogSystem>().Add(LogType.Healed, $"{eventArgs.User} healed themselves for {healed.Total} damage");
|
EntitySystem.Get<AdminLogSystem>().Add(LogType.Healed, $"{_entMan.ToPrettyString(eventArgs.User):user} healed themselves for {healed.Total:damage} damage");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,9 +208,9 @@ namespace Content.Server.Nutrition.Components
|
|||||||
if (calculatedHungerThreshold != _currentHungerThreshold)
|
if (calculatedHungerThreshold != _currentHungerThreshold)
|
||||||
{
|
{
|
||||||
if (_currentHungerThreshold == HungerThreshold.Dead)
|
if (_currentHungerThreshold == HungerThreshold.Dead)
|
||||||
EntitySystem.Get<AdminLogSystem>().Add(LogType.Hunger, $"{Owner} has stopped starving");
|
EntitySystem.Get<AdminLogSystem>().Add(LogType.Hunger, $"{_entMan.ToPrettyString(Owner):entity} has stopped starving");
|
||||||
else if (calculatedHungerThreshold == HungerThreshold.Dead)
|
else if (calculatedHungerThreshold == HungerThreshold.Dead)
|
||||||
EntitySystem.Get<AdminLogSystem>().Add(LogType.Hunger, $"{Owner} has started starving");
|
EntitySystem.Get<AdminLogSystem>().Add(LogType.Hunger, $"{_entMan.ToPrettyString(Owner):entity} has started starving");
|
||||||
|
|
||||||
_currentHungerThreshold = calculatedHungerThreshold;
|
_currentHungerThreshold = calculatedHungerThreshold;
|
||||||
HungerThresholdEffect();
|
HungerThresholdEffect();
|
||||||
|
|||||||
@@ -205,9 +205,9 @@ namespace Content.Server.Nutrition.Components
|
|||||||
if (calculatedThirstThreshold != _currentThirstThreshold)
|
if (calculatedThirstThreshold != _currentThirstThreshold)
|
||||||
{
|
{
|
||||||
if (_currentThirstThreshold == ThirstThreshold.Dead)
|
if (_currentThirstThreshold == ThirstThreshold.Dead)
|
||||||
EntitySystem.Get<AdminLogSystem>().Add(LogType.Thirst, $"{Owner} has stopped taking dehydration damage");
|
EntitySystem.Get<AdminLogSystem>().Add(LogType.Thirst, $"{_entMan.ToPrettyString(Owner):entity} has stopped taking dehydration damage");
|
||||||
else if (calculatedThirstThreshold == ThirstThreshold.Dead)
|
else if (calculatedThirstThreshold == ThirstThreshold.Dead)
|
||||||
EntitySystem.Get<AdminLogSystem>().Add(LogType.Thirst, $"{Owner} has started taking dehydration damage");
|
EntitySystem.Get<AdminLogSystem>().Add(LogType.Thirst, $"{_entMan.ToPrettyString(Owner):entity} has started taking dehydration damage");
|
||||||
|
|
||||||
_currentThirstThreshold = calculatedThirstThreshold;
|
_currentThirstThreshold = calculatedThirstThreshold;
|
||||||
ThirstThresholdEffect();
|
ThirstThresholdEffect();
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
|||||||
});
|
});
|
||||||
|
|
||||||
// logging
|
// logging
|
||||||
_logSystem.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(userUid)} is forcing {ToPrettyString(targetUid)} to drink {ToPrettyString(uid)}");
|
_logSystem.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(userUid):user} is forcing {ToPrettyString(targetUid):target} to drink {ToPrettyString(uid):drink} {SolutionContainerSystem.ToPrettyString(drinkSolution):solution}");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
|||||||
});
|
});
|
||||||
|
|
||||||
// logging
|
// logging
|
||||||
_logSystem.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(user)} is forcing {ToPrettyString(target)} to eat {ToPrettyString(uid)}");
|
_logSystem.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(user):user} is forcing {ToPrettyString(target):target} to eat {ToPrettyString(uid):food} {SolutionContainerSystem.ToPrettyString(foodSolution):solution}");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -415,9 +415,9 @@ namespace Content.Server.Nutrition.EntitySystems
|
|||||||
|
|
||||||
// logging
|
// logging
|
||||||
if (user == null)
|
if (user == null)
|
||||||
_logSystem.Add(LogType.ForceFeed, $"{uid} was thrown into the mouth of {target}");
|
_logSystem.Add(LogType.ForceFeed, $"{ToPrettyString(uid):food} {SolutionContainerSystem.ToPrettyString(foodSolution):solution} was thrown into the mouth of {ToPrettyString(target):target}");
|
||||||
else
|
else
|
||||||
_logSystem.Add(LogType.ForceFeed, $"{user} threw {uid} into the mouth of {target}");
|
_logSystem.Add(LogType.ForceFeed, $"{ToPrettyString(user.Value):user} threw {ToPrettyString(uid):food} {SolutionContainerSystem.ToPrettyString(foodSolution):solution} into the mouth of {ToPrettyString(target):target}");
|
||||||
|
|
||||||
var filter = user == null ? Filter.Entities(target) : Filter.Entities(target, user.Value);
|
var filter = user == null ? Filter.Entities(target) : Filter.Entities(target, user.Value);
|
||||||
_popupSystem.PopupEntity(Loc.GetString(food.EatMessage), target, filter);
|
_popupSystem.PopupEntity(Loc.GetString(food.EatMessage), target, filter);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace Content.Server.Projectiles
|
|||||||
|
|
||||||
if (dmg is not null && EntityManager.EntityExists(component.Shooter))
|
if (dmg is not null && EntityManager.EntityExists(component.Shooter))
|
||||||
_adminLogSystem.Add(LogType.BulletHit, LogImpact.Low,
|
_adminLogSystem.Add(LogType.BulletHit, LogImpact.Low,
|
||||||
$"Projectile {ToPrettyString(component.Owner)} shot by {ToPrettyString(component.Shooter):shooter} hit {ToPrettyString(otherEntity)} and dealt {dmg.Total} damage");
|
$"Projectile {ToPrettyString(component.Owner):projectile} shot by {ToPrettyString(component.Shooter):user} hit {ToPrettyString(otherEntity):target} and dealt {dmg.Total:damage} damage");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Damaging it can delete it
|
// Damaging it can delete it
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace Content.Server.Repairable
|
|||||||
|
|
||||||
// Repair all damage
|
// Repair all damage
|
||||||
_damageableSystem.SetAllDamage(damageable, 0);
|
_damageableSystem.SetAllDamage(damageable, 0);
|
||||||
_logSystem.Add(LogType.Healed, $"{args.User} repaired ${uid} back to full health");
|
_logSystem.Add(LogType.Healed, $"{ToPrettyString(args.User):user} repaired ${ToPrettyString(uid):target} back to full health");
|
||||||
|
|
||||||
component.Owner.PopupMessage(args.User,
|
component.Owner.PopupMessage(args.User,
|
||||||
Loc.GetString("comp-repairable-repair",
|
Loc.GetString("comp-repairable-repair",
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ namespace Content.Server.RoundEnd
|
|||||||
|
|
||||||
if (requester != null)
|
if (requester != null)
|
||||||
{
|
{
|
||||||
_adminLog.Add(LogType.ShuttleCalled, LogImpact.High, $"Shuttle called by {ToPrettyString(requester.Value)}");
|
_adminLog.Add(LogType.ShuttleCalled, LogImpact.High, $"Shuttle called by {ToPrettyString(requester.Value):user}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -128,7 +128,7 @@ namespace Content.Server.RoundEnd
|
|||||||
|
|
||||||
if (requester != null)
|
if (requester != null)
|
||||||
{
|
{
|
||||||
_adminLog.Add(LogType.ShuttleRecalled, LogImpact.High, $"Shuttle recalled by {ToPrettyString(requester.Value)}");
|
_adminLog.Add(LogType.ShuttleRecalled, LogImpact.High, $"Shuttle recalled by {ToPrettyString(requester.Value):user}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace Content.Server.Stunnable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_adminLogSystem.Add(LogType.DisarmedKnockdown, LogImpact.Medium, $"{ToPrettyString(args.Source):performer} knocked down {ToPrettyString(args.Target):target}");
|
_adminLogSystem.Add(LogType.DisarmedKnockdown, LogImpact.Medium, $"{ToPrettyString(args.Source):user} knocked down {ToPrettyString(args.Target):target}");
|
||||||
|
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ namespace Content.Server.Temperature.Systems
|
|||||||
{
|
{
|
||||||
if (!temperature.TakingDamage)
|
if (!temperature.TakingDamage)
|
||||||
{
|
{
|
||||||
_logSystem.Add(LogType.Temperature, $"{temperature.Owner} started taking high temperature damage");
|
_logSystem.Add(LogType.Temperature, $"{ToPrettyString(temperature.Owner):entity} started taking high temperature damage");
|
||||||
temperature.TakingDamage = true;
|
temperature.TakingDamage = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,7 +178,7 @@ namespace Content.Server.Temperature.Systems
|
|||||||
{
|
{
|
||||||
if (!temperature.TakingDamage)
|
if (!temperature.TakingDamage)
|
||||||
{
|
{
|
||||||
_logSystem.Add(LogType.Temperature, $"{temperature.Owner} started taking low temperature damage");
|
_logSystem.Add(LogType.Temperature, $"{ToPrettyString(temperature.Owner):entity} started taking low temperature damage");
|
||||||
temperature.TakingDamage = true;
|
temperature.TakingDamage = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ namespace Content.Server.Temperature.Systems
|
|||||||
}
|
}
|
||||||
else if (temperature.TakingDamage)
|
else if (temperature.TakingDamage)
|
||||||
{
|
{
|
||||||
_logSystem.Add(LogType.Temperature, $"{temperature.Owner} stopped taking temperature damage");
|
_logSystem.Add(LogType.Temperature, $"{ToPrettyString(temperature.Owner):entity} stopped taking temperature damage");
|
||||||
temperature.TakingDamage = false;
|
temperature.TakingDamage = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ namespace Content.Server.Weapon.Melee
|
|||||||
{
|
{
|
||||||
if (args.Used == args.User)
|
if (args.Used == args.User)
|
||||||
_logSystem.Add(LogType.MeleeHit,
|
_logSystem.Add(LogType.MeleeHit,
|
||||||
$"{args.User} melee attacked {args.TargetEntity} using their hands and dealt {damageResult.Total} damage");
|
$"{ToPrettyString(args.User):user} melee attacked {ToPrettyString(args.Target):target} using their hands and dealt {damageResult.Total:damage} damage");
|
||||||
else
|
else
|
||||||
_logSystem.Add(LogType.MeleeHit,
|
_logSystem.Add(LogType.MeleeHit,
|
||||||
$"{args.User} melee attacked {args.TargetEntity} using {args.Used} and dealt {damageResult.Total} damage");
|
$"{ToPrettyString(args.User):user} melee attacked {ToPrettyString(args.Target):target} using {ToPrettyString(args.Used):used} and dealt {damageResult.Total:damage} damage");
|
||||||
}
|
}
|
||||||
|
|
||||||
SoundSystem.Play(Filter.Pvs(owner), comp.HitSound.GetSound(), target);
|
SoundSystem.Play(Filter.Pvs(owner), comp.HitSound.GetSound(), target);
|
||||||
@@ -179,10 +179,10 @@ namespace Content.Server.Weapon.Melee
|
|||||||
{
|
{
|
||||||
if (args.Used == args.User)
|
if (args.Used == args.User)
|
||||||
_logSystem.Add(LogType.MeleeHit,
|
_logSystem.Add(LogType.MeleeHit,
|
||||||
$"{args.User} melee attacked {entity} using their hands and dealt {damageResult.Total} damage");
|
$"{ToPrettyString(args.User):user} melee attacked {ToPrettyString(entity):target} using their hands and dealt {damageResult.Total:damage} damage");
|
||||||
else
|
else
|
||||||
_logSystem.Add(LogType.MeleeHit,
|
_logSystem.Add(LogType.MeleeHit,
|
||||||
$"{args.User} melee attacked {entity} using {args.Used} and dealt {damageResult.Total} damage");
|
$"{ToPrettyString(args.User):user} melee attacked {ToPrettyString(entity):target} using {ToPrettyString(args.Used):used} and dealt {damageResult.Total:damage} damage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
|
|||||||
var dmg = EntitySystem.Get<DamageableSystem>().TryChangeDamage(result.HitEntity, hitscan.Damage);
|
var dmg = EntitySystem.Get<DamageableSystem>().TryChangeDamage(result.HitEntity, hitscan.Damage);
|
||||||
if (dmg != null)
|
if (dmg != null)
|
||||||
EntitySystem.Get<AdminLogSystem>().Add(LogType.HitScanHit,
|
EntitySystem.Get<AdminLogSystem>().Add(LogType.HitScanHit,
|
||||||
$"{shooter} hit {result.HitEntity} using {hitscan.Owner} and dealt {dmg.Total} damage");
|
$"{_entities.ToPrettyString(shooter):user} hit {_entities.ToPrettyString(result.HitEntity):target} using {_entities.ToPrettyString(hitscan.Owner):used} and dealt {dmg.Total:damage} damage");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ namespace Content.Shared.Chemistry.Reaction
|
|||||||
{
|
{
|
||||||
var entity = args.SolutionEntity;
|
var entity = args.SolutionEntity;
|
||||||
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
|
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
|
||||||
$"Reaction effect {effect.GetType().Name} of reaction ${reaction.ID:reaction} applied on entity {ToPrettyString(entity)} at {Transform(entity).Coordinates}");
|
$"Reaction effect {effect.GetType().Name:effect} of reaction ${reaction.ID:reaction} applied on entity {ToPrettyString(entity):entity} at {Transform(entity).Coordinates:coordinates}");
|
||||||
}
|
}
|
||||||
|
|
||||||
effect.Effect(args);
|
effect.Effect(args);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace Content.Shared.Chemistry
|
|||||||
{
|
{
|
||||||
var entity = args.SolutionEntity;
|
var entity = args.SolutionEntity;
|
||||||
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
|
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
|
||||||
$"Reactive effect {effect.GetType().Name} of reagent {reagent.ID:reagent} with method {method} applied on entity {ToPrettyString(entity)} at {Transform(entity).Coordinates}");
|
$"Reactive effect {effect.GetType().Name:effect} of reagent {reagent.ID:reagent} with method {method} applied on entity {ToPrettyString(entity):entity} at {Transform(entity).Coordinates:coordinates}");
|
||||||
}
|
}
|
||||||
|
|
||||||
effect.Effect(args);
|
effect.Effect(args);
|
||||||
@@ -94,7 +94,7 @@ namespace Content.Shared.Chemistry
|
|||||||
{
|
{
|
||||||
var entity = args.SolutionEntity;
|
var entity = args.SolutionEntity;
|
||||||
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
|
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
|
||||||
$"Reactive effect {effect.GetType().Name} of {ToPrettyString(entity)} using reagent {reagent.ID} with method {method} at {Transform(entity).Coordinates}");
|
$"Reactive effect {effect.GetType().Name:effect} of {ToPrettyString(entity):entity} using reagent {reagent.ID:reagent} with method {method} at {Transform(entity).Coordinates:coordinates}");
|
||||||
}
|
}
|
||||||
|
|
||||||
effect.Effect(args);
|
effect.Effect(args);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Shared.Administration.Logs;
|
using Content.Shared.Administration.Logs;
|
||||||
using Content.Shared.Body.Prototypes;
|
using Content.Shared.Body.Prototypes;
|
||||||
@@ -123,7 +123,7 @@ namespace Content.Shared.Chemistry.Reagent
|
|||||||
{
|
{
|
||||||
var entity = args.SolutionEntity;
|
var entity = args.SolutionEntity;
|
||||||
EntitySystem.Get<SharedAdminLogSystem>().Add(LogType.ReagentEffect, plantMetabolizable.LogImpact,
|
EntitySystem.Get<SharedAdminLogSystem>().Add(LogType.ReagentEffect, plantMetabolizable.LogImpact,
|
||||||
$"Plant metabolism effect {plantMetabolizable.GetType().Name:effect} of reagent {ID} applied on entity {entMan.ToPrettyString(entity)} at {entMan.GetComponent<TransformComponent>(entity).Coordinates}");
|
$"Plant metabolism effect {plantMetabolizable.GetType().Name:effect} of reagent {ID:reagent} applied on entity {entMan.ToPrettyString(entity):entity} at {entMan.GetComponent<TransformComponent>(entity).Coordinates:coordinates}");
|
||||||
plantMetabolizable.Effect(args);
|
plantMetabolizable.Effect(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -673,7 +673,7 @@ namespace Content.Shared.Hands.Components
|
|||||||
|
|
||||||
HandlePickupAnimation(entity);
|
HandlePickupAnimation(entity);
|
||||||
PutEntityIntoHand(hand, entity);
|
PutEntityIntoHand(hand, entity);
|
||||||
EntitySystem.Get<SharedAdminLogSystem>().Add(LogType.Pickup, LogImpact.Low, $"{_entMan.ToPrettyString(Owner)} picked up {_entMan.ToPrettyString(entity)}");
|
EntitySystem.Get<SharedAdminLogSystem>().Add(LogType.Pickup, LogImpact.Low, $"{_entMan.ToPrettyString(Owner):user} picked up {_entMan.ToPrettyString(entity):entity}");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -468,7 +468,7 @@ namespace Content.Shared.Interaction
|
|||||||
RaiseLocalEvent(used, activateMsg);
|
RaiseLocalEvent(used, activateMsg);
|
||||||
if (activateMsg.Handled)
|
if (activateMsg.Handled)
|
||||||
{
|
{
|
||||||
_adminLogSystem.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(user)} activated {ToPrettyString(used)}");
|
_adminLogSystem.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(user):user} activated {ToPrettyString(used):used}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,7 +477,7 @@ namespace Content.Shared.Interaction
|
|||||||
|
|
||||||
var activateEventArgs = new ActivateEventArgs(user, used);
|
var activateEventArgs = new ActivateEventArgs(user, used);
|
||||||
activateComp.Activate(activateEventArgs);
|
activateComp.Activate(activateEventArgs);
|
||||||
_adminLogSystem.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(user)} activated {ToPrettyString(used)}"); // No way to check success.
|
_adminLogSystem.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(user):user} activated {ToPrettyString(used):used}"); // No way to check success.
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -556,7 +556,7 @@ namespace Content.Shared.Interaction
|
|||||||
RaiseLocalEvent(thrown, throwMsg);
|
RaiseLocalEvent(thrown, throwMsg);
|
||||||
if (throwMsg.Handled)
|
if (throwMsg.Handled)
|
||||||
{
|
{
|
||||||
_adminLogSystem.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user)} threw {ToPrettyString(thrown)}");
|
_adminLogSystem.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user):user} threw {ToPrettyString(thrown):entity}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -568,7 +568,7 @@ namespace Content.Shared.Interaction
|
|||||||
{
|
{
|
||||||
comp.Thrown(args);
|
comp.Thrown(args);
|
||||||
}
|
}
|
||||||
_adminLogSystem.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user)} threw {ToPrettyString(thrown)}");
|
_adminLogSystem.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user):user} threw {ToPrettyString(thrown):entity}");
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -677,7 +677,7 @@ namespace Content.Shared.Interaction
|
|||||||
RaiseLocalEvent(item, dropMsg);
|
RaiseLocalEvent(item, dropMsg);
|
||||||
if (dropMsg.Handled)
|
if (dropMsg.Handled)
|
||||||
{
|
{
|
||||||
_adminLogSystem.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user)} dropped {ToPrettyString(item)}");
|
_adminLogSystem.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user):user} dropped {ToPrettyString(item):entity}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -690,7 +690,7 @@ namespace Content.Shared.Interaction
|
|||||||
{
|
{
|
||||||
comp.Dropped(new DroppedEventArgs(user));
|
comp.Dropped(new DroppedEventArgs(user));
|
||||||
}
|
}
|
||||||
_adminLogSystem.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user)} dropped {ToPrettyString(item)}");
|
_adminLogSystem.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user):user} dropped {ToPrettyString(item):entity}");
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Shared.Administration.Logs;
|
using Content.Shared.Administration.Logs;
|
||||||
@@ -106,7 +106,7 @@ namespace Content.Shared.Slippery
|
|||||||
PlaySound(component);
|
PlaySound(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
_adminLog.Add(LogType.Slip, LogImpact.Low, $"{ToPrettyString(otherBody.Owner)} slipped on collision with {ToPrettyString(component.Owner)}");
|
_adminLog.Add(LogType.Slip, LogImpact.Low, $"{ToPrettyString(otherBody.Owner):mob} slipped on collision with {ToPrettyString(component.Owner):entity}");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ namespace Content.Shared.Throwing
|
|||||||
|
|
||||||
// Assume it's uninteresting if it has no thrower. For now anyway.
|
// Assume it's uninteresting if it has no thrower. For now anyway.
|
||||||
if (thrownItem.Thrower is not null)
|
if (thrownItem.Thrower is not null)
|
||||||
_adminLogSystem.Add(LogType.Landed, LogImpact.Low, $"{ToPrettyString(landing)} thrown by {ToPrettyString(thrownItem.Thrower.Value):thrower} landed.");
|
_adminLogSystem.Add(LogType.Landed, LogImpact.Low, $"{ToPrettyString(landing):entity} thrown by {ToPrettyString(thrownItem.Thrower.Value):thrower} landed.");
|
||||||
|
|
||||||
var landMsg = new LandEvent {User = thrownItem.Thrower};
|
var landMsg = new LandEvent {User = thrownItem.Thrower};
|
||||||
RaiseLocalEvent(landing, landMsg, false);
|
RaiseLocalEvent(landing, landMsg, false);
|
||||||
|
|||||||
@@ -130,19 +130,22 @@ namespace Content.Shared.Verbs
|
|||||||
if (usedUid != default)
|
if (usedUid != default)
|
||||||
EntityManager.EntityExists(usedUid);
|
EntityManager.EntityExists(usedUid);
|
||||||
|
|
||||||
// then prepare the basic log message body
|
|
||||||
var verbText = $"{verb.Category?.Text} {verb.Text}".Trim();
|
var verbText = $"{verb.Category?.Text} {verb.Text}".Trim();
|
||||||
var logText = forced
|
|
||||||
? $"was forced to execute the '{verbText}' verb targeting " // let's not frame people, eh?
|
|
||||||
: $"executed '{verbText}' verb targeting ";
|
|
||||||
|
|
||||||
// then log with entity information
|
// lets not frame people, eh?
|
||||||
if (used != null)
|
var executionText = forced ? "was forced to execute" : "executed";
|
||||||
|
|
||||||
|
if (used == null)
|
||||||
|
{
|
||||||
_logSystem.Add(LogType.Verb, verb.Impact,
|
_logSystem.Add(LogType.Verb, verb.Impact,
|
||||||
$"{ToPrettyString(user)} {logText} {ToPrettyString(target)} while holding {ToPrettyString(used.Value)}");
|
$"{ToPrettyString(user):user} {executionText} the [{verbText:verb}] verb targeting {ToPrettyString(target):target}");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
_logSystem.Add(LogType.Verb, verb.Impact,
|
_logSystem.Add(LogType.Verb, verb.Impact,
|
||||||
$"{ToPrettyString(user)} {logText} {ToPrettyString(target)}");
|
$"{ToPrettyString(user):user} {executionText} the [{verbText:verb}] verb targeting {ToPrettyString(target):target} while holding {ToPrettyString(used.Value):held}");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user