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

View File

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

View File

@@ -44,13 +44,15 @@
- type: Sprite
sprite: Constructible/Power/autolathe.rsi
layers:
- state: autolathe
- state: icon
map: ["enum.AutolatheVisualLayers.Base"]
- state: autolathe_unlit
- state: unlit
shader: unshaded
map: ["enum.AutolatheVisualLayers.BaseUnlit"]
- state: autolathe_panel
map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
- state: icon
map: ["enum.AutolatheVisualLayers.AnimationLayer"]
- state: panel
map: ["enum.WiresVisualLayers.MaintenancePanel"]
- type: Construction
graph: machine
node: machine
@@ -106,15 +108,15 @@
- type: Sprite
sprite: Constructible/Power/protolathe.rsi
layers:
- state: protolathe
- state: icon
map: ["enum.ProtolatheVisualLayers.Base"]
- state: protolathe_unlit
- state: unlit
shader: unshaded
map: ["enum.ProtolatheVisualLayers.BaseUnlit"]
- state: protolathe
- state: icon
map: ["enum.ProtolatheVisualLayers.AnimationLayer"]
- state: protolathe_panel
map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
- state: panel
map: ["enum.WiresVisualLayers.MaintenancePanel"]
- type: ResearchClient
- type: Construction
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,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c6e3401f2e7e1e55c57060cdf956a98ef1fefc24",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "autolathe",
"name": "icon"
},
{
"name": "autolathe_unlit",
"name": "panel"
},
{
"name": "autolathe_building",
"name": "unlit"
},
{
"name": "building",
"delays": [
[
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "autolathe_building_unlit",
"name": "building_unlit",
"delays": [
[
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "autolathe_inserting_metal_plate",
"name": "inserting_unlit",
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "autolathe_inserting_glass_plate",
"name": "inserting_glass",
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "autolathe_inserting_phoron_sheet",
"name": "inserting_gold",
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "autolathe_inserting_plasma_sheet",
"name": "inserting_metal",
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "autolathe_inserting_gold_plate",
"name": "inserting_phoron",
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "autolathe_inserting_plastic_sheet",
"name": "inserting_plasma",
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "autolathe_inserting_unlit",
"name": "inserting_plastic",
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5,
0.5
]
]
},
{
"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,217 +1,239 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c6e3401f2e7e1e55c57060cdf956a98ef1fefc24",
"size": {
"x": 32,
"y": 32
},
"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",
"states": [
{
"name": "protolathe",
"name": "icon"
},
{
"name": "protolathe_unlit",
"name": "panel"
},
{
"name": "protolathe_adamantine",
"name": "unlit"
},
{
"name": "building",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_bananium",
"name": "building_unlit",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_diamond",
"name": "inserting_unlit",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_glass",
"name": "inserting_glass",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_gold",
"name": "inserting_adamantine",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_metal",
"name": "inserting_bananium",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_phoron",
"name": "inserting_diamond",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_plastic",
"name": "inserting_silver",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_building",
"name": "inserting_uranium",
"delays": [
[
0.05,
0.05,
0.05,
0.05,
0.05,
0.05,
0.05,
0.05,
0.05,
0.05,
0.05,
0.05,
0.05
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_silver",
"name": "inserting_gold",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_solid plasma",
"name": "inserting_metal",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "protolathe_panel",
},
{
"name": "protolathe_uranium",
"name": "inserting_phoron",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
0.8
]
]
},
{
"name": "inserting_plasma",
"delays": [
[
0.8,
0.8,
0.8,
0.8,
0.8,
0.8,
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