mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
fix AI battery alert (#41879)
* fix AI battery alert * fix copy paste error
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user