replace apc panel with wires panel (#14832)
@@ -1,10 +1,5 @@
|
|||||||
using Content.Shared.APC;
|
using Content.Shared.APC;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Robust.Client.GameObjects;
|
using Robust.Client.GameObjects;
|
||||||
using Robust.Client.State;
|
|
||||||
using Robust.Shared.GameObjects;
|
|
||||||
using Robust.Shared.IoC;
|
|
||||||
using Robust.Shared.Maths;
|
|
||||||
|
|
||||||
namespace Content.Client.Power.APC
|
namespace Content.Client.Power.APC
|
||||||
{
|
{
|
||||||
@@ -15,32 +10,6 @@ namespace Content.Client.Power.APC
|
|||||||
public static readonly Color FullColor = Color.FromHex("#3db83b");
|
public static readonly Color FullColor = Color.FromHex("#3db83b");
|
||||||
public static readonly Color EmagColor = Color.FromHex("#1f48d6");
|
public static readonly Color EmagColor = Color.FromHex("#1f48d6");
|
||||||
|
|
||||||
[UsedImplicitly]
|
|
||||||
[Obsolete("Subscribe to your component being initialised instead.")]
|
|
||||||
public override void InitializeEntity(EntityUid entity)
|
|
||||||
{
|
|
||||||
base.InitializeEntity(entity);
|
|
||||||
|
|
||||||
var sprite = IoCManager.Resolve<IEntityManager>().GetComponent<SpriteComponent>(entity);
|
|
||||||
|
|
||||||
sprite.LayerMapSet(Layers.Panel, sprite.AddLayerState("apc0"));
|
|
||||||
|
|
||||||
sprite.LayerMapSet(Layers.ChargeState, sprite.AddLayerState("apco3-0"));
|
|
||||||
sprite.LayerSetShader(Layers.ChargeState, "unshaded");
|
|
||||||
|
|
||||||
sprite.LayerMapSet(Layers.Lock, sprite.AddLayerState("apcox-0"));
|
|
||||||
sprite.LayerSetShader(Layers.Lock, "unshaded");
|
|
||||||
|
|
||||||
sprite.LayerMapSet(Layers.Equipment, sprite.AddLayerState("apco0-3"));
|
|
||||||
sprite.LayerSetShader(Layers.Equipment, "unshaded");
|
|
||||||
|
|
||||||
sprite.LayerMapSet(Layers.Lighting, sprite.AddLayerState("apco1-3"));
|
|
||||||
sprite.LayerSetShader(Layers.Lighting, "unshaded");
|
|
||||||
|
|
||||||
sprite.LayerMapSet(Layers.Environment, sprite.AddLayerState("apco2-3"));
|
|
||||||
sprite.LayerSetShader(Layers.Environment, "unshaded");
|
|
||||||
}
|
|
||||||
|
|
||||||
[Obsolete("Subscribe to AppearanceChangeEvent instead.")]
|
[Obsolete("Subscribe to AppearanceChangeEvent instead.")]
|
||||||
public override void OnChangeData(AppearanceComponent component)
|
public override void OnChangeData(AppearanceComponent component)
|
||||||
{
|
{
|
||||||
@@ -48,36 +17,8 @@ namespace Content.Client.Power.APC
|
|||||||
|
|
||||||
var ent = IoCManager.Resolve<IEntityManager>();
|
var ent = IoCManager.Resolve<IEntityManager>();
|
||||||
var sprite = ent.GetComponent<SpriteComponent>(component.Owner);
|
var sprite = ent.GetComponent<SpriteComponent>(component.Owner);
|
||||||
if (component.TryGetData<ApcPanelState>(ApcVisuals.PanelState, out var panelState))
|
|
||||||
{
|
|
||||||
switch (panelState)
|
|
||||||
{
|
|
||||||
case ApcPanelState.Closed:
|
|
||||||
sprite.LayerSetState(Layers.Panel, "apc0");
|
|
||||||
break;
|
|
||||||
case ApcPanelState.Open:
|
|
||||||
sprite.LayerSetState(Layers.Panel, "apcframe");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (component.TryGetData<ApcChargeState>(ApcVisuals.ChargeState, out var chargeState))
|
if (component.TryGetData<ApcChargeState>(ApcVisuals.ChargeState, out var chargeState))
|
||||||
{
|
{
|
||||||
switch (chargeState)
|
|
||||||
{
|
|
||||||
case ApcChargeState.Lack:
|
|
||||||
sprite.LayerSetState(Layers.ChargeState, "apco3-0");
|
|
||||||
break;
|
|
||||||
case ApcChargeState.Charging:
|
|
||||||
sprite.LayerSetState(Layers.ChargeState, "apco3-1");
|
|
||||||
break;
|
|
||||||
case ApcChargeState.Full:
|
|
||||||
sprite.LayerSetState(Layers.ChargeState, "apco3-2");
|
|
||||||
break;
|
|
||||||
case ApcChargeState.Emag:
|
|
||||||
sprite.LayerSetState(Layers.ChargeState, "emag-unlit");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ent.TryGetComponent(component.Owner, out SharedPointLightComponent? light))
|
if (ent.TryGetComponent(component.Owner, out SharedPointLightComponent? light))
|
||||||
{
|
{
|
||||||
light.Color = chargeState switch
|
light.Color = chargeState switch
|
||||||
@@ -90,20 +31,15 @@ namespace Content.Client.Power.APC
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
sprite.LayerSetState(Layers.ChargeState, "apco3-0");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Layers : byte
|
enum ApcVisualLayers : byte
|
||||||
{
|
{
|
||||||
ChargeState,
|
ChargeState,
|
||||||
Lock,
|
Lock,
|
||||||
Equipment,
|
Equipment,
|
||||||
Lighting,
|
Lighting,
|
||||||
Environment,
|
Environment,
|
||||||
Panel,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +1,12 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.IntegrationTests.Tests.Interaction;
|
using Content.IntegrationTests.Tests.Interaction;
|
||||||
using Content.Server.Power.Components;
|
|
||||||
using Content.Shared.Wires;
|
using Content.Shared.Wires;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Robust.Shared.GameObjects;
|
|
||||||
|
|
||||||
namespace Content.IntegrationTests.Tests.Construction.Interaction;
|
namespace Content.IntegrationTests.Tests.Construction.Interaction;
|
||||||
|
|
||||||
public sealed class PanelScrewing : InteractionTest
|
public sealed class PanelScrewing : InteractionTest
|
||||||
{
|
{
|
||||||
[Test]
|
|
||||||
public async Task ApcPanel()
|
|
||||||
{
|
|
||||||
await SpawnTarget("APCBasic");
|
|
||||||
var comp = Comp<ApcComponent>();
|
|
||||||
|
|
||||||
// Open & close panel
|
|
||||||
Assert.That(comp.IsApcOpen, Is.False);
|
|
||||||
|
|
||||||
await Interact(Screw);
|
|
||||||
Assert.That(comp.IsApcOpen, Is.True);
|
|
||||||
await Interact(Screw);
|
|
||||||
Assert.That(comp.IsApcOpen, Is.False);
|
|
||||||
|
|
||||||
// Interrupted DoAfters
|
|
||||||
await Interact(Screw, awaitDoAfters: false);
|
|
||||||
await CancelDoAfters();
|
|
||||||
Assert.That(comp.IsApcOpen, Is.False);
|
|
||||||
await Interact(Screw);
|
|
||||||
Assert.That(comp.IsApcOpen, Is.True);
|
|
||||||
await Interact(Screw, awaitDoAfters: false);
|
|
||||||
await CancelDoAfters();
|
|
||||||
Assert.That(comp.IsApcOpen, Is.True);
|
|
||||||
await Interact(Screw);
|
|
||||||
Assert.That(comp.IsApcOpen, Is.False);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test wires panel on both airlocks & tcomms servers. These both use the same component, but comms may have
|
// Test wires panel on both airlocks & tcomms servers. These both use the same component, but comms may have
|
||||||
// conflicting interactions due to encryption key removal interactions.
|
// conflicting interactions due to encryption key removal interactions.
|
||||||
[Test]
|
[Test]
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
using Content.Server.Power.Components;
|
|
||||||
using Content.Shared.Construction;
|
|
||||||
using Content.Shared.Examine;
|
|
||||||
using JetBrains.Annotations;
|
|
||||||
|
|
||||||
namespace Content.Server.Construction.Conditions
|
|
||||||
{
|
|
||||||
[UsedImplicitly]
|
|
||||||
[DataDefinition]
|
|
||||||
public sealed class ApcPanel : IGraphCondition
|
|
||||||
{
|
|
||||||
[DataField("open")] public bool Open { get; private set; } = true;
|
|
||||||
|
|
||||||
public bool Condition(EntityUid uid, IEntityManager entityManager)
|
|
||||||
{
|
|
||||||
if (!entityManager.TryGetComponent(uid, out ApcComponent? apc))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return apc.IsApcOpen == Open;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool DoExamine(ExaminedEvent args)
|
|
||||||
{
|
|
||||||
var entity = args.Examined;
|
|
||||||
|
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out ApcComponent? apc)) return false;
|
|
||||||
|
|
||||||
switch (Open)
|
|
||||||
{
|
|
||||||
case true when !apc.IsApcOpen:
|
|
||||||
args.PushMarkup(Loc.GetString("construction-examine-condition-apc-open"));
|
|
||||||
return true;
|
|
||||||
case false when apc.IsApcOpen:
|
|
||||||
args.PushMarkup(Loc.GetString("construction-examine-condition-apc-close"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<ConstructionGuideEntry> GenerateGuideEntry()
|
|
||||||
{
|
|
||||||
yield return new ConstructionGuideEntry()
|
|
||||||
{
|
|
||||||
Localization = Open
|
|
||||||
? "construction-step-condition-apc-open"
|
|
||||||
: "construction-step-condition-apc-close"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -14,12 +14,6 @@ public sealed class ApcComponent : BaseApcNetComponent
|
|||||||
public ApcChargeState LastChargeState;
|
public ApcChargeState LastChargeState;
|
||||||
public TimeSpan LastChargeStateTime;
|
public TimeSpan LastChargeStateTime;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Is the panel open for this entity's APC?
|
|
||||||
/// </summary>
|
|
||||||
[DataField("open")]
|
|
||||||
public bool IsApcOpen { get; set; }
|
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
public ApcExternalPowerState LastExternalState;
|
public ApcExternalPowerState LastExternalState;
|
||||||
public TimeSpan LastUiUpdate;
|
public TimeSpan LastUiUpdate;
|
||||||
@@ -41,11 +35,4 @@ public sealed class ApcComponent : BaseApcNetComponent
|
|||||||
{
|
{
|
||||||
apcNet.RemoveApc(this);
|
apcNet.RemoveApc(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
[DataField("screwdriverOpenSound")]
|
|
||||||
public SoundSpecifier ScrewdriverOpenSound = new SoundPathSpecifier("/Audio/Machines/screwdriveropen.ogg");
|
|
||||||
|
|
||||||
[DataField("screwdriverCloseSound")]
|
|
||||||
public SoundSpecifier ScrewdriverCloseSound = new SoundPathSpecifier("/Audio/Machines/screwdriverclose.ogg");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,19 +5,12 @@ using Content.Server.Power.Pow3r;
|
|||||||
using Content.Shared.Access.Components;
|
using Content.Shared.Access.Components;
|
||||||
using Content.Shared.Access.Systems;
|
using Content.Shared.Access.Systems;
|
||||||
using Content.Shared.APC;
|
using Content.Shared.APC;
|
||||||
using Content.Shared.DoAfter;
|
|
||||||
using Content.Shared.Emag.Components;
|
using Content.Shared.Emag.Components;
|
||||||
using Content.Shared.Emag.Systems;
|
using Content.Shared.Emag.Systems;
|
||||||
using Content.Shared.Examine;
|
|
||||||
using Content.Shared.Interaction;
|
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.Power;
|
|
||||||
using Content.Shared.Tools;
|
|
||||||
using Content.Shared.Tools.Components;
|
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Player;
|
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Server.Power.EntitySystems
|
namespace Content.Server.Power.EntitySystems
|
||||||
@@ -26,15 +19,12 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
internal sealed class ApcSystem : EntitySystem
|
internal sealed class ApcSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly AccessReaderSystem _accessReader = default!;
|
[Dependency] private readonly AccessReaderSystem _accessReader = default!;
|
||||||
[Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
|
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
||||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
[Dependency] private readonly PopupSystem _popup = default!;
|
||||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||||
[Dependency] private readonly SharedToolSystem _toolSystem = default!;
|
|
||||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||||
|
|
||||||
private const float ScrewTime = 2f;
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
@@ -47,10 +37,6 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
SubscribeLocalEvent<ApcComponent, ApcToggleMainBreakerMessage>(OnToggleMainBreaker);
|
SubscribeLocalEvent<ApcComponent, ApcToggleMainBreakerMessage>(OnToggleMainBreaker);
|
||||||
SubscribeLocalEvent<ApcComponent, GotEmaggedEvent>(OnEmagged);
|
SubscribeLocalEvent<ApcComponent, GotEmaggedEvent>(OnEmagged);
|
||||||
|
|
||||||
SubscribeLocalEvent<ApcComponent, ApcToolFinishedEvent>(OnToolFinished);
|
|
||||||
SubscribeLocalEvent<ApcComponent, InteractUsingEvent>(OnInteractUsing);
|
|
||||||
SubscribeLocalEvent<ApcComponent, ExaminedEvent>(OnExamine);
|
|
||||||
|
|
||||||
SubscribeLocalEvent<ApcComponent, EmpPulseEvent>(OnEmpPulse);
|
SubscribeLocalEvent<ApcComponent, EmpPulseEvent>(OnEmpPulse);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +79,7 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_popupSystem.PopupCursor(Loc.GetString("apc-component-insufficient-access"),
|
_popup.PopupCursor(Loc.GetString("apc-component-insufficient-access"),
|
||||||
args.Session, PopupType.Medium);
|
args.Session, PopupType.Medium);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -107,7 +93,7 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
battery.CanDischarge = apc.MainBreakerEnabled;
|
battery.CanDischarge = apc.MainBreakerEnabled;
|
||||||
|
|
||||||
UpdateUIState(uid, apc);
|
UpdateUIState(uid, apc);
|
||||||
SoundSystem.Play(apc.OnReceiveMessageSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-2f));
|
_audio.PlayPvs(apc.OnReceiveMessageSound, uid, AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnEmagged(EntityUid uid, ApcComponent comp, ref GotEmaggedEvent args)
|
private void OnEmagged(EntityUid uid, ApcComponent comp, ref GotEmaggedEvent args)
|
||||||
@@ -123,18 +109,13 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
if (!Resolve(uid, ref apc, ref battery))
|
if (!Resolve(uid, ref apc, ref battery))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (TryComp(uid, out AppearanceComponent? appearance))
|
|
||||||
{
|
|
||||||
UpdatePanelAppearance(uid, appearance, apc);
|
|
||||||
}
|
|
||||||
|
|
||||||
var newState = CalcChargeState(uid, battery.NetworkBattery);
|
var newState = CalcChargeState(uid, battery.NetworkBattery);
|
||||||
if (newState != apc.LastChargeState && apc.LastChargeStateTime + ApcComponent.VisualsChangeDelay < _gameTiming.CurTime)
|
if (newState != apc.LastChargeState && apc.LastChargeStateTime + ApcComponent.VisualsChangeDelay < _gameTiming.CurTime)
|
||||||
{
|
{
|
||||||
apc.LastChargeState = newState;
|
apc.LastChargeState = newState;
|
||||||
apc.LastChargeStateTime = _gameTiming.CurTime;
|
apc.LastChargeStateTime = _gameTiming.CurTime;
|
||||||
|
|
||||||
if (appearance != null)
|
if (TryComp(uid, out AppearanceComponent? appearance))
|
||||||
{
|
{
|
||||||
_appearance.SetData(uid, ApcVisuals.ChargeState, newState, appearance);
|
_appearance.SetData(uid, ApcVisuals.ChargeState, newState, appearance);
|
||||||
}
|
}
|
||||||
@@ -164,7 +145,7 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
(int) MathF.Ceiling(battery.CurrentSupply), apc.LastExternalState,
|
(int) MathF.Ceiling(battery.CurrentSupply), apc.LastExternalState,
|
||||||
battery.AvailableSupply / battery.Capacity);
|
battery.AvailableSupply / battery.Capacity);
|
||||||
|
|
||||||
_userInterfaceSystem.TrySetUiState(uid, ApcUiKey.Key, state, ui: ui);
|
_ui.TrySetUiState(uid, ApcUiKey.Key, state, ui: ui);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApcChargeState CalcChargeState(EntityUid uid, PowerState.Battery battery)
|
private ApcChargeState CalcChargeState(EntityUid uid, PowerState.Battery battery)
|
||||||
@@ -197,51 +178,6 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
return ApcExternalPowerState.Good;
|
return ApcExternalPowerState.Good;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ApcPanelState GetPanelState(ApcComponent apc)
|
|
||||||
{
|
|
||||||
if (apc.IsApcOpen)
|
|
||||||
return ApcPanelState.Open;
|
|
||||||
else
|
|
||||||
return ApcPanelState.Closed;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnInteractUsing(EntityUid uid, ApcComponent component, InteractUsingEvent args)
|
|
||||||
{
|
|
||||||
if (!EntityManager.TryGetComponent(args.Used, out ToolComponent? tool))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (_toolSystem.UseTool(args.Used, args.User, uid, ScrewTime, "Screwing", new ApcToolFinishedEvent(), toolComponent:tool))
|
|
||||||
args.Handled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnToolFinished(EntityUid uid, ApcComponent component, ApcToolFinishedEvent args)
|
|
||||||
{
|
|
||||||
if (args.Cancelled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
component.IsApcOpen = !component.IsApcOpen;
|
|
||||||
UpdatePanelAppearance(uid, apc: component);
|
|
||||||
|
|
||||||
// this will play on top of the normal screw driver tool sound.
|
|
||||||
var sound = component.IsApcOpen ? component.ScrewdriverOpenSound : component.ScrewdriverCloseSound;
|
|
||||||
_audio.PlayPvs(sound, uid);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdatePanelAppearance(EntityUid uid, AppearanceComponent? appearance = null, ApcComponent? apc = null)
|
|
||||||
{
|
|
||||||
if (!Resolve(uid, ref appearance, ref apc, false))
|
|
||||||
return;
|
|
||||||
|
|
||||||
_appearance.SetData(uid, ApcVisuals.PanelState, GetPanelState(apc), appearance);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnExamine(EntityUid uid, ApcComponent component, ExaminedEvent args)
|
|
||||||
{
|
|
||||||
args.PushMarkup(Loc.GetString(component.IsApcOpen
|
|
||||||
? "apc-component-on-examine-panel-open"
|
|
||||||
: "apc-component-on-examine-panel-closed"));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnEmpPulse(EntityUid uid, ApcComponent component, ref EmpPulseEvent args)
|
private void OnEmpPulse(EntityUid uid, ApcComponent component, ref EmpPulseEvent args)
|
||||||
{
|
{
|
||||||
if (component.MainBreakerEnabled)
|
if (component.MainBreakerEnabled)
|
||||||
|
|||||||
@@ -9,24 +9,6 @@ namespace Content.Shared.APC
|
|||||||
/// APC lights/HUD.
|
/// APC lights/HUD.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ChargeState,
|
ChargeState,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// APC frame.
|
|
||||||
/// </summary>
|
|
||||||
PanelState
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
|
||||||
public enum ApcPanelState
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// APC is closed.
|
|
||||||
/// </summary>
|
|
||||||
Closed,
|
|
||||||
/// <summary>
|
|
||||||
/// APC opened.
|
|
||||||
/// </summary>
|
|
||||||
Open
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public sealed class WiresPanelComponent : Component
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is the panel open for this entity's wires?
|
/// Is the panel open for this entity's wires?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables]
|
[DataField("open")]
|
||||||
public bool Open;
|
public bool Open;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -359,7 +359,7 @@
|
|||||||
description: technologies-electromagnetic-theory-description
|
description: technologies-electromagnetic-theory-description
|
||||||
icon:
|
icon:
|
||||||
sprite: Structures/Power/apc.rsi
|
sprite: Structures/Power/apc.rsi
|
||||||
state: apc0
|
state: base
|
||||||
requiredPoints: 10000
|
requiredPoints: 10000
|
||||||
requiredTechnologies:
|
requiredTechnologies:
|
||||||
- BasicResearch
|
- BasicResearch
|
||||||
|
|||||||
@@ -28,7 +28,25 @@
|
|||||||
drawdepth: WallMountedItems
|
drawdepth: WallMountedItems
|
||||||
netsync: false
|
netsync: false
|
||||||
sprite: Structures/Power/apc.rsi
|
sprite: Structures/Power/apc.rsi
|
||||||
state: apc0
|
layers:
|
||||||
|
- state: base
|
||||||
|
- state: powered-1
|
||||||
|
shader: unshaded
|
||||||
|
map: ["enum.ApcVisualLayers.ChargeState"]
|
||||||
|
- state: apcox-0
|
||||||
|
shader: unshaded
|
||||||
|
map: ["enum.ApcVisualLayers.Lock"]
|
||||||
|
- state: apco0-3
|
||||||
|
shader: unshaded
|
||||||
|
map: ["enum.ApcVisualLayers.Equipment"]
|
||||||
|
- state: apco1-3
|
||||||
|
shader: unshaded
|
||||||
|
map: ["enum.ApcVisualLayers.Lighting"]
|
||||||
|
- state: apco2-3
|
||||||
|
shader: unshaded
|
||||||
|
map: ["enum.ApcVisualLayers.Environment"]
|
||||||
|
- state: panel
|
||||||
|
map: ["enum.WiresVisualLayers.MaintenancePanel"]
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
visuals:
|
visuals:
|
||||||
- type: ApcVisualizer
|
- type: ApcVisualizer
|
||||||
@@ -69,6 +87,18 @@
|
|||||||
supplyRampTolerance: 1000
|
supplyRampTolerance: 1000
|
||||||
supplyRampRate: 500
|
supplyRampRate: 500
|
||||||
- type: WallMount
|
- type: WallMount
|
||||||
|
- type: Wires
|
||||||
|
BoardName: "APC"
|
||||||
|
LayoutId: APC
|
||||||
|
- type: WiresVisuals
|
||||||
|
- type: GenericVisualizer
|
||||||
|
visuals:
|
||||||
|
enum.ApcVisuals.ChargeState:
|
||||||
|
enum.ApcVisualLayers.ChargeState:
|
||||||
|
Lack: { state: powered-1 }
|
||||||
|
Charging: { state: powered-2 }
|
||||||
|
Full: { state: powered-3 }
|
||||||
|
Emag: { state: emag-unlit }
|
||||||
- type: Damageable
|
- type: Damageable
|
||||||
damageContainer: Inorganic
|
damageContainer: Inorganic
|
||||||
damageModifierSet: StrongMetallic
|
damageModifierSet: StrongMetallic
|
||||||
@@ -146,8 +176,7 @@
|
|||||||
id: APCConstructed
|
id: APCConstructed
|
||||||
suffix: Open
|
suffix: Open
|
||||||
components:
|
components:
|
||||||
- type: Apc
|
- type: WiresPanel
|
||||||
voltage: Apc
|
|
||||||
open: true
|
open: true
|
||||||
|
|
||||||
# APCs in use
|
# APCs in use
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
prototype: APCElectronics
|
prototype: APCElectronics
|
||||||
amount: 1
|
amount: 1
|
||||||
conditions:
|
conditions:
|
||||||
- !type:ApcPanel
|
- !type:WirePanel
|
||||||
open: true
|
open: true
|
||||||
steps:
|
steps:
|
||||||
- tool: Prying
|
- tool: Prying
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
description: "Area Power Controller (APC). Controls power. In an area."
|
description: "Area Power Controller (APC). Controls power. In an area."
|
||||||
icon:
|
icon:
|
||||||
sprite: Structures/Power/apc.rsi
|
sprite: Structures/Power/apc.rsi
|
||||||
state: apc0
|
state: base
|
||||||
objectType: Structure
|
objectType: Structure
|
||||||
placementMode: SnapgridCenter
|
placementMode: SnapgridCenter
|
||||||
canBuildInImpassable: true
|
canBuildInImpassable: true
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 370 B After Width: | Height: | Size: 370 B |
@@ -27,7 +27,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "apc0"
|
"name": "base"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "emag-unlit",
|
"name": "emag-unlit",
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"name": "apco2-3"
|
"name": "apco2-3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "apco3-0",
|
"name": "powered-1",
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
1,
|
1,
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "apco3-1",
|
"name": "powered-2",
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
0.1,
|
0.1,
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "apco3-2",
|
"name": "powered-3",
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
1,
|
1,
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 275 B |