#391 Done Lathe animations (#774)

* Draft PR, do not merge

* Lathe now uses animations. Timing is still wrong, code is very wet, repetitions and unused layers are there.

* Removed (unneeded?) PowerDeviceVisualizer from the lathe
Refactored & Renamed code and variables
Renamed animation names

* WIP protolathe animation

* Working protolathe animation.
I still don't like the solution though.
This commit is contained in:
Decappi
2020-03-15 17:55:20 +01:00
committed by GitHub
parent 020c74a9cb
commit a1357a1ff3
13 changed files with 325 additions and 47 deletions

View File

@@ -25,9 +25,10 @@
sprite: Buildings/autolathe.rsi
layers:
- state: autolathe
map: ["enum.AutolatheVisualLayers.Base"]
- state: autolathe_unlit
shader: unshaded
map: ["enum.PowerDeviceVisualLayers.Powered"]
map: ["enum.AutolatheVisualLayers.BaseUnlit"]
- type: Icon
sprite: Buildings/autolathe.rsi
state: autolathe
@@ -56,7 +57,7 @@
- Multitool
- type: Appearance
visuals:
- type: PowerDeviceVisualizer2D
- type: AutolatheVisualizer2D
- type: entity
parent: BaseLathe
@@ -67,9 +68,12 @@
sprite: Buildings/research.rsi
layers:
- state: protolathe
map: ["enum.ProtolatheVisualLayers.Base"]
- state: protolathe_unlit
shader: unshaded
map: ["enum.PowerDeviceVisualLayers.Powered"]
map: ["enum.ProtolatheVisualLayers.BaseUnlit"]
- state: protolathe
map: ["enum.ProtolatheVisualLayers.AnimationLayer"]
- type: Icon
sprite: Buildings/research.rsi
state: protolathe
@@ -104,4 +108,4 @@
type: ResearchClientBoundUserInterface
- type: Appearance
visuals:
- type: PowerDeviceVisualizer2D
- type: ProtolatheVisualizer2D

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -28,15 +28,15 @@
"directions": 1,
"delays": [
[
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055
]
]
},
@@ -45,20 +45,37 @@
"directions": 1,
"delays": [
[
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055,
0.055
]
]
},
{
"name": "autolathe_inserting",
"name": "autolathe_inserting_metal_plate",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "autolathe_inserting_glass_plate",
"directions": 1,
"delays": [
[
@@ -99,23 +116,6 @@
1.0
]
]
},
{
"name": "autolathe_r",
"directions": 1,
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
]
]
}
]
}
}

View File

@@ -259,7 +259,7 @@
]
},
{
"name": "protolathe_n",
"name": "protolathe_building",
"directions": 1,
"delays": [
[
@@ -314,7 +314,7 @@
]
},
{
"name": "protolathe_t",
"name": "protolathe_open",
"directions": 1,
"delays": [
[

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB