Add placement logs (#18709)

* add placement logs

* add tile log type

* add support for spawn command

a little janky because the log message isn't entirely accurate when it's the result of a command use

* move method to ActorSystem.cs

* switch to TryGet and outs instead of multiple returns
This commit is contained in:
Chief-Engineer
2023-08-15 00:11:54 -05:00
committed by GitHub
parent be3fc7481e
commit 335e0230f2
4 changed files with 62 additions and 3 deletions

View File

@@ -42,12 +42,12 @@ public sealed partial class ToolSystem
var center = _turf.GetTileCenter(tile);
if (args.Used != null)
{
_adminLogger.Add(LogType.Action, LogImpact.Low,
_adminLogger.Add(LogType.Tile, LogImpact.Low,
$"{ToPrettyString(args.User):actor} used {ToPrettyString(args.Used.Value):tool} to pry {_tileDefinitionManager[tile.Tile.TypeId].Name} at {center}");
}
else
{
_adminLogger.Add(LogType.Action, LogImpact.Low,
_adminLogger.Add(LogType.Tile, LogImpact.Low,
$"{ToPrettyString(args.User):actor} pried {_tileDefinitionManager[tile.Tile.TypeId].Name} at {center}");
}