fix AI battery alert (#41879)

* fix AI battery alert

* fix copy paste error
This commit is contained in:
slarticodefast
2025-12-16 19:48:20 +01:00
committed by GitHub
parent 4643bb8bbb
commit 5facf93b4a
3 changed files with 17 additions and 2 deletions

View File

@@ -68,7 +68,7 @@ public sealed class StationAiSystem : SharedStationAiSystem
private readonly ProtoId<JobPrototype> _stationAiJob = "StationAi";
private readonly EntProtoId _stationAiBrain = "StationAiBrain";
private readonly ProtoId<AlertPrototype> _batteryAlert = "BorgBattery";
private readonly ProtoId<AlertPrototype> _batteryAlert = "AiBattery";
private readonly ProtoId<AlertPrototype> _damageAlert = "BorgHealth";
public override void Initialize()

View File

@@ -1,4 +1,5 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
using Robust.Shared.Utility;
namespace Content.Shared.Alert;
@@ -7,8 +8,17 @@ namespace Content.Shared.Alert;
/// An alert popup with associated icon, tooltip, and other data.
/// </summary>
[Prototype]
public sealed partial class AlertPrototype : IPrototype
public sealed partial class AlertPrototype : IPrototype, IInheritingPrototype
{
/// <inheritdoc />
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<AlertPrototype>))]
public string[]? Parents { get; private set; }
/// <inheritdoc />
[NeverPushInheritance]
[AbstractDataField]
public bool Abstract { get; private set; }
/// <summary>
/// Type of alert, no 2 alert prototypes should have the same one.
/// </summary>

View File

@@ -295,6 +295,11 @@
description: alerts-no-battery-desc
clientHandled: true # the power cell battery is read on the client so that we don't have to periodically network the charge
- type: alert
parent: BorgBattery
id: AiBattery
clientHandled: false # the station AI does not have a predicted battery, so we need to send the alert from the server
- type: alert
id: Internals
category: Internals