Cleans up lathe rsis (#3392)

This commit is contained in:
Swept
2021-02-25 11:48:35 +00:00
committed by GitHub
parent 6acb38754f
commit e9af0d58e7
51 changed files with 434 additions and 410 deletions

View File

@@ -11,7 +11,7 @@ namespace Content.Client.GameObjects.Components.Power
[UsedImplicitly] [UsedImplicitly]
public class AutolatheVisualizer : AppearanceVisualizer public class AutolatheVisualizer : AppearanceVisualizer
{ {
private const string AnimationKey = "autolathe_animation"; private const string AnimationKey = "inserting_animation";
private Animation _buildingAnimation; private Animation _buildingAnimation;
private Animation _insertingMetalAnimation; private Animation _insertingMetalAnimation;
@@ -24,12 +24,12 @@ namespace Content.Client.GameObjects.Components.Power
{ {
base.LoadData(node); base.LoadData(node);
_buildingAnimation = PopulateAnimation("autolathe_building", "autolathe_building_unlit", 0.5f); _buildingAnimation = PopulateAnimation("building", "building_unlit", 0.5f);
_insertingMetalAnimation = PopulateAnimation("autolathe_inserting_metal_plate", "autolathe_inserting_unlit", 0.9f); _insertingMetalAnimation = PopulateAnimation("inserting_metal", "inserting_unlit", 0.5f);
_insertingGlassAnimation = PopulateAnimation("autolathe_inserting_glass_plate", "autolathe_inserting_unlit", 0.9f); _insertingGlassAnimation = PopulateAnimation("inserting_glass", "inserting_unlit", 0.5f);
_insertingGoldAnimation = PopulateAnimation("autolathe_inserting_gold_plate", "autolathe_inserting_unlit", 0.9f); _insertingGoldAnimation = PopulateAnimation("inserting_gold", "inserting_unlit", 0.5f);
_insertingPlasmaAnimation = PopulateAnimation("autolathe_inserting_plasma_sheet", "autolathe_inserting_unlit", 0.9f); _insertingPlasmaAnimation = PopulateAnimation("inserting_plasma", "inserting_unlit", 0.5f);
_insertingPlasticAnimation = PopulateAnimation("autolathe_inserting_plastic_sheet", "autolathe_inserting_unlit", 0.9f); _insertingPlasticAnimation = PopulateAnimation("inserting_plastic", "inserting_unlit", 0.5f);
} }
private Animation PopulateAnimation(string sprite, string spriteUnlit, float length) private Animation PopulateAnimation(string sprite, string spriteUnlit, float length)
@@ -67,7 +67,7 @@ namespace Content.Client.GameObjects.Components.Power
{ {
state = LatheVisualState.Idle; state = LatheVisualState.Idle;
} }
sprite.LayerSetVisible(AutolatheVisualLayers.AnimationLayer, true);
switch (state) switch (state)
{ {
case LatheVisualState.Idle: case LatheVisualState.Idle:
@@ -76,8 +76,9 @@ namespace Content.Client.GameObjects.Components.Power
animPlayer.Stop(AnimationKey); animPlayer.Stop(AnimationKey);
} }
sprite.LayerSetState(AutolatheVisualLayers.Base, "autolathe"); sprite.LayerSetState(AutolatheVisualLayers.Base, "icon");
sprite.LayerSetState(AutolatheVisualLayers.BaseUnlit, "autolathe_unlit"); sprite.LayerSetState(AutolatheVisualLayers.BaseUnlit, "unlit");
sprite.LayerSetVisible(AutolatheVisualLayers.AnimationLayer, false);
break; break;
case LatheVisualState.Producing: case LatheVisualState.Producing:
if (!animPlayer.HasRunningAnimation(AnimationKey)) if (!animPlayer.HasRunningAnimation(AnimationKey))
@@ -125,7 +126,8 @@ namespace Content.Client.GameObjects.Components.Power
public enum AutolatheVisualLayers : byte public enum AutolatheVisualLayers : byte
{ {
Base, Base,
BaseUnlit BaseUnlit,
AnimationLayer
} }
} }
} }

View File

@@ -11,7 +11,7 @@ namespace Content.Client.GameObjects.Components.Power
[UsedImplicitly] [UsedImplicitly]
public class ProtolatheVisualizer : AppearanceVisualizer public class ProtolatheVisualizer : AppearanceVisualizer
{ {
private const string AnimationKey = "protolathe_animation"; private const string AnimationKey = "inserting_animation";
private Animation _buildingAnimation; private Animation _buildingAnimation;
private Animation _insertingMetalAnimation; private Animation _insertingMetalAnimation;
@@ -24,23 +24,28 @@ namespace Content.Client.GameObjects.Components.Power
{ {
base.LoadData(node); base.LoadData(node);
_buildingAnimation = PopulateAnimation("protolathe_building", 0.9f); _buildingAnimation = PopulateAnimation("building", "building_unlit", 0.8f);
_insertingMetalAnimation = PopulateAnimation("protolathe_metal", 0.9f); _insertingMetalAnimation = PopulateAnimation("inserting_metal", "inserting_unlit", 0.8f);
_insertingGlassAnimation = PopulateAnimation("protolathe_glass", 0.9f); _insertingGlassAnimation = PopulateAnimation("inserting_glass", "inserting_unlit", 0.8f);
_insertingGoldAnimation = PopulateAnimation("protolathe_gold", 0.9f); _insertingGoldAnimation = PopulateAnimation("inserting_gold", "inserting_unlit", 0.8f);
_insertingPlasmaAnimation = PopulateAnimation("protolathe_plasma", 0.9f); _insertingPlasmaAnimation = PopulateAnimation("inserting_plasma", "inserting_unlit", 0.8f);
_insertingPlasticAnimation = PopulateAnimation("protolathe_plastic", 0.9f); _insertingPlasticAnimation = PopulateAnimation("inserting_plastic", "inserting_unlit", 0.8f);
} }
private Animation PopulateAnimation(string sprite, float length) private Animation PopulateAnimation(string sprite, string spriteUnlit, float length)
{ {
var animation = new Animation {Length = TimeSpan.FromSeconds(length)}; var animation = new Animation { Length = TimeSpan.FromSeconds(length) };
var flick = new AnimationTrackSpriteFlick(); var flick = new AnimationTrackSpriteFlick();
animation.AnimationTracks.Add(flick); animation.AnimationTracks.Add(flick);
flick.LayerKey = ProtolatheVisualLayers.AnimationLayer; flick.LayerKey = ProtolatheVisualLayers.Base;
flick.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame(sprite, 0f)); flick.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame(sprite, 0f));
var flickUnlit = new AnimationTrackSpriteFlick();
animation.AnimationTracks.Add(flickUnlit);
flickUnlit.LayerKey = ProtolatheVisualLayers.BaseUnlit;
flickUnlit.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame(spriteUnlit, 0f));
return animation; return animation;
} }
@@ -71,8 +76,8 @@ namespace Content.Client.GameObjects.Components.Power
animPlayer.Stop(AnimationKey); animPlayer.Stop(AnimationKey);
} }
sprite.LayerSetState(ProtolatheVisualLayers.Base, "protolathe"); sprite.LayerSetState(ProtolatheVisualLayers.Base, "icon");
sprite.LayerSetState(ProtolatheVisualLayers.BaseUnlit, "protolathe_unlit"); sprite.LayerSetState(ProtolatheVisualLayers.BaseUnlit, "unlit");
sprite.LayerSetVisible(ProtolatheVisualLayers.AnimationLayer, false); sprite.LayerSetVisible(ProtolatheVisualLayers.AnimationLayer, false);
break; break;
case LatheVisualState.Producing: case LatheVisualState.Producing:

View File

@@ -44,13 +44,15 @@
- type: Sprite - type: Sprite
sprite: Constructible/Power/autolathe.rsi sprite: Constructible/Power/autolathe.rsi
layers: layers:
- state: autolathe - state: icon
map: ["enum.AutolatheVisualLayers.Base"] map: ["enum.AutolatheVisualLayers.Base"]
- state: autolathe_unlit - state: unlit
shader: unshaded shader: unshaded
map: ["enum.AutolatheVisualLayers.BaseUnlit"] map: ["enum.AutolatheVisualLayers.BaseUnlit"]
- state: autolathe_panel - state: icon
map: [ "enum.WiresVisualLayers.MaintenancePanel" ] map: ["enum.AutolatheVisualLayers.AnimationLayer"]
- state: panel
map: ["enum.WiresVisualLayers.MaintenancePanel"]
- type: Construction - type: Construction
graph: machine graph: machine
node: machine node: machine
@@ -106,15 +108,15 @@
- type: Sprite - type: Sprite
sprite: Constructible/Power/protolathe.rsi sprite: Constructible/Power/protolathe.rsi
layers: layers:
- state: protolathe - state: icon
map: ["enum.ProtolatheVisualLayers.Base"] map: ["enum.ProtolatheVisualLayers.Base"]
- state: protolathe_unlit - state: unlit
shader: unshaded shader: unshaded
map: ["enum.ProtolatheVisualLayers.BaseUnlit"] map: ["enum.ProtolatheVisualLayers.BaseUnlit"]
- state: protolathe - state: icon
map: ["enum.ProtolatheVisualLayers.AnimationLayer"] map: ["enum.ProtolatheVisualLayers.AnimationLayer"]
- state: protolathe_panel - state: panel
map: [ "enum.WiresVisualLayers.MaintenancePanel" ] map: ["enum.WiresVisualLayers.MaintenancePanel"]
- type: ResearchClient - type: ResearchClient
- type: Construction - type: Construction
graph: machine graph: machine

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 733 B

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,165 +1,158 @@
{ {
"version": 1, "version": 1,
"size": { "license": "CC-BY-SA-3.0",
"x": 32, "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c6e3401f2e7e1e55c57060cdf956a98ef1fefc24",
"y": 32 "size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
}, },
"states": [ {
{ "name": "panel"
"name": "autolathe", },
{
}, "name": "unlit"
{ },
"name": "autolathe_unlit", {
"name": "building",
}, "delays": [
{ [
"name": "autolathe_building", 0.5,
"delays": [ 0.5,
[ 0.5,
0.055, 0.5,
0.055, 0.5,
0.055, 0.5,
0.055, 0.5,
0.055, 0.5,
0.055, 0.5
0.055, ]
0.055, ]
0.055 },
] {
] "name": "building_unlit",
}, "delays": [
{ [
"name": "autolathe_building_unlit", 0.5,
"delays": [ 0.5,
[ 0.5,
0.055, 0.5,
0.055, 0.5,
0.055, 0.5,
0.055, 0.5,
0.055, 0.5,
0.055, 0.5
0.055, ]
0.055, ]
0.055 },
] {
] "name": "inserting_unlit",
}, "delays": [
{ [
"name": "autolathe_inserting_metal_plate", 0.5,
"delays": [ 0.5,
[ 0.5,
0.1, 0.5,
0.1, 0.5,
0.1, 0.5,
0.1, 0.5,
0.1, 0.5,
0.1, 0.5
0.1, ]
0.1, ]
0.1 },
] {
] "name": "inserting_glass",
}, "delays": [
{ [
"name": "autolathe_inserting_glass_plate", 0.5,
"delays": [ 0.5,
[ 0.5,
0.1, 0.5,
0.1, 0.5,
0.1, 0.5,
0.1, 0.5,
0.1, 0.5
0.1, ]
0.1, ]
0.1, },
0.1 {
] "name": "inserting_gold",
] "delays": [
}, [
{ 0.5,
"name": "autolathe_inserting_phoron_sheet", 0.5,
"delays": [ 0.5,
[ 0.5,
0.1, 0.5,
0.1, 0.5,
0.1, 0.5,
0.1, 0.5
0.1, ]
0.1, ]
0.1, },
0.1, {
0.1 "name": "inserting_metal",
] "delays": [
] [
}, 0.5,
{ 0.5,
"name": "autolathe_inserting_plasma_sheet", 0.5,
"delays": [ 0.5,
[ 0.5,
0.1, 0.5,
0.1, 0.5,
0.1, 0.5
0.1, ]
0.1, ]
0.1, },
0.1, {
0.1, "name": "inserting_phoron",
0.1 "delays": [
] [
] 0.5,
}, 0.5,
{ 0.5,
"name": "autolathe_inserting_gold_plate", 0.5,
"delays": [ 0.5,
[ 0.5,
0.1, 0.5,
0.1, 0.5
0.1, ]
0.1, ]
0.1, },
0.1, {
0.1, "name": "inserting_plasma",
0.1, "delays": [
0.1 [
] 0.5,
] 0.5,
}, 0.5,
{ 0.5,
"name": "autolathe_inserting_plastic_sheet", 0.5,
"delays": [ 0.5,
[ 0.5,
0.1, 0.5
0.1, ]
0.1, ]
0.1, },
0.1, {
0.1, "name": "inserting_plastic",
0.1, "delays": [
0.1, [
0.1 0.5,
] 0.5,
] 0.5,
}, 0.5,
{ 0.5,
"name": "autolathe_inserting_unlit", 0.5,
"delays": [ 0.5,
[ 0.5
0.1, ]
0.1, ]
0.1, }
0.1, ]
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "autolathe_panel",
}
]
} }

View File

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 298 B

View File

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

View File

@@ -1,219 +1,241 @@
{ {
"version": 1, "version": 1,
"size": { "license": "CC-BY-SA-3.0",
"x": 32, "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c6e3401f2e7e1e55c57060cdf956a98ef1fefc24",
"y": 32 "size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
}, },
"license": "CC-BY-SA-3.0", {
"copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/master/icons/obj/machines/excelsior/autolathe.dmi at 40b254106b46981b8ad95ccd5589deb8fa56e765", "name": "panel"
"states": [ },
{ {
"name": "protolathe", "name": "unlit"
},
}, {
{ "name": "building",
"name": "protolathe_unlit", "delays": [
[
}, 0.8,
{ 0.8,
"name": "protolathe_adamantine", 0.8,
"delays": [ 0.8,
[ 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8
0.088 ]
] ]
] },
}, {
{ "name": "building_unlit",
"name": "protolathe_bananium", "delays": [
"delays": [ [
[ 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088 0.8,
] 0.8,
] 0.8,
}, 0.8
{ ]
"name": "protolathe_diamond", ]
"delays": [ },
[ {
0.088, "name": "inserting_unlit",
0.088, "delays": [
0.088, [
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088 0.8,
] 0.8,
] 0.8,
}, 0.8
{ ]
"name": "protolathe_glass", ]
"delays": [ },
[ {
0.088, "name": "inserting_glass",
0.088, "delays": [
0.088, [
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088 0.8,
] 0.8,
] 0.8
}, ]
{ ]
"name": "protolathe_gold", },
"delays": [ {
[ "name": "inserting_adamantine",
0.088, "delays": [
0.088, [
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088 0.8,
] 0.8
] ]
}, ]
{ },
"name": "protolathe_metal", {
"delays": [ "name": "inserting_bananium",
[ "delays": [
0.088, [
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088 0.8
] ]
] ]
}, },
{ {
"name": "protolathe_phoron", "name": "inserting_diamond",
"delays": [ "delays": [
[ [
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8
0.088 ]
] ]
] },
}, {
{ "name": "inserting_silver",
"name": "protolathe_plastic", "delays": [
"delays": [ [
[ 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8
0.088, ]
0.088 ]
] },
] {
}, "name": "inserting_uranium",
{ "delays": [
"name": "protolathe_building", [
"delays": [ 0.8,
[ 0.8,
0.05, 0.8,
0.05, 0.8,
0.05, 0.8,
0.05, 0.8,
0.05, 0.8,
0.05, 0.8
0.05, ]
0.05, ]
0.05, },
0.05, {
0.05, "name": "inserting_gold",
0.05, "delays": [
0.05 [
] 0.8,
] 0.8,
}, 0.8,
{ 0.8,
"name": "protolathe_silver", 0.8,
"delays": [ 0.8,
[ 0.8,
0.088, 0.8
0.088, ]
0.088, ]
0.088, },
0.088, {
0.088, "name": "inserting_metal",
0.088, "delays": [
0.088, [
0.088 0.8,
] 0.8,
] 0.8,
}, 0.8,
{ 0.8,
"name": "protolathe_solid plasma", 0.8,
"delays": [ 0.8,
[ 0.8
0.088, ]
0.088, ]
0.088, },
0.088, {
0.088, "name": "inserting_phoron",
0.088, "delays": [
0.088, [
0.088, 0.8,
0.088 0.8,
] 0.8,
] 0.8,
}, 0.8,
{ 0.8,
"name": "protolathe_panel", 0.8,
0.8
}, ]
{ ]
"name": "protolathe_uranium", },
"delays": [ {
[ "name": "inserting_plasma",
0.088, "delays": [
0.088, [
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088, 0.8,
0.088 0.8,
] 0.8
] ]
} ]
] },
{
"name": "inserting_plastic",
"delays": [
[
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
}
]
} }

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B