Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion Content.Shared/RCD/Systems/RCDSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Content.Shared.Administration.Logs;
using Content.Shared.Charges.Components;
using Content.Shared.Charges.Systems;
using Content.Shared.Construction;
using Content.Shared.Database;
Expand Down Expand Up @@ -94,6 +93,21 @@ private void OnRCDSystemMessage(EntityUid uid, RCDComponent component, RCDSystem

// Set the current RCD prototype to the one supplied
component.ProtoId = args.ProtoId;

var prototype = _protoManager.Index(component.ProtoId);
switch (prototype.Mode)
{
case RcdMode.ConstructTile:
_adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Construct Tile : {prototype.Prototype}");
break;
case RcdMode.ConstructObject:
_adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Construct Object : {prototype.Prototype}");
break;
case RcdMode.Deconstruct:
_adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Deconstruct");
break;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just

Image
Suggested change
var prototype = _protoManager.Index(component.ProtoId);
switch (prototype.Mode)
{
case RcdMode.ConstructTile:
_adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Construct Tile : {prototype.Prototype}");
break;
case RcdMode.ConstructObject:
_adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Construct Object : {prototype.Prototype}");
break;
case RcdMode.Deconstruct:
_adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Deconstruct");
break;
}
var prototype = _protoManager.Index(component.ProtoId);
_adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: {prototype.Mode} : {prototype.Prototype}");

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's fine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted with @ArtisticRoomba excellent suggestion

Here is what it looks like:

image


Dirty(uid, component);
}

Expand Down
Loading