* Log radial menu interractions, Issue #40902 * code review adjustement * Asked modifications from code review * Update Content.Shared/RCD/Systems/RCDSystem.cs Yeah, I'm old and using a very old C# syntax :D I need to update my brain Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Content.Shared/RCD/Systems/RCDSystem.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
using Content.Shared.Administration.Logs;
|
using Content.Shared.Administration.Logs;
|
||||||
using Content.Shared.Charges.Components;
|
|
||||||
using Content.Shared.Charges.Systems;
|
using Content.Shared.Charges.Systems;
|
||||||
using Content.Shared.Construction;
|
using Content.Shared.Construction;
|
||||||
using Content.Shared.Database;
|
using Content.Shared.Database;
|
||||||
@@ -89,11 +88,14 @@ public sealed class RCDSystem : EntitySystem
|
|||||||
if (!component.AvailablePrototypes.Contains(args.ProtoId))
|
if (!component.AvailablePrototypes.Contains(args.ProtoId))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!_protoManager.HasIndex(args.ProtoId))
|
if (!_protoManager.Resolve<RCDPrototype>(args.ProtoId, out var prototype))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Set the current RCD prototype to the one supplied
|
// Set the current RCD prototype to the one supplied
|
||||||
component.ProtoId = args.ProtoId;
|
component.ProtoId = args.ProtoId;
|
||||||
|
|
||||||
|
_adminLogger.Add(LogType.RCD, LogImpact.Low, $"{args.Actor} set RCD mode to: {prototype.Mode} : {prototype.Prototype}");
|
||||||
|
|
||||||
Dirty(uid, component);
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user