Fix #4070, Visualizer Edition (#4730)

* Transform the Cloning Pod visualizer into a generic enum visualizer for simple cases like it

...I find it helpful at times like these to remind myself that our true enemy is
code. Code is what makes our programs run and generally is required for all of
these machinations to function in any way at all...

* Give the kitchen/meat spike a visualizer

* GenericEnumVisualizer: Byteify enums, switch to TryGetComponent for sprite
This commit is contained in:
20kdc
2021-10-03 00:43:47 +01:00
committed by GitHub
parent 67c4f49749
commit eb82dd3dae
7 changed files with 107 additions and 53 deletions

View File

@@ -10,7 +10,6 @@
sprite: Structures/Machines/cloning.rsi
layers:
- state: pod_0
map: ["enum.CloningPodVisualLayers.Machine"]
- type: Physics
bodyType: Static
fixtures:
@@ -44,7 +43,14 @@
LayoutId: CloningPod
- type: Appearance
visuals:
- type: CloningPodVisualizer
- type: GenericEnumVisualizer
key: enum.CloningPodVisuals.Status
layer: 0
states:
enum.CloningPodStatus.Cloning: pod_1
enum.CloningPodStatus.NoMind: pod_e
enum.CloningPodStatus.Gore: pod_g
enum.CloningPodStatus.Idle: pod_0
- type: UserInterface
interfaces:
- key: enum.CloningPodUIKey.Key

View File

@@ -32,3 +32,12 @@
- type: KitchenSpike
- type: Anchorable
- type: Pullable
- type: Appearance
visuals:
- type: GenericEnumVisualizer
key: enum.KitchenSpikeVisuals.Status
layer: 0
states:
enum.KitchenSpikeStatus.Empty: spike
enum.KitchenSpikeStatus.Bloody: spikebloody