fix AI battery alert (#41879)
* fix AI battery alert * fix copy paste error
This commit is contained in:
parent
4643bb8bbb
commit
5facf93b4a
3 changed files with 17 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ public sealed class StationAiSystem : SharedStationAiSystem
|
||||||
private readonly ProtoId<JobPrototype> _stationAiJob = "StationAi";
|
private readonly ProtoId<JobPrototype> _stationAiJob = "StationAi";
|
||||||
private readonly EntProtoId _stationAiBrain = "StationAiBrain";
|
private readonly EntProtoId _stationAiBrain = "StationAiBrain";
|
||||||
|
|
||||||
private readonly ProtoId<AlertPrototype> _batteryAlert = "BorgBattery";
|
private readonly ProtoId<AlertPrototype> _batteryAlert = "AiBattery";
|
||||||
private readonly ProtoId<AlertPrototype> _damageAlert = "BorgHealth";
|
private readonly ProtoId<AlertPrototype> _damageAlert = "BorgHealth";
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Shared.Alert;
|
namespace Content.Shared.Alert;
|
||||||
|
|
@ -7,8 +8,17 @@ namespace Content.Shared.Alert;
|
||||||
/// An alert popup with associated icon, tooltip, and other data.
|
/// An alert popup with associated icon, tooltip, and other data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Prototype]
|
[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>
|
/// <summary>
|
||||||
/// Type of alert, no 2 alert prototypes should have the same one.
|
/// Type of alert, no 2 alert prototypes should have the same one.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -295,6 +295,11 @@
|
||||||
description: alerts-no-battery-desc
|
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
|
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
|
- type: alert
|
||||||
id: Internals
|
id: Internals
|
||||||
category: Internals
|
category: Internals
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue