Airlocks use unshaded overlays for the lights.

This commit is contained in:
Pieter-Jan Briers
2019-06-02 13:40:56 +02:00
parent 50bc1bff48
commit 4a4fcad7ef
14 changed files with 669 additions and 4 deletions

View File

@@ -31,6 +31,11 @@ namespace Content.Client.GameObjects.Components.Doors
flick.LayerKey = DoorVisualLayers.Base; flick.LayerKey = DoorVisualLayers.Base;
flick.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("closing", 0f)); flick.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("closing", 0f));
var flickUnlit = new AnimationTrackSpriteFlick();
CloseAnimation.AnimationTracks.Add(flickUnlit);
flickUnlit.LayerKey = DoorVisualLayers.BaseUnlit;
flickUnlit.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("closing_unlit", 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));
@@ -43,6 +48,11 @@ namespace Content.Client.GameObjects.Components.Doors
flick.LayerKey = DoorVisualLayers.Base; flick.LayerKey = DoorVisualLayers.Base;
flick.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("opening", 0f)); flick.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("opening", 0f));
var flickUnlit = new AnimationTrackSpriteFlick();
OpenAnimation.AnimationTracks.Add(flickUnlit);
flickUnlit.LayerKey = DoorVisualLayers.BaseUnlit;
flickUnlit.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("opening_unlit", 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));
@@ -70,14 +80,18 @@ 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.LayerSetVisible(DoorVisualLayers.BaseUnlit, true);
break; break;
case DoorVisualState.Closing: case DoorVisualState.Closing:
sprite.LayerSetVisible(DoorVisualLayers.BaseUnlit, true);
if (!animPlayer.HasRunningAnimation(AnimationKey)) if (!animPlayer.HasRunningAnimation(AnimationKey))
{ {
animPlayer.Play(CloseAnimation, AnimationKey); animPlayer.Play(CloseAnimation, AnimationKey);
} }
break; break;
case DoorVisualState.Opening: case DoorVisualState.Opening:
sprite.LayerSetVisible(DoorVisualLayers.BaseUnlit, true);
if (!animPlayer.HasRunningAnimation(AnimationKey)) if (!animPlayer.HasRunningAnimation(AnimationKey))
{ {
animPlayer.Play(OpenAnimation, AnimationKey); animPlayer.Play(OpenAnimation, AnimationKey);
@@ -86,6 +100,7 @@ namespace Content.Client.GameObjects.Components.Doors
break; break;
case DoorVisualState.Open: case DoorVisualState.Open:
sprite.LayerSetState(DoorVisualLayers.Base, "open"); sprite.LayerSetState(DoorVisualLayers.Base, "open");
sprite.LayerSetVisible(DoorVisualLayers.BaseUnlit, false);
break; break;
default: default:
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();
@@ -95,6 +110,7 @@ namespace Content.Client.GameObjects.Components.Doors
public enum DoorVisualLayers public enum DoorVisualLayers
{ {
Base Base,
BaseUnlit
} }
} }

View File

@@ -5,12 +5,16 @@
components: components:
- type: Clickable - type: Clickable
- type: Sprite - type: Sprite
netsync: false
drawdepth: Mobs # They're on the same layer as mobs, perspective. drawdepth: Mobs # They're on the same layer as mobs, perspective.
sprite: Buildings/airlock_basic.rsi sprite: Buildings/airlock_basic.rsi
layers: layers:
- state: closed - state: closed
map: ["enum.DoorVisualLayers.Base"] map: ["enum.DoorVisualLayers.Base"]
- state: closed_unlit
shader: unshaded
map: ["enum.DoorVisualLayers.BaseUnlit"]
- type: Icon - type: Icon
sprite: Buildings/airlock_basic.rsi sprite: Buildings/airlock_basic.rsi

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

View File

@@ -1 +1,220 @@
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/2b969adc2dfd3e9621bf3597c5cbffeb3ac8c9f0/icons/obj/doors/doorint.dmi", "states": [{"name": "closed", "directions": 1, "delays": [[1.0]]}, {"name": "closing", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "deny", "directions": 1, "delays": [[0.1, 0.1, 0.1]]}, {"name": "locked", "directions": 1, "delays": [[1.0]]}, {"name": "o_closing", "directions": 1, "delays": [[0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.4]]}, {"name": "o_opening", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "open", "directions": 1, "delays": [[1.0]]}, {"name": "opening", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "panel_open", "directions": 1, "delays": [[1.0]]}, {"name": "spark", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "sparks_broken", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "sparks_damaged", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.7]]}, {"name": "sparks_open", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "welded", "directions": 1, "delays": [[1.0]]}]} {
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CC-BY-SA-3.0",
"copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/2b969adc2dfd3e9621bf3597c5cbffeb3ac8c9f0/icons/obj/doors/doorint.dmi",
"states": [
{
"name": "closed",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "closed_unlit",
"directions": 1
},
{
"name": "closing",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "closing_unlit",
"directions": 1,
"delays": [
[
0.5,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "deny",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1
]
]
},
{
"name": "locked",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "o_closing",
"directions": 1,
"delays": [
[
0.2,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.4
]
]
},
{
"name": "o_opening",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "open",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "opening",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "opening_unlit",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.5
]
]
},
{
"name": "panel_open",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "spark",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "sparks_broken",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "sparks_damaged",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
1.7
]
]
},
{
"name": "sparks_open",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "welded",
"directions": 1,
"delays": [
[
1.0
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

View File

@@ -1 +1,220 @@
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/2b969adc2dfd3e9621bf3597c5cbffeb3ac8c9f0/icons/obj/doors/Dooreng.dmi", "states": [{"name": "closed", "directions": 1, "delays": [[1.0]]}, {"name": "closing", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "deny", "directions": 1, "delays": [[0.1, 0.1, 0.1]]}, {"name": "locked", "directions": 1, "delays": [[1.0]]}, {"name": "o_closing", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "o_opening", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "open", "directions": 1, "delays": [[1.0]]}, {"name": "opening", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "panel_open", "directions": 1, "delays": [[1.0]]}, {"name": "spark", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "sparks_broken", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "sparks_damaged", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.7]]}, {"name": "sparks_open", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "welded", "directions": 1, "delays": [[1.0]]}]} {
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CC-BY-SA-3.0",
"copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/2b969adc2dfd3e9621bf3597c5cbffeb3ac8c9f0/icons/obj/doors/Dooreng.dmi",
"states": [
{
"name": "closed",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "closed_unlit",
"directions": 1
},
{
"name": "closing",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "closing_unlit",
"directions": 1,
"delays": [
[
0.5,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "deny",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1
]
]
},
{
"name": "locked",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "o_closing",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "o_opening",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "open",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "opening",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "opening_unlit",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.5
]
]
},
{
"name": "panel_open",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "spark",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "sparks_broken",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "sparks_damaged",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
1.7
]
]
},
{
"name": "sparks_open",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "welded",
"directions": 1,
"delays": [
[
1.0
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

View File

@@ -1 +1,208 @@
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/2b969adc2dfd3e9621bf3597c5cbffeb3ac8c9f0/icons/obj/doors/Doorext.dmi", "states": [{"name": "closed", "directions": 1, "delays": [[1.0]]}, {"name": "closing", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "deny", "directions": 1, "delays": [[0.1, 0.1, 0.1]]}, {"name": "locked", "directions": 1, "delays": [[1.0]]}, {"name": "o_closing", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "o_opening", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "open", "directions": 1, "delays": [[1.0]]}, {"name": "opening", "directions": 1, "delays": [[0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.3]]}, {"name": "panel_open", "directions": 1, "delays": [[1.0]]}, {"name": "spark", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "sparks_broken", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "sparks_damaged", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 1.7]]}, {"name": "sparks_open", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "welded", "directions": 1, "delays": [[1.0]]}]} {
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CC-BY-SA-3.0",
"copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/2b969adc2dfd3e9621bf3597c5cbffeb3ac8c9f0/icons/obj/doors/Doorext.dmi",
"states": [
{
"name": "closed",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "closed_unlit",
"directions": 1
},
{
"name": "closing",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "closing_unlit",
"directions": 1,
"delays": [
[
0.6,
0.1,
0.1,
0.3
]
]
},
{
"name": "deny",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1
]
]
},
{
"name": "locked",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "o_closing",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "o_opening",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "open",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "opening",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.1,
0.1,
0.1,
0.3
]
]
},
{
"name": "opening_unlit",
"directions": 1,
"delays": [
[
0.2,
0.2,
0.1,
0.6
]
]
},
{
"name": "panel_open",
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "spark",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "sparks_broken",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "sparks_damaged",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
1.7
]
]
},
{
"name": "sparks_open",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "welded",
"directions": 1,
"delays": [
[
1.0
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B