Correctly implement opening animation for airlocks with open maintenance panel.
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Content.Client.GameObjects.Components.Wires;
|
||||||
using Content.Shared.GameObjects.Components.Doors;
|
using Content.Shared.GameObjects.Components.Doors;
|
||||||
using Robust.Client.Animations;
|
using Robust.Client.Animations;
|
||||||
using Robust.Client.GameObjects;
|
using Robust.Client.GameObjects;
|
||||||
@@ -38,6 +39,11 @@ namespace Content.Client.GameObjects.Components.Doors
|
|||||||
flickUnlit.LayerKey = DoorVisualLayers.BaseUnlit;
|
flickUnlit.LayerKey = DoorVisualLayers.BaseUnlit;
|
||||||
flickUnlit.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("closing_unlit", 0f));
|
flickUnlit.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("closing_unlit", 0f));
|
||||||
|
|
||||||
|
var flickMaintenancePanel = new AnimationTrackSpriteFlick();
|
||||||
|
CloseAnimation.AnimationTracks.Add(flickMaintenancePanel);
|
||||||
|
flickMaintenancePanel.LayerKey = WiresVisualizer2D.WiresVisualLayers.MaintenancePanel;
|
||||||
|
flickMaintenancePanel.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("panel_closing", 0f));
|
||||||
|
|
||||||
var sound = new AnimationTrackPlaySound();
|
var sound = new AnimationTrackPlaySound();
|
||||||
CloseAnimation.AnimationTracks.Add(sound);
|
CloseAnimation.AnimationTracks.Add(sound);
|
||||||
sound.KeyFrames.Add(new AnimationTrackPlaySound.KeyFrame(closeSound, 0));
|
sound.KeyFrames.Add(new AnimationTrackPlaySound.KeyFrame(closeSound, 0));
|
||||||
@@ -55,6 +61,11 @@ namespace Content.Client.GameObjects.Components.Doors
|
|||||||
flickUnlit.LayerKey = DoorVisualLayers.BaseUnlit;
|
flickUnlit.LayerKey = DoorVisualLayers.BaseUnlit;
|
||||||
flickUnlit.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("opening_unlit", 0f));
|
flickUnlit.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("opening_unlit", 0f));
|
||||||
|
|
||||||
|
var flickMaintenancePanel = new AnimationTrackSpriteFlick();
|
||||||
|
OpenAnimation.AnimationTracks.Add(flickMaintenancePanel);
|
||||||
|
flickMaintenancePanel.LayerKey = WiresVisualizer2D.WiresVisualLayers.MaintenancePanel;
|
||||||
|
flickMaintenancePanel.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("panel_opening", 0f));
|
||||||
|
|
||||||
var sound = new AnimationTrackPlaySound();
|
var sound = new AnimationTrackPlaySound();
|
||||||
OpenAnimation.AnimationTracks.Add(sound);
|
OpenAnimation.AnimationTracks.Add(sound);
|
||||||
sound.KeyFrames.Add(new AnimationTrackPlaySound.KeyFrame(openSound, 0));
|
sound.KeyFrames.Add(new AnimationTrackPlaySound.KeyFrame(openSound, 0));
|
||||||
@@ -96,6 +107,7 @@ namespace Content.Client.GameObjects.Components.Doors
|
|||||||
case DoorVisualState.Closed:
|
case DoorVisualState.Closed:
|
||||||
sprite.LayerSetState(DoorVisualLayers.Base, "closed");
|
sprite.LayerSetState(DoorVisualLayers.Base, "closed");
|
||||||
sprite.LayerSetState(DoorVisualLayers.BaseUnlit, "closed_unlit");
|
sprite.LayerSetState(DoorVisualLayers.BaseUnlit, "closed_unlit");
|
||||||
|
sprite.LayerSetState(WiresVisualizer2D.WiresVisualLayers.MaintenancePanel, "panel_open");
|
||||||
break;
|
break;
|
||||||
case DoorVisualState.Closing:
|
case DoorVisualState.Closing:
|
||||||
if (!animPlayer.HasRunningAnimation(AnimationKey))
|
if (!animPlayer.HasRunningAnimation(AnimationKey))
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace Content.Server.GameObjects.Components.Doors
|
|||||||
{
|
{
|
||||||
base.State = value;
|
base.State = value;
|
||||||
// Only show the maintenance panel if the airlock is closed
|
// Only show the maintenance panel if the airlock is closed
|
||||||
_wires.IsPanelVisible = value == DoorState.Closed;
|
_wires.IsPanelVisible = value != DoorState.Open;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_closing",
|
"name": "panel_closing",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_opening",
|
"name": "panel_opening",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
BIN
Resources/Textures/Buildings/airlock_basic.rsi/panel_closing.png
Normal file
|
After Width: | Height: | Size: 368 B |
BIN
Resources/Textures/Buildings/airlock_basic.rsi/panel_opening.png
Normal file
|
After Width: | Height: | Size: 348 B |
@@ -71,7 +71,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_closing",
|
"name": "panel_closing",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_opening",
|
"name": "panel_opening",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 348 B |
|
Before Width: | Height: | Size: 992 B After Width: | Height: | Size: 915 B |
@@ -68,7 +68,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_closing",
|
"name": "panel_closing",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_opening",
|
"name": "panel_opening",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 513 B |
|
After Width: | Height: | Size: 496 B |
@@ -71,7 +71,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_closing",
|
"name": "panel_closing",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_opening",
|
"name": "panel_opening",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 348 B |
@@ -71,7 +71,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_closing",
|
"name": "panel_closing",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_opening",
|
"name": "panel_opening",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 348 B |
@@ -71,7 +71,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_closing",
|
"name": "panel_closing",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_opening",
|
"name": "panel_opening",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 348 B |
@@ -71,7 +71,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_closing",
|
"name": "panel_closing",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "o_opening",
|
"name": "panel_opening",
|
||||||
"directions": 1,
|
"directions": 1,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 348 B |