Revert "Mind ecs" (#14881)

This commit is contained in:
Leon Friedrich
2023-03-27 10:24:00 +13:00
committed by GitHub
parent c6c8fa2075
commit 4d71b1b81e
85 changed files with 684 additions and 1150 deletions

View File

@@ -176,20 +176,20 @@ namespace Content.Server.AME.Components
}
// Logging
_entities.TryGetComponent(player, out MindContainerComponent? mindContainerComponent);
if (mindContainerComponent != null)
_entities.TryGetComponent(player, out MindComponent? mindComponent);
if (mindComponent != null)
{
var humanReadableState = _injecting ? "Inject" : "Not inject";
if (msg.Button == UiButton.IncreaseFuel || msg.Button == UiButton.DecreaseFuel)
_adminLogger.Add(LogType.Action, LogImpact.Extreme, $"{_entities.ToPrettyString(mindContainerComponent.Owner):player} has set the AME to inject {InjectionAmount} while set to {humanReadableState}");
_adminLogger.Add(LogType.Action, LogImpact.Extreme, $"{_entities.ToPrettyString(mindComponent.Owner):player} has set the AME to inject {InjectionAmount} while set to {humanReadableState}");
if (msg.Button == UiButton.ToggleInjection)
_adminLogger.Add(LogType.Action, LogImpact.Extreme, $"{_entities.ToPrettyString(mindContainerComponent.Owner):player} has set the AME to {humanReadableState}");
_adminLogger.Add(LogType.Action, LogImpact.Extreme, $"{_entities.ToPrettyString(mindComponent.Owner):player} has set the AME to {humanReadableState}");
// Admin alert
if (GetCoreCount() * 2 == InjectionAmount - 2 && msg.Button == UiButton.IncreaseFuel)
_chat.SendAdminAlert(player, $"increased AME over safe limit to {InjectionAmount}", mindContainerComponent);
_chat.SendAdminAlert(player, $"increased AME over safe limit to {InjectionAmount}", mindComponent);
}
GetAMENodeGroup()?.UpdateCoreVisuals();